diff --git a/README.md b/README.md index 3fc28fefd..e8c94b3df 100644 --- a/README.md +++ b/README.md @@ -218,6 +218,37 @@ for more information about the `.boto` file. `user_domain` is required on some newer versions of OpenStack using Keystone V3 but is optional on older versions. `floating_ip_pool` and `region_name` can be optionally specified here to be used as a default if not specified on the command line. +### oraclecloud +`oraclecloud` uses the OCI SDK config file at the absolute path `$HOME/.oci/config` by default, and profile `DEFAULT`. +Use `--oraclecloud-config-file` and `--oraclecloud-profile` to override those values. +OCI API requests use the SDK's default retry policy for transient service and eventual-consistency failures. Mantle separately polls instance and image lifecycle state until each resource is ready. + +The Oracle platform also requires the target compartment, availability domain, subnet, and image: +``` +kola run -p oraclecloud \ + --oraclecloud-compartment-id= \ + --oraclecloud-availability-domain= \ + --oraclecloud-subnet-id= \ + --oraclecloud-image-id= +``` + +For CI runs with a local image, upload and import the image first: +``` +IMAGE_ID=$(ore oraclecloud \ + --oraclecloud-compartment-id= \ + create-image \ + --oraclecloud-bucket= \ + --board=-usr \ + --name= \ + --file=) + +kola run -p oraclecloud \ + --oraclecloud-compartment-id= \ + --oraclecloud-availability-domain= \ + --oraclecloud-subnet-id= \ + --oraclecloud-image-id="${IMAGE_ID}" +``` + ### packet `packet` uses `~/.config/packet.json`. This can be configured manually: ``` diff --git a/cmd/kola/kola.go b/cmd/kola/kola.go index b7f55935b..28306f25f 100644 --- a/cmd/kola/kola.go +++ b/cmd/kola/kola.go @@ -190,24 +190,32 @@ func writeProps() error { Image string `json:"image"` Flavor string `json:"flavor"` } + type OracleCloud struct { + AvailabilityDomain string `json:"availabilityDomain"` + ImageID string `json:"imageId"` + Shape string `json:"shape"` + OCPUs float32 `json:"ocpus"` + MemoryGB float32 `json:"memoryGb"` + } type QEMU struct { Image string `json:"image"` Mangled bool `json:"mangled"` } return enc.Encode(&struct { - Cmdline []string `json:"cmdline"` - Platform string `json:"platform"` - Distro string `json:"distro"` - IgnitionVersion string `json:"ignitionversion"` - Board string `json:"board"` - OSContainer string `json:"oscontainer"` - AWS AWS `json:"aws"` - Azure Azure `json:"azure"` - DO DO `json:"do"` - ESX ESX `json:"esx"` - GCE GCE `json:"gce"` - OpenStack OpenStack `json:"openstack"` - QEMU QEMU `json:"qemu"` + Cmdline []string `json:"cmdline"` + Platform string `json:"platform"` + Distro string `json:"distro"` + IgnitionVersion string `json:"ignitionversion"` + Board string `json:"board"` + OSContainer string `json:"oscontainer"` + AWS AWS `json:"aws"` + Azure Azure `json:"azure"` + DO DO `json:"do"` + ESX ESX `json:"esx"` + GCE GCE `json:"gce"` + OpenStack OpenStack `json:"openstack"` + OracleCloud OracleCloud `json:"oraclecloud"` + QEMU QEMU `json:"qemu"` }{ Cmdline: os.Args, Platform: kolaPlatform, @@ -251,6 +259,13 @@ func writeProps() error { Image: kola.OpenStackOptions.Image, Flavor: kola.OpenStackOptions.Flavor, }, + OracleCloud: OracleCloud{ + AvailabilityDomain: kola.OracleCloudOptions.AvailabilityDomain, + ImageID: kola.OracleCloudOptions.ImageID, + Shape: kola.OracleCloudOptions.Shape, + OCPUs: kola.OracleCloudOptions.OCPUs, + MemoryGB: kola.OracleCloudOptions.MemoryGB, + }, QEMU: QEMU{ Image: kola.QEMUOptions.DiskImage, Mangled: !kola.QEMUOptions.UseVanillaImage, diff --git a/cmd/kola/options.go b/cmd/kola/options.go index 7badf3e41..2bedd8c84 100644 --- a/cmd/kola/options.go +++ b/cmd/kola/options.go @@ -40,8 +40,8 @@ var ( kolaImageVersion string // ${VERSION_ID} or ${VERSION_ID}+${BUILD_ID} kolaDisableSELinuxAVCChecks bool defaultTargetBoard = sdk.DefaultBoard() - kolaArchitectures = []string{"amd64"} - kolaPlatforms = []string{"akamai", "aws", "azure", "brightbox", "do", "esx", "external", "gce", "hetzner", "openstack", "qemu", "qemu-unpriv", "scaleway", "stackit"} + kolaArchitectures = []string{"amd64", "arm64"} + kolaPlatforms = []string{"akamai", "aws", "azure", "brightbox", "do", "esx", "external", "gce", "hetzner", "openstack", "oraclecloud", "qemu", "qemu-unpriv", "scaleway", "stackit"} kolaDistros = []string{"cl", "fcos", "rhcos"} kolaChannels = []string{"alpha", "beta", "stable", "edge", "lts"} kolaOfferings = []string{"basic", "pro"} @@ -70,6 +70,7 @@ func init() { ss := root.PersistentFlags().StringSlice dv := root.PersistentFlags().DurationVar iv := root.PersistentFlags().IntVar + f32v := root.PersistentFlags().Float32Var // general options sv(&outputDir, "output-dir", "", "Temporary output directory for test data and logs") @@ -187,6 +188,22 @@ func init() { sv(&kola.OpenStackOptions.User, "openstack-user", "", "User is the one used for the SSH connection to the Host") sv(&kola.OpenStackOptions.Keyfile, "openstack-keyfile", "", "Keyfile is the absolute path to private SSH key file for the User on the Host") + // Oracle Cloud Infrastructure specific options + sv(&kola.OracleCloudOptions.Tenancy, "oraclecloud-tenancy", "", "Oracle Cloud tenancy") + sv(&kola.OracleCloudOptions.User, "oraclecloud-user", "", "Oracle Cloud user") + sv(&kola.OracleCloudOptions.Region, "oraclecloud-region", "", "Oracle Cloud region") + sv(&kola.OracleCloudOptions.PrivateKey, "oraclecloud-private-key", "", "Oracle Cloud private key") + sv(&kola.OracleCloudOptions.PrivateKeyPassphrase, "oraclecloud-private-key-passphrase", "", "Oracle Cloud private key passphrase") + sv(&kola.OracleCloudOptions.Fingerprint, "oraclecloud-fingerprint", "", "Oracle Cloud fingerprint") + + sv(&kola.OracleCloudOptions.CompartmentID, "oraclecloud-compartment-id", "", "Oracle Cloud Infrastructure compartment OCID") + sv(&kola.OracleCloudOptions.AvailabilityDomain, "oraclecloud-availability-domain", "", "Oracle Cloud Infrastructure availability domain") + sv(&kola.OracleCloudOptions.SubnetID, "oraclecloud-subnet-id", "", "Oracle Cloud Infrastructure subnet OCID") + sv(&kola.OracleCloudOptions.ImageID, "oraclecloud-image-id", "", "Oracle Cloud Infrastructure custom image OCID") + sv(&kola.OracleCloudOptions.Shape, "oraclecloud-shape", "", "Oracle Cloud Infrastructure instance shape (default depends on --board)") + f32v(&kola.OracleCloudOptions.OCPUs, "oraclecloud-ocpus", 2, "Oracle Cloud Infrastructure flexible shape OCPUs") + f32v(&kola.OracleCloudOptions.MemoryGB, "oraclecloud-memory-gb", 8, "Oracle Cloud Infrastructure flexible shape memory in GB") + // QEMU-specific options sv(&kola.QEMUOptions.Board, "board", defaultTargetBoard, "target board") sv(&kola.QEMUOptions.DiskImage, "qemu-image", "", "path to CoreOS disk image") @@ -254,8 +271,20 @@ func syncOptions() error { kola.ScalewayOptions.Board = board kola.HetznerOptions.Board = board kola.AkamaiOptions.Board = board + kola.OracleCloudOptions.Board = board kola.STACKITOptions.Board = board + if kola.OracleCloudOptions.Shape == "" { + switch board { + case "amd64-usr": + kola.OracleCloudOptions.Shape = "VM.Standard.E4.Flex" + case "arm64-usr": + kola.OracleCloudOptions.Shape = "VM.Standard.A1.Flex" + default: + return fmt.Errorf("unsupported Oracle Cloud board %q", board) + } + } + validateOption := func(name, item string, valid []string) error { for _, v := range valid { if v == item { @@ -342,6 +371,23 @@ func syncOptions() error { } } + if kolaPlatform == "oraclecloud" { + required := []struct { + name string + value string + }{ + {"oraclecloud-compartment-id", kola.OracleCloudOptions.CompartmentID}, + {"oraclecloud-availability-domain", kola.OracleCloudOptions.AvailabilityDomain}, + {"oraclecloud-subnet-id", kola.OracleCloudOptions.SubnetID}, + {"oraclecloud-image-id", kola.OracleCloudOptions.ImageID}, + } + for _, item := range required { + if item.value == "" { + return fmt.Errorf("--%s is required for --platform=oraclecloud", item.name) + } + } + } + return nil } diff --git a/cmd/ore/oraclecloud.go b/cmd/ore/oraclecloud.go new file mode 100644 index 000000000..e6534dcce --- /dev/null +++ b/cmd/ore/oraclecloud.go @@ -0,0 +1,10 @@ +// Copyright The Mantle Authors. +// SPDX-License-Identifier: Apache-2.0 + +package main + +import "github.com/flatcar/mantle/cmd/ore/oraclecloud" + +func init() { + root.AddCommand(oraclecloud.OracleCloud) +} diff --git a/cmd/ore/oraclecloud/create-image.go b/cmd/ore/oraclecloud/create-image.go new file mode 100644 index 000000000..a73704e67 --- /dev/null +++ b/cmd/ore/oraclecloud/create-image.go @@ -0,0 +1,66 @@ +// Copyright The Mantle Authors. +// SPDX-License-Identifier: Apache-2.0 + +package oraclecloud + +import ( + "fmt" + "path/filepath" + + "github.com/spf13/cobra" +) + +var ( + cmdCreateImage = &cobra.Command{ + Use: "create-image", + Short: "Create Oracle Cloud Infrastructure image", + Long: "Upload an image to Object Storage and import it as an OCI custom image", + RunE: runCreateImage, + Example: `IMAGE_ID=$(ore oraclecloud \ + --oraclecloud-compartment-id "${ORACLE_COMPARTMENT_ID}" \ + create-image \ + --oraclecloud-bucket "${ORACLE_BUCKET}" \ + --board "${CIA_ARCH}-usr" \ + --name "${kola_test_basename}" \ + --file "${ORACLE_IMAGE_NAME}")`, + } + + imageFile string + imageName string + imageBoard string + imageObjectName string + imageSourceImageType string +) + +func init() { + OracleCloud.AddCommand(cmdCreateImage) + cmdCreateImage.Flags().StringVar(&options.Namespace, "oraclecloud-namespace", "", "Oracle Cloud Infrastructure Object Storage namespace (default: auto-detect)") + cmdCreateImage.Flags().StringVar(&options.Bucket, "oraclecloud-bucket", "", "Oracle Cloud Infrastructure Object Storage bucket for image uploads") + cmdCreateImage.Flags().StringVar(&imageFile, "file", "flatcar_production_oraclecloud_image.qcow2", "path to local Flatcar image (.qcow2 or .vmdk)") + cmdCreateImage.Flags().StringVar(&imageName, "name", "flatcar-kola-test", "name of the image") + cmdCreateImage.Flags().StringVar(&imageBoard, "board", "amd64-usr", "board of the image") + cmdCreateImage.Flags().StringVar(&imageObjectName, "oraclecloud-object-name", "", "Object Storage object name to use for the upload (default: /)") + cmdCreateImage.Flags().StringVar(&imageSourceImageType, "source-image-type", "QCOW2", "image import source type: QCOW2 or VMDK") +} + +func runCreateImage(cmd *cobra.Command, args []string) error { + if options.CompartmentID == "" { + return fmt.Errorf("--oraclecloud-compartment-id is required") + } + if options.Bucket == "" { + return fmt.Errorf("--oraclecloud-bucket is required") + } + + objectName := imageObjectName + if objectName == "" { + objectName = fmt.Sprintf("%s/%s", imageBoard, filepath.Base(imageFile)) + } + + ID, err := api.UploadImage(cmd.Context(), imageName, imageFile, objectName, imageSourceImageType) + if err != nil { + return fmt.Errorf("creating Flatcar image: %w", err) + } + + fmt.Println(ID) + return nil +} diff --git a/cmd/ore/oraclecloud/gc.go b/cmd/ore/oraclecloud/gc.go new file mode 100644 index 000000000..50c57fc2d --- /dev/null +++ b/cmd/ore/oraclecloud/gc.go @@ -0,0 +1,39 @@ +// Copyright The Mantle Authors. +// SPDX-License-Identifier: Apache-2.0 + +package oraclecloud + +import ( + "fmt" + "time" + + "github.com/spf13/cobra" +) + +var ( + cmdGC = &cobra.Command{ + Use: "gc", + Short: "GC resources in Oracle Cloud Infrastructure", + Long: "Delete mantle-managed instances created over the given duration ago", + RunE: runGC, + } + + gcDuration time.Duration +) + +func init() { + OracleCloud.AddCommand(cmdGC) + cmdGC.Flags().DurationVar(&gcDuration, "duration", 5*time.Hour, "how old resources must be before they're considered garbage") +} + +func runGC(cmd *cobra.Command, args []string) error { + if options.CompartmentID == "" { + return fmt.Errorf("--oraclecloud-compartment-id is required") + } + + if err := api.GC(cmd.Context(), gcDuration); err != nil { + return fmt.Errorf("running garbage collection: %w", err) + } + + return nil +} diff --git a/cmd/ore/oraclecloud/oraclecloud.go b/cmd/ore/oraclecloud/oraclecloud.go new file mode 100644 index 000000000..32a72813b --- /dev/null +++ b/cmd/ore/oraclecloud/oraclecloud.go @@ -0,0 +1,51 @@ +// Copyright The Mantle Authors. +// SPDX-License-Identifier: Apache-2.0 + +package oraclecloud + +import ( + "fmt" + "os" + + "github.com/coreos/pkg/capnslog" + "github.com/flatcar/mantle/cli" + "github.com/flatcar/mantle/platform" + oraclecloudapi "github.com/flatcar/mantle/platform/api/oraclecloud" + "github.com/spf13/cobra" +) + +var ( + plog = capnslog.NewPackageLogger("github.com/flatcar/mantle", "ore/oraclecloud") + + OracleCloud = &cobra.Command{ + Use: "oraclecloud [command]", + Short: "Oracle Cloud Infrastructure utilities", + } + + api *oraclecloudapi.API + options oraclecloudapi.Options +) + +func init() { + cli.WrapPreRun(OracleCloud, preflightCheck) + OracleCloud.PersistentFlags().StringVar(&options.Tenancy, "oraclecloud-tenancy", "", "Oracle Cloud tenancy") + OracleCloud.PersistentFlags().StringVar(&options.User, "oraclecloud-user", "", "Oracle Cloud user") + OracleCloud.PersistentFlags().StringVar(&options.Region, "oraclecloud-region", "us-ashburn-1", "Oracle Cloud fingerprint") + OracleCloud.PersistentFlags().StringVar(&options.PrivateKey, "oraclecloud-private-key", "", "Oracle Cloud private key") + OracleCloud.PersistentFlags().StringVar(&options.PrivateKeyPassphrase, "oraclecloud-private-key-passphrase", "", "Oracle Cloud private key passphrase") + OracleCloud.PersistentFlags().StringVar(&options.Fingerprint, "oraclecloud-fingerprint", "", "Oracle Cloud fingerprint") + OracleCloud.PersistentFlags().StringVar(&options.CompartmentID, "oraclecloud-compartment-id", "", "Oracle Cloud Infrastructure compartment OCID") +} + +func preflightCheck(cmd *cobra.Command, args []string) error { + options.Options = &platform.Options{Board: imageBoard} + + a, err := oraclecloudapi.New(&options) + if err != nil { + fmt.Fprintf(os.Stderr, "could not create Oracle Cloud Infrastructure API client: %v\n", err) + os.Exit(1) + } + + api = a + return nil +} diff --git a/go.mod b/go.mod index d7c4141c4..d78d70183 100644 --- a/go.mod +++ b/go.mod @@ -35,6 +35,7 @@ require ( github.com/kballard/go-shellquote v0.0.0-20150810074751-d8ec1a69a250 github.com/kylelemons/godebug v1.1.0 github.com/linode/linodego v1.69.1 + github.com/oracle/oci-go-sdk/v65 v65.117.1 github.com/pborman/uuid v1.2.1 github.com/pin/tftp v2.1.0+incompatible github.com/scaleway/scaleway-sdk-go v1.0.0-beta.37 @@ -83,6 +84,7 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-resty/resty/v2 v2.17.2 // indirect github.com/goccy/go-json v0.10.2 // indirect + github.com/gofrs/flock v0.10.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.2 // indirect github.com/golang-jwt/jwt/v5 v5.3.1 // indirect @@ -115,7 +117,9 @@ require ( github.com/prometheus/common v0.66.1 // indirect github.com/prometheus/procfs v0.16.1 // indirect github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.24.1 // indirect + github.com/sony/gobreaker/v2 v2.4.0 // indirect github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect + github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect go.etcd.io/bbolt v1.3.9 // indirect go.etcd.io/etcd/api/v3 v3.5.13 // indirect go.etcd.io/etcd/client/v2 v2.305.13 // indirect diff --git a/go.sum b/go.sum index 0bdb45847..956505be1 100644 --- a/go.sum +++ b/go.sum @@ -151,6 +151,8 @@ github.com/go-resty/resty/v2 v2.17.2/go.mod h1:kCKZ3wWmwJaNc7S29BRtUhJwy7iqmn+2m github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20181025153459-66d97aec3384/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/gofrs/flock v0.10.0 h1:SHMXenfaB03KbroETaCMtbBg3Yn29v4w1r+tgy4ff4k= +github.com/gofrs/flock v0.10.0/go.mod h1:FirDy1Ing0mI2+kB6wk+vyyAH+e6xiE+EYA0jnzV9jc= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= @@ -281,6 +283,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/oracle/oci-go-sdk/v65 v65.117.1 h1:DurEtbj8xEuF2B6K73uifNqWJ4dh6CJPADVmNzclrGU= +github.com/oracle/oci-go-sdk/v65 v65.117.1/go.mod h1:oo33NDf2XPqx3/N6oLG4jFlrqJ0xu4Rlt9SfuAbtDFs= github.com/pborman/uuid v0.0.0-20170612153648-e790cca94e6c/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw= github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= @@ -313,6 +317,8 @@ github.com/sigma/bdoor v0.0.0-20160202064022-babf2a4017b0/go.mod h1:WBu7REWbxC/s github.com/sigma/vmw-guestinfo v0.0.0-20160204083807-95dd4126d6e8/go.mod h1:JrRFFC0veyh0cibh0DAhriSY7/gV3kDdNaVUOmfx01U= github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM= +github.com/sony/gobreaker/v2 v2.4.0 h1:g2KJRW1Ubty3+ZOcSEUN7K+REQJdN6yo6XvaML+jptg= +github.com/sony/gobreaker/v2 v2.4.0/go.mod h1:pTyFJgcZ3h2tdQVLZZruK2C0eoFL1fb/G83wK1ZQl+s= github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -327,6 +333,7 @@ github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.24.1/go.mod h github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -350,6 +357,8 @@ github.com/vmware/vmw-guestinfo v0.0.0-20170707015358-25eff159a728/go.mod h1:x9o github.com/vmware/vmw-ovflib v0.0.0-20170608004843-1f217b9dc714/go.mod h1:jiPk45kn7klhByRvUq5i2vo1RtHKBHj+iWGFpxbXuuI= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM= +github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= diff --git a/kola/harness.go b/kola/harness.go index ab83c2a57..3f1eadc24 100644 --- a/kola/harness.go +++ b/kola/harness.go @@ -48,6 +48,7 @@ import ( gcloudapi "github.com/flatcar/mantle/platform/api/gcloud" hetznerapi "github.com/flatcar/mantle/platform/api/hetzner" openstackapi "github.com/flatcar/mantle/platform/api/openstack" + oraclecloudapi "github.com/flatcar/mantle/platform/api/oraclecloud" scalewayapi "github.com/flatcar/mantle/platform/api/scaleway" stackitapi "github.com/flatcar/mantle/platform/api/stackit" "github.com/flatcar/mantle/platform/conf" @@ -61,6 +62,7 @@ import ( "github.com/flatcar/mantle/platform/machine/gcloud" "github.com/flatcar/mantle/platform/machine/hetzner" "github.com/flatcar/mantle/platform/machine/openstack" + "github.com/flatcar/mantle/platform/machine/oraclecloud" "github.com/flatcar/mantle/platform/machine/qemu" "github.com/flatcar/mantle/platform/machine/scaleway" "github.com/flatcar/mantle/platform/machine/unprivqemu" @@ -74,20 +76,21 @@ const ( var ( plog = capnslog.NewPackageLogger("github.com/flatcar/mantle", "kola") - Options = platform.Options{} - AkamaiOptions = akamaiapi.Options{Options: &Options} // glue to set platform options from main - AWSOptions = awsapi.Options{Options: &Options} // glue to set platform options from main - AzureOptions = azureapi.Options{Options: &Options} // glue to set platform options from main - BrightboxOptions = brightboxapi.Options{Options: &Options} // glue to set platform options from main - DOOptions = doapi.Options{Options: &Options} // glue to set platform options from main - ESXOptions = esxapi.Options{Options: &Options} // glue to set platform options from main - ExternalOptions = external.Options{Options: &Options} // glue to set platform options from main - GCEOptions = gcloudapi.Options{Options: &Options} // glue to set platform options from main - OpenStackOptions = openstackapi.Options{Options: &Options} // glue to set platform options from main - STACKITOptions = stackitapi.Options{Options: &Options} // glue to set platform options from main - QEMUOptions = qemu.Options{Options: &Options} // glue to set platform options from main - ScalewayOptions = scalewayapi.Options{Options: &Options} // glue to set platform options from main - HetznerOptions = hetznerapi.Options{Options: &Options} // glue to set platform options from main + Options = platform.Options{} + AkamaiOptions = akamaiapi.Options{Options: &Options} // glue to set platform options from main + AWSOptions = awsapi.Options{Options: &Options} // glue to set platform options from main + AzureOptions = azureapi.Options{Options: &Options} // glue to set platform options from main + BrightboxOptions = brightboxapi.Options{Options: &Options} // glue to set platform options from main + DOOptions = doapi.Options{Options: &Options} // glue to set platform options from main + ESXOptions = esxapi.Options{Options: &Options} // glue to set platform options from main + ExternalOptions = external.Options{Options: &Options} // glue to set platform options from main + GCEOptions = gcloudapi.Options{Options: &Options} // glue to set platform options from main + OpenStackOptions = openstackapi.Options{Options: &Options} // glue to set platform options from main + OracleCloudOptions = oraclecloudapi.Options{Options: &Options} // glue to set platform options from main + STACKITOptions = stackitapi.Options{Options: &Options} // glue to set platform options from main + QEMUOptions = qemu.Options{Options: &Options} // glue to set platform options from main + ScalewayOptions = scalewayapi.Options{Options: &Options} // glue to set platform options from main + HetznerOptions = hetznerapi.Options{Options: &Options} // glue to set platform options from main TestParallelism int //glue var to set test parallelism from main TAPFile string // if not "", write TAP results here @@ -266,6 +269,8 @@ func NewFlight(pltfrm string) (flight platform.Flight, err error) { flight, err = hetzner.NewFlight(&HetznerOptions) case "openstack": flight, err = openstack.NewFlight(&OpenStackOptions) + case "oraclecloud": + flight, err = oraclecloud.NewFlight(&OracleCloudOptions) case "stackit": flight, err = stackit.NewFlight(&STACKITOptions) case "qemu": @@ -691,6 +696,9 @@ func architecture(pltfrm string) string { if pltfrm == "hetzner" && HetznerOptions.Board != "" { nativeArch = boardToArch(HetznerOptions.Board) } + if pltfrm == "oraclecloud" && OracleCloudOptions.Board != "" { + nativeArch = boardToArch(OracleCloudOptions.Board) + } if pltfrm == "stackit" && STACKITOptions.Board != "" { nativeArch = boardToArch(STACKITOptions.Board) } diff --git a/kola/tests/misc/cloudinit.go b/kola/tests/misc/cloudinit.go index cb6ff82a5..1f4a17b77 100644 --- a/kola/tests/misc/cloudinit.go +++ b/kola/tests/misc/cloudinit.go @@ -158,7 +158,8 @@ write_files: Distros: []string{"cl"}, // Hetzner: we need to implement coreos-cloudinit support for Hetzner. // Akamai: we need to implement coreos-cloudinit support for Akamai. - ExcludePlatforms: []string{"qemu-unpriv", "hetzner", "akamai"}, + // Oraclecloud: we need to implement coreos-cloudinit support for Oraclecloud. + ExcludePlatforms: []string{"qemu-unpriv", "hetzner", "akamai", "oraclecloud"}, // This should run on all clouds }) register.Register(®ister.Test{ diff --git a/platform/api/oraclecloud/api.go b/platform/api/oraclecloud/api.go new file mode 100644 index 000000000..dbae8e61f --- /dev/null +++ b/platform/api/oraclecloud/api.go @@ -0,0 +1,680 @@ +// Copyright The Mantle Authors. +// SPDX-License-Identifier: Apache-2.0 + +package oraclecloud + +import ( + "context" + "encoding/base64" + "fmt" + "io" + "os" + "path/filepath" + "strings" + "time" + + "github.com/flatcar/mantle/platform" + "github.com/flatcar/mantle/util" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/core" + "github.com/oracle/oci-go-sdk/v65/objectstorage" +) + +var DefaultTags = map[string]string{ + "managed-by": "mantle", +} + +const ( + amd64Board = "amd64-usr" + arm64Board = "arm64-usr" + arm64Shape = "VM.Standard.A1.Flex" + globalSchemaName = "OCI.ComputeGlobalImageCapabilitySchema" +) + +// Options hold the specific Oracle Cloud Infrastructure options. +type Options struct { + *platform.Options + Tenancy string + User string + Fingerprint string + PrivateKey string + PrivateKeyPassphrase string + Region string + + CompartmentID string + AvailabilityDomain string + SubnetID string + ImageID string + Shape string + OCPUs float32 + MemoryGB float32 + Namespace string + Bucket string +} + +// API is a wrapper around Oracle Cloud Infrastructure clients. +type API struct { + opts *Options + compute core.ComputeClient + objectStorage objectstorage.ObjectStorageClient + virtualNetwork core.VirtualNetworkClient +} + +type Instance struct { + core.Instance + PublicIP string + PrivateIP string +} + +func New(opts *Options) (*API, error) { + var privateKeyPassphrase *string + if opts.PrivateKeyPassphrase != "" { + privateKeyPassphrase = &opts.PrivateKeyPassphrase + } + + provider := common.NewRawConfigurationProvider(opts.Tenancy, opts.User, opts.Region, opts.Fingerprint, opts.PrivateKey, privateKeyPassphrase) + + compute, err := core.NewComputeClientWithConfigurationProvider(provider) + if err != nil { + return nil, fmt.Errorf("creating compute client: %w", err) + } + + virtualNetwork, err := core.NewVirtualNetworkClientWithConfigurationProvider(provider) + if err != nil { + return nil, fmt.Errorf("creating virtual network client: %w", err) + } + objectStorage, err := objectstorage.NewObjectStorageClientWithConfigurationProvider(provider) + if err != nil { + return nil, fmt.Errorf("creating object storage client: %w", err) + } + + // DefaultRetryPolicy retries selected 409 responses, 429 responses, and + // most 5xx responses. It makes up to eight attempts using exponential + // backoff with jitter, capped at about 30 seconds per delay. It also handles + // eventual-consistency failures with up to nine attempts. See: + // https://pkg.go.dev/github.com/oracle/oci-go-sdk/v65/common#DefaultRetryPolicy + retryPolicy := common.DefaultRetryPolicy() + retryConfig := common.CustomClientConfiguration{ + RetryPolicy: &retryPolicy, + } + compute.SetCustomClientConfiguration(retryConfig) + virtualNetwork.SetCustomClientConfiguration(retryConfig) + objectStorage.SetCustomClientConfiguration(retryConfig) + + return &API{ + opts: opts, + compute: compute, + objectStorage: objectStorage, + virtualNetwork: virtualNetwork, + }, nil +} + +func (a *API) CreateInstance(ctx context.Context, name, userData, sshAuthorizedKeys string) (*Instance, error) { + encodedUserData := base64.StdEncoding.EncodeToString([]byte(userData)) + metadata := map[string]string{ + "user_data": encodedUserData, + } + if sshAuthorizedKeys != "" { + metadata["ssh_authorized_keys"] = sshAuthorizedKeys + } + shapeConfig := core.LaunchInstanceShapeConfigDetails{ + Ocpus: common.Float32(a.opts.OCPUs), + MemoryInGBs: common.Float32(a.opts.MemoryGB), + } + launchOptions, err := launchOptionsForBoard(a.opts.Board) + if err != nil { + return nil, err + } + + resp, err := a.compute.LaunchInstance(ctx, core.LaunchInstanceRequest{ + LaunchInstanceDetails: core.LaunchInstanceDetails{ + AvailabilityDomain: common.String(a.opts.AvailabilityDomain), + CompartmentId: common.String(a.opts.CompartmentID), + DisplayName: common.String(name), + FreeformTags: DefaultTags, + Metadata: metadata, + Shape: common.String(a.opts.Shape), + ShapeConfig: &shapeConfig, + LaunchOptions: launchOptions, + SourceDetails: core.InstanceSourceViaImageDetails{ + ImageId: common.String(a.opts.ImageID), + }, + CreateVnicDetails: &core.CreateVnicDetails{ + AssignPublicIp: common.Bool(true), + DisplayName: common.String(name), + FreeformTags: DefaultTags, + SubnetId: common.String(a.opts.SubnetID), + }, + }, + }) + if err != nil { + return nil, fmt.Errorf("launching instance: %w", err) + } + + instance, err := a.WaitForInstanceState(ctx, *resp.Instance.Id, core.InstanceLifecycleStateRunning) + if err != nil { + return nil, err + } + + vnic, err := a.PrimaryVNIC(ctx, *instance.Id) + if err != nil { + return nil, fmt.Errorf("getting primary vnic: %w", err) + } + + return &Instance{ + Instance: *instance, + PublicIP: stringValue(vnic.PublicIp), + PrivateIP: stringValue(vnic.PrivateIp), + }, nil +} + +func (a *API) WaitForInstanceState(ctx context.Context, instanceID string, state core.InstanceLifecycleStateEnum) (*core.Instance, error) { + var instance *core.Instance + var terminalErr error + err := util.Retry(60, 10*time.Second, func() error { + resp, err := a.compute.GetInstance(ctx, core.GetInstanceRequest{ + InstanceId: common.String(instanceID), + }) + if err != nil { + if ctx.Err() != nil { + terminalErr = ctx.Err() + return nil + } + return fmt.Errorf("getting instance %q: %w", instanceID, err) + } + + if resp.Instance.LifecycleState == state { + instance = &resp.Instance + return nil + } + + switch resp.Instance.LifecycleState { + case core.InstanceLifecycleStateTerminated, core.InstanceLifecycleStateTerminating: + terminalErr = fmt.Errorf("instance %q entered state %q while waiting for %q", instanceID, resp.Instance.LifecycleState, state) + return nil + } + + return fmt.Errorf("instance %q is in state %q, waiting for %q", instanceID, resp.Instance.LifecycleState, state) + }) + if terminalErr != nil { + return nil, terminalErr + } + if err != nil { + return nil, fmt.Errorf("waiting for instance %q to reach %q: %w", instanceID, state, err) + } + return instance, nil +} + +func (a *API) PrimaryVNIC(ctx context.Context, instanceID string) (*core.Vnic, error) { + attachments, err := a.compute.ListVnicAttachments(ctx, core.ListVnicAttachmentsRequest{ + CompartmentId: common.String(a.opts.CompartmentID), + InstanceId: common.String(instanceID), + }) + if err != nil { + return nil, fmt.Errorf("listing VNIC attachments for instance %q: %w", instanceID, err) + } + + for _, attachment := range attachments.Items { + if attachment.VnicId == nil { + continue + } + + resp, err := a.virtualNetwork.GetVnic(ctx, core.GetVnicRequest{ + VnicId: attachment.VnicId, + }) + if err != nil { + return nil, fmt.Errorf("getting VNIC %q: %w", *attachment.VnicId, err) + } + + if resp.Vnic.IsPrimary != nil && *resp.Vnic.IsPrimary { + return &resp.Vnic, nil + } + } + + return nil, fmt.Errorf("no primary VNIC found for instance %q", instanceID) +} + +func (a *API) TerminateInstance(ctx context.Context, instanceID string) error { + preserveBootVolume := false + _, err := a.compute.TerminateInstance(ctx, core.TerminateInstanceRequest{ + InstanceId: common.String(instanceID), + PreserveBootVolume: &preserveBootVolume, + }) + if err != nil { + return fmt.Errorf("terminating instance %q: %w", instanceID, err) + } + + return nil +} + +func (a *API) UploadImage(ctx context.Context, name, path, objectName, sourceImageType string) (string, error) { + if a.opts.CompartmentID == "" { + return "", fmt.Errorf("compartment ID is required") + } + if a.opts.Bucket == "" { + return "", fmt.Errorf("bucket is required") + } + board := a.opts.Board + if board == "" { + board = amd64Board + } + if err := validateBoard(board); err != nil { + return "", err + } + + namespace := a.opts.Namespace + if namespace == "" { + var err error + namespace, err = a.GetNamespace(ctx) + if err != nil { + return "", err + } + } + + f, err := os.Open(path) + if err != nil { + return "", fmt.Errorf("opening image %q: %w", path, err) + } + defer f.Close() + + st, err := f.Stat() + if err != nil { + return "", fmt.Errorf("stat image %q: %w", path, err) + } + + if objectName == "" { + objectName = filepath.Base(path) + } + + if err := a.UploadObject(ctx, namespace, a.opts.Bucket, objectName, f, st.Size()); err != nil { + return "", err + } + + imageID, err := a.CreateImageFromObject(ctx, name, namespace, a.opts.Bucket, objectName, sourceImageType) + if err != nil { + if deleteErr := a.DeleteObject(ctx, namespace, a.opts.Bucket, objectName); deleteErr != nil { + return "", fmt.Errorf("%w; additionally failed deleting uploaded object %q: %v", err, objectName, deleteErr) + } + return "", err + } + + if _, err := a.WaitForImageState(ctx, imageID, core.ImageLifecycleStateAvailable); err != nil { + return "", fmt.Errorf("waiting for image import %q: %w; uploaded object %q was left in bucket %q", imageID, err, objectName, a.opts.Bucket) + } + if err := a.ConfigureImageForBoard(ctx, imageID, board); err != nil { + return "", fmt.Errorf("configuring imported image %q for board %q: %w; uploaded object %q was left in bucket %q", imageID, board, err, objectName, a.opts.Bucket) + } + + if err := a.DeleteObject(ctx, namespace, a.opts.Bucket, objectName); err != nil { + return "", fmt.Errorf("deleting uploaded object %q: %w", objectName, err) + } + + return imageID, nil +} + +func launchOptionsForBoard(board string) (*core.LaunchOptions, error) { + switch board { + case "", amd64Board: + return nil, nil + case arm64Board: + return &core.LaunchOptions{ + BootVolumeType: core.LaunchOptionsBootVolumeTypeParavirtualized, + Firmware: core.LaunchOptionsFirmwareUefi64, + NetworkType: core.LaunchOptionsNetworkTypeParavirtualized, + RemoteDataVolumeType: core.LaunchOptionsRemoteDataVolumeTypeParavirtualized, + IsConsistentVolumeNamingEnabled: common.Bool(true), + }, nil + default: + return nil, fmt.Errorf("unsupported Oracle Cloud board %q", board) + } +} + +func validateBoard(board string) error { + switch board { + case amd64Board, arm64Board: + return nil + default: + return fmt.Errorf("unsupported Oracle Cloud board %q", board) + } +} + +// ConfigureImageForBoard applies image capabilities that OCI cannot infer +// from an imported ARM64 disk image. +func (a *API) ConfigureImageForBoard(ctx context.Context, imageID, board string) error { + if err := validateBoard(board); err != nil { + return err + } + if board == amd64Board { + return nil + } + + version, err := a.globalImageCapabilitySchemaVersion(ctx) + if err != nil { + return err + } + + resp, err := a.compute.CreateComputeImageCapabilitySchema(ctx, core.CreateComputeImageCapabilitySchemaRequest{ + CreateComputeImageCapabilitySchemaDetails: core.CreateComputeImageCapabilitySchemaDetails{ + CompartmentId: common.String(a.opts.CompartmentID), + ComputeGlobalImageCapabilitySchemaVersionName: common.String(version), + ImageId: common.String(imageID), + DisplayName: common.String("flatcar-arm64"), + FreeformTags: DefaultTags, + SchemaData: arm64ImageCapabilitySchemaData(), + }, + OpcRetryToken: common.String(common.RetryToken()), + }) + if err != nil { + return fmt.Errorf("creating image capability schema: %w", err) + } + if resp.ComputeImageCapabilitySchema.Id == nil { + return fmt.Errorf("created image capability schema response did not include an ID") + } + if err := a.waitForImageCapabilitySchema(ctx, *resp.ComputeImageCapabilitySchema.Id); err != nil { + return err + } + + _, err = a.compute.AddImageShapeCompatibilityEntry(ctx, core.AddImageShapeCompatibilityEntryRequest{ + ImageId: common.String(imageID), + ShapeName: common.String(arm64Shape), + AddImageShapeCompatibilityEntryDetails: core.AddImageShapeCompatibilityEntryDetails{}, + }) + if err != nil { + return fmt.Errorf("adding compatible shape %q: %w", arm64Shape, err) + } + return nil +} + +func arm64ImageCapabilitySchemaData() map[string]core.ImageCapabilitySchemaDescriptor { + return map[string]core.ImageCapabilitySchemaDescriptor{ + "Compute.Firmware": enumStringImageCapability("UEFI_64"), + "Compute.LaunchMode": enumStringImageCapability("PARAVIRTUALIZED"), + "Network.AttachmentType": enumStringImageCapability("PARAVIRTUALIZED"), + "Storage.BootVolumeType": enumStringImageCapability("PARAVIRTUALIZED"), + "Storage.RemoteDataVolumeType": enumStringImageCapability("PARAVIRTUALIZED"), + } +} + +func enumStringImageCapability(value string) core.EnumStringImageCapabilitySchemaDescriptor { + return core.EnumStringImageCapabilitySchemaDescriptor{ + Values: []string{value}, + DefaultValue: common.String(value), + Source: core.ImageCapabilitySchemaDescriptorSourceImage, + } +} + +func (a *API) globalImageCapabilitySchemaVersion(ctx context.Context) (string, error) { + var page *string + for { + resp, err := a.compute.ListComputeGlobalImageCapabilitySchemas(ctx, core.ListComputeGlobalImageCapabilitySchemasRequest{ + DisplayName: common.String(globalSchemaName), + Page: page, + }) + if err != nil { + return "", fmt.Errorf("listing global image capability schemas: %w", err) + } + for _, schema := range resp.Items { + if schema.DisplayName != nil && *schema.DisplayName == globalSchemaName && schema.CurrentVersionName != nil && *schema.CurrentVersionName != "" { + return *schema.CurrentVersionName, nil + } + } + if resp.OpcNextPage == nil { + break + } + page = resp.OpcNextPage + } + return "", fmt.Errorf("global image capability schema %q has no current version", globalSchemaName) +} + +func (a *API) waitForImageCapabilitySchema(ctx context.Context, schemaID string) error { + var terminalErr error + err := util.Retry(60, 10*time.Second, func() error { + resp, err := a.compute.GetComputeImageCapabilitySchema(ctx, core.GetComputeImageCapabilitySchemaRequest{ + ComputeImageCapabilitySchemaId: common.String(schemaID), + }) + if err != nil { + if ctx.Err() != nil { + terminalErr = ctx.Err() + return nil + } + return fmt.Errorf("getting image capability schema %q: %w", schemaID, err) + } + if resp.ComputeImageCapabilitySchema.LifecycleState == core.ComputeImageCapabilitySchemaLifecycleStateActive { + return nil + } + if resp.ComputeImageCapabilitySchema.LifecycleState == core.ComputeImageCapabilitySchemaLifecycleStateDeleted { + terminalErr = fmt.Errorf("image capability schema %q entered state %q", schemaID, resp.ComputeImageCapabilitySchema.LifecycleState) + return nil + } + return fmt.Errorf("image capability schema %q is in state %q, waiting for %q", schemaID, resp.ComputeImageCapabilitySchema.LifecycleState, core.ComputeImageCapabilitySchemaLifecycleStateActive) + }) + if terminalErr != nil { + return terminalErr + } + if err != nil { + return fmt.Errorf("waiting for image capability schema %q: %w", schemaID, err) + } + return nil +} + +func (a *API) GetNamespace(ctx context.Context) (string, error) { + resp, err := a.objectStorage.GetNamespace(ctx, objectstorage.GetNamespaceRequest{ + CompartmentId: common.String(a.opts.CompartmentID), + }) + if err != nil { + return "", fmt.Errorf("getting object storage namespace: %w", err) + } + if resp.Value == nil || *resp.Value == "" { + return "", fmt.Errorf("object storage namespace is empty") + } + return *resp.Value, nil +} + +func (a *API) UploadObject(ctx context.Context, namespace, bucket, objectName string, body io.ReadCloser, size int64) error { + _, err := a.objectStorage.PutObject(ctx, objectstorage.PutObjectRequest{ + NamespaceName: common.String(namespace), + BucketName: common.String(bucket), + ObjectName: common.String(objectName), + ContentLength: common.Int64(size), + PutObjectBody: body, + ContentType: common.String("application/octet-stream"), + }) + if err != nil { + return fmt.Errorf("uploading object %q to bucket %q: %w", objectName, bucket, err) + } + return nil +} + +func (a *API) DeleteObject(ctx context.Context, namespace, bucket, objectName string) error { + _, err := a.objectStorage.DeleteObject(ctx, objectstorage.DeleteObjectRequest{ + NamespaceName: common.String(namespace), + BucketName: common.String(bucket), + ObjectName: common.String(objectName), + }) + if err != nil { + return fmt.Errorf("deleting object %q from bucket %q: %w", objectName, bucket, err) + } + return nil +} + +func (a *API) CreateImageFromObject(ctx context.Context, name, namespace, bucket, objectName, sourceImageType string) (string, error) { + sourceType, err := parseSourceImageType(sourceImageType) + if err != nil { + return "", err + } + + resp, err := a.compute.CreateImage(ctx, core.CreateImageRequest{ + CreateImageDetails: core.CreateImageDetails{ + CompartmentId: common.String(a.opts.CompartmentID), + DisplayName: common.String(name), + FreeformTags: DefaultTags, + ImageSourceDetails: core.ImageSourceViaObjectStorageTupleDetails{ + BucketName: common.String(bucket), + NamespaceName: common.String(namespace), + ObjectName: common.String(objectName), + OperatingSystem: common.String("Flatcar"), + OperatingSystemVersion: common.String("Container Linux"), + SourceImageType: sourceType, + }, + LaunchMode: core.CreateImageDetailsLaunchModeParavirtualized, + }, + }) + if err != nil { + return "", fmt.Errorf("creating image from object %q: %w", objectName, err) + } + if resp.Image.Id == nil { + return "", fmt.Errorf("created image response did not include an image ID") + } + return *resp.Image.Id, nil +} + +func (a *API) WaitForImageState(ctx context.Context, imageID string, state core.ImageLifecycleStateEnum) (*core.Image, error) { + var image *core.Image + var terminalErr error + err := util.Retry(240, 30*time.Second, func() error { + resp, err := a.compute.GetImage(ctx, core.GetImageRequest{ + ImageId: common.String(imageID), + }) + if err != nil { + if ctx.Err() != nil { + terminalErr = ctx.Err() + return nil + } + return fmt.Errorf("getting image %q: %w", imageID, err) + } + + if resp.Image.LifecycleState == state { + image = &resp.Image + return nil + } + + switch resp.Image.LifecycleState { + case core.ImageLifecycleStateDeleted, core.ImageLifecycleStateDisabled: + terminalErr = fmt.Errorf("image %q entered state %q while waiting for %q", imageID, resp.Image.LifecycleState, state) + return nil + } + + return fmt.Errorf("image %q is in state %q, waiting for %q", imageID, resp.Image.LifecycleState, state) + }) + if terminalErr != nil { + return nil, terminalErr + } + if err != nil { + return nil, fmt.Errorf("waiting for image %q to reach %q: %w", imageID, state, err) + } + return image, nil +} + +func (a *API) GC(ctx context.Context, gracePeriod time.Duration) error { + createdCutoff := time.Now().Add(-gracePeriod) + + if err := a.gcImages(ctx, createdCutoff); err != nil { + return fmt.Errorf("failed to gc images: %w", err) + } + + if err := a.gcInstances(ctx, createdCutoff); err != nil { + return fmt.Errorf("failed to gc instances: %w", err) + } + + return nil +} + +func (a *API) gcInstances(ctx context.Context, createdCutoff time.Time) error { + + var page *string + for { + resp, err := a.compute.ListInstances(ctx, core.ListInstancesRequest{ + CompartmentId: common.String(a.opts.CompartmentID), + Page: page, + }) + if err != nil { + return fmt.Errorf("listing instances: %w", err) + } + + for _, instance := range resp.Items { + if instance.LifecycleState == core.InstanceLifecycleStateTerminated || instance.LifecycleState == core.InstanceLifecycleStateTerminating { + continue + } + if instance.FreeformTags["managed-by"] != "mantle" { + continue + } + if instance.TimeCreated == nil || instance.TimeCreated.After(createdCutoff) { + continue + } + if instance.Id == nil { + continue + } + + if err := a.TerminateInstance(ctx, *instance.Id); err != nil { + return fmt.Errorf("terminating instance %q: %w", *instance.Id, err) + } + } + + if resp.OpcNextPage == nil { + break + } + page = resp.OpcNextPage + } + + return nil +} + +func (a *API) gcImages(ctx context.Context, createdCutoff time.Time) error { + var page *string + for { + resp, err := a.compute.ListImages(ctx, core.ListImagesRequest{ + CompartmentId: common.String(a.opts.CompartmentID), + Page: page, + }) + if err != nil { + return fmt.Errorf("listing images: %w", err) + } + + for _, image := range resp.Items { + if image.LifecycleState == core.ImageLifecycleStateDeleted { + continue + } + if image.FreeformTags["managed-by"] != "mantle" { + continue + } + if image.TimeCreated == nil || image.TimeCreated.After(createdCutoff) { + continue + } + if image.Id == nil { + continue + } + + _, err := a.compute.DeleteImage(ctx, core.DeleteImageRequest{ + ImageId: image.Id, + }) + if err != nil { + return fmt.Errorf("deleting image %q: %w", *image.Id, err) + } + } + + if resp.OpcNextPage == nil { + break + } + page = resp.OpcNextPage + } + + return nil +} + +func parseSourceImageType(sourceImageType string) (core.ImageSourceDetailsSourceImageTypeEnum, error) { + switch strings.ToUpper(sourceImageType) { + case "", "QCOW2": + return core.ImageSourceDetailsSourceImageTypeQcow2, nil + case "VMDK": + return core.ImageSourceDetailsSourceImageTypeVmdk, nil + default: + return "", fmt.Errorf("unsupported source image type %q", sourceImageType) + } +} + +func stringValue(s *string) string { + if s == nil { + return "" + } + return *s +} diff --git a/platform/api/oraclecloud/api_test.go b/platform/api/oraclecloud/api_test.go new file mode 100644 index 000000000..92bb8c1b0 --- /dev/null +++ b/platform/api/oraclecloud/api_test.go @@ -0,0 +1,111 @@ +// Copyright The Mantle Authors. +// SPDX-License-Identifier: Apache-2.0 + +package oraclecloud + +import ( + "testing" + + "github.com/oracle/oci-go-sdk/v65/core" +) + +func TestLaunchOptionsForBoard(t *testing.T) { + tests := []struct { + name string + board string + firmware core.LaunchOptionsFirmwareEnum + wantNil bool + wantErr bool + }{ + {name: "empty preserves defaults", wantNil: true}, + {name: "amd64 preserves defaults", board: amd64Board, wantNil: true}, + {name: "arm64 uses UEFI", board: arm64Board, firmware: core.LaunchOptionsFirmwareUefi64}, + {name: "unknown board", board: "riscv64-usr", wantErr: true}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + options, err := launchOptionsForBoard(tt.board) + if (err != nil) != tt.wantErr { + t.Fatalf("launchOptionsForBoard() error = %v, wantErr %v", err, tt.wantErr) + } + if tt.wantErr { + return + } + if tt.wantNil { + if options != nil { + t.Fatalf("launchOptionsForBoard() = %#v, want nil", options) + } + return + } + if options == nil { + t.Fatal("launchOptionsForBoard() returned nil") + } + if options.Firmware != tt.firmware { + t.Errorf("Firmware = %q, want %q", options.Firmware, tt.firmware) + } + if options.BootVolumeType != core.LaunchOptionsBootVolumeTypeParavirtualized { + t.Errorf("BootVolumeType = %q, want PARAVIRTUALIZED", options.BootVolumeType) + } + if options.NetworkType != core.LaunchOptionsNetworkTypeParavirtualized { + t.Errorf("NetworkType = %q, want PARAVIRTUALIZED", options.NetworkType) + } + if options.RemoteDataVolumeType != core.LaunchOptionsRemoteDataVolumeTypeParavirtualized { + t.Errorf("RemoteDataVolumeType = %q, want PARAVIRTUALIZED", options.RemoteDataVolumeType) + } + if options.IsConsistentVolumeNamingEnabled == nil || !*options.IsConsistentVolumeNamingEnabled { + t.Error("IsConsistentVolumeNamingEnabled is not true") + } + if options.IsPvEncryptionInTransitEnabled != nil { + t.Error("IsPvEncryptionInTransitEnabled must not be overridden") + } + }) + } +} + +func TestArm64ImageCapabilitySchemaData(t *testing.T) { + want := map[string]string{ + "Compute.Firmware": "UEFI_64", + "Compute.LaunchMode": "PARAVIRTUALIZED", + "Network.AttachmentType": "PARAVIRTUALIZED", + "Storage.BootVolumeType": "PARAVIRTUALIZED", + "Storage.RemoteDataVolumeType": "PARAVIRTUALIZED", + } + + data := arm64ImageCapabilitySchemaData() + if len(data) != len(want) { + t.Fatalf("schema has %d entries, want %d", len(data), len(want)) + } + for name, value := range want { + descriptor, ok := data[name] + if !ok { + t.Errorf("schema is missing %q", name) + continue + } + enum, ok := descriptor.(core.EnumStringImageCapabilitySchemaDescriptor) + if !ok { + t.Errorf("schema %q has type %T, want EnumStringImageCapabilitySchemaDescriptor", name, descriptor) + continue + } + if enum.Source != core.ImageCapabilitySchemaDescriptorSourceImage { + t.Errorf("schema %q source = %q, want IMAGE", name, enum.Source) + } + if enum.DefaultValue == nil || *enum.DefaultValue != value { + t.Errorf("schema %q default = %v, want %q", name, enum.DefaultValue, value) + } + if len(enum.Values) != 1 || enum.Values[0] != value { + t.Errorf("schema %q values = %v, want [%q]", name, enum.Values, value) + } + } +} + +func TestValidateBoard(t *testing.T) { + for _, board := range []string{amd64Board, arm64Board} { + if err := validateBoard(board); err != nil { + t.Errorf("validateBoard(%q) returned %v", board, err) + } + } + if err := validateBoard("riscv64-usr"); err == nil { + t.Error("validateBoard() accepted unsupported board") + } +} diff --git a/platform/machine/oraclecloud/cluster.go b/platform/machine/oraclecloud/cluster.go new file mode 100644 index 000000000..e0e1b09ba --- /dev/null +++ b/platform/machine/oraclecloud/cluster.go @@ -0,0 +1,99 @@ +// Copyright The Mantle Authors. +// SPDX-License-Identifier: Apache-2.0 + +package oraclecloud + +import ( + "context" + "crypto/rand" + "fmt" + "os" + "path/filepath" + "strings" + + "github.com/flatcar/mantle/platform" + "github.com/flatcar/mantle/platform/conf" +) + +type cluster struct { + *platform.BaseCluster + flight *flight +} + +func (bc *cluster) NewMachine(userdata *conf.UserData) (platform.Machine, error) { + conf, err := bc.RenderUserData(userdata, map[string]string{ + "$public_ipv4": "${COREOS_CUSTOM_PUBLIC_IPV4}", + "$private_ipv4": "${COREOS_CUSTOM_PRIVATE_IPV4}", + }) + if err != nil { + return nil, err + } + + conf.AddSystemdUnitDropin("coreos-metadata.service", "00-custom-metadata.conf", `[Service] +ExecStartPost=/usr/bin/sh -c 'ip=$(ip -json -4 addr show $(ip -json route get 1 | jq -r '.[0].dev') | jq -r .[0].addr_info.[0].local); printf "COREOS_CUSTOM_PRIVATE_IPV4=%%s\nCOREOS_CUSTOM_PUBLIC_IPV4=%%s\n" "$ip" "$ip" >> /run/metadata/flatcar' +`) + + var sshAuthorizedKeys string + if !bc.RuntimeConf().NoSSHKeyInMetadata { + keys, err := bc.Keys() + if err != nil { + return nil, err + } + keyStrings := make([]string, 0, len(keys)) + for _, key := range keys { + keyStrings = append(keyStrings, key.String()) + } + sshAuthorizedKeys = strings.Join(keyStrings, "\n") + } + + instance, err := bc.flight.api.CreateInstance(context.TODO(), bc.vmname(), conf.String(), sshAuthorizedKeys) + if err != nil { + return nil, err + } + + mach := &machine{ + cluster: bc, + mach: instance, + } + + m := mach + defer func() { + if m != nil { + m.Destroy() + } + }() + + mach.dir = filepath.Join(bc.RuntimeConf().OutputDir, mach.ID()) + if err := os.Mkdir(mach.dir, 0777); err != nil { + return nil, err + } + + confPath := filepath.Join(mach.dir, "ignition.json") + if err := conf.WriteFile(confPath); err != nil { + return nil, err + } + + if mach.journal, err = platform.NewJournal(mach.dir); err != nil { + return nil, err + } + + if err := platform.StartMachine(mach, mach.journal); err != nil { + return nil, err + } + + m = nil + bc.AddMach(mach) + + return mach, nil +} + +func (bc *cluster) vmname() string { + b := make([]byte, 5) + rand.Read(b) + return fmt.Sprintf("%s-%x", bc.Name()[0:13], b) +} + +func (bc *cluster) Destroy() { + bc.BaseCluster.Destroy() + bc.flight.DelCluster(bc) +} diff --git a/platform/machine/oraclecloud/flight.go b/platform/machine/oraclecloud/flight.go new file mode 100644 index 000000000..061cee769 --- /dev/null +++ b/platform/machine/oraclecloud/flight.go @@ -0,0 +1,60 @@ +// Copyright The Mantle Authors. +// SPDX-License-Identifier: Apache-2.0 + +package oraclecloud + +import ( + "fmt" + + "github.com/coreos/pkg/capnslog" + ctplatform "github.com/flatcar/container-linux-config-transpiler/config/platform" + + "github.com/flatcar/mantle/platform" + "github.com/flatcar/mantle/platform/api/oraclecloud" +) + +const ( + Platform platform.Name = "oraclecloud" +) + +var ( + plog = capnslog.NewPackageLogger("github.com/flatcar/mantle", "platform/machine/oraclecloud") +) + +type flight struct { + *platform.BaseFlight + api *oraclecloud.API +} + +func NewFlight(opts *oraclecloud.Options) (platform.Flight, error) { + api, err := oraclecloud.New(opts) + if err != nil { + return nil, fmt.Errorf("creating oraclecloud API client: %w", err) + } + + base, err := platform.NewBaseFlight(opts.Options, Platform, ctplatform.Custom) + if err != nil { + return nil, fmt.Errorf("creating base flight: %w", err) + } + + return &flight{ + BaseFlight: base, + api: api, + }, nil +} + +func (bf *flight) NewCluster(rconf *platform.RuntimeConfig) (platform.Cluster, error) { + bc, err := platform.NewBaseCluster(bf.BaseFlight, rconf) + if err != nil { + return nil, fmt.Errorf("creating oraclecloud base cluster: %w", err) + } + + c := &cluster{ + BaseCluster: bc, + flight: bf, + } + + bf.AddCluster(c) + + return c, nil +} diff --git a/platform/machine/oraclecloud/machine.go b/platform/machine/oraclecloud/machine.go new file mode 100644 index 000000000..422e67c31 --- /dev/null +++ b/platform/machine/oraclecloud/machine.go @@ -0,0 +1,90 @@ +// Copyright The Mantle Authors. +// SPDX-License-Identifier: Apache-2.0 + +package oraclecloud + +import ( + "context" + + "golang.org/x/crypto/ssh" + + "github.com/flatcar/mantle/platform" + "github.com/flatcar/mantle/platform/api/oraclecloud" +) + +type machine struct { + cluster *cluster + mach *oraclecloud.Instance + dir string + journal *platform.Journal + console string +} + +func (om *machine) ID() string { + if om.mach.Id == nil { + return "" + } + return *om.mach.Id +} + +func (om *machine) IP() string { + return om.mach.PublicIP +} + +func (om *machine) PrivateIP() string { + return om.mach.PrivateIP +} + +func (om *machine) RuntimeConf() *platform.RuntimeConfig { + return om.cluster.RuntimeConf() +} + +func (om *machine) SSHClient() (*ssh.Client, error) { + return om.cluster.SSHClient(om.IP()) +} + +func (om *machine) PasswordSSHClient(user string, password string) (*ssh.Client, error) { + return om.cluster.PasswordSSHClient(om.IP(), user, password) +} + +func (om *machine) SSH(cmd string) ([]byte, []byte, error) { + return om.cluster.SSH(om, cmd) +} + +func (om *machine) Reboot() error { + return platform.RebootMachine(om, om.journal) +} + +func (om *machine) Destroy() { + if id := om.ID(); id != "" { + if err := om.cluster.flight.api.TerminateInstance(context.TODO(), id); err != nil { + plog.Errorf("terminating instance %v: %v", id, err) + } + } + + if om.journal != nil { + om.journal.Destroy() + } + + om.cluster.DelMach(om) +} + +func (om *machine) ConsoleOutput() string { + return om.console +} + +func (om *machine) JournalOutput() string { + if om.journal == nil { + return "" + } + + data, err := om.journal.Read() + if err != nil { + plog.Errorf("Reading journal for instance %v: %v", om.ID(), err) + } + return string(data) +} + +func (om *machine) Board() string { + return om.cluster.flight.Options().Board +} diff --git a/platforms.md b/platforms.md index ab4e54308..2ea5a6c5e 100644 --- a/platforms.md +++ b/platforms.md @@ -106,10 +106,25 @@ create images from the image file. ## OpenStack - - The OpenStack platform wraps [gophercloud](https://github.com/gophercloud/gophercloud). - - By default SSH keys will be passed via both the OpenStack metadata AND the userdata. - - UserData is passed to the instances via the OpenStack metadata service. - - Instances are tagged with `CreatedBy: mantle` which is used when filtering instances for `GC`. + - The OpenStack platform wraps [gophercloud](https://github.com/gophercloud/gophercloud). + - By default SSH keys will be passed via both the OpenStack metadata AND the userdata. + - UserData is passed to the instances via the OpenStack metadata service. + - Instances are tagged with `CreatedBy: mantle` which is used when filtering instances for `GC`. + +## Oracle Cloud Infrastructure + + - The Oracle platform wraps [oci-go-sdk](https://github.com/oracle/oci-go-sdk). + - OCI API requests use the SDK's default exponential-backoff retry policy for transient service and eventual-consistency failures. Mantle separately polls asynchronous instance and image lifecycle state. + - UserData is passed to instances via OCI instance metadata as base64-encoded `user_data`. + - Instances and VNICs are tagged with `managed-by: mantle`. + - `kola` requires `--oraclecloud-compartment-id`, `--oraclecloud-availability-domain`, `--oraclecloud-subnet-id`, and `--oraclecloud-image-id`. + - The default shape is `VM.Standard.E4.Flex` for `amd64-usr` and `VM.Standard.A1.Flex` for `arm64-usr`. ARM64 instances use UEFI firmware and paravirtualized boot, network, and remote volume devices. + - `ore oraclecloud create-image` uploads a local QCOW2 or VMDK image to Object Storage, imports it as an OCI custom image, waits for the image to become available, deletes the temporary object, and prints the image OCID. + - ARM64 image imports configure UEFI image capabilities and add `VM.Standard.A1.Flex` to the compatible shapes list. + - Configuring ARM64 image capabilities requires permission to manage Compute image capability schemas in the target compartment. + - Test success is reported by the `kola` harness, not by the machine journal. Check terminal output for `PASS, output in ...`, `/test.tap`, or `/reports/report.json`. + - Machine logs are collected under `//journal.txt` for diagnostics. + - `ore oraclecloud gc` deletes old mantle-managed custom images and terminates old mantle-managed instances in the configured compartment. ## Packet diff --git a/vendor/github.com/gofrs/flock/.gitignore b/vendor/github.com/gofrs/flock/.gitignore new file mode 100644 index 000000000..daf913b1b --- /dev/null +++ b/vendor/github.com/gofrs/flock/.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/gofrs/flock/.golangci.yml b/vendor/github.com/gofrs/flock/.golangci.yml new file mode 100644 index 000000000..3ad88a38f --- /dev/null +++ b/vendor/github.com/gofrs/flock/.golangci.yml @@ -0,0 +1,114 @@ +run: + timeout: 10m + +linters: + enable: + - asasalint + - bidichk + - dogsled + - dupword + - durationcheck + - err113 + - errname + - errorlint + - fatcontext + - forbidigo + - gocheckcompilerdirectives + - gochecknoinits + - gocritic + - godot + - godox + - gofumpt + - goheader + - goimports + - gomoddirectives + - goprintffuncname + - gosec + - inamedparam + - interfacebloat + - ireturn + - mirror + - misspell + - nolintlint + - revive + - stylecheck + - tenv + - testifylint + - thelper + - unconvert + - unparam + - usestdlibvars + - whitespace + +linters-settings: + misspell: + locale: US + godox: + keywords: + - FIXME + goheader: + template: |- + Copyright 2015 Tim Heckman. All rights reserved. + Copyright 2018-{{ YEAR }} The Gofrs. All rights reserved. + Use of this source code is governed by the BSD 3-Clause + license that can be found in the LICENSE file. + gofumpt: + extra-rules: true + gocritic: + enabled-tags: + - diagnostic + - style + - performance + disabled-checks: + - paramTypeCombine # already handle by gofumpt.extra-rules + - whyNoLint # already handle by nonolint + - unnamedResult + - hugeParam + - sloppyReassign + - rangeValCopy + - octalLiteral + - ptrToRefParam + - appendAssign + - ruleguard + - httpNoBody + - exposedSyncMutex + + revive: + rules: + - name: struct-tag + - name: blank-imports + - name: context-as-argument + - name: context-keys-type + - name: dot-imports + - name: error-return + - name: error-strings + - name: error-naming + - name: exported + - name: if-return + - name: increment-decrement + - name: var-naming + - name: var-declaration + - name: package-comments + - name: range + - name: receiver-naming + - name: time-naming + - name: unexported-return + - name: indent-error-flow + - name: errorf + - name: empty-block + - name: superfluous-else + - name: unused-parameter + - name: unreachable-code + - name: redefines-builtin-id + +issues: + exclude-use-default: true + max-issues-per-linter: 0 + max-same-issues: 0 + +output: + show-stats: true + sort-results: true + sort-order: + - linter + - file diff --git a/vendor/github.com/gofrs/flock/LICENSE b/vendor/github.com/gofrs/flock/LICENSE new file mode 100644 index 000000000..7de525bf0 --- /dev/null +++ b/vendor/github.com/gofrs/flock/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2018-2024, The Gofrs +Copyright (c) 2015-2020, Tim Heckman +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of gofrs nor the names of its contributors may be used + to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/gofrs/flock/Makefile b/vendor/github.com/gofrs/flock/Makefile new file mode 100644 index 000000000..65c139d68 --- /dev/null +++ b/vendor/github.com/gofrs/flock/Makefile @@ -0,0 +1,15 @@ +.PHONY: lint test test_race build_cross_os + +default: lint test build_cross_os + +test: + go test -v -cover ./... + +test_race: + CGO_ENABLED=1 go test -v -race ./... + +lint: + golangci-lint run + +build_cross_os: + ./build.sh diff --git a/vendor/github.com/gofrs/flock/README.md b/vendor/github.com/gofrs/flock/README.md new file mode 100644 index 000000000..a3479dba5 --- /dev/null +++ b/vendor/github.com/gofrs/flock/README.md @@ -0,0 +1,45 @@ +# flock + +[![Go Reference](https://pkg.go.dev/badge/github.com/gofrs/flock.svg)](https://pkg.go.dev/github.com/gofrs/flock) +[![License](https://img.shields.io/badge/license-BSD_3--Clause-brightgreen.svg?style=flat)](https://github.com/gofrs/flock/blob/master/LICENSE) +[![Go Report Card](https://goreportcard.com/badge/github.com/gofrs/flock)](https://goreportcard.com/report/github.com/gofrs/flock) + +`flock` implements a thread-safe file lock. + +It also includes a non-blocking `TryLock()` function to allow locking without blocking execution. + +## Installation + +```bash +go get -u github.com/gofrs/flock +``` + +## Usage + +```go +import "github.com/gofrs/flock" + +fileLock := flock.New("/var/lock/go-lock.lock") + +locked, err := fileLock.TryLock() + +if err != nil { + // handle locking error +} + +if locked { + // do work + fileLock.Unlock() +} +``` + +For more detailed usage information take a look at the package API docs on +[GoDoc](https://pkg.go.dev/github.com/gofrs/flock). + +## License + +`flock` is released under the BSD 3-Clause License. See the [`LICENSE`](./LICENSE) file for more details. + +## Project History + +This project was originally `github.com/theckman/go-flock`, it was transferred to Gofrs by the original author [Tim Heckman ](https://github.com/theckman). diff --git a/vendor/github.com/gofrs/flock/SECURITY.md b/vendor/github.com/gofrs/flock/SECURITY.md new file mode 100644 index 000000000..01419bd59 --- /dev/null +++ b/vendor/github.com/gofrs/flock/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Supported Versions + +We support the latest version of this library. +We do not guarantee support of previous versions. + +If a defect is reported, it will generally be fixed on the latest version (provided it exists) irrespective of whether it was introduced in a prior version. + +## Reporting a Vulnerability + +To report a potential security vulnerability, please create a [security advisory](https://github.com/gofrs/flock/security/advisories/new). + +For us to respond to your report most effectively, please include any of the following: + +- Steps to reproduce or a proof-of-concept +- Any relevant information, including the versions used + +## Security Scorecard + +This project submits security [results](https://scorecard.dev/viewer/?uri=github.com/gofrs/flock) to the [OpenSSF Scorecard](https://securityscorecards.dev/). diff --git a/vendor/github.com/gofrs/flock/build.sh b/vendor/github.com/gofrs/flock/build.sh new file mode 100644 index 000000000..34d3a9c90 --- /dev/null +++ b/vendor/github.com/gofrs/flock/build.sh @@ -0,0 +1,18 @@ +#!/bin/bash -e + +# Not supported by flock: +# - plan9/* +# - js/wasm +# - wasp1/wasm + +for row in $(go tool dist list -json | jq -r '.[] | select( .GOOS != "plan9" and .GOARCH != "wasm") | @base64'); do + _jq() { + echo ${row} | base64 --decode | jq -r ${1} + } + + GOOS=$(_jq '.GOOS') + GOARCH=$(_jq '.GOARCH') + + echo "$GOOS/$GOARCH" + GOOS=$GOOS GOARCH=$GOARCH go build +done diff --git a/vendor/github.com/gofrs/flock/flock.go b/vendor/github.com/gofrs/flock/flock.go new file mode 100644 index 000000000..97ba857c6 --- /dev/null +++ b/vendor/github.com/gofrs/flock/flock.go @@ -0,0 +1,146 @@ +// Copyright 2015 Tim Heckman. All rights reserved. +// Copyright 2018-2024 The Gofrs. All rights reserved. +// Use of this source code is governed by the BSD 3-Clause +// license that can be found in the LICENSE file. + +// Package flock implements a thread-safe interface for file locking. +// It also includes a non-blocking TryLock() function to allow locking +// without blocking execution. +// +// Package flock is released under the BSD 3-Clause License. See the LICENSE file +// for more details. +// +// While using this library, remember that the locking behaviors are not +// guaranteed to be the same on each platform. For example, some UNIX-like +// operating systems will transparently convert a shared lock to an exclusive +// lock. If you Unlock() the flock from a location where you believe that you +// have the shared lock, you may accidentally drop the exclusive lock. +package flock + +import ( + "context" + "os" + "runtime" + "sync" + "time" +) + +// Flock is the struct type to handle file locking. All fields are unexported, +// with access to some of the fields provided by getter methods (Path() and Locked()). +type Flock struct { + path string + m sync.RWMutex + fh *os.File + l bool + r bool +} + +// New returns a new instance of *Flock. The only parameter +// it takes is the path to the desired lockfile. +func New(path string) *Flock { + return &Flock{path: path} +} + +// NewFlock returns a new instance of *Flock. The only parameter +// it takes is the path to the desired lockfile. +// +// Deprecated: Use New instead. +func NewFlock(path string) *Flock { + return New(path) +} + +// Close is equivalent to calling Unlock. +// +// This will release the lock and close the underlying file descriptor. +// It will not remove the file from disk, that's up to your application. +func (f *Flock) Close() error { + return f.Unlock() +} + +// Path returns the path as provided in NewFlock(). +func (f *Flock) Path() string { + return f.path +} + +// Locked returns the lock state (locked: true, unlocked: false). +// +// Warning: by the time you use the returned value, the state may have changed. +func (f *Flock) Locked() bool { + f.m.RLock() + defer f.m.RUnlock() + return f.l +} + +// RLocked returns the read lock state (locked: true, unlocked: false). +// +// Warning: by the time you use the returned value, the state may have changed. +func (f *Flock) RLocked() bool { + f.m.RLock() + defer f.m.RUnlock() + return f.r +} + +func (f *Flock) String() string { + return f.path +} + +// TryLockContext repeatedly tries to take an exclusive lock until one of the +// conditions is met: TryLock succeeds, TryLock fails with error, or Context +// Done channel is closed. +func (f *Flock) TryLockContext(ctx context.Context, retryDelay time.Duration) (bool, error) { + return tryCtx(ctx, f.TryLock, retryDelay) +} + +// TryRLockContext repeatedly tries to take a shared lock until one of the +// conditions is met: TryRLock succeeds, TryRLock fails with error, or Context +// Done channel is closed. +func (f *Flock) TryRLockContext(ctx context.Context, retryDelay time.Duration) (bool, error) { + return tryCtx(ctx, f.TryRLock, retryDelay) +} + +func tryCtx(ctx context.Context, fn func() (bool, error), retryDelay time.Duration) (bool, error) { + if ctx.Err() != nil { + return false, ctx.Err() + } + for { + if ok, err := fn(); ok || err != nil { + return ok, err + } + select { + case <-ctx.Done(): + return false, ctx.Err() + case <-time.After(retryDelay): + // try again + } + } +} + +func (f *Flock) setFh() error { + // open a new os.File instance + // create it if it doesn't exist, and open the file read-only. + flags := os.O_CREATE + if runtime.GOOS == "aix" || runtime.GOOS == "solaris" || runtime.GOOS == "illumos" { + // AIX cannot preform write-lock (ie exclusive) on a + // read-only file. + flags |= os.O_RDWR + } else { + flags |= os.O_RDONLY + } + + fh, err := os.OpenFile(f.path, flags, os.FileMode(0o600)) + if err != nil { + return err + } + + // set the filehandle on the struct + f.fh = fh + return nil +} + +// ensure the file handle is closed if no lock is held. +func (f *Flock) ensureFhState() { + if !f.l && !f.r && f.fh != nil { + f.fh.Close() + f.fh = nil + } +} diff --git a/vendor/github.com/gofrs/flock/flock_unix.go b/vendor/github.com/gofrs/flock/flock_unix.go new file mode 100644 index 000000000..4fde9f039 --- /dev/null +++ b/vendor/github.com/gofrs/flock/flock_unix.go @@ -0,0 +1,202 @@ +// Copyright 2015 Tim Heckman. All rights reserved. +// Copyright 2018-2024 The Gofrs. All rights reserved. +// Use of this source code is governed by the BSD 3-Clause +// license that can be found in the LICENSE file. + +//go:build !aix && !solaris && !windows + +package flock + +import ( + "errors" + "os" + "syscall" +) + +// Lock is a blocking call to try and take an exclusive file lock. It will wait +// until it is able to obtain the exclusive file lock. It's recommended that +// TryLock() be used over this function. This function may block the ability to +// query the current Locked() or RLocked() status due to a RW-mutex lock. +// +// If we are already exclusive-locked, this function short-circuits and returns +// immediately assuming it can take the mutex lock. +// +// If the *Flock has a shared lock (RLock), this may transparently replace the +// shared lock with an exclusive lock on some UNIX-like operating systems. Be +// careful when using exclusive locks in conjunction with shared locks +// (RLock()), because calling Unlock() may accidentally release the exclusive +// lock that was once a shared lock. +func (f *Flock) Lock() error { + return f.lock(&f.l, syscall.LOCK_EX) +} + +// RLock is a blocking call to try and take a shared file lock. It will wait +// until it is able to obtain the shared file lock. It's recommended that +// TryRLock() be used over this function. This function may block the ability to +// query the current Locked() or RLocked() status due to a RW-mutex lock. +// +// If we are already shared-locked, this function short-circuits and returns +// immediately assuming it can take the mutex lock. +func (f *Flock) RLock() error { + return f.lock(&f.r, syscall.LOCK_SH) +} + +func (f *Flock) lock(locked *bool, flag int) error { + f.m.Lock() + defer f.m.Unlock() + + if *locked { + return nil + } + + if f.fh == nil { + if err := f.setFh(); err != nil { + return err + } + defer f.ensureFhState() + } + + if err := syscall.Flock(int(f.fh.Fd()), flag); err != nil { + shouldRetry, reopenErr := f.reopenFDOnError(err) + if reopenErr != nil { + return reopenErr + } + + if !shouldRetry { + return err + } + + if err = syscall.Flock(int(f.fh.Fd()), flag); err != nil { + return err + } + } + + *locked = true + return nil +} + +// Unlock is a function to unlock the file. This file takes a RW-mutex lock, so +// while it is running the Locked() and RLocked() functions will be blocked. +// +// This function short-circuits if we are unlocked already. If not, it calls +// syscall.LOCK_UN on the file and closes the file descriptor. It does not +// remove the file from disk. It's up to your application to do. +// +// Please note, if your shared lock became an exclusive lock this may +// unintentionally drop the exclusive lock if called by the consumer that +// believes they have a shared lock. Please see Lock() for more details. +func (f *Flock) Unlock() error { + f.m.Lock() + defer f.m.Unlock() + + // if we aren't locked or if the lockfile instance is nil + // just return a nil error because we are unlocked + if (!f.l && !f.r) || f.fh == nil { + return nil + } + + // mark the file as unlocked + if err := syscall.Flock(int(f.fh.Fd()), syscall.LOCK_UN); err != nil { + return err + } + + f.fh.Close() + + f.l = false + f.r = false + f.fh = nil + + return nil +} + +// TryLock is the preferred function for taking an exclusive file lock. This +// function takes an RW-mutex lock before it tries to lock the file, so there is +// the possibility that this function may block for a short time if another +// goroutine is trying to take any action. +// +// The actual file lock is non-blocking. If we are unable to get the exclusive +// file lock, the function will return false instead of waiting for the lock. If +// we get the lock, we also set the *Flock instance as being exclusive-locked. +func (f *Flock) TryLock() (bool, error) { + return f.try(&f.l, syscall.LOCK_EX) +} + +// TryRLock is the preferred function for taking a shared file lock. This +// function takes an RW-mutex lock before it tries to lock the file, so there is +// the possibility that this function may block for a short time if another +// goroutine is trying to take any action. +// +// The actual file lock is non-blocking. If we are unable to get the shared file +// lock, the function will return false instead of waiting for the lock. If we +// get the lock, we also set the *Flock instance as being share-locked. +func (f *Flock) TryRLock() (bool, error) { + return f.try(&f.r, syscall.LOCK_SH) +} + +func (f *Flock) try(locked *bool, flag int) (bool, error) { + f.m.Lock() + defer f.m.Unlock() + + if *locked { + return true, nil + } + + if f.fh == nil { + if err := f.setFh(); err != nil { + return false, err + } + defer f.ensureFhState() + } + + var retried bool +retry: + err := syscall.Flock(int(f.fh.Fd()), flag|syscall.LOCK_NB) + + switch err { + case syscall.EWOULDBLOCK: + return false, nil + case nil: + *locked = true + return true, nil + } + + if !retried { + if shouldRetry, reopenErr := f.reopenFDOnError(err); reopenErr != nil { + return false, reopenErr + } else if shouldRetry { + retried = true + goto retry + } + } + + return false, err +} + +// reopenFDOnError determines whether we should reopen the file handle +// in readwrite mode and try again. This comes from util-linux/sys-utils/flock.c: +// +// Since Linux 3.4 (commit 55725513) +// Probably NFSv4 where flock() is emulated by fcntl(). +func (f *Flock) reopenFDOnError(err error) (bool, error) { + if !errors.Is(err, syscall.EIO) && !errors.Is(err, syscall.EBADF) { + return false, nil + } + if st, err := f.fh.Stat(); err == nil { + // if the file is able to be read and written + if st.Mode()&0o600 == 0o600 { + f.fh.Close() + f.fh = nil + + // reopen in read-write mode and set the filehandle + fh, err := os.OpenFile(f.path, os.O_CREATE|os.O_RDWR, os.FileMode(0o600)) + if err != nil { + return false, err + } + f.fh = fh + + return true, nil + } + } + + return false, nil +} diff --git a/vendor/github.com/gofrs/flock/flock_unix_variants.go b/vendor/github.com/gofrs/flock/flock_unix_variants.go new file mode 100644 index 000000000..e485e16a1 --- /dev/null +++ b/vendor/github.com/gofrs/flock/flock_unix_variants.go @@ -0,0 +1,282 @@ +// Copyright 2015 Tim Heckman. All rights reserved. +// Copyright 2018-2024 The Gofrs. All rights reserved. +// Use of this source code is governed by the BSD 3-Clause +// license that can be found in the LICENSE file. + +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This code implements the filelock API using POSIX 'fcntl' locks, which attach +// to an (inode, process) pair rather than a file descriptor. To avoid unlocking +// files prematurely when the same file is opened through different descriptors, +// we allow only one read-lock at a time. +// +// This code is adapted from the Go package: +// cmd/go/internal/lockedfile/internal/filelock + +//go:build aix || solaris + +package flock + +import ( + "errors" + "io" + "os" + "sync" + "syscall" + + "golang.org/x/sys/unix" +) + +type lockType int16 + +const ( + readLock lockType = unix.F_RDLCK + writeLock lockType = unix.F_WRLCK +) + +type cmdType int + +const ( + tryLock cmdType = unix.F_SETLK + waitLock cmdType = unix.F_SETLKW +) + +type inode = uint64 + +type inodeLock struct { + owner *Flock + queue []<-chan *Flock +} + +var ( + mu sync.Mutex + inodes = map[*Flock]inode{} + locks = map[inode]inodeLock{} +) + +// Lock is a blocking call to try and take an exclusive file lock. It will wait +// until it is able to obtain the exclusive file lock. It's recommended that +// TryLock() be used over this function. This function may block the ability to +// query the current Locked() or RLocked() status due to a RW-mutex lock. +// +// If we are already exclusive-locked, this function short-circuits and returns +// immediately assuming it can take the mutex lock. +// +// If the *Flock has a shared lock (RLock), this may transparently replace the +// shared lock with an exclusive lock on some UNIX-like operating systems. Be +// careful when using exclusive locks in conjunction with shared locks +// (RLock()), because calling Unlock() may accidentally release the exclusive +// lock that was once a shared lock. +func (f *Flock) Lock() error { + return f.lock(&f.l, writeLock) +} + +// RLock is a blocking call to try and take a shared file lock. It will wait +// until it is able to obtain the shared file lock. It's recommended that +// TryRLock() be used over this function. This function may block the ability to +// query the current Locked() or RLocked() status due to a RW-mutex lock. +// +// If we are already shared-locked, this function short-circuits and returns +// immediately assuming it can take the mutex lock. +func (f *Flock) RLock() error { + return f.lock(&f.r, readLock) +} + +func (f *Flock) lock(locked *bool, flag lockType) error { + f.m.Lock() + defer f.m.Unlock() + + if *locked { + return nil + } + + if f.fh == nil { + if err := f.setFh(); err != nil { + return err + } + defer f.ensureFhState() + } + + if _, err := f.doLock(waitLock, flag, true); err != nil { + return err + } + + *locked = true + return nil +} + +func (f *Flock) doLock(cmd cmdType, lt lockType, blocking bool) (bool, error) { + // POSIX locks apply per inode and process, and the lock for an inode is + // released when *any* descriptor for that inode is closed. So we need to + // synchronize access to each inode internally, and must serialize lock and + // unlock calls that refer to the same inode through different descriptors. + fi, err := f.fh.Stat() + if err != nil { + return false, err + } + ino := inode(fi.Sys().(*syscall.Stat_t).Ino) + + mu.Lock() + if i, dup := inodes[f]; dup && i != ino { + mu.Unlock() + return false, &os.PathError{ + Path: f.Path(), + Err: errors.New("inode for file changed since last Lock or RLock"), + } + } + + inodes[f] = ino + + var wait chan *Flock + l := locks[ino] + if l.owner == f { + // This file already owns the lock, but the call may change its lock type. + } else if l.owner == nil { + // No owner: it's ours now. + l.owner = f + } else if !blocking { + // Already owned: cannot take the lock. + mu.Unlock() + return false, nil + } else { + // Already owned: add a channel to wait on. + wait = make(chan *Flock) + l.queue = append(l.queue, wait) + } + locks[ino] = l + mu.Unlock() + + if wait != nil { + wait <- f + } + + err = setlkw(f.fh.Fd(), cmd, lt) + if err != nil { + f.doUnlock() + if cmd == tryLock && err == unix.EACCES { + return false, nil + } + return false, err + } + + return true, nil +} + +func (f *Flock) Unlock() error { + f.m.Lock() + defer f.m.Unlock() + + // if we aren't locked or if the lockfile instance is nil + // just return a nil error because we are unlocked + if (!f.l && !f.r) || f.fh == nil { + return nil + } + + if err := f.doUnlock(); err != nil { + return err + } + + f.fh.Close() + + f.l = false + f.r = false + f.fh = nil + + return nil +} + +func (f *Flock) doUnlock() (err error) { + var owner *Flock + mu.Lock() + ino, ok := inodes[f] + if ok { + owner = locks[ino].owner + } + mu.Unlock() + + if owner == f { + err = setlkw(f.fh.Fd(), waitLock, unix.F_UNLCK) + } + + mu.Lock() + l := locks[ino] + if len(l.queue) == 0 { + // No waiters: remove the map entry. + delete(locks, ino) + } else { + // The first waiter is sending us their file now. + // Receive it and update the queue. + l.owner = <-l.queue[0] + l.queue = l.queue[1:] + locks[ino] = l + } + delete(inodes, f) + mu.Unlock() + + return err +} + +// TryLock is the preferred function for taking an exclusive file lock. This +// function takes an RW-mutex lock before it tries to lock the file, so there is +// the possibility that this function may block for a short time if another +// goroutine is trying to take any action. +// +// The actual file lock is non-blocking. If we are unable to get the exclusive +// file lock, the function will return false instead of waiting for the lock. If +// we get the lock, we also set the *Flock instance as being exclusive-locked. +func (f *Flock) TryLock() (bool, error) { + return f.try(&f.l, writeLock) +} + +// TryRLock is the preferred function for taking a shared file lock. This +// function takes an RW-mutex lock before it tries to lock the file, so there is +// the possibility that this function may block for a short time if another +// goroutine is trying to take any action. +// +// The actual file lock is non-blocking. If we are unable to get the shared file +// lock, the function will return false instead of waiting for the lock. If we +// get the lock, we also set the *Flock instance as being share-locked. +func (f *Flock) TryRLock() (bool, error) { + return f.try(&f.r, readLock) +} + +func (f *Flock) try(locked *bool, flag lockType) (bool, error) { + f.m.Lock() + defer f.m.Unlock() + + if *locked { + return true, nil + } + + if f.fh == nil { + if err := f.setFh(); err != nil { + return false, err + } + defer f.ensureFhState() + } + + haslock, err := f.doLock(tryLock, flag, false) + if err != nil { + return false, err + } + + *locked = haslock + return haslock, nil +} + +// setlkw calls FcntlFlock with cmd for the entire file indicated by fd. +func setlkw(fd uintptr, cmd cmdType, lt lockType) error { + for { + err := unix.FcntlFlock(fd, int(cmd), &unix.Flock_t{ + Type: int16(lt), + Whence: io.SeekStart, + Start: 0, + Len: 0, // All bytes. + }) + if err != unix.EINTR { + return err + } + } +} diff --git a/vendor/github.com/gofrs/flock/flock_winapi.go b/vendor/github.com/gofrs/flock/flock_winapi.go new file mode 100644 index 000000000..9e4df34b2 --- /dev/null +++ b/vendor/github.com/gofrs/flock/flock_winapi.go @@ -0,0 +1,75 @@ +// Copyright 2015 Tim Heckman. All rights reserved. +// Copyright 2018-2024 The Gofrs. All rights reserved. +// Use of this source code is governed by the BSD 3-Clause +// license that can be found in the LICENSE file. + +//go:build windows + +package flock + +import ( + "syscall" + "unsafe" +) + +var ( + kernel32, _ = syscall.LoadLibrary("kernel32.dll") + procLockFileEx, _ = syscall.GetProcAddress(kernel32, "LockFileEx") + procUnlockFileEx, _ = syscall.GetProcAddress(kernel32, "UnlockFileEx") +) + +const ( + winLockfileFailImmediately = 0x00000001 + winLockfileExclusiveLock = 0x00000002 + winLockfileSharedLock = 0x00000000 +) + +// Use of 0x00000000 for the shared lock is a guess based on some the MS Windows +// `LockFileEX` docs, which document the `LOCKFILE_EXCLUSIVE_LOCK` flag as: +// +// > The function requests an exclusive lock. Otherwise, it requests a shared +// > lock. +// +// https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203(v=vs.85).aspx + +//nolint:unparam +func lockFileEx(handle syscall.Handle, flags, reserved, numberOfBytesToLockLow, numberOfBytesToLockHigh uint32, offset *syscall.Overlapped) (bool, syscall.Errno) { + r1, _, errNo := syscall.SyscallN( + procLockFileEx, + uintptr(handle), + uintptr(flags), + uintptr(reserved), + uintptr(numberOfBytesToLockLow), + uintptr(numberOfBytesToLockHigh), + uintptr(unsafe.Pointer(offset))) + + if r1 != 1 { + if errNo == 0 { + return false, syscall.EINVAL + } + + return false, errNo + } + + return true, 0 +} + +func unlockFileEx(handle syscall.Handle, reserved, numberOfBytesToLockLow, numberOfBytesToLockHigh uint32, offset *syscall.Overlapped) (bool, syscall.Errno) { + r1, _, errNo := syscall.SyscallN( + procUnlockFileEx, + uintptr(handle), + uintptr(reserved), + uintptr(numberOfBytesToLockLow), + uintptr(numberOfBytesToLockHigh), + uintptr(unsafe.Pointer(offset))) + + if r1 != 1 { + if errNo == 0 { + return false, syscall.EINVAL + } + + return false, errNo + } + + return true, 0 +} diff --git a/vendor/github.com/gofrs/flock/flock_windows.go b/vendor/github.com/gofrs/flock/flock_windows.go new file mode 100644 index 000000000..1f0c96841 --- /dev/null +++ b/vendor/github.com/gofrs/flock/flock_windows.go @@ -0,0 +1,145 @@ +// Copyright 2015 Tim Heckman. All rights reserved. +// Copyright 2018-2024 The Gofrs. All rights reserved. +// Use of this source code is governed by the BSD 3-Clause +// license that can be found in the LICENSE file. + +package flock + +import ( + "syscall" +) + +// ErrorLockViolation is the error code returned from the Windows syscall when a +// lock would block, and you ask to fail immediately. +const ErrorLockViolation syscall.Errno = 0x21 // 33 + +// Lock is a blocking call to try and take an exclusive file lock. It will wait +// until it is able to obtain the exclusive file lock. It's recommended that +// TryLock() be used over this function. This function may block the ability to +// query the current Locked() or RLocked() status due to a RW-mutex lock. +// +// If we are already locked, this function short-circuits and returns +// immediately assuming it can take the mutex lock. +func (f *Flock) Lock() error { + return f.lock(&f.l, winLockfileExclusiveLock) +} + +// RLock is a blocking call to try and take a shared file lock. It will wait +// until it is able to obtain the shared file lock. It's recommended that +// TryRLock() be used over this function. This function may block the ability to +// query the current Locked() or RLocked() status due to a RW-mutex lock. +// +// If we are already locked, this function short-circuits and returns +// immediately assuming it can take the mutex lock. +func (f *Flock) RLock() error { + return f.lock(&f.r, winLockfileSharedLock) +} + +func (f *Flock) lock(locked *bool, flag uint32) error { + f.m.Lock() + defer f.m.Unlock() + + if *locked { + return nil + } + + if f.fh == nil { + if err := f.setFh(); err != nil { + return err + } + defer f.ensureFhState() + } + + _, errNo := lockFileEx(syscall.Handle(f.fh.Fd()), flag, 0, 1, 0, &syscall.Overlapped{}) + if errNo > 0 { + return errNo + } + + *locked = true + return nil +} + +// Unlock is a function to unlock the file. This file takes a RW-mutex lock, so +// while it is running the Locked() and RLocked() functions will be blocked. +// +// This function short-circuits if we are unlocked already. If not, it calls +// UnlockFileEx() on the file and closes the file descriptor. It does not remove +// the file from disk. It's up to your application to do. +func (f *Flock) Unlock() error { + f.m.Lock() + defer f.m.Unlock() + + // if we aren't locked or if the lockfile instance is nil + // just return a nil error because we are unlocked + if (!f.l && !f.r) || f.fh == nil { + return nil + } + + // mark the file as unlocked + _, errNo := unlockFileEx(syscall.Handle(f.fh.Fd()), 0, 1, 0, &syscall.Overlapped{}) + if errNo > 0 { + return errNo + } + + f.fh.Close() + + f.l = false + f.r = false + f.fh = nil + + return nil +} + +// TryLock is the preferred function for taking an exclusive file lock. This +// function does take a RW-mutex lock before it tries to lock the file, so there +// is the possibility that this function may block for a short time if another +// goroutine is trying to take any action. +// +// The actual file lock is non-blocking. If we are unable to get the exclusive +// file lock, the function will return false instead of waiting for the lock. If +// we get the lock, we also set the *Flock instance as being exclusive-locked. +func (f *Flock) TryLock() (bool, error) { + return f.try(&f.l, winLockfileExclusiveLock) +} + +// TryRLock is the preferred function for taking a shared file lock. This +// function does take a RW-mutex lock before it tries to lock the file, so there +// is the possibility that this function may block for a short time if another +// goroutine is trying to take any action. +// +// The actual file lock is non-blocking. If we are unable to get the shared file +// lock, the function will return false instead of waiting for the lock. If we +// get the lock, we also set the *Flock instance as being shared-locked. +func (f *Flock) TryRLock() (bool, error) { + return f.try(&f.r, winLockfileSharedLock) +} + +func (f *Flock) try(locked *bool, flag uint32) (bool, error) { + f.m.Lock() + defer f.m.Unlock() + + if *locked { + return true, nil + } + + if f.fh == nil { + if err := f.setFh(); err != nil { + return false, err + } + defer f.ensureFhState() + } + + _, errNo := lockFileEx(syscall.Handle(f.fh.Fd()), flag|winLockfileFailImmediately, 0, 1, 0, &syscall.Overlapped{}) + + if errNo > 0 { + if errNo == ErrorLockViolation || errNo == syscall.ERROR_IO_PENDING { + return false, nil + } + + return false, errNo + } + + *locked = true + + return true, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/LICENSE.txt b/vendor/github.com/oracle/oci-go-sdk/v65/LICENSE.txt new file mode 100644 index 000000000..fcc68fc59 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/LICENSE.txt @@ -0,0 +1,102 @@ +Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. +This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl +or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + ____________________________ +Copyright (c) 2016, 2026 Oracle and/or its affiliates. + +The Universal Permissive License (UPL), Version 1.0 + +Subject to the condition set forth below, permission is hereby granted to any +person obtaining a copy of this software, associated documentation and/or data +(collectively the "Software"), free of charge and under any and all copyright +rights in the Software, and any and all patent rights owned or freely +licensable by each licensor hereunder covering either (i) the unmodified +Software as contributed to or provided by such licensor, or (ii) the Larger +Works (as defined below), to deal in both + +(a) the Software, and +(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if +one is included with the Software (each a "Larger Work" to which the Software +is contributed by such licensors), + +without restriction, including without limitation the rights to copy, create +derivative works of, display, perform, and distribute the Software and make, +use, sell, offer for sale, import, export, have made, and have sold the +Software and the Larger Work(s), and to sublicense the foregoing rights on +either these or other terms. + +This license is subject to the following condition: +The above copyright notice and either this complete permission notice or at +a minimum a reference to the UPL must be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +The Apache Software License, Version 2.0 +Copyright (c) 2016, 2016, Oracle and/or its affiliates. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); You may not use this product except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. A copy of the license is also reproduced below. 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. + +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: +You must give any other recipients of the Work or Derivative Works a copy of this License; and +You must cause any modified files to carry prominent notices stating that You changed the files; and +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 +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/oracle/oci-go-sdk/v65/NOTICE.txt b/vendor/github.com/oracle/oci-go-sdk/v65/NOTICE.txt new file mode 100644 index 000000000..42d987bdd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/NOTICE.txt @@ -0,0 +1 @@ +Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. \ No newline at end of file diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/certificate_retriever.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/certificate_retriever.go new file mode 100644 index 000000000..128dddb82 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/certificate_retriever.go @@ -0,0 +1,262 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "bytes" + "crypto/rsa" + "crypto/x509" + "encoding/pem" + "fmt" + "sync" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +// x509CertificateRetriever provides an X509 certificate with the RSA private key +type x509CertificateRetriever interface { + Refresh() error + CertificatePemRaw() []byte + Certificate() *x509.Certificate + PrivateKeyPemRaw() []byte + PrivateKey() *rsa.PrivateKey +} + +// urlBasedX509CertificateRetriever retrieves PEM-encoded X509 certificates from the given URLs. +type urlBasedX509CertificateRetriever struct { + certURL string + privateKeyURL string + passphrase string + certificatePemRaw []byte + certificate *x509.Certificate + privateKeyPemRaw []byte + privateKey *rsa.PrivateKey + mux sync.Mutex + dispatcher common.HTTPRequestDispatcher +} + +func newURLBasedX509CertificateRetriever(dispatcher common.HTTPRequestDispatcher, certURL, privateKeyURL, passphrase string) x509CertificateRetriever { + return &urlBasedX509CertificateRetriever{ + certURL: certURL, + privateKeyURL: privateKeyURL, + passphrase: passphrase, + mux: sync.Mutex{}, + dispatcher: dispatcher, + } +} + +// Refresh() is failure atomic, i.e., CertificatePemRaw(), Certificate(), PrivateKeyPemRaw(), and PrivateKey() would +// return their previous values if Refresh() fails. +func (r *urlBasedX509CertificateRetriever) Refresh() error { + common.Debugln("Refreshing certificate") + + r.mux.Lock() + defer r.mux.Unlock() + + var err error + + var certificatePemRaw []byte + var certificate *x509.Certificate + if certificatePemRaw, certificate, err = r.renewCertificate(r.certURL); err != nil { + return fmt.Errorf("failed to renew certificate: %s", err.Error()) + } + + var privateKeyPemRaw []byte + var privateKey *rsa.PrivateKey + if r.privateKeyURL != "" { + if privateKeyPemRaw, privateKey, err = r.renewPrivateKey(r.privateKeyURL, r.passphrase); err != nil { + return fmt.Errorf("failed to renew private key: %s", err.Error()) + } + } + + r.certificatePemRaw = certificatePemRaw + r.certificate = certificate + r.privateKeyPemRaw = privateKeyPemRaw + r.privateKey = privateKey + return nil +} + +func (r *urlBasedX509CertificateRetriever) renewCertificate(url string) (certificatePemRaw []byte, certificate *x509.Certificate, err error) { + var body bytes.Buffer + if body, _, err = httpGet(r.dispatcher, url); err != nil { + return nil, nil, fmt.Errorf("failed to get certificate from %s: %s", url, err.Error()) + } + + certificatePemRaw = body.Bytes() + var block *pem.Block + block, _ = pem.Decode(certificatePemRaw) + if block == nil { + return nil, nil, fmt.Errorf("failed to parse the new certificate, not valid pem data") + } + + if certificate, err = x509.ParseCertificate(block.Bytes); err != nil { + return nil, nil, fmt.Errorf("failed to parse the new certificate: %s", err.Error()) + } + + return certificatePemRaw, certificate, nil +} + +func (r *urlBasedX509CertificateRetriever) renewPrivateKey(url, passphrase string) (privateKeyPemRaw []byte, privateKey *rsa.PrivateKey, err error) { + var body bytes.Buffer + if body, _, err = httpGet(r.dispatcher, url); err != nil { + return nil, nil, fmt.Errorf("failed to get private key from %s: %s", url, err.Error()) + } + + privateKeyPemRaw = body.Bytes() + if privateKey, err = common.PrivateKeyFromBytes(privateKeyPemRaw, &passphrase); err != nil { + return nil, nil, fmt.Errorf("failed to parse the new private key: %s", err.Error()) + } + + return privateKeyPemRaw, privateKey, nil +} + +func (r *urlBasedX509CertificateRetriever) CertificatePemRaw() []byte { + r.mux.Lock() + defer r.mux.Unlock() + + if r.certificatePemRaw == nil { + return nil + } + + c := make([]byte, len(r.certificatePemRaw)) + copy(c, r.certificatePemRaw) + return c +} + +func (r *urlBasedX509CertificateRetriever) Certificate() *x509.Certificate { + r.mux.Lock() + defer r.mux.Unlock() + + if r.certificate == nil { + return nil + } + + c := *r.certificate + return &c +} + +func (r *urlBasedX509CertificateRetriever) PrivateKeyPemRaw() []byte { + r.mux.Lock() + defer r.mux.Unlock() + + if r.privateKeyPemRaw == nil { + return nil + } + + c := make([]byte, len(r.privateKeyPemRaw)) + copy(c, r.privateKeyPemRaw) + return c +} + +func (r *urlBasedX509CertificateRetriever) PrivateKey() *rsa.PrivateKey { + r.mux.Lock() + defer r.mux.Unlock() + + //Nil Private keys are supported as part of a certificate + if r.privateKey == nil { + return nil + } + + c := *r.privateKey + return &c +} + +// staticCertificateRetriever serves certificates from static data +type staticCertificateRetriever struct { + Passphrase []byte + CertificatePem []byte + PrivateKeyPem []byte + certificate *x509.Certificate + privateKey *rsa.PrivateKey + mux sync.Mutex +} + +// Refresh proccess the inputs into appropiate keys and certificates +func (r *staticCertificateRetriever) Refresh() error { + r.mux.Lock() + defer r.mux.Unlock() + + certifcate, err := r.readCertificate() + if err != nil { + r.certificate = nil + return err + } + r.certificate = certifcate + + key, err := r.readPrivateKey() + if err != nil { + r.privateKey = nil + return err + } + r.privateKey = key + + return nil +} + +func (r *staticCertificateRetriever) Certificate() *x509.Certificate { + r.mux.Lock() + defer r.mux.Unlock() + + return r.certificate +} + +func (r *staticCertificateRetriever) PrivateKey() *rsa.PrivateKey { + r.mux.Lock() + defer r.mux.Unlock() + + return r.privateKey +} + +func (r *staticCertificateRetriever) CertificatePemRaw() []byte { + r.mux.Lock() + defer r.mux.Unlock() + + if r.CertificatePem == nil { + return nil + } + + c := make([]byte, len(r.CertificatePem)) + copy(c, r.CertificatePem) + return c +} + +func (r *staticCertificateRetriever) PrivateKeyPemRaw() []byte { + r.mux.Lock() + defer r.mux.Unlock() + + if r.PrivateKeyPem == nil { + return nil + } + + c := make([]byte, len(r.PrivateKeyPem)) + copy(c, r.PrivateKeyPem) + return c +} + +func (r *staticCertificateRetriever) readCertificate() (certificate *x509.Certificate, err error) { + block, _ := pem.Decode(r.CertificatePem) + if block == nil { + return nil, fmt.Errorf("failed to parse the new certificate, not valid pem data") + } + + if certificate, err = x509.ParseCertificate(block.Bytes); err != nil { + return nil, fmt.Errorf("failed to parse the new certificate: %s", err.Error()) + } + return certificate, nil +} + +func (r *staticCertificateRetriever) readPrivateKey() (*rsa.PrivateKey, error) { + if r.PrivateKeyPem == nil { + return nil, nil + } + + var pass *string + if r.Passphrase == nil { + pass = nil + } else { + ss := string(r.Passphrase) + pass = &ss + } + return common.PrivateKeyFromBytes(r.PrivateKeyPem, pass) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/configuration.go new file mode 100644 index 000000000..797411afb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/configuration.go @@ -0,0 +1,115 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "crypto/rsa" + "fmt" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +type instancePrincipalConfigurationProvider struct { + keyProvider instancePrincipalKeyProvider + region *common.Region +} + +// InstancePrincipalConfigurationProvider returns a configuration for instance principals +func InstancePrincipalConfigurationProvider() (common.ConfigurationProvider, error) { + return newInstancePrincipalConfigurationProvider("", nil) +} + +// InstancePrincipalConfigurationProviderForRegion returns a configuration for instance principals with a given region +func InstancePrincipalConfigurationProviderForRegion(region common.Region) (common.ConfigurationProvider, error) { + return newInstancePrincipalConfigurationProvider(region, nil) +} + +// InstancePrincipalConfigurationProviderWithCustomClient returns a configuration for instance principals using a modifier function to modify the HTTPRequestDispatcher +func InstancePrincipalConfigurationProviderWithCustomClient(modifier func(common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error)) (common.ConfigurationProvider, error) { + return newInstancePrincipalConfigurationProvider("", modifier) +} + +// InstancePrincipalConfigurationForRegionWithCustomClient returns a configuration for instance principals with a given region using a modifier function to modify the HTTPRequestDispatcher +func InstancePrincipalConfigurationForRegionWithCustomClient(region common.Region, modifier func(common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error)) (common.ConfigurationProvider, error) { + return newInstancePrincipalConfigurationProvider(region, modifier) +} + +func newInstancePrincipalConfigurationProvider(region common.Region, modifier func(common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error)) (common.ConfigurationProvider, error) { + var err error + var keyProvider *instancePrincipalKeyProvider + if keyProvider, err = newInstancePrincipalKeyProvider(modifier); err != nil { + return nil, fmt.Errorf("failed to create a new key provider for instance principal: %s", err.Error()) + } + if len(region) > 0 { + return instancePrincipalConfigurationProvider{keyProvider: *keyProvider, region: ®ion}, nil + } + return instancePrincipalConfigurationProvider{keyProvider: *keyProvider, region: nil}, nil +} + +// InstancePrincipalConfigurationWithCerts returns a configuration for instance principals with a given region and hardcoded certificates in lieu of metadata service certs +func InstancePrincipalConfigurationWithCerts(region common.Region, leafCertificate, leafPassphrase, leafPrivateKey []byte, intermediateCertificates [][]byte) (common.ConfigurationProvider, error) { + leafCertificateRetriever := staticCertificateRetriever{Passphrase: leafPassphrase, CertificatePem: leafCertificate, PrivateKeyPem: leafPrivateKey} + + //The .Refresh() call actually reads the certificates from the inputs + err := leafCertificateRetriever.Refresh() + if err != nil { + return nil, err + } + + certificate := leafCertificateRetriever.Certificate() + + tenancyID := extractTenancyIDFromCertificate(certificate) + fedClient, err := newX509FederationClientWithCerts(region, tenancyID, leafCertificate, leafPassphrase, leafPrivateKey, intermediateCertificates, *newDispatcherModifier(nil)) + if err != nil { + return nil, err + } + + provider := instancePrincipalConfigurationProvider{ + keyProvider: instancePrincipalKeyProvider{ + Region: region, + FederationClient: fedClient, + TenancyID: tenancyID, + }, + region: ®ion, + } + return provider, nil + +} + +func (p instancePrincipalConfigurationProvider) PrivateRSAKey() (*rsa.PrivateKey, error) { + return p.keyProvider.PrivateRSAKey() +} + +func (p instancePrincipalConfigurationProvider) KeyID() (string, error) { + return p.keyProvider.KeyID() +} + +func (p instancePrincipalConfigurationProvider) TenancyOCID() (string, error) { + return p.keyProvider.TenancyOCID() +} + +func (p instancePrincipalConfigurationProvider) UserOCID() (string, error) { + return "", nil +} + +func (p instancePrincipalConfigurationProvider) KeyFingerprint() (string, error) { + return "", nil +} + +func (p instancePrincipalConfigurationProvider) Region() (string, error) { + if p.region == nil { + region := p.keyProvider.RegionForFederationClient() + common.Debugf("Region in instance principal configuration provider is nil. Returning federation clients region: %s", region) + return string(region), nil + } + return string(*p.region), nil +} + +func (p instancePrincipalConfigurationProvider) AuthType() (common.AuthConfig, error) { + return common.AuthConfig{common.InstancePrincipal, false, nil}, fmt.Errorf("unsupported, keep the interface") +} + +func (p instancePrincipalConfigurationProvider) Refreshable() bool { + return true +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/dispatcher_modifier.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/dispatcher_modifier.go new file mode 100644 index 000000000..e4e662f2b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/dispatcher_modifier.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import "github.com/oracle/oci-go-sdk/v65/common" + +// dispatcherModifier gives ability to modify a HTTPRequestDispatcher before use. +type dispatcherModifier struct { + modifiers []func(common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error) +} + +// newDispatcherModifier creates a new dispatcherModifier with optional initial modifier (may be nil). +func newDispatcherModifier(modifier func(common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error)) *dispatcherModifier { + dispatcherModifier := &dispatcherModifier{ + modifiers: make([]func(common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error), 0), + } + if modifier != nil { + dispatcherModifier.QueueModifier(modifier) + } + return dispatcherModifier +} + +// QueueModifier queues up a new modifier +func (c *dispatcherModifier) QueueModifier(modifier func(common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error)) { + c.modifiers = append(c.modifiers, modifier) +} + +// Modify the provided HTTPRequestDispatcher with this modifier, and return the result, or error if something goes wrong +func (c *dispatcherModifier) Modify(dispatcher common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error) { + if len(c.modifiers) > 0 { + for _, modifier := range c.modifiers { + var err error + if dispatcher, err = modifier(dispatcher); err != nil { + common.Debugf("An error occurred when attempting to modify the dispatcher. Error was: %s", err.Error()) + return nil, err + } + } + } + return dispatcher, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/federation_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/federation_client.go new file mode 100644 index 000000000..32390bd4e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/federation_client.go @@ -0,0 +1,1045 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +// Package auth provides supporting functions and structs for authentication +package auth + +import ( + "context" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "encoding/pem" + "errors" + "fmt" + "io/ioutil" + "maps" + "math" + "net/http" + "net/url" + "os" + "strings" + "sync" + "time" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +// federationClient is a client to retrieve the security token for an instance principal necessary to sign a request. +// It also provides the private key whose corresponding public key is used to retrieve the security token. +type federationClient interface { + ClaimHolder + PrivateKey() (*rsa.PrivateKey, error) + SecurityToken() (string, error) +} + +// ClaimHolder is implemented by any token interface that provides access to the security claims embedded in the token. +type ClaimHolder interface { + GetClaim(key string) (interface{}, error) +} + +type genericFederationClient struct { + SessionKeySupplier sessionKeySupplier + RefreshSecurityToken func() (securityToken, error) + + securityToken securityToken + mux sync.Mutex +} + +var _ federationClient = &genericFederationClient{} + +func (c *genericFederationClient) PrivateKey() (*rsa.PrivateKey, error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err := c.renewKeyAndSecurityTokenIfNotValid(); err != nil { + return nil, err + } + return c.SessionKeySupplier.PrivateKey(), nil +} + +func (c *genericFederationClient) SecurityToken() (token string, err error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err = c.renewKeyAndSecurityTokenIfNotValid(); err != nil { + return "", err + } + return c.securityToken.String(), nil +} + +func (c *genericFederationClient) renewKeyAndSecurityTokenIfNotValid() (err error) { + if c.securityToken == nil || !c.securityToken.Valid() { + if err = c.renewKeyAndSecurityToken(); err != nil { + return fmt.Errorf("failed to renew security token: %s", err.Error()) + } + } + return nil +} + +func (c *genericFederationClient) renewKeyAndSecurityToken() (err error) { + common.Logf("Renewing keys for file based security token at: %v\n", time.Now().Format("15:04:05.000")) + if err = c.SessionKeySupplier.Refresh(); err != nil { + return fmt.Errorf("failed to refresh session key: %s", err.Error()) + } + + common.Logf("Renewing security token at: %v\n", time.Now().Format("15:04:05.000")) + if c.securityToken, err = c.RefreshSecurityToken(); err != nil { + return fmt.Errorf("failed to refresh security token key: %s", err.Error()) + } + common.Logf("Security token renewed at: %v\n", time.Now().Format("15:04:05.000")) + return nil +} + +func (c *genericFederationClient) GetClaim(key string) (interface{}, error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err := c.renewKeyAndSecurityTokenIfNotValid(); err != nil { + return nil, err + } + return c.securityToken.GetClaim(key) +} + +func newFileBasedFederationClient(securityTokenPath string, supplier sessionKeySupplier) (*genericFederationClient, error) { + return &genericFederationClient{ + SessionKeySupplier: supplier, + RefreshSecurityToken: func() (token securityToken, err error) { + var content []byte + if content, err = ioutil.ReadFile(securityTokenPath); err != nil { + return nil, fmt.Errorf("failed to read security token from :%s. Due to: %s", securityTokenPath, err.Error()) + } + + var newToken securityToken + if newToken, err = newPrincipalToken(string(content)); err != nil { + return nil, fmt.Errorf("failed to read security token from :%s. Due to: %s", securityTokenPath, err.Error()) + } + + return newToken, nil + }, + }, nil +} + +func newStaticFederationClient(sessionToken string, supplier sessionKeySupplier) (*genericFederationClient, error) { + var newToken securityToken + var err error + if newToken, err = newPrincipalToken(string(sessionToken)); err != nil { + return nil, fmt.Errorf("failed to read security token. Due to: %s", err.Error()) + } + + return &genericFederationClient{ + SessionKeySupplier: supplier, + RefreshSecurityToken: func() (token securityToken, err error) { + return newToken, nil + }, + }, nil +} + +// oAuth2FederationClient retrieves a security token from the scoped OAuth endpoint in Auth Service +type oAuth2FederationClient struct { + sessionKeySupplier cacheableSessionKeySupplier + authClientKeyProvider common.KeyProvider + authClient *common.BaseClient + securityToken securityToken + lastRefresh time.Time + scope string + targetCompartment string + mux sync.Mutex +} + +var OAuthTokenStaleWindow = 20 * time.Minute + +// newOAuth2FederationClient creates a new oAuth2FederationClient from the provided configProvider and Auth request parameters +func newOAuth2FederationClient(configProvider common.ConfigurationProvider, scope string, targetCompartment string, sessionKeySupplier cacheableSessionKeySupplier) (federationClient, error) { + client := &oAuth2FederationClient{} + client.sessionKeySupplier = sessionKeySupplier + region, err := configProvider.Region() + if err != nil { + return nil, fmt.Errorf("failed to build OAuth Federation Client: %s", err.Error()) + } + authClient := newAuthClient(common.StringToRegion(region), configProvider, "v1/oauth2/scoped") + client.authClient = authClient + client.authClientKeyProvider = configProvider + client.scope = scope + client.targetCompartment = targetCompartment + return client, nil +} + +// KeyID calls the KeyID method of the auth provider given to the federation client +func (c *oAuth2FederationClient) KeyID() (string, error) { + return c.authClientKeyProvider.KeyID() +} + +// PrivateRSAKey calls the PrivateRSAKey method of the auth provider given to the federation client +func (c *oAuth2FederationClient) PrivateRSAKey() (*rsa.PrivateKey, error) { + return c.authClientKeyProvider.PrivateRSAKey() +} + +func (c *oAuth2FederationClient) GetClaim(key string) (interface{}, error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err := c.renewKeyAndSecurityTokenIfNotValid(); err != nil { + return nil, err + } + return c.securityToken.GetClaim(key) +} + +// isTokenStale returns true if the JWT token is older than OAuthTokenStaleWindow +func (c *oAuth2FederationClient) isTokenStale() bool { + return c.lastRefresh.IsZero() || time.Now().After(c.lastRefresh.Add(OAuthTokenStaleWindow)) +} + +func (c *oAuth2FederationClient) renewKeyAndSecurityTokenIfNotValid() (err error) { + return c.renewSecurityTokenIfNotValid() +} + +func (c *oAuth2FederationClient) renewSecurityTokenIfNotValid() (err error) { + + // Get a new token if this one is stale (or nil), even if it is still valid + if c.securityToken == nil || c.isTokenStale() { + if err = c.renewSecurityToken(); err != nil { + if c.securityToken != nil && c.securityToken.Valid() { + // Token is stale but still valid. We failed to get a new token + // but we can still use the old one + common.Debugln("failed to refresh OAuth token. Using valid cached token and cached session keys") + c.sessionKeySupplier.Revert() + return nil + } + + return fmt.Errorf("failed to refresh token: %s", err.Error()) + } + } + + // Token exists and is not stale, + // or token was stale and a new one was retrieved + return nil +} + +func (c *oAuth2FederationClient) renewSecurityToken() (err error) { + if err = c.sessionKeySupplier.Refresh(); err != nil { + return fmt.Errorf("failed to refresh session key: %s", err.Error()) + } + + common.Logf("Renewing security token at: %v\n", time.Now().Format("15:04:05.000")) + if newToken, err := c.getSecurityToken(); err != nil { + return fmt.Errorf("failed to get security token: %s", err.Error()) + } else { + // only update token if a new one was retrieved. + c.lastRefresh = time.Now() + c.securityToken = newToken + } + + common.Logf("Security token renewed at: %v\n", time.Now().Format("15:04:05.000")) + + return nil + +} + +func (c *oAuth2FederationClient) getSecurityToken() (securityToken, error) { + var err error + var httpRequest http.Request + var httpResponse *http.Response + defer common.CloseBodyIfValid(httpResponse) + for retry := 0; retry < 3; retry++ { + request := c.makeOAuthFederationRequest() + + if httpRequest, err = common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "", request); err != nil { + return nil, fmt.Errorf("failed to make http request: %s", err.Error()) + } + + if httpResponse, err = c.authClient.Call(context.Background(), &httpRequest); err == nil { + break + } + // Don't retry on 4xx errors + if httpResponse != nil && httpResponse.StatusCode >= 400 && httpResponse.StatusCode <= 499 { + return nil, fmt.Errorf("error %s returned by auth service: %s", httpResponse.Status, err.Error()) + } + nextDuration := time.Duration(1000.0*(math.Pow(2.0, float64(retry)))) * time.Millisecond + time.Sleep(nextDuration) + } + if err != nil { + return nil, fmt.Errorf("failed to call: %s", err.Error()) + } + + response := oAuthFederationResponse{} + if err = common.UnmarshalResponse(httpResponse, &response); err != nil { + return nil, fmt.Errorf("failed to unmarshal the response: %s", err.Error()) + } + + return newPrincipalToken(response.Token.Token) + +} + +type oAuthFederationRequest struct { + OAuthFederationDetails `contributesTo:"body"` +} + +// OAuthFederationDetails Scoped Oauth federation details +// The scope type should correspond to the type of config provider used to create +// the OAuth Federation Client +type OAuthFederationDetails struct { + Scope string `mandatory:"true" json:"scope,omitempty"` + PublicKey string `mandatory:"true" json:"public_key,omitempty"` + TargetCompartment string `mandatory:"true" json:"target_compartment,omitempty"` +} + +type oAuthFederationResponse struct { + Token `presentIn:"body"` +} + +func (c *oAuth2FederationClient) makeOAuthFederationRequest() *oAuthFederationRequest { + publicKey := sanitizeCertificateString(string(c.sessionKeySupplier.PublicKeyPemRaw())) + details := OAuthFederationDetails{ + Scope: c.scope, + PublicKey: publicKey, + TargetCompartment: c.targetCompartment, + } + return &oAuthFederationRequest{details} +} + +func (c *oAuth2FederationClient) PrivateKey() (*rsa.PrivateKey, error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err := c.renewSecurityTokenIfNotValid(); err != nil { + return nil, err + } + return c.sessionKeySupplier.PrivateKey(), nil +} + +func (c *oAuth2FederationClient) SecurityToken() (token string, err error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err = c.renewSecurityTokenIfNotValid(); err != nil { + return "", err + } + return c.securityToken.String(), nil +} + +// x509FederationClient retrieves a security token from Auth service. +type x509FederationClient struct { + tenancyID string + sessionKeySupplier sessionKeySupplier + leafCertificateRetriever x509CertificateRetriever + intermediateCertificateRetrievers []x509CertificateRetriever + securityToken securityToken + authClient *common.BaseClient + mux sync.Mutex +} + +func newX509FederationClient(region common.Region, tenancyID string, leafCertificateRetriever x509CertificateRetriever, intermediateCertificateRetrievers []x509CertificateRetriever, modifier dispatcherModifier) (federationClient, error) { + client := &x509FederationClient{ + tenancyID: tenancyID, + leafCertificateRetriever: leafCertificateRetriever, + intermediateCertificateRetrievers: intermediateCertificateRetrievers, + } + client.sessionKeySupplier = newSessionKeySupplier() + authClient := newAuthClient(region, client, "v1/x509") + + var err error + + if authClient.HTTPClient, err = modifier.Modify(authClient.HTTPClient); err != nil { + err = fmt.Errorf("failed to modify client: %s", err.Error()) + return nil, err + } + + client.authClient = authClient + return client, nil +} + +func newX509FederationClientWithCerts(region common.Region, tenancyID string, leafCertificate, leafPassphrase, leafPrivateKey []byte, intermediateCertificates [][]byte, modifier dispatcherModifier) (federationClient, error) { + intermediateRetrievers := make([]x509CertificateRetriever, len(intermediateCertificates)) + for i, c := range intermediateCertificates { + intermediateRetrievers[i] = &staticCertificateRetriever{Passphrase: []byte(""), CertificatePem: c, PrivateKeyPem: nil} + } + + client := &x509FederationClient{ + tenancyID: tenancyID, + leafCertificateRetriever: &staticCertificateRetriever{Passphrase: leafPassphrase, CertificatePem: leafCertificate, PrivateKeyPem: leafPrivateKey}, + intermediateCertificateRetrievers: intermediateRetrievers, + } + client.sessionKeySupplier = newSessionKeySupplier() + authClient := newAuthClient(region, client, "v1/x509") + + var err error + + if authClient.HTTPClient, err = modifier.Modify(authClient.HTTPClient); err != nil { + err = fmt.Errorf("failed to modify client: %s", err.Error()) + return nil, err + } + + client.authClient = authClient + return client, nil +} + +var ( + genericHeaders = []string{"date", "(request-target)"} // "host" is not needed for the federation endpoint. Don't ask me why. + bodyHeaders = []string{"content-length", "content-type", "x-content-sha256"} +) + +func newAuthClient(region common.Region, provider common.KeyProvider, authBasePath string) *common.BaseClient { + signer := common.RequestSigner(provider, genericHeaders, bodyHeaders) + client := common.DefaultBaseClientWithSigner(signer) + + if regionURL, ok := os.LookupEnv("OCI_SDK_AUTH_CLIENT_REGION_URL"); ok { + client.Host = regionURL + } else { + client.Host = region.Endpoint("auth") + } + client.BasePath = authBasePath + + if common.GlobalAuthClientCircuitBreakerSetting != nil { + client.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.GlobalAuthClientCircuitBreakerSetting) + } else if !common.IsEnvVarFalse("OCI_SDK_AUTH_CLIENT_CIRCUIT_BREAKER_ENABLED") { + common.Logf("Configuring DefaultAuthClientCircuitBreakerSetting for federation client") + client.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultAuthClientCircuitBreakerSetting()) + } + return &client +} + +// For authClient to sign requests to X509 Federation Endpoint +func (c *x509FederationClient) KeyID() (string, error) { + tenancy := c.tenancyID + fingerprint := fingerprint(c.leafCertificateRetriever.Certificate()) + return fmt.Sprintf("%s/fed-x509-sha256/%s", tenancy, fingerprint), nil +} + +// For authClient to sign requests to X509 Federation Endpoint +func (c *x509FederationClient) PrivateRSAKey() (*rsa.PrivateKey, error) { + key := c.leafCertificateRetriever.PrivateKey() + if key == nil { + return nil, fmt.Errorf("can not read private key from leaf certificate. Likely an error in the metadata service") + } + + return key, nil +} + +func (c *x509FederationClient) PrivateKey() (*rsa.PrivateKey, error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err := c.renewSecurityTokenIfNotValid(); err != nil { + return nil, err + } + return c.sessionKeySupplier.PrivateKey(), nil +} + +func (c *x509FederationClient) SecurityToken() (token string, err error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err = c.renewSecurityTokenIfNotValid(); err != nil { + return "", err + } + return c.securityToken.String(), nil +} + +func (c *x509FederationClient) renewSecurityTokenIfNotValid() (err error) { + if c.securityToken == nil || !c.securityToken.Valid() { + if err = c.renewSecurityToken(); err != nil { + return fmt.Errorf("failed to renew security token: %s", err.Error()) + } + } + return nil +} + +func (c *x509FederationClient) renewSecurityToken() (err error) { + if err = c.sessionKeySupplier.Refresh(); err != nil { + return fmt.Errorf("failed to refresh session key: %s", err.Error()) + } + + if err = c.leafCertificateRetriever.Refresh(); err != nil { + return fmt.Errorf("failed to refresh leaf certificate: %s", err.Error()) + } + + updatedTenancyID := extractTenancyIDFromCertificate(c.leafCertificateRetriever.Certificate()) + if c.tenancyID != updatedTenancyID { + err = fmt.Errorf("unexpected update of tenancy OCID in the leaf certificate. Previous tenancy: %s, Updated: %s", c.tenancyID, updatedTenancyID) + return + } + + for _, retriever := range c.intermediateCertificateRetrievers { + if err = retriever.Refresh(); err != nil { + return fmt.Errorf("failed to refresh intermediate certificate: %s", err.Error()) + } + } + + common.Logf("Renewing security token at: %v\n", time.Now().Format("15:04:05.000")) + if c.securityToken, err = c.getSecurityToken(); err != nil { + return fmt.Errorf("failed to get security token: %s", err.Error()) + } + common.Logf("Security token renewed at: %v\n", time.Now().Format("15:04:05.000")) + + return nil +} + +func (c *x509FederationClient) getSecurityToken() (securityToken, error) { + var err error + var httpRequest http.Request + var httpResponse *http.Response + defer common.CloseBodyIfValid(httpResponse) + + for retry := 0; retry < 3; retry++ { + request := c.makeX509FederationRequest() + + if httpRequest, err = common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "", request); err != nil { + return nil, fmt.Errorf("failed to make http request: %s", err.Error()) + } + + if httpResponse, err = c.authClient.Call(context.Background(), &httpRequest); err == nil { + break + } + // Don't retry on 4xx errors + if httpResponse != nil && httpResponse.StatusCode >= 400 && httpResponse.StatusCode <= 499 { + return nil, fmt.Errorf("error %s returned by auth service: %s", httpResponse.Status, err.Error()) + } + nextDuration := time.Duration(1000.0*(math.Pow(2.0, float64(retry)))) * time.Millisecond + time.Sleep(nextDuration) + } + if err != nil { + return nil, fmt.Errorf("failed to call: %s", err.Error()) + } + + response := x509FederationResponse{} + if err = common.UnmarshalResponse(httpResponse, &response); err != nil { + return nil, fmt.Errorf("failed to unmarshal the response: %s", err.Error()) + } + + return newPrincipalToken(response.Token.Token) +} + +func (c *x509FederationClient) GetClaim(key string) (interface{}, error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err := c.renewSecurityTokenIfNotValid(); err != nil { + return nil, err + } + return c.securityToken.GetClaim(key) +} + +type x509FederationRequest struct { + X509FederationDetails `contributesTo:"body"` +} + +// X509FederationDetails x509 federation details +type X509FederationDetails struct { + Certificate string `mandatory:"true" json:"certificate,omitempty"` + PublicKey string `mandatory:"true" json:"publicKey,omitempty"` + IntermediateCertificates []string `mandatory:"false" json:"intermediateCertificates,omitempty"` + FingerprintAlgorithm string `mandatory:"false" json:"fingerprintAlgorithm,omitempty"` +} + +type x509FederationResponse struct { + Token `presentIn:"body"` +} + +// Token token +type Token struct { + Token string `mandatory:"true" json:"token,omitempty"` +} + +func (c *x509FederationClient) makeX509FederationRequest() *x509FederationRequest { + certificate := c.sanitizeCertificateString(string(c.leafCertificateRetriever.CertificatePemRaw())) + publicKey := c.sanitizeCertificateString(string(c.sessionKeySupplier.PublicKeyPemRaw())) + var intermediateCertificates []string + for _, retriever := range c.intermediateCertificateRetrievers { + intermediateCertificates = append(intermediateCertificates, c.sanitizeCertificateString(string(retriever.CertificatePemRaw()))) + } + + details := X509FederationDetails{ + Certificate: certificate, + PublicKey: publicKey, + IntermediateCertificates: intermediateCertificates, + FingerprintAlgorithm: "SHA256", + } + return &x509FederationRequest{details} +} + +func (c *x509FederationClient) sanitizeCertificateString(certString string) string { + certString = strings.Replace(certString, "-----BEGIN CERTIFICATE-----", "", -1) + certString = strings.Replace(certString, "-----END CERTIFICATE-----", "", -1) + certString = strings.Replace(certString, "-----BEGIN PUBLIC KEY-----", "", -1) + certString = strings.Replace(certString, "-----END PUBLIC KEY-----", "", -1) + certString = strings.Replace(certString, "\n", "", -1) + return certString +} + +// sessionKeySupplier provides an RSA keypair which can be re-generated by calling Refresh(). +type sessionKeySupplier interface { + Refresh() error + PrivateKey() *rsa.PrivateKey + PublicKeyPemRaw() []byte +} + +// cacheableSessionKeySupplier extends sessionKeySupplier with the ability to revert to the previous key pair. +type cacheableSessionKeySupplier interface { + sessionKeySupplier + Revert() +} + +// genericKeySupplier implements sessionKeySupplier and provides an arbitrary refresh mechanism +type genericKeySupplier struct { + RefreshFn func() (*rsa.PrivateKey, []byte, error) + + privateKey *rsa.PrivateKey + publicKeyPemRaw []byte +} + +func (s genericKeySupplier) PrivateKey() *rsa.PrivateKey { + if s.privateKey == nil { + return nil + } + + c := *s.privateKey + return &c +} + +func (s genericKeySupplier) PublicKeyPemRaw() []byte { + if s.publicKeyPemRaw == nil { + return nil + } + + c := make([]byte, len(s.publicKeyPemRaw)) + copy(c, s.publicKeyPemRaw) + return c +} + +func (s *genericKeySupplier) Refresh() (err error) { + privateKey, publicPem, err := s.RefreshFn() + if err != nil { + return err + } + + s.privateKey = privateKey + s.publicKeyPemRaw = publicPem + return nil +} + +// create a sessionKeySupplier that reads keys from file every time it refreshes +func newFileBasedKeySessionSupplier(privateKeyPemPath string, passphrasePath *string) (*genericKeySupplier, error) { + return &genericKeySupplier{ + RefreshFn: func() (*rsa.PrivateKey, []byte, error) { + var err error + var passContent []byte + if passphrasePath != nil { + if passContent, err = ioutil.ReadFile(*passphrasePath); err != nil { + return nil, nil, fmt.Errorf("can not read passphrase from file: %s, due to %s", *passphrasePath, err.Error()) + } + } + + var keyPemContent []byte + if keyPemContent, err = ioutil.ReadFile(privateKeyPemPath); err != nil { + return nil, nil, fmt.Errorf("can not read private privateKey pem from file: %s, due to %s", privateKeyPemPath, err.Error()) + } + + var privateKey *rsa.PrivateKey + if privateKey, err = common.PrivateKeyFromBytesWithPassword(keyPemContent, passContent); err != nil { + return nil, nil, fmt.Errorf("can not create private privateKey from contents of: %s, due to: %s", privateKeyPemPath, err.Error()) + } + + var publicKeyAsnBytes []byte + if publicKeyAsnBytes, err = x509.MarshalPKIXPublicKey(privateKey.Public()); err != nil { + return nil, nil, fmt.Errorf("failed to marshal the public part of the new keypair: %s", err.Error()) + } + publicKeyPemRaw := pem.EncodeToMemory(&pem.Block{ + Type: "PUBLIC KEY", + Bytes: publicKeyAsnBytes, + }) + return privateKey, publicKeyPemRaw, nil + }, + }, nil +} + +func newStaticKeySessionSupplier(privateKeyPemContent, passphrase []byte) (*genericKeySupplier, error) { + var err error + var privateKey *rsa.PrivateKey + + if privateKey, err = common.PrivateKeyFromBytesWithPassword(privateKeyPemContent, passphrase); err != nil { + return nil, fmt.Errorf("can not create private privateKey, due to: %s", err.Error()) + } + + var publicKeyAsnBytes []byte + if publicKeyAsnBytes, err = x509.MarshalPKIXPublicKey(privateKey.Public()); err != nil { + return nil, fmt.Errorf("failed to marshal the public part of the new keypair: %s", err.Error()) + } + publicKeyPemRaw := pem.EncodeToMemory(&pem.Block{ + Type: "PUBLIC KEY", + Bytes: publicKeyAsnBytes, + }) + + return &genericKeySupplier{ + RefreshFn: func() (key *rsa.PrivateKey, bytes []byte, err error) { + return privateKey, publicKeyPemRaw, nil + }, + }, nil +} + +// inMemorySessionKeySupplier implements sessionKeySupplier to vend an RSA keypair. +// Refresh() generates a new RSA keypair with a random source, and keeps it in memory. +// +// inMemorySessionKeySupplier is not thread-safe. +type inMemorySessionKeySupplier struct { + keySize int + privateKey *rsa.PrivateKey + publicKeyPemRaw []byte +} + +// newSessionKeySupplier creates and returns a sessionKeySupplier instance which generates key pairs of size 2048. +func newSessionKeySupplier() sessionKeySupplier { + return &inMemorySessionKeySupplier{keySize: 2048} +} + +// Refresh() is failure atomic, i.e., PrivateKey() and PublicKeyPemRaw() would return their previous values +// if Refresh() fails. +func (s *inMemorySessionKeySupplier) Refresh() (err error) { + common.Debugln("Refreshing session key") + + var privateKey *rsa.PrivateKey + privateKey, err = rsa.GenerateKey(rand.Reader, s.keySize) + if err != nil { + return fmt.Errorf("failed to generate a new keypair: %s", err) + } + + var publicKeyAsnBytes []byte + if publicKeyAsnBytes, err = x509.MarshalPKIXPublicKey(privateKey.Public()); err != nil { + return fmt.Errorf("failed to marshal the public part of the new keypair: %s", err.Error()) + } + publicKeyPemRaw := pem.EncodeToMemory(&pem.Block{ + Type: "PUBLIC KEY", + Bytes: publicKeyAsnBytes, + }) + + s.privateKey = privateKey + s.publicKeyPemRaw = publicKeyPemRaw + return nil +} + +func (s *inMemorySessionKeySupplier) PrivateKey() *rsa.PrivateKey { + if s.privateKey == nil { + return nil + } + + c := *s.privateKey + return &c +} + +func (s *inMemorySessionKeySupplier) PublicKeyPemRaw() []byte { + if s.publicKeyPemRaw == nil { + return nil + } + + c := make([]byte, len(s.publicKeyPemRaw)) + copy(c, s.publicKeyPemRaw) + return c +} + +type inMemoryCacheableSessionKeySupplier struct { + inMemorySessionKeySupplier + cachedPublicKeyPemRaw []byte + cachedPrivateKey *rsa.PrivateKey +} + +// newCacheableSessionKeySupplier creates and returns an inMemoryCacheableSessionKeySupplier instance which generates key pairs of size 2048. +func newCacheableSessionKeySupplier() cacheableSessionKeySupplier { + return &inMemoryCacheableSessionKeySupplier{inMemorySessionKeySupplier: inMemorySessionKeySupplier{keySize: 2048}} +} + +func (s *inMemoryCacheableSessionKeySupplier) Refresh() (err error) { + + common.Debugln("Refreshing cacheable session key") + + // Cache current keys before generating new ones + s.cachedPrivateKey = s.privateKey + if s.publicKeyPemRaw != nil { + s.cachedPublicKeyPemRaw = make([]byte, len(s.publicKeyPemRaw)) + copy(s.cachedPublicKeyPemRaw, s.publicKeyPemRaw) + } else { + s.cachedPublicKeyPemRaw = nil + } + var privateKey *rsa.PrivateKey + privateKey, err = rsa.GenerateKey(rand.Reader, s.keySize) + if err != nil { + return fmt.Errorf("failed to generate a new keypair: %s", err) + } + var publicKeyAsnBytes []byte + if publicKeyAsnBytes, err = x509.MarshalPKIXPublicKey(privateKey.Public()); err != nil { + return fmt.Errorf("failed to marshal the public part of the new keypair: %s", err.Error()) + } + publicKeyPemRaw := pem.EncodeToMemory(&pem.Block{ + Type: "PUBLIC KEY", + Bytes: publicKeyAsnBytes, + }) + s.privateKey = privateKey + s.publicKeyPemRaw = publicKeyPemRaw + + return nil +} + +func (s *inMemoryCacheableSessionKeySupplier) Revert() { + s.privateKey = s.cachedPrivateKey + if s.cachedPublicKeyPemRaw != nil { + s.publicKeyPemRaw = make([]byte, len(s.cachedPublicKeyPemRaw)) + copy(s.publicKeyPemRaw, s.cachedPublicKeyPemRaw) + } else { + s.publicKeyPemRaw = nil + } +} + +type securityToken interface { + fmt.Stringer + Valid() bool + + ClaimHolder +} + +type principalToken struct { + tokenString string + jwtToken *jwtToken +} + +func newPrincipalToken(tokenString string) (newToken securityToken, err error) { + var jwtToken *jwtToken + if jwtToken, err = parseJwt(tokenString); err != nil { + return nil, fmt.Errorf("failed to parse the token string \"%s\": %s", tokenString, err.Error()) + } + return &principalToken{tokenString, jwtToken}, nil +} + +func (t *principalToken) String() string { + return t.tokenString +} + +func (t *principalToken) Valid() bool { + return !t.jwtToken.expired() +} + +var ( + // ErrNoSuchClaim is returned when a token does not hold the claim sought + ErrNoSuchClaim = errors.New("no such claim") +) + +func (t *principalToken) GetClaim(key string) (interface{}, error) { + if value, ok := t.jwtToken.payload[key]; ok { + return value, nil + } + return nil, ErrNoSuchClaim +} + +// nilSigner is required to avoid common.BaseClient panic. +type nilSigner struct{} + +// Sign fulfills the HTTPRequestSigner interface. +func (e nilSigner) Sign(r *http.Request) error { + return nil +} + +// newIDAuthClient returns a BaseClient that does not sign requests and has the auth +// client circuit breaker +func newIDAuthClient(host string, authBasePath string) *common.BaseClient { + client := common.DefaultBaseClientWithSigner(nilSigner{}) + client.Host = host + client.BasePath = authBasePath + if common.GlobalAuthClientCircuitBreakerSetting != nil { + client.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.GlobalAuthClientCircuitBreakerSetting) + } else if !common.IsEnvVarFalse("OCI_SDK_AUTH_CLIENT_CIRCUIT_BREAKER_ENABLED") { + common.Logf("Configuring DefaultAuthClientCircuitBreakerSetting for federation client") + client.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultAuthClientCircuitBreakerSetting()) + } + return &client +} + +// tokenExchangeResponse provides a struct for unmarshaling tokens. +type tokenExchangeResponse struct { + Token `presentIn:"body"` +} + +// tokenExchangeFederationClient implements federationClient. +type tokenExchangeFederationClient struct { + client *common.BaseClient + securityToken securityToken + privateKey *rsa.PrivateKey + tokenIssuer TokenIssuer + domainUrl string + authCode string + requestData map[string][]string + instancePrincipalProvider common.ConfigurationProvider + mux sync.Mutex +} + +// newTokenExchangeFederationClient creates a federation client. +func newTokenExchangeFederationClient(issuer TokenIssuer, host string, + authCode string, requestData map[string][]string, + instancePrincipalProvider common.ConfigurationProvider) *tokenExchangeFederationClient { + defaultGenericHeaders := []string{"date", "(request-target)", "host"} + bodyHeaders := []string{"content-length", "content-type", "x-content-sha256"} + var client *common.BaseClient + if instancePrincipalProvider != nil { + signer := common.RequestSigner(instancePrincipalProvider, defaultGenericHeaders, bodyHeaders) + baseClient := common.DefaultBaseClientWithSigner(signer) + client = &baseClient + client.Host = host + client.BasePath = "oauth2/v1/token" + } else { + client = newIDAuthClient(host, "/oauth2/v1/token") + } + fc := tokenExchangeFederationClient{ + tokenIssuer: issuer, + client: client, + authCode: authCode, + requestData: requestData, + instancePrincipalProvider: instancePrincipalProvider, + } + return &fc +} + +// PrivateKey receiver implements federationClient interface. Safe for concurrent use. +func (fc *tokenExchangeFederationClient) PrivateKey() (*rsa.PrivateKey, error) { + if err := fc.renewSecurityTokenIfNotValid(); err != nil { + return nil, err + } + return fc.privateKey, nil +} + +// SecurityToken receiver implements federationClient interface. Safe for concurrent +// use. +func (fc *tokenExchangeFederationClient) SecurityToken() (string, error) { + if err := fc.renewSecurityTokenIfNotValid(); err != nil { + return "", err + } + return fmt.Sprintf("ST$%s", fc.securityToken.String()), nil +} + +// GetClaim returns claims embedded in the Security Token. +func (fc *tokenExchangeFederationClient) GetClaim(key string) (interface{}, error) { + if err := fc.renewSecurityTokenIfNotValid(); err != nil { + return nil, fmt.Errorf("unable to retrieve claim: %w", err) + } + return fc.securityToken.GetClaim(key) +} + +// renewSecurityTokenIfNotValid checks if token is valid and initiates refresh if needed. +// Mutex is locked here if an operation is needed to prevent concurrency errors. +func (fc *tokenExchangeFederationClient) renewSecurityTokenIfNotValid() error { + if fc.securityToken == nil || !fc.securityToken.Valid() { + // Lock here to prevent renewSecurityToken from making surplus calls to the + // authorization server and identity domain + fc.mux.Lock() + defer fc.mux.Unlock() + // Ensure token is not renewed by previously blocked operation + if fc.securityToken != nil && fc.securityToken.Valid() { + return nil + } + return fc.renewSecurityToken() + } + return nil +} + +// renewSecurityToken initiates renewal of the Security Token returned by the +// tokenExchangeFederationClient. Should only be called by renewSecurityTokenIfNotValid. +// Rotates RSA key and updates federation client with fresh Security Token and private key. +func (fc *tokenExchangeFederationClient) renewSecurityToken() (err error) { + var token string + // Since we are running arbitrary code, we catch panics and return the cause + // as an error + func() { + // Scope recover around caller-provided code + common.Logf("attempting to retrieve token from issuer") + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("panic occurred during token renewal: %v", r) + } + }() + // Get a fresh token from the issuer + token, err = fc.tokenIssuer.GetToken() + }() + if err != nil { + return fmt.Errorf("unable to refresh JWT: %w", err) + } + privateKey, err := rsa.GenerateKey(rand.Reader, 3072) + if err != nil { + return fmt.Errorf("unable to generate RSA key: %w", err) + } + publicKey, err := privateToPublicDERBase64(privateKey) + if err != nil { + return fmt.Errorf("unable to derive public key: %w", err) + } + securityToken, err := fc.newTokenExchangeToken(token, publicKey) + if err != nil { + return fmt.Errorf("unable to exchange JWT for security token: %w", err) + } + // privateKey and securityToken ONLY updated here while under lock from renewSecurityTokenIfNotValid + fc.privateKey = privateKey + fc.securityToken = securityToken + return nil +} + +// newTokenExchangeToken assembles and returns a tokenExchangeToken issued by OCI. +func (fc *tokenExchangeFederationClient) newTokenExchangeToken(token string, + publicKey string) (tokenExchangeToken, error) { + var t tokenExchangeToken + var err error + // Retry and backoff + maxRetries := 3 + var httpResponse *http.Response + defer common.CloseBodyIfValid(httpResponse) + for retry := 1; retry <= maxRetries; retry++ { + common.Logf("attempt %d to retrieve Security Token", retry) + form := make(url.Values, 0) + maps.Copy(form, fc.requestData) + form.Set("public_key", publicKey) + if token != "" { + form.Set("subject_token", token) + } + formString := form.Encode() + formBody := strings.NewReader(formString) + httpRequest, err := http.NewRequest(http.MethodPost, fc.client.Host, formBody) + if err != nil { + return t, fmt.Errorf("failed to make request to token endpoint: %w", err) + } + httpRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded") + if fc.instancePrincipalProvider != nil { + httpRequest.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat)) + } else if fc.authCode != "" { + httpRequest.Header.Set("Authorization", "Basic "+fc.authCode) + } + ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) + response, err := fc.client.Call(ctx, httpRequest) + if (err == nil && response.StatusCode == http.StatusOK) || + // Do not retry 4XX response codes + (response != nil && response.StatusCode >= 400 && response.StatusCode <= 499) || + // Skip last sleep on max attempts + (retry == maxRetries) { + httpResponse = response + cancel() + break + } + if response != nil { + common.Logf("invalid response from domain: %s", response.Status) + } else { + common.Logf("invalid response from domain: %v", err) + } + common.CloseBodyIfValid(response) + cancel() + sleep := time.Duration(1000.0*(math.Pow(2.0, float64(retry)))) * time.Millisecond + time.Sleep(sleep) + } + if httpResponse == nil { + return t, fmt.Errorf("no response from domain") + } + if httpResponse.StatusCode != http.StatusOK { + return t, fmt.Errorf("invalid token endpoint response %s", httpResponse.Status) + } + responseBody := tokenExchangeResponse{} + if err = common.UnmarshalResponse(httpResponse, &responseBody); err != nil { + return t, fmt.Errorf("failed to unmarshal response: %w", err) + } + parsedToken, err := parseJwt(responseBody.Token.Token) + if err != nil { + return t, fmt.Errorf("unable to parse token: %w", err) + } + t.token = *parsedToken + return t, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/federation_client_oke_workload_identity.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/federation_client_oke_workload_identity.go new file mode 100644 index 000000000..9b70847f4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/federation_client_oke_workload_identity.go @@ -0,0 +1,230 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "bytes" + "crypto/rsa" + "crypto/tls" + "crypto/x509" + "encoding/base64" + "encoding/json" + "fmt" + "io" + "net/http" + "sync" + "time" + + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/utils" +) + +const ( + rpstValidForRatio float64 = 0.5 +) + +// Workload RPST Issuance Service (WRIS) +// x509FederationClientForOkeWorkloadIdentity retrieves a security token from Auth service. +type x509FederationClientForOkeWorkloadIdentity struct { + tenancyID string + sessionKeySupplier sessionKeySupplier + securityToken securityToken + authClient *common.BaseClient + httpClient *http.Client + mux sync.Mutex + proxymuxEndpoint string + saTokenProvider ServiceAccountTokenProvider + kubernetesServiceAccountCert *x509.CertPool +} + +func newX509FederationClientForOkeWorkloadIdentity(endpoint string, saTokenProvider ServiceAccountTokenProvider, + kubernetesServiceAccountCert *x509.CertPool) (federationClient, error) { + client := &x509FederationClientForOkeWorkloadIdentity{ + proxymuxEndpoint: endpoint, + saTokenProvider: saTokenProvider, + kubernetesServiceAccountCert: kubernetesServiceAccountCert, + } + + client.sessionKeySupplier = newSessionKeySupplier() + client.httpClient = newOkeWorkloadIdentityHTTPClient(kubernetesServiceAccountCert) + + return client, nil +} + +func newOkeWorkloadIdentityHTTPClient(kubernetesServiceAccountCert *x509.CertPool) *http.Client { + return &http.Client{ + Timeout: 30 * time.Second, + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{ + RootCAs: kubernetesServiceAccountCert, + }, + }, + } +} + +func (c *x509FederationClientForOkeWorkloadIdentity) proxymuxHTTPClient() *http.Client { + if c.httpClient == nil { + c.httpClient = newOkeWorkloadIdentityHTTPClient(c.kubernetesServiceAccountCert) + } + return c.httpClient +} + +func (c *x509FederationClientForOkeWorkloadIdentity) renewSecurityToken() (err error) { + if err = c.sessionKeySupplier.Refresh(); err != nil { + return fmt.Errorf("failed to refresh session key: %s", err.Error()) + } + + common.Logf("Renewing security token at: %v\n", time.Now().Format("15:04:05.000")) + if c.securityToken, err = c.getSecurityToken(); err != nil { + return fmt.Errorf("failed to get security token: %s", err.Error()) + } + common.Logf("Security token renewed at: %v\n", time.Now().Format("15:04:05.000")) + + return nil +} + +type workloadIdentityRequestPayload struct { + Podkey string `json:"podKey"` +} +type token struct { + Token string +} + +// getSecurityToken get security token from Proxymux +func (c *x509FederationClientForOkeWorkloadIdentity) getSecurityToken() (securityToken, error) { + publicKey := string(c.sessionKeySupplier.PublicKeyPemRaw()) + rawPayload := workloadIdentityRequestPayload{Podkey: publicKey} + payload, err := json.Marshal(rawPayload) + if err != nil { + return nil, fmt.Errorf("error getting security token%s", err) + } + + request, err := http.NewRequest(http.MethodPost, c.proxymuxEndpoint, bytes.NewBuffer(payload)) + + if err != nil { + common.Logf("error %s", err) + return nil, fmt.Errorf("error getting security token %s", err) + } + + kubernetesServiceAccountToken, err := c.saTokenProvider.ServiceAccountToken() + if err != nil { + common.Logf("error %s", err) + return nil, fmt.Errorf("error getting service account token %s", err) + } + + request.Header.Add("Authorization", "Bearer "+kubernetesServiceAccountToken) + request.Header.Set("Content-Type", "application/json") + opcRequestID := utils.GenerateOpcRequestID() + request.Header.Set("opc-request-id", opcRequestID) + + response, err := c.proxymuxHTTPClient().Do(request) + if err != nil { + return nil, fmt.Errorf("error %s", err) + } + + var body bytes.Buffer + defer func(body io.ReadCloser) { + err := body.Close() + if err != nil { + common.Logf("error %s", err) + } + }(response.Body) + + // Ensure body is read before returning, to allow connection reuse. + if _, err = body.ReadFrom(response.Body); err != nil { + return nil, fmt.Errorf("error reading Workload Identity token generation response: %s. Please contact OKE team", err) + } + + statusCode := response.StatusCode + if statusCode != http.StatusOK { + if statusCode == http.StatusForbidden { + return nil, fmt.Errorf("please ensure the cluster type is enhanced: Status: %s, Message: %s", + response.Status, body.String()) + } else { + return nil, fmt.Errorf("failed to get a Workload Identity token. Status: %s, Message: %s. Please contact OKE team", + response.Status, body.String()) + } + + } + + rawBody := body.String() + rawBody = rawBody[1 : len(rawBody)-1] + decodedBodyStr, err := base64.StdEncoding.DecodeString(rawBody) + if err != nil { + return nil, fmt.Errorf("error decoding Workload Identity token: %s. Please contact OKE team", err) + } + + var parsedBody token + err = json.Unmarshal(decodedBodyStr, &parsedBody) + if err != nil { + return nil, fmt.Errorf("error parsing Workload Identity token: %s. Please contact OKE team", err) + } + + token := parsedBody.Token + if len(token) == 0 { + return nil, fmt.Errorf("invalid (empty) Workload Identity token received. Please contact OKE team") + } + if len(token) < 3 { + return nil, fmt.Errorf("invalid Workload Identity token received. Please contact OKE team") + } + + return newPrincipalToken(token[3:]) +} + +func (c *x509FederationClientForOkeWorkloadIdentity) PrivateKey() (*rsa.PrivateKey, error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err := c.renewSecurityTokenIfNotValid(); err != nil { + return nil, err + } + return c.sessionKeySupplier.PrivateKey(), nil +} + +func (c *x509FederationClientForOkeWorkloadIdentity) SecurityToken() (token string, err error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err = c.renewSecurityTokenIfNotValid(); err != nil { + return "", err + } + return c.securityToken.String(), nil +} + +func (c *x509FederationClientForOkeWorkloadIdentity) renewSecurityTokenIfNotValid() (err error) { + if c.securityToken == nil || !c.securityToken.Valid() { + if err = c.renewSecurityToken(); err != nil { + return fmt.Errorf("failed to renew security token: %s", err.Error()) + } + } + return nil +} + +type workloadIdentityPrincipalToken struct { + principalToken +} + +func (t *workloadIdentityPrincipalToken) Valid() bool { + // TODO: read rpstValidForRatio from rpst token + issuedAt := int64(t.jwtToken.payload["iat"].(float64)) + expiredAt := int64(t.jwtToken.payload["exp"].(float64)) + softExpiredAt := issuedAt + int64(float64(expiredAt-issuedAt)*rpstValidForRatio) + softExpiredAtTime := time.Unix(softExpiredAt, 0) + now := time.Now().Unix() + int64(bufferTimeBeforeTokenExpiration.Seconds()) + expired := softExpiredAt <= now + if expired { + common.Debugf("Token expired at: %v", softExpiredAtTime.Format("15:04:05.000")) + } + return !expired +} + +func (c *x509FederationClientForOkeWorkloadIdentity) GetClaim(key string) (interface{}, error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err := c.renewSecurityTokenIfNotValid(); err != nil { + return nil, err + } + return c.securityToken.GetClaim(key) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/instance_principal_delegation_token_provider.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/instance_principal_delegation_token_provider.go new file mode 100644 index 000000000..94adec771 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/instance_principal_delegation_token_provider.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "crypto/rsa" + "fmt" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +type instancePrincipalDelegationTokenConfigurationProvider struct { + instancePrincipalKeyProvider instancePrincipalKeyProvider + delegationToken string + region *common.Region +} +type instancePrincipalDelegationTokenError struct { + err error +} + +func (ipe instancePrincipalDelegationTokenError) Error() string { + return fmt.Sprintf("%s\nInstance principals delegation token authentication can only be used on specific OCI services. Please confirm this code is running on the correct environment", ipe.err.Error()) +} + +// InstancePrincipalDelegationTokenConfigurationProvider returns a configuration for obo token instance principals +func InstancePrincipalDelegationTokenConfigurationProvider(delegationToken *string) (common.ConfigurationProvider, error) { + if delegationToken == nil || len(*delegationToken) == 0 { + return nil, instancePrincipalDelegationTokenError{err: fmt.Errorf("failed to create a delagationTokenConfigurationProvider: token is a mandatory input parameter")} + } + return newInstancePrincipalDelegationTokenConfigurationProvider(delegationToken, "", nil) +} + +// InstancePrincipalDelegationTokenConfigurationProviderForRegion returns a configuration for obo token instance principals with a given region +func InstancePrincipalDelegationTokenConfigurationProviderForRegion(delegationToken *string, region common.Region) (common.ConfigurationProvider, error) { + if delegationToken == nil || len(*delegationToken) == 0 { + return nil, instancePrincipalDelegationTokenError{err: fmt.Errorf("failed to create a delagationTokenConfigurationProvider: token is a mandatory input parameter")} + } + return newInstancePrincipalDelegationTokenConfigurationProvider(delegationToken, region, nil) +} + +func newInstancePrincipalDelegationTokenConfigurationProvider(delegationToken *string, region common.Region, modifier func(common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, + error)) (common.ConfigurationProvider, error) { + + keyProvider, err := newInstancePrincipalKeyProvider(modifier) + if err != nil { + return nil, instancePrincipalDelegationTokenError{err: fmt.Errorf("failed to create a new key provider for instance principal: %s", err.Error())} + } + if len(region) > 0 { + return instancePrincipalDelegationTokenConfigurationProvider{*keyProvider, *delegationToken, ®ion}, err + } + return instancePrincipalDelegationTokenConfigurationProvider{*keyProvider, *delegationToken, nil}, err +} + +func (p instancePrincipalDelegationTokenConfigurationProvider) getInstancePrincipalDelegationTokenConfigurationProvider() (instancePrincipalDelegationTokenConfigurationProvider, error) { + return p, nil +} + +func (p instancePrincipalDelegationTokenConfigurationProvider) PrivateRSAKey() (*rsa.PrivateKey, error) { + return p.instancePrincipalKeyProvider.PrivateRSAKey() +} + +func (p instancePrincipalDelegationTokenConfigurationProvider) KeyID() (string, error) { + return p.instancePrincipalKeyProvider.KeyID() +} + +func (p instancePrincipalDelegationTokenConfigurationProvider) TenancyOCID() (string, error) { + return p.instancePrincipalKeyProvider.TenancyOCID() +} + +func (p instancePrincipalDelegationTokenConfigurationProvider) UserOCID() (string, error) { + return "", nil +} + +func (p instancePrincipalDelegationTokenConfigurationProvider) KeyFingerprint() (string, error) { + return "", nil +} + +func (p instancePrincipalDelegationTokenConfigurationProvider) Region() (string, error) { + if p.region == nil { + region := p.instancePrincipalKeyProvider.RegionForFederationClient() + common.Debugf("Region in instance principal delegation token configuration provider is nil. Returning federation clients region: %s", region) + return string(region), nil + } + return string(*p.region), nil +} + +func (p instancePrincipalDelegationTokenConfigurationProvider) AuthType() (common.AuthConfig, error) { + token := p.delegationToken + return common.AuthConfig{common.InstancePrincipalDelegationToken, false, &token}, nil +} + +func (p instancePrincipalDelegationTokenConfigurationProvider) Refreshable() bool { + return true +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/instance_principal_key_provider.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/instance_principal_key_provider.go new file mode 100644 index 000000000..0f365ab4d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/instance_principal_key_provider.go @@ -0,0 +1,169 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "bytes" + "crypto/rsa" + "fmt" + "math/rand" + "net/http" + "os" + "time" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +const ( + defaultMetadataBaseURL = `http://169.254.169.254/opc/v2` + metadataBaseURLEnvVar = `OCI_METADATA_BASE_URL` + regionPath = `/instance/region` + leafCertificatePath = `/identity/cert.pem` + leafCertificateKeyPath = `/identity/key.pem` + intermediateCertificatePath = `/identity/intermediate.pem` + + leafCertificateKeyPassphrase = `` // No passphrase for the private key for Compute instances + intermediateCertificateKeyURL = `` + intermediateCertificateKeyPassphrase = `` // No passphrase for the private key for Compute instances +) + +var ( + regionURL, leafCertificateURL, leafCertificateKeyURL, intermediateCertificateURL string +) + +// instancePrincipalKeyProvider implements KeyProvider to provide a key ID and its corresponding private key +// for an instance principal by getting a security token via x509FederationClient. +// +// The region name of the endpoint for x509FederationClient is obtained from the metadata service on the compute +// instance. +type instancePrincipalKeyProvider struct { + Region common.Region + FederationClient federationClient + TenancyID string +} + +type instancePrincipalError struct { + err error +} + +func (ipe instancePrincipalError) Error() string { + return fmt.Sprintf("%s\nInstance principals authentication can only be used on OCI compute instances. Please confirm this code is running on an OCI compute instance and you have set up the policy properly.\nSee https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm for more info", ipe.err.Error()) +} + +// newInstancePrincipalKeyProvider creates and returns an instancePrincipalKeyProvider instance based on +// x509FederationClient. +// +// NOTE: There is a race condition between PrivateRSAKey() and KeyID(). These two pieces are tightly coupled; KeyID +// includes a security token obtained from Auth service by giving a public key which is paired with PrivateRSAKey. +// The x509FederationClient caches the security token in memory until it is expired. Thus, even if a client obtains a +// KeyID that is not expired at the moment, the PrivateRSAKey that the client acquires at a next moment could be +// invalid because the KeyID could be already expired. +func newInstancePrincipalKeyProvider(modifier func(common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error)) (provider *instancePrincipalKeyProvider, err error) { + updateX509CertRetrieverURLParas(getMetadataBaseURL()) + clientModifier := newDispatcherModifier(modifier) + + client, err := clientModifier.Modify(&http.Client{}) + if err != nil { + err = fmt.Errorf("failed to modify client: %s", err.Error()) + return nil, instancePrincipalError{err: err} + } + + var region common.Region + + if region, err = getRegionForFederationClient(client, regionURL); err != nil { + err = fmt.Errorf("failed to get the region name from %s: %s", regionURL, err.Error()) + common.Logf("%v\n", err) + return nil, instancePrincipalError{err: err} + } + + leafCertificateRetriever := newURLBasedX509CertificateRetriever(client, + leafCertificateURL, leafCertificateKeyURL, leafCertificateKeyPassphrase) + intermediateCertificateRetrievers := []x509CertificateRetriever{ + newURLBasedX509CertificateRetriever( + client, intermediateCertificateURL, intermediateCertificateKeyURL, + intermediateCertificateKeyPassphrase), + } + + if err = leafCertificateRetriever.Refresh(); err != nil { + err = fmt.Errorf("failed to refresh the leaf certificate: %s", err.Error()) + return nil, instancePrincipalError{err: err} + } + tenancyID := extractTenancyIDFromCertificate(leafCertificateRetriever.Certificate()) + + federationClient, err := newX509FederationClient(region, tenancyID, leafCertificateRetriever, intermediateCertificateRetrievers, *clientModifier) + + if err != nil { + err = fmt.Errorf("failed to create federation client: %s", err.Error()) + return nil, instancePrincipalError{err: err} + } + + provider = &instancePrincipalKeyProvider{FederationClient: federationClient, TenancyID: tenancyID, Region: region} + return +} + +func getRegionForFederationClient(dispatcher common.HTTPRequestDispatcher, url string) (r common.Region, err error) { + var body bytes.Buffer + var statusCode int + MaxRetriesFederationClient := 8 + for currTry := 0; currTry < MaxRetriesFederationClient; currTry++ { + body, statusCode, err = httpGet(dispatcher, url) + if err == nil && statusCode == 200 { + return common.StringToRegion(body.String()), nil + } + common.Logf("Error in getting region from url: %s, Status code: %v, Error: %s", url, statusCode, err.Error()) + nextDuration := time.Duration(float64(int(1)< 30*time.Second { + nextDuration = 30*time.Second + time.Duration(rand.Float64())*time.Second + } + common.Logf("Retrying for getRegionForFederationClinet function, current retry count is:%v, sleep after %v", currTry+1, nextDuration) + time.Sleep(nextDuration) + } + return +} + +func updateX509CertRetrieverURLParas(baseURL string) { + regionURL = baseURL + regionPath + leafCertificateURL = baseURL + leafCertificatePath + leafCertificateKeyURL = baseURL + leafCertificateKeyPath + intermediateCertificateURL = baseURL + intermediateCertificatePath +} + +func (p *instancePrincipalKeyProvider) RegionForFederationClient() common.Region { + return p.Region +} + +func (p *instancePrincipalKeyProvider) PrivateRSAKey() (privateKey *rsa.PrivateKey, err error) { + if privateKey, err = p.FederationClient.PrivateKey(); err != nil { + err = fmt.Errorf("failed to get private key: %s", err.Error()) + return nil, instancePrincipalError{err: err} + } + return privateKey, nil +} + +func (p *instancePrincipalKeyProvider) KeyID() (string, error) { + var securityToken string + var err error + if securityToken, err = p.FederationClient.SecurityToken(); err != nil { + err = fmt.Errorf("failed to get security token: %s", err.Error()) + return "", instancePrincipalError{err: err} + } + return fmt.Sprintf("ST$%s", securityToken), nil +} + +func (p *instancePrincipalKeyProvider) TenancyOCID() (string, error) { + return p.TenancyID, nil +} + +func (p *instancePrincipalKeyProvider) Refreshable() bool { + return true +} + +// Gets the Meta Data Base url from the Environment variable SNTL_METADATA_BASE_URL +// If it is not present, returns default value instead +func getMetadataBaseURL() string { + if baseURL := os.Getenv(metadataBaseURLEnvVar); baseURL != "" { + return baseURL + } + return defaultMetadataBaseURL +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/jwt.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/jwt.go new file mode 100644 index 000000000..a87706a02 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/jwt.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "bytes" + "encoding/base64" + "encoding/json" + "fmt" + "strings" + "time" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +type jwtToken struct { + raw string + header map[string]interface{} + payload map[string]interface{} +} + +const bufferTimeBeforeTokenExpiration = 5 * time.Minute + +func (t *jwtToken) expired() bool { + exp := int64(t.payload["exp"].(float64)) + expTime := time.Unix(exp, 0) + expired := exp <= time.Now().Unix()+int64(bufferTimeBeforeTokenExpiration.Seconds()) + if expired { + common.Debugf("Token expires at: %v, currently expired due to bufferTime: %v", expTime.Format("15:04:05.000"), expired) + } + return expired +} + +func parseJwt(tokenString string) (*jwtToken, error) { + parts := strings.Split(tokenString, ".") + if len(parts) != 3 { + return nil, fmt.Errorf("the given token string contains an invalid number of parts") + } + + token := &jwtToken{raw: tokenString} + var err error + + // Parse Header part + var headerBytes []byte + if headerBytes, err = decodePart(parts[0]); err != nil { + return nil, fmt.Errorf("failed to decode the header bytes: %s", err.Error()) + } + if err = json.Unmarshal(headerBytes, &token.header); err != nil { + return nil, err + } + + // Parse Payload part + var payloadBytes []byte + if payloadBytes, err = decodePart(parts[1]); err != nil { + return nil, fmt.Errorf("failed to decode the payload bytes: %s", err.Error()) + } + decoder := json.NewDecoder(bytes.NewBuffer(payloadBytes)) + if err = decoder.Decode(&token.payload); err != nil { + return nil, fmt.Errorf("failed to decode the payload json: %s", err.Error()) + } + + return token, nil +} + +func decodePart(partString string) ([]byte, error) { + if l := len(partString) % 4; 0 < l { + partString += strings.Repeat("=", 4-l) + } + return base64.URLEncoding.DecodeString(partString) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/oauth2_provider.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/oauth2_provider.go new file mode 100644 index 000000000..56b61043d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/oauth2_provider.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "crypto/rsa" + "fmt" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +// OAuth2ConfigurationProvider provides Oauth2 type authentication +type OAuth2ConfigurationProvider struct { + federationClient federationClient + sessionKeySupplier cacheableSessionKeySupplier + region string +} + +// NewOAuth2ConfigurationProvider builds an OAuth2ConfigurationProvider from an existing config provider, and auth endpoint parameters +// The config provider can be for instance, resource, or service principals. +func NewOAuth2ConfigurationProvider(configProvider common.ConfigurationProvider, scope string, targetCompartment string) (common.ConfigurationProvider, error) { + sessionKeySupplier := newCacheableSessionKeySupplier() + region, err := configProvider.Region() + if err != nil { + return nil, fmt.Errorf("failed to get region from configProvider: %s", err.Error()) + } + federationClient, err := newOAuth2FederationClient(configProvider, scope, targetCompartment, sessionKeySupplier) + if err != nil { + err = fmt.Errorf("failed to create auth provider: %w", err) + return nil, err + } + return &OAuth2ConfigurationProvider{ + federationClient: federationClient, + sessionKeySupplier: sessionKeySupplier, + region: region, + }, nil +} + +// KeyID checks if the current security token is valid, and retrieves a new token from Auth Service if not +func (p OAuth2ConfigurationProvider) KeyID() (string, error) { + var securityToken string + var err error + if securityToken, err = p.federationClient.SecurityToken(); err != nil { + err = fmt.Errorf("failed to get security token: %s", err.Error()) + return "", err + } + return fmt.Sprintf("ST$%s", securityToken), nil +} + +// PrivateRSAKey returns the private key of the session key supplier created for the OAuth Provider +func (p OAuth2ConfigurationProvider) PrivateRSAKey() (privateKey *rsa.PrivateKey, err error) { + if privateKey, err = p.federationClient.PrivateKey(); err != nil { + err = fmt.Errorf("failed to get private key: %s", err.Error()) + return nil, err + } + return privateKey, nil +} + +func (p OAuth2ConfigurationProvider) SecurityToken() (string, error) { + return p.federationClient.SecurityToken() +} + +func (p OAuth2ConfigurationProvider) TenancyOCID() (string, error) { + return "", nil +} + +func (p OAuth2ConfigurationProvider) UserOCID() (string, error) { + return "", nil +} + +func (p OAuth2ConfigurationProvider) KeyFingerprint() (string, error) { + return "", nil +} + +func (p OAuth2ConfigurationProvider) Region() (string, error) { + return p.region, nil +} + +func (p OAuth2ConfigurationProvider) AuthType() (common.AuthConfig, error) { + return common.AuthConfig{AuthType: common.OAuthDelegationToken}, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principal_delegation_token_provider.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principal_delegation_token_provider.go new file mode 100644 index 000000000..aa57fb294 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principal_delegation_token_provider.go @@ -0,0 +1,90 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "crypto/rsa" + "fmt" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +type resourcePrincipalDelegationTokenConfigurationProvider struct { + resourcePrincipalKeyProvider ConfigurationProviderWithClaimAccess + delegationToken string + region *common.Region +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) PrivateRSAKey() (*rsa.PrivateKey, error) { + return r.resourcePrincipalKeyProvider.PrivateRSAKey() +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) KeyID() (string, error) { + return r.resourcePrincipalKeyProvider.KeyID() +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) TenancyOCID() (string, error) { + return r.resourcePrincipalKeyProvider.TenancyOCID() +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) UserOCID() (string, error) { + return "", nil +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) KeyFingerprint() (string, error) { + return "", nil +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) Region() (string, error) { + if r.region == nil { + common.Debugf("Region in resource principal delegation token configuration provider is nil. Returning configuration provider region: %v", r.region) + return r.resourcePrincipalKeyProvider.Region() + } + return string(*r.region), nil +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) AuthType() (common.AuthConfig, error) { + token := r.delegationToken + return common.AuthConfig{AuthType: common.ResourcePrincipalDelegationToken, OboToken: &token}, nil +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) GetClaim(key string) (interface{}, error) { + return r.resourcePrincipalKeyProvider.GetClaim(key) +} + +type resourcePrincipalDelegationTokenError struct { + err error +} + +func (rpe resourcePrincipalDelegationTokenError) Error() string { + return fmt.Sprintf("%s\nResource principals delegation token authentication can only be used on specific OCI services. Please confirm this code is running on the correct environment", rpe.err.Error()) +} + +// ResourcePrincipalDelegationTokenConfigurationProvider returns a configuration for obo token resource principals +func ResourcePrincipalDelegationTokenConfigurationProvider(delegationToken *string) (ConfigurationProviderWithClaimAccess, error) { + if delegationToken == nil || len(*delegationToken) == 0 { + return nil, resourcePrincipalDelegationTokenError{err: fmt.Errorf("failed to create a delagationTokenConfigurationProvider: token is a mandatory input parameter")} + } + return newResourcePrincipalDelegationTokenConfigurationProvider(delegationToken, "", nil) +} + +// ResourcePrincipalDelegationTokenConfigurationProviderForRegion returns a configuration for obo token resource principals with a given region +func ResourcePrincipalDelegationTokenConfigurationProviderForRegion(delegationToken *string, region common.Region) (ConfigurationProviderWithClaimAccess, error) { + if delegationToken == nil || len(*delegationToken) == 0 { + return nil, resourcePrincipalDelegationTokenError{err: fmt.Errorf("failed to create a delagationTokenConfigurationProvider: token is a mandatory input parameter")} + } + return newResourcePrincipalDelegationTokenConfigurationProvider(delegationToken, region, nil) +} + +func newResourcePrincipalDelegationTokenConfigurationProvider(delegationToken *string, region common.Region, modifier func(common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error)) (ConfigurationProviderWithClaimAccess, error) { + + keyProvider, err := ResourcePrincipalConfigurationProvider() + if err != nil { + return nil, resourcePrincipalDelegationTokenError{err: fmt.Errorf("failed to create a new key provider for resource principal: %s", err.Error())} + } + if len(region) > 0 { + return resourcePrincipalDelegationTokenConfigurationProvider{keyProvider, *delegationToken, ®ion}, err + } + return resourcePrincipalDelegationTokenConfigurationProvider{keyProvider, *delegationToken, nil}, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principal_key_provider.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principal_key_provider.go new file mode 100644 index 000000000..2912857d2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principal_key_provider.go @@ -0,0 +1,485 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "crypto/rsa" + "crypto/x509" + "errors" + "fmt" + "io/ioutil" + "os" + "path" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +const ( + //ResourcePrincipalVersion2_2 is a supported version for resource principals + ResourcePrincipalVersion2_2 = "2.2" + //ResourcePrincipalVersionEnvVar environment var name for version + ResourcePrincipalVersionEnvVar = "OCI_RESOURCE_PRINCIPAL_VERSION" + //ResourcePrincipalRPSTEnvVar environment var name holding the token or a path to the token + ResourcePrincipalRPSTEnvVar = "OCI_RESOURCE_PRINCIPAL_RPST" + //ResourcePrincipalPrivatePEMEnvVar environment var holding a rsa private key in pem format or a path to one + ResourcePrincipalPrivatePEMEnvVar = "OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM" + //ResourcePrincipalPrivatePEMPassphraseEnvVar environment var holding the passphrase to a key or a path to one + ResourcePrincipalPrivatePEMPassphraseEnvVar = "OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE" + //ResourcePrincipalRegionEnvVar environment variable holding a region + ResourcePrincipalRegionEnvVar = "OCI_RESOURCE_PRINCIPAL_REGION" + + //ResourcePrincipalVersion1_1 is a supported version for resource principals + ResourcePrincipalVersion1_1 = "1.1" + //ResourcePrincipalSessionTokenEndpoint endpoint for retrieving the Resource Principal Session Token + ResourcePrincipalSessionTokenEndpoint = "OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT" + //ResourcePrincipalTokenEndpoint endpoint for retrieving the Resource Principal Token + ResourcePrincipalTokenEndpoint = "OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT" + + //ResourcePrincipalVersion3_0 is a supported version for resource principals + ResourcePrincipalVersion3_0 = "3.0" + ResourcePrincipalVersionForLeaf = "OCI_RESOURCE_PRINCIPAL_VERSION_FOR_LEAF_RESOURCE" + ResourcePrincipalRptEndpointForLeaf = "OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT_FOR_LEAF_RESOURCE" + ResourcePrincipalRptPathForLeaf = "OCI_RESOURCE_PRINCIPAL_RPT_PATH_FOR_LEAF_RESOURCE" + ResourcePrincipalRpstEndpointForLeaf = "OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_LEAF_RESOURCE" + ResourcePrincipalResourceIdForLeaf = "OCI_RESOURCE_PRINCIPAL_RESOURCE_ID_FOR_LEAF_RESOURCE" + ResourcePrincipalPrivatePemForLeaf = "OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_FOR_LEAF_RESOURCE" + ResourcePrincipalPrivatePemPassphraseForLeaf = "OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE_FOR_LEAF_RESOURCE" + ResourcePrincipalRpstForLeaf = "OCI_RESOURCE_PRINCIPAL_RPST_FOR_LEAF_RESOURCE" + ResourcePrincipalRegionForLeaf = "OCI_RESOURCE_PRINCIPAL_REGION_FOR_LEAF_RESOURCE" + ResourcePrincipalRptURLForParent = "OCI_RESOURCE_PRINCIPAL_RPT_URL_FOR_PARENT_RESOURCE" + ResourcePrincipalRpstEndpointForParent = "OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_PARENT_RESOURCE" + ResourcePrincipalTenancyIDForLeaf = "OCI_RESOURCE_PRINCIPAL_TENANCY_ID_FOR_LEAF_RESOURCE" + OpcParentRptUrlHeader = "opc-parent-rpt-url" + + // KubernetesServiceAccountTokenPath that contains cluster information + KubernetesServiceAccountTokenPath = "/var/run/secrets/kubernetes.io/serviceaccount/token" + // DefaultKubernetesServiceAccountCertPath that contains cluster information + DefaultKubernetesServiceAccountCertPath = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" + // OciKubernetesServiceAccountCertPath Environment variable for Kubernetes Service Account Cert Path + OciKubernetesServiceAccountCertPath = "OCI_KUBERNETES_SERVICE_ACCOUNT_CERT_PATH" + // KubernetesServiceHostEnvVar environment var holding the kubernetes host + KubernetesServiceHostEnvVar = "KUBERNETES_SERVICE_HOST" + // KubernetesProxymuxServicePort environment var holding the kubernetes port + KubernetesProxymuxServicePort = "12250" + // TenancyOCIDClaimKey is the key used to look up the resource tenancy in an RPST + TenancyOCIDClaimKey = "res_tenant" + // CompartmentOCIDClaimKey is the key used to look up the resource compartment in an RPST + CompartmentOCIDClaimKey = "res_compartment" +) + +// ConfigurationProviderWithClaimAccess mixes in a method to access the claims held on the underlying security token +type ConfigurationProviderWithClaimAccess interface { + common.ConfigurationProvider + ClaimHolder +} + +// ResourcePrincipalConfigurationProvider returns a resource principal configuration provider using well known +// environment variables to look up token information. The environment variables can either paths or contain the material value +// of the keys. However in the case of the keys and tokens paths and values can not be mixed +func ResourcePrincipalConfigurationProvider() (ConfigurationProviderWithClaimAccess, error) { + var version string + var ok bool + if version, ok = os.LookupEnv(ResourcePrincipalVersionEnvVar); !ok { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalVersionEnvVar) + return nil, resourcePrincipalError{err: err} + } + + switch version { + case ResourcePrincipalVersion2_2: + rpst := requireEnv(ResourcePrincipalRPSTEnvVar) + if rpst == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalRPSTEnvVar) + return nil, resourcePrincipalError{err: err} + } + private := requireEnv(ResourcePrincipalPrivatePEMEnvVar) + if private == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalPrivatePEMEnvVar) + return nil, resourcePrincipalError{err: err} + } + passphrase := requireEnv(ResourcePrincipalPrivatePEMPassphraseEnvVar) + region := requireEnv(ResourcePrincipalRegionEnvVar) + if region == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalRegionEnvVar) + return nil, resourcePrincipalError{err: err} + } + return newResourcePrincipalKeyProvider22( + *rpst, *private, passphrase, *region) + case ResourcePrincipalVersion1_1: + return newResourcePrincipalKeyProvider11(DefaultRptPathProvider{}) + case ResourcePrincipalVersion3_0: + return newResourcePrincipalKeyProvider30() + default: + err := fmt.Errorf("can not create resource principal, environment variable: %s, must be valid", ResourcePrincipalVersionEnvVar) + return nil, resourcePrincipalError{err: err} + } +} + +// OkeWorkloadIdentityConfigurationProvider returns a resource principal configuration provider by OKE Workload Identity +func OkeWorkloadIdentityConfigurationProvider() (ConfigurationProviderWithClaimAccess, error) { + return OkeWorkloadIdentityConfigurationProviderWithServiceAccountTokenProvider(NewDefaultServiceAccountTokenProvider()) +} + +// OkeWorkloadIdentityConfigurationProviderWithServiceAccountTokenProvider returns a resource principal configuration provider by OKE Workload Identity +// with service account token provider +func OkeWorkloadIdentityConfigurationProviderWithServiceAccountTokenProvider(saTokenProvider ServiceAccountTokenProvider) (ConfigurationProviderWithClaimAccess, error) { + var version string + var ok bool + if version, ok = os.LookupEnv(ResourcePrincipalVersionEnvVar); !ok { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalVersionEnvVar) + return nil, resourcePrincipalError{err: err} + } + + if version == ResourcePrincipalVersion1_1 || version == ResourcePrincipalVersion2_2 { + + saCertPath := requireEnv(OciKubernetesServiceAccountCertPath) + + if saCertPath == nil { + tmp := DefaultKubernetesServiceAccountCertPath + saCertPath = &tmp + } + + kubernetesServiceAccountCertRaw, err := ioutil.ReadFile(*saCertPath) + if err != nil { + err = fmt.Errorf("can not create resource principal, error getting Kubernetes Service Account Token at %s", *saCertPath) + return nil, resourcePrincipalError{err: err} + } + + kubernetesServiceAccountCert := x509.NewCertPool() + kubernetesServiceAccountCert.AppendCertsFromPEM(kubernetesServiceAccountCertRaw) + + region := requireEnv(ResourcePrincipalRegionEnvVar) + if region == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", + ResourcePrincipalRegionEnvVar) + return nil, resourcePrincipalError{err: err} + } + + k8sServiceHost := requireEnv(KubernetesServiceHostEnvVar) + if k8sServiceHost == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", + KubernetesServiceHostEnvVar) + return nil, resourcePrincipalError{err: err} + } + proxymuxEndpoint := fmt.Sprintf("https://%s:%s/resourcePrincipalSessionTokens", *k8sServiceHost, KubernetesProxymuxServicePort) + + return newOkeWorkloadIdentityProvider(proxymuxEndpoint, saTokenProvider, kubernetesServiceAccountCert, *region) + } + + err := fmt.Errorf("can not create resource principal, environment variable: %s, must be valid", ResourcePrincipalVersionEnvVar) + return nil, resourcePrincipalError{err: err} +} + +func OkeWorkloadIdentityConfigurationProviderWithServiceAccountTokenProviderK8sService(k8sServiceHost *string, saTokenProvider ServiceAccountTokenProvider, remoteCAbytes []byte) (ConfigurationProviderWithClaimAccess, error) { + saCertPath := requireEnv(OciKubernetesServiceAccountCertPath) + + if saCertPath == nil { + tmp := DefaultKubernetesServiceAccountCertPath + saCertPath = &tmp + } + + kubernetesServiceAccountCertRaw, err := ioutil.ReadFile(*saCertPath) + if err != nil { + err = fmt.Errorf("can not create resource principal, error getting Kubernetes Service Account Token at %s", *saCertPath) + return nil, resourcePrincipalError{err: err} + } + + kubernetesServiceAccountCert := x509.NewCertPool() + kubernetesServiceAccountCert.AppendCertsFromPEM(kubernetesServiceAccountCertRaw) + if ok := kubernetesServiceAccountCert.AppendCertsFromPEM(remoteCAbytes); !ok { + err := fmt.Errorf("failed to load remote CA") + return nil, resourcePrincipalError{err: err} + } + + region := requireEnv(ResourcePrincipalRegionEnvVar) + if region == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", + ResourcePrincipalRegionEnvVar) + return nil, resourcePrincipalError{err: err} + } + + proxymuxEndpoint := fmt.Sprintf("https://%s:%s/resourcePrincipalSessionTokens", *k8sServiceHost, KubernetesProxymuxServicePort) + + return newOkeWorkloadIdentityProvider(proxymuxEndpoint, saTokenProvider, kubernetesServiceAccountCert, *region) + + return nil, resourcePrincipalError{err: err} +} + +// ResourcePrincipalConfigurationProviderForRegion returns a resource principal configuration provider using well known +// environment variables to look up token information, for a given region. The environment variables can either paths or contain the material value +// of the keys. However, in the case of the keys and tokens paths and values can not be mixed +func ResourcePrincipalConfigurationProviderForRegion(region common.Region) (ConfigurationProviderWithClaimAccess, error) { + var version string + var ok bool + if version, ok = os.LookupEnv(ResourcePrincipalVersionEnvVar); !ok { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalVersionEnvVar) + return nil, resourcePrincipalError{err: err} + } + + switch version { + case ResourcePrincipalVersion2_2: + rpst := requireEnv(ResourcePrincipalRPSTEnvVar) + if rpst == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalRPSTEnvVar) + return nil, resourcePrincipalError{err: err} + } + private := requireEnv(ResourcePrincipalPrivatePEMEnvVar) + if private == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalPrivatePEMEnvVar) + return nil, resourcePrincipalError{err: err} + } + passphrase := requireEnv(ResourcePrincipalPrivatePEMPassphraseEnvVar) + region := string(region) + if region == "" { + err := fmt.Errorf("can not create resource principal, region cannot be empty") + return nil, resourcePrincipalError{err: err} + } + return newResourcePrincipalKeyProvider22( + *rpst, *private, passphrase, region) + case ResourcePrincipalVersion1_1: + return newResourcePrincipalKeyProvider11(DefaultRptPathProvider{}) + default: + err := fmt.Errorf("can not create resource principal, environment variable: %s, must be valid", ResourcePrincipalVersionEnvVar) + return nil, resourcePrincipalError{err: err} + } +} + +// ResourcePrincipalConfigurationProviderWithPathProvider returns a resource principal configuration provider using path provider. +func ResourcePrincipalConfigurationProviderWithPathProvider(pathProvider PathProvider) (ConfigurationProviderWithClaimAccess, error) { + var version string + var ok bool + if version, ok = os.LookupEnv(ResourcePrincipalVersionEnvVar); !ok { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalVersionEnvVar) + return nil, resourcePrincipalError{err: err} + } else if version != ResourcePrincipalVersion1_1 { + err := fmt.Errorf("can not create resource principal, environment variable: %s, must be %s", ResourcePrincipalVersionEnvVar, ResourcePrincipalVersion1_1) + return nil, resourcePrincipalError{err: err} + } + return newResourcePrincipalKeyProvider11(pathProvider) +} + +func newResourcePrincipalKeyProvider11(pathProvider PathProvider) (ConfigurationProviderWithClaimAccess, error) { + rptEndpoint := requireEnv(ResourcePrincipalTokenEndpoint) + if rptEndpoint == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalTokenEndpoint) + return nil, resourcePrincipalError{err: err} + } + rptPath, err := pathProvider.Path() + if err != nil { + err := fmt.Errorf("can not create resource principal, due to: %s ", err.Error()) + return nil, resourcePrincipalError{err: err} + } + resourceID, err := pathProvider.ResourceID() + if err != nil { + err := fmt.Errorf("can not create resource principal, due to: %s ", err.Error()) + return nil, resourcePrincipalError{err: err} + } + rp, err := resourcePrincipalConfigurationProviderV1(*rptEndpoint+*rptPath, *resourceID) + if err != nil { + err := fmt.Errorf("can not create resource principal, due to: %s ", err.Error()) + return nil, resourcePrincipalError{err: err} + } + return rp, nil +} + +func requireEnv(key string) *string { + if val, ok := os.LookupEnv(key); ok { + return &val + } + return nil +} + +// resourcePrincipalKeyProvider22 is key provider that reads from specified the specified environment variables +// the environment variables can host the material keys/passphrases or they can be paths to files that need to be read +type resourcePrincipalKeyProvider struct { + FederationClient federationClient + KeyProviderRegion common.Region +} + +func newResourcePrincipalKeyProvider22(sessionTokenLocation, privatePemLocation string, + passphraseLocation *string, region string) (*resourcePrincipalKeyProvider, error) { + + //Check both the passphrase and the key are paths + if passphraseLocation != nil && (!isPath(privatePemLocation) && isPath(*passphraseLocation) || + isPath(privatePemLocation) && !isPath(*passphraseLocation)) { + err := fmt.Errorf("cant not create resource principal: both key and passphrase need to be path or none needs to be path") + return nil, resourcePrincipalError{err: err} + } + + var supplier sessionKeySupplier + var err error + + //File based case + if isPath(privatePemLocation) { + supplier, err = newFileBasedKeySessionSupplier(privatePemLocation, passphraseLocation) + if err != nil { + err := fmt.Errorf("can not create resource principal, due to: %s ", err.Error()) + return nil, resourcePrincipalError{err: err} + } + } else { + //else the content is in the env vars + var passphrase []byte + if passphraseLocation != nil { + passphrase = []byte(*passphraseLocation) + } + supplier, err = newStaticKeySessionSupplier([]byte(privatePemLocation), passphrase) + if err != nil { + err := fmt.Errorf("can not create resource principal, due to: %s ", err.Error()) + return nil, resourcePrincipalError{err: err} + } + } + + var fd federationClient + if isPath(sessionTokenLocation) { + fd, _ = newFileBasedFederationClient(sessionTokenLocation, supplier) + } else { + fd, err = newStaticFederationClient(sessionTokenLocation, supplier) + + if err != nil { + err := fmt.Errorf("can not create resource principal, due to: %s ", err.Error()) + return nil, resourcePrincipalError{err: err} + } + } + + rs := resourcePrincipalKeyProvider{ + FederationClient: fd, + KeyProviderRegion: common.StringToRegion(region), + } + + return &rs, nil +} + +func newResourcePrincipalKeyProvider30() (ConfigurationProviderWithClaimAccess, error) { + rpVersionForLeafResource := requireEnv(ResourcePrincipalVersionForLeaf) + if rpVersionForLeafResource == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalVersionForLeaf) + return nil, resourcePrincipalError{err: err} + } + var leafResourceAuthProvider ConfigurationProviderWithClaimAccess + var err error + switch *rpVersionForLeafResource { + case ResourcePrincipalVersion1_1: + leafResourceAuthProvider, err = newResourcePrincipalKeyProvider11(RptPathProviderForLeafResource{}) + if err != nil { + return nil, err + } + return ResourcePrincipalConfigurationProviderV3(leafResourceAuthProvider) + case ResourcePrincipalVersion2_2: + rpst := requireEnv(ResourcePrincipalRpstForLeaf) + if rpst == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalRpstForLeaf) + return nil, resourcePrincipalError{err: err} + } + private := requireEnv(ResourcePrincipalPrivatePemForLeaf) + if private == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalPrivatePemForLeaf) + return nil, resourcePrincipalError{err: err} + } + passphrase := requireEnv(ResourcePrincipalPrivatePemPassphraseForLeaf) + region := requireEnv(ResourcePrincipalRegionForLeaf) + if region == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", ResourcePrincipalRegionForLeaf) + return nil, resourcePrincipalError{err: err} + } + leafResourceAuthProvider, err = newResourcePrincipalKeyProvider22( + *rpst, *private, passphrase, *region) + if err != nil { + return nil, err + } + return ResourcePrincipalConfigurationProviderV3(leafResourceAuthProvider) + default: + err := fmt.Errorf("can not create resource principal, environment variable: %s, must be valid", ResourcePrincipalVersionForLeaf) + return nil, resourcePrincipalError{err: err} + + } +} + +func newOkeWorkloadIdentityProvider(proxymuxEndpoint string, saTokenProvider ServiceAccountTokenProvider, + kubernetesServiceAccountCert *x509.CertPool, region string) (*resourcePrincipalKeyProvider, error) { + var err error + var fd federationClient + fd, err = newX509FederationClientForOkeWorkloadIdentity(proxymuxEndpoint, saTokenProvider, kubernetesServiceAccountCert) + + if err != nil { + err := fmt.Errorf("can not create resource principal, due to: %s ", err.Error()) + return nil, resourcePrincipalError{err: err} + } + + rs := resourcePrincipalKeyProvider{ + FederationClient: fd, + KeyProviderRegion: common.StringToRegion(region), + } + + return &rs, nil +} + +func (p *resourcePrincipalKeyProvider) PrivateRSAKey() (privateKey *rsa.PrivateKey, err error) { + if privateKey, err = p.FederationClient.PrivateKey(); err != nil { + err = fmt.Errorf("failed to get private key: %s", err.Error()) + return nil, resourcePrincipalError{err: err} + } + return privateKey, nil +} + +func (p *resourcePrincipalKeyProvider) KeyID() (string, error) { + var securityToken string + var err error + if securityToken, err = p.FederationClient.SecurityToken(); err != nil { + err = fmt.Errorf("failed to get security token: %s", err.Error()) + return "", resourcePrincipalError{err: err} + } + return fmt.Sprintf("ST$%s", securityToken), nil +} + +func (p *resourcePrincipalKeyProvider) Region() (string, error) { + return string(p.KeyProviderRegion), nil +} + +var ( + // ErrNonStringClaim is returned if the token has a claim for a key, but it's not a string value + ErrNonStringClaim = errors.New("claim does not have a string value") +) + +func (p *resourcePrincipalKeyProvider) TenancyOCID() (string, error) { + if claim, err := p.GetClaim(TenancyOCIDClaimKey); err != nil { + return "", err + } else if tenancy, ok := claim.(string); ok { + return tenancy, nil + } else { + return "", ErrNonStringClaim + } +} + +func (p *resourcePrincipalKeyProvider) GetClaim(claim string) (interface{}, error) { + return p.FederationClient.GetClaim(claim) +} + +func (p *resourcePrincipalKeyProvider) KeyFingerprint() (string, error) { + return "", nil +} + +func (p *resourcePrincipalKeyProvider) UserOCID() (string, error) { + return "", nil +} + +func (p *resourcePrincipalKeyProvider) AuthType() (common.AuthConfig, error) { + return common.AuthConfig{common.UnknownAuthenticationType, false, nil}, fmt.Errorf("unsupported, keep the interface") +} + +func (p *resourcePrincipalKeyProvider) Refreshable() bool { + return true +} + +// By contract for the the content of a resource principal to be considered path, it needs to be +// an absolute path. +func isPath(str string) bool { + return path.IsAbs(str) +} + +type resourcePrincipalError struct { + err error +} + +func (ipe resourcePrincipalError) Error() string { + return fmt.Sprintf("%s\nResource principals authentication can only be used in certain OCI services. Please check that the OCI service you're running this code from supports Resource principals.\nSee https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_authentication_methods.htm#sdk_authentication_methods_resource_principal for more info.", ipe.err.Error()) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principal_token_path_provider.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principal_token_path_provider.go new file mode 100644 index 000000000..8407e0096 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principal_token_path_provider.go @@ -0,0 +1,247 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io/ioutil" + "net/http" + "time" +) + +const ( + imdsPathTemplate = "/20180711/resourcePrincipalToken/{id}" + instanceIDURL = `http://169.254.169.254/opc/v2/instance/id` + + //ResourcePrincipalTokenPath path for retrieving the Resource Principal Token + ResourcePrincipalTokenPath = "OCI_RESOURCE_PRINCIPAL_RPT_PATH" + //ResourceID OCID for the resource for Resource Principal + ResourceID = "OCI_RESOURCE_PRINCIPAL_RPT_ID" +) + +// PathProvider is an interface that returns path and resource ID +type PathProvider interface { + Path() (*string, error) + ResourceID() (*string, error) +} + +// StringRptPathProvider is a simple path provider that takes a string and returns it +type StringRptPathProvider struct { + path string + resourceID string +} + +// Path returns the resource principal token path +func (pp StringRptPathProvider) Path() (*string, error) { + return &pp.path, nil +} + +// ResourceID returns the resource associated with the resource principal +func (pp StringRptPathProvider) ResourceID() (*string, error) { + return &pp.resourceID, nil +} + +// ImdsRptPathProvider sets the path from a default value and the resource ID from instance metadata +type ImdsRptPathProvider struct{} + +// Path returns the resource principal token path +func (pp ImdsRptPathProvider) Path() (*string, error) { + path := imdsPathTemplate + return &path, nil +} + +// ResourceID returns the resource associated with the resource principal +func (pp ImdsRptPathProvider) ResourceID() (*string, error) { + instanceID, err := getInstanceIDFromMetadata() + return &instanceID, err +} + +// EnvRptPathProvider sets the path and resource ID from environment variables +type EnvRptPathProvider struct{} + +// Path returns the resource principal token path +func (pp EnvRptPathProvider) Path() (*string, error) { + path := requireEnv(ResourcePrincipalTokenPath) + if path == nil { + return nil, fmt.Errorf("missing %s env var", ResourcePrincipalTokenPath) + } + return path, nil +} + +// ResourceID returns the resource associated with the resource principal +func (pp EnvRptPathProvider) ResourceID() (*string, error) { + rpID := requireEnv(ResourceID) + if rpID == nil { + return nil, fmt.Errorf("missing %s env var", ResourceID) + } + return rpID, nil +} + +// DefaultRptPathProvider path provider makes sure the behavior happens with the correct fallback. +// +// For the path, +// Use the contents of the OCI_RESOURCE_PRINCIPAL_RPT_PATH environment variable, if set. +// Otherwise, use the current path: "/20180711/resourcePrincipalToken/{id}" +// +// For the resource id, +// Use the contents of the OCI_RESOURCE_PRINCIPAL_RPT_ID environment variable, if set. +// Otherwise, use IMDS to get the instance id +// +// This path provider is used when the caller doesn't provide a specific path provider to the resource principals signer +type DefaultRptPathProvider struct { + path string + resourceID string +} + +// Path returns the resource principal token path +func (pp DefaultRptPathProvider) Path() (*string, error) { + path := requireEnv(ResourcePrincipalTokenPath) + if path == nil { + rpPath := imdsPathTemplate + return &rpPath, nil + } + return path, nil +} + +// ResourceID returns the resource associated with the resource principal +func (pp DefaultRptPathProvider) ResourceID() (*string, error) { + rpID := requireEnv(ResourceID) + if rpID == nil { + instanceID, err := getInstanceIDFromMetadata() + if err != nil { + return nil, err + } + return &instanceID, nil + } + return rpID, nil +} + +type RptPathProviderForLeafResource struct { + path string + resourceID string +} + +func (pp RptPathProviderForLeafResource) Path() (*string, error) { + path := requireEnv(ResourcePrincipalRptPathForLeaf) + if path == nil { + rpPath := imdsPathTemplate + return &rpPath, nil + } + return path, nil +} + +// ResourceID returns the resource associated with the resource principal +func (pp RptPathProviderForLeafResource) ResourceID() (*string, error) { + rpID := requireEnv(ResourcePrincipalResourceIdForLeaf) + if rpID == nil { + instanceID, err := getInstanceIDFromMetadata() + if err != nil { + return nil, err + } + return &instanceID, nil + } + return rpID, nil +} + +func getInstanceIDFromMetadata() (instanceID string, err error) { + client := &http.Client{} + req, err := http.NewRequest("GET", instanceIDURL, nil) + if err != nil { + return "", err + } + req.Header.Set("Authorization", "Bearer Oracle") + resp, err := client.Do(req) + if err != nil { + return "", err + } + defer resp.Body.Close() + + bodyBytes, err := ioutil.ReadAll(resp.Body) + if err != nil { + return "", err + } + bodyString := string(bodyBytes) + return bodyString, nil +} + +// ServiceAccountTokenProvider comment +type ServiceAccountTokenProvider interface { + ServiceAccountToken() (string, error) +} + +// DefaultServiceAccountTokenProvider is supplied by user when instantiating +// OkeWorkloadIdentityConfigurationProvider +type DefaultServiceAccountTokenProvider struct { + tokenPath string `mandatory:"false"` +} + +// NewDefaultServiceAccountTokenProvider returns a new instance of defaultServiceAccountTokenProvider +func NewDefaultServiceAccountTokenProvider() DefaultServiceAccountTokenProvider { + return DefaultServiceAccountTokenProvider{ + tokenPath: KubernetesServiceAccountTokenPath, + } +} + +// WithSaTokenPath Builder method to override the to SA ken path +func (d DefaultServiceAccountTokenProvider) WithSaTokenPath(tokenPath string) DefaultServiceAccountTokenProvider { + d.tokenPath = tokenPath + return d +} + +// ServiceAccountToken returns a service account token +func (d DefaultServiceAccountTokenProvider) ServiceAccountToken() (string, error) { + saTokenString, err := ioutil.ReadFile(d.tokenPath) + if err != nil { + common.Logf("error %s", err) + return "", fmt.Errorf("error reading service account token: %s", err) + } + isSaTokenValid, err := isValidSaToken(string(saTokenString)) + if !isSaTokenValid { + common.Logf("error %s", err) + return "", fmt.Errorf("error validating service account token: %s", err) + } + return string(saTokenString), err +} + +// SuppliedServiceAccountTokenProvider is supplied by user when instantiating +// OkeWorkloadIdentityConfigurationProviderWithServiceAccountTokenProvider +type SuppliedServiceAccountTokenProvider struct { + tokenString string `mandatory:"false"` +} + +// NewSuppliedServiceAccountTokenProvider returns a new instance of defaultServiceAccountTokenProvider +func NewSuppliedServiceAccountTokenProvider(tokenString string) SuppliedServiceAccountTokenProvider { + return SuppliedServiceAccountTokenProvider{tokenString: tokenString} +} + +// ServiceAccountToken returns a service account token +func (d SuppliedServiceAccountTokenProvider) ServiceAccountToken() (string, error) { + isSaTokenValid, err := isValidSaToken(d.tokenString) + if !isSaTokenValid { + common.Logf("error %s", err) + return "", fmt.Errorf("error validating service account token %s", err) + } + return d.tokenString, nil +} + +// isValidSaToken returns true is a saTokenString provides a valid service account token +func isValidSaToken(saTokenString string) (bool, error) { + var jwtToken *jwtToken + var err error + if jwtToken, err = parseJwt(saTokenString); err != nil { + return false, fmt.Errorf("failed to parse the default service token string \"%s\": %s", saTokenString, err.Error()) + } + now := time.Now().Unix() + int64(bufferTimeBeforeTokenExpiration.Seconds()) + if jwtToken.payload["exp"] == nil { + return false, fmt.Errorf("service token doesn't have an `exp` field") + } + expiredAt := int64(jwtToken.payload["exp"].(float64)) + expired := expiredAt <= now + if expired { + return false, fmt.Errorf("service token expired at: %v", time.Unix(expiredAt, 0).Format("15:04:05.000")) + } + + return true, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principals_v1.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principals_v1.go new file mode 100644 index 000000000..eb7ab5466 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principals_v1.go @@ -0,0 +1,377 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "context" + "crypto/rsa" + "fmt" + + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "net/url" + "sync" + "time" +) + +// resourcePrincipalFederationClient is the client used to to talk acquire resource principals +// No auth client, leaf or intermediate retrievers. We use certificates retrieved by instance principals to sign the operations of +// resource principals +type resourcePrincipalFederationClient struct { + tenancyID string + instanceID string + sessionKeySupplier sessionKeySupplier + mux sync.Mutex + securityToken securityToken + path string + + //instancePrincipalKeyProvider the instance Principal Key container + instancePrincipalKeyProvider instancePrincipalKeyProvider + + //ResourcePrincipalTargetServiceClient client that calls the target service to acquire a resource principal token + ResourcePrincipalTargetServiceClient common.BaseClient + + //ResourcePrincipalSessionTokenClient. The client used to communicate with identity to exchange a resource principal for + // resource principal session token + ResourcePrincipalSessionTokenClient common.BaseClient +} + +type resourcePrincipalTokenRequest struct { + InstanceID string `contributesTo:"path" name:"id"` +} + +type resourcePrincipalTokenResponse struct { + Body struct { + ResourcePrincipalToken string `json:"resourcePrincipalToken"` + ServicePrincipalSessionToken string `json:"servicePrincipalSessionToken"` + } `presentIn:"body"` +} + +type resourcePrincipalSessionTokenRequestBody struct { + ResourcePrincipalToken string `json:"resourcePrincipalToken,omitempty"` + ServicePrincipalSessionToken string `json:"servicePrincipalSessionToken,omitempty"` + SessionPublicKey string `json:"sessionPublicKey,omitempty"` +} +type resourcePrincipalSessionTokenRequest struct { + Body resourcePrincipalSessionTokenRequestBody `contributesTo:"body"` +} + +// acquireResourcePrincipalToken acquires the resource principal from the target service +func (c *resourcePrincipalFederationClient) acquireResourcePrincipalToken() (tokenResponse resourcePrincipalTokenResponse, err error) { + rpServiceClient := c.ResourcePrincipalTargetServiceClient + + //Set the signer of this client to be the instance principal provider + rpServiceClient.Signer = common.DefaultRequestSigner(&c.instancePrincipalKeyProvider) + + //Create a request with the instanceId + request, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, c.path, resourcePrincipalTokenRequest{InstanceID: c.instanceID}) + if err != nil { + return + } + + //Call the target service + response, err := rpServiceClient.Call(context.Background(), &request) + if err != nil { + return + } + + defer common.CloseBodyIfValid(response) + + tokenResponse = resourcePrincipalTokenResponse{} + err = common.UnmarshalResponse(response, &tokenResponse) + return +} + +// exchangeToken exchanges a resource principal token from the target service with a session token from identity +func (c *resourcePrincipalFederationClient) exchangeToken(publicKeyBase64 string, tokenResponse resourcePrincipalTokenResponse) (sessionToken string, err error) { + rpServiceClient := c.ResourcePrincipalSessionTokenClient + + //Set the signer of this client to be the instance principal provider + rpServiceClient.Signer = common.DefaultRequestSigner(&c.instancePrincipalKeyProvider) + + // Call identity service to get resource principal session token + sessionTokenReq := resourcePrincipalSessionTokenRequest{ + resourcePrincipalSessionTokenRequestBody{ + ServicePrincipalSessionToken: tokenResponse.Body.ServicePrincipalSessionToken, + ResourcePrincipalToken: tokenResponse.Body.ResourcePrincipalToken, + SessionPublicKey: publicKeyBase64, + }, + } + + sessionTokenHTTPReq, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, + "", sessionTokenReq) + if err != nil { + return + } + + sessionTokenHTTPRes, err := rpServiceClient.Call(context.Background(), &sessionTokenHTTPReq) + if err != nil { + return + } + defer common.CloseBodyIfValid(sessionTokenHTTPRes) + + sessionTokenRes := x509FederationResponse{} + err = common.UnmarshalResponse(sessionTokenHTTPRes, &sessionTokenRes) + if err != nil { + return + } + + sessionToken = sessionTokenRes.Token.Token + return +} + +// getSecurityToken makes the appropiate calls to acquire a resource principal security token +func (c *resourcePrincipalFederationClient) getSecurityToken() (securityToken, error) { + var err error + ipFederationClient := c.instancePrincipalKeyProvider.FederationClient + + common.Debugf("Refreshing instance principal token") + //Refresh instance principal token + if refreshable, ok := ipFederationClient.(*x509FederationClient); ok { + err = refreshable.renewSecurityTokenIfNotValid() + if err != nil { + return nil, err + } + } + + //Acquire resource principal token from target service + common.Debugf("Acquiring resource principal token from target service") + tokenResponse, err := c.acquireResourcePrincipalToken() + if err != nil { + return nil, err + } + + //Read the public key from the session supplier. + pem := c.sessionKeySupplier.PublicKeyPemRaw() + pemSanitized := sanitizeCertificateString(string(pem)) + + //Exchange resource principal token for session token from identity + common.Debugf("Exchanging resource principal token for resource principal session token") + sessionToken, err := c.exchangeToken(pemSanitized, tokenResponse) + if err != nil { + return nil, err + } + + return newPrincipalToken(sessionToken) // should be a resource principal token +} + +func (c *resourcePrincipalFederationClient) renewSecurityToken() (err error) { + if err = c.sessionKeySupplier.Refresh(); err != nil { + return fmt.Errorf("failed to refresh session key: %s", err.Error()) + } + common.Logf("Renewing resource principal security token at: %v\n", time.Now().Format("15:04:05.000")) + if c.securityToken, err = c.getSecurityToken(); err != nil { + return fmt.Errorf("failed to get security token: %s", err.Error()) + } + common.Logf("Resource principal security token renewed at: %v\n", time.Now().Format("15:04:05.000")) + + return nil +} + +// ResourcePrincipal Key provider in charge of resource principal acquiring tokens +type resourcePrincipalKeyProviderV1 struct { + ResourcePrincipalClient resourcePrincipalFederationClient +} + +func (c *resourcePrincipalFederationClient) renewSecurityTokenIfNotValid() (err error) { + if c.securityToken == nil || !c.securityToken.Valid() { + if err = c.renewSecurityToken(); err != nil { + return fmt.Errorf("failed to renew resource prinicipal security token: %s", err.Error()) + } + } + return nil +} + +func (c *resourcePrincipalFederationClient) PrivateKey() (*rsa.PrivateKey, error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err := c.renewSecurityTokenIfNotValid(); err != nil { + return nil, err + } + return c.sessionKeySupplier.PrivateKey(), nil +} + +func (c *resourcePrincipalFederationClient) SecurityToken() (token string, err error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err = c.renewSecurityTokenIfNotValid(); err != nil { + return "", err + } + return c.securityToken.String(), nil +} + +func (p *resourcePrincipalConfigurationProvider) PrivateRSAKey() (privateKey *rsa.PrivateKey, err error) { + if privateKey, err = p.keyProvider.ResourcePrincipalClient.PrivateKey(); err != nil { + err = fmt.Errorf("failed to get resource principal private key: %s", err.Error()) + return nil, err + } + return privateKey, nil +} + +func (p *resourcePrincipalConfigurationProvider) KeyID() (string, error) { + var securityToken string + var err error + if securityToken, err = p.keyProvider.ResourcePrincipalClient.SecurityToken(); err != nil { + return "", fmt.Errorf("failed to get resource principal security token: %s", err.Error()) + } + return fmt.Sprintf("ST$%s", securityToken), nil +} + +func (p *resourcePrincipalConfigurationProvider) TenancyOCID() (string, error) { + return p.keyProvider.ResourcePrincipalClient.instancePrincipalKeyProvider.TenancyOCID() +} + +// todo what is this +func (p *resourcePrincipalConfigurationProvider) GetClaim(key string) (interface{}, error) { + return nil, nil +} + +// Resource Principals +type resourcePrincipalConfigurationProvider struct { + keyProvider resourcePrincipalKeyProviderV1 + region *common.Region +} + +func newResourcePrincipalKeyProvider(ipKeyProvider instancePrincipalKeyProvider, rpTokenTargetServiceClient, rpSessionTokenClient common.BaseClient, instanceID, path string) (keyProvider resourcePrincipalKeyProviderV1, err error) { + rpFedClient := resourcePrincipalFederationClient{} + rpFedClient.tenancyID = ipKeyProvider.TenancyID + rpFedClient.instanceID = instanceID + rpFedClient.sessionKeySupplier = newSessionKeySupplier() + rpFedClient.ResourcePrincipalTargetServiceClient = rpTokenTargetServiceClient + rpFedClient.ResourcePrincipalSessionTokenClient = rpSessionTokenClient + rpFedClient.instancePrincipalKeyProvider = ipKeyProvider + rpFedClient.path = path + keyProvider = resourcePrincipalKeyProviderV1{ResourcePrincipalClient: rpFedClient} + return +} + +func (p *resourcePrincipalConfigurationProvider) AuthType() (common.AuthConfig, error) { + return common.AuthConfig{common.UnknownAuthenticationType, false, nil}, + fmt.Errorf("unsupported, keep the interface") +} + +func (p resourcePrincipalConfigurationProvider) UserOCID() (string, error) { + return "", nil +} + +func (p resourcePrincipalConfigurationProvider) KeyFingerprint() (string, error) { + return "", nil +} + +func (p resourcePrincipalConfigurationProvider) Region() (string, error) { + if p.region == nil { + region := p.keyProvider.ResourcePrincipalClient.instancePrincipalKeyProvider.RegionForFederationClient() + common.Debugf("Region in resource principal configuration provider is nil. Returning instance principal federation clients region: %s", region) + return string(region), nil + } + return string(*p.region), nil +} + +func (p resourcePrincipalConfigurationProvider) Refreshable() bool { + return true +} + +// resourcePrincipalConfigurationProviderForInstanceWithClients returns a configuration for instance principals +// resourcePrincipalTargetServiceTokenClient and resourcePrincipalSessionTokenClient are clients that at last need to have +// their base path and host properly set for their respective services. Additionally the clients can be further customized +// to provide mocking or any other customization for the requests/responses +func resourcePrincipalConfigurationProviderForInstanceWithClients(instancePrincipalProvider common.ConfigurationProvider, + resourcePrincipalTargetServiceTokenClient, resourcePrincipalSessionTokenClient common.BaseClient, instanceID, path string) (*resourcePrincipalConfigurationProvider, error) { + var ok bool + var ip instancePrincipalConfigurationProvider + if ip, ok = instancePrincipalProvider.(instancePrincipalConfigurationProvider); !ok { + return nil, fmt.Errorf("instancePrincipalConfigurationProvider needs to be of type vald Instance Principal Configuration Provider") + } + + keyProvider, err := newResourcePrincipalKeyProvider(ip.keyProvider, resourcePrincipalTargetServiceTokenClient, resourcePrincipalSessionTokenClient, instanceID, path) + if err != nil { + return nil, err + } + + provider := &resourcePrincipalConfigurationProvider{ + region: nil, + keyProvider: keyProvider, + } + return provider, nil +} + +const identityResourcePrincipalSessionTokenPath = "/v1/resourcePrincipalSessionToken" + +// resourcePrincipalConfigurationProviderForInstanceWithInterceptor creates a resource principal configuration provider with +// a interceptor used to customize the call going to the resource principal token request to the target service +// for a given instance ID +func resourcePrincipalConfigurationProviderForInstanceWithInterceptor(instancePrincipalProvider common.ConfigurationProvider, resourcePrincipalTokenEndpoint, instanceID string, interceptor common.RequestInterceptor) (provider *resourcePrincipalConfigurationProvider, err error) { + + //Build the target service client + rpTargetServiceClient, err := common.NewClientWithConfig(instancePrincipalProvider) + if err != nil { + return + } + + rpTokenURL, err := url.Parse(resourcePrincipalTokenEndpoint) + if err != nil { + return + } + + rpTargetServiceClient.Host = rpTokenURL.Scheme + "://" + rpTokenURL.Host + rpTargetServiceClient.Interceptor = interceptor + + var path string + if rpTokenURL.Path != "" { + path = rpTokenURL.Path + } else { + path = identityResourcePrincipalSessionTokenPath + } + + //Build the identity client for token service + rpTokenSessionClient, err := common.NewClientWithConfig(instancePrincipalProvider) + if err != nil { + return + } + + // Set RPST endpoint if passed in from env var, otherwise create it from region + resourcePrincipalSessionTokenEndpoint := requireEnv(ResourcePrincipalSessionTokenEndpoint) + if resourcePrincipalSessionTokenEndpoint != nil { + rpSessionTokenURL, err := url.Parse(*resourcePrincipalSessionTokenEndpoint) + if err != nil { + return nil, err + } + + rpTokenSessionClient.Host = rpSessionTokenURL.Scheme + "://" + rpSessionTokenURL.Host + } else { + regionStr, err := instancePrincipalProvider.Region() + if err != nil { + return nil, fmt.Errorf("missing RPST env var and cannot determine region: %v", err) + } + region := common.StringToRegion(regionStr) + rpTokenSessionClient.Host = fmt.Sprintf("https://%s", region.Endpoint("auth")) + } + + rpTokenSessionClient.BasePath = identityResourcePrincipalSessionTokenPath + + return resourcePrincipalConfigurationProviderForInstanceWithClients(instancePrincipalProvider, rpTargetServiceClient, rpTokenSessionClient, instanceID, path) +} + +// ResourcePrincipalConfigurationProviderWithInterceptor creates a resource principal configuration provider with endpoints +// a interceptor used to customize the call going to the resource principal token request to the target service +// see https://godoc.org/github.com/oracle/oci-go-sdk/common#RequestInterceptor +func ResourcePrincipalConfigurationProviderWithInterceptor(instancePrincipalProvider common.ConfigurationProvider, + resourcePrincipalTokenEndpoint, resourcePrincipalSessionTokenEndpoint string, + interceptor common.RequestInterceptor) (common.ConfigurationProvider, error) { + + return resourcePrincipalConfigurationProviderForInstanceWithInterceptor(instancePrincipalProvider, resourcePrincipalTokenEndpoint, "", interceptor) +} + +// resourcePrincipalConfigurationProviderV1 creates a resource principal configuration provider with +// endpoints for both resource principal token and resource principal token session +func resourcePrincipalConfigurationProviderV1(resourcePrincipalTokenEndpoint, resourceID string) (*resourcePrincipalConfigurationProvider, error) { + + instancePrincipalProvider, err := InstancePrincipalConfigurationProvider() + if err != nil { + return nil, err + } + return resourcePrincipalConfigurationProviderForInstanceWithInterceptor(instancePrincipalProvider, resourcePrincipalTokenEndpoint, resourceID, nil) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principals_v3.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principals_v3.go new file mode 100644 index 000000000..47a985f04 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/resource_principals_v3.go @@ -0,0 +1,351 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "context" + "crypto/rsa" + "fmt" + "net/http" + "net/url" + "strings" + "sync" + "time" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +type resourcePrincipalV3Client struct { + securityToken securityToken + mux sync.Mutex + sessionKeySupplier sessionKeySupplier + rptUrl string + rpstUrl string + + leafResourcePrincipalKeyProvider ConfigurationProviderWithClaimAccess + + //ResourcePrincipalTargetServiceClient client that calls the target service to acquire a resource principal token + //ResourcePrincipalTargetServiceClient common.BaseClient + + //ResourcePrincipalSessionTokenClient. The client used to communicate with identity to exchange a resource principal for + // resource principal session token + //ResourcePrincipalSessionTokenClient common.BaseClient +} + +// acquireResourcePrincipalToken acquires the resource principal from the target service +func (c *resourcePrincipalV3Client) acquireResourcePrincipalToken(rptClient common.BaseClient, path string, signer common.HTTPRequestSigner) (tokenResponse resourcePrincipalTokenResponse, parentRptURL string, err error) { + rpServiceClient := rptClient + rpServiceClient.Signer = signer + + //Create a request with the instanceId + request := common.MakeDefaultHTTPRequest(http.MethodGet, path) + + //Call the target service + response, err := rpServiceClient.Call(context.Background(), &request) + if err != nil { + return + } + + defer common.CloseBodyIfValid(response) + + // Extract the opc-parent-rpt-url header value + parentRptURL = response.Header.Get(OpcParentRptUrlHeader) + + tokenResponse = resourcePrincipalTokenResponse{} + err = common.UnmarshalResponse(response, &tokenResponse) + return +} + +// exchangeToken exchanges a resource principal token from the target service with a session token from identity +func (c *resourcePrincipalV3Client) exchangeToken(rpstClient common.BaseClient, signer common.HTTPRequestSigner, publicKeyBase64 string, tokenResponse resourcePrincipalTokenResponse) (sessionToken string, err error) { + rpServiceClient := rpstClient + rpServiceClient.Signer = signer + + // Call identity service to get resource principal session token + sessionTokenReq := resourcePrincipalSessionTokenRequest{ + resourcePrincipalSessionTokenRequestBody{ + ServicePrincipalSessionToken: tokenResponse.Body.ServicePrincipalSessionToken, + ResourcePrincipalToken: tokenResponse.Body.ResourcePrincipalToken, + SessionPublicKey: publicKeyBase64, + }, + } + + sessionTokenHTTPReq, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, + "", sessionTokenReq) + if err != nil { + return + } + + sessionTokenHTTPRes, err := rpServiceClient.Call(context.Background(), &sessionTokenHTTPReq) + if err != nil { + return + } + defer common.CloseBodyIfValid(sessionTokenHTTPRes) + + sessionTokenRes := x509FederationResponse{} + err = common.UnmarshalResponse(sessionTokenHTTPRes, &sessionTokenRes) + if err != nil { + return + } + + sessionToken = sessionTokenRes.Token.Token + return +} + +// getSecurityToken makes the appropriate calls to acquire a resource principal security token +func (c *resourcePrincipalV3Client) getSecurityToken() (securityToken, error) { + + //c.leafResourcePrincipalKeyProvider.KeyID() + //common.Debugf("Refreshing resource principal token") + + //Read the public key from the session supplier. + pem := c.sessionKeySupplier.PublicKeyPemRaw() + pemSanitized := sanitizeCertificateString(string(pem)) + + return c.getSecurityTokenWithDepth(c.leafResourcePrincipalKeyProvider, 1, c.rptUrl, pemSanitized) + +} + +func (c *resourcePrincipalV3Client) getSecurityTokenWithDepth(keyProvider ConfigurationProviderWithClaimAccess, depth int, rptUrl, publicKey string) (securityToken, error) { + //Build the target service client + rpTargetServiceClient, err := common.NewClientWithConfig(keyProvider) + if err != nil { + return nil, err + } + + rpTokenURL, err := url.Parse(rptUrl) + if err != nil { + return nil, err + } + + common.Debugf("rptURL: %v", rpTokenURL) + + rpTargetServiceClient.Host = rpTokenURL.Scheme + "://" + rpTokenURL.Host + + //Build the identity client for token service + rpTokenSessionClient, err := common.NewClientWithConfig(keyProvider) + if err != nil { + return nil, err + } + + // Set RPST endpoint if passed in from env var, otherwise create it from region + if c.rpstUrl != "" { + rpSessionTokenURL, err := url.Parse(c.rpstUrl) + if err != nil { + return nil, err + } + + rpTokenSessionClient.Host = rpSessionTokenURL.Scheme + "://" + rpSessionTokenURL.Host + } else { + regionStr, err := c.leafResourcePrincipalKeyProvider.Region() + if err != nil { + return nil, fmt.Errorf("missing RPST env var and cannot determine region: %v", err) + } + region := common.StringToRegion(regionStr) + rpTokenSessionClient.Host = fmt.Sprintf("https://%s", region.Endpoint("auth")) + } + + rpTokenSessionClient.BasePath = identityResourcePrincipalSessionTokenPath + + //Acquire resource principal token from target service + common.Debugf("Acquiring resource principal token from target service") + tokenResponse, parentRptURL, err := c.acquireResourcePrincipalToken(rpTargetServiceClient, rpTokenURL.Path, common.DefaultRequestSigner(keyProvider)) + if err != nil { + return nil, err + } + + //Exchange resource principal token for session token from identity + common.Debugf("Exchanging resource principal token for resource principal session token") + sessionToken, err := c.exchangeToken(rpTokenSessionClient, common.DefaultRequestSigner(keyProvider), publicKey, tokenResponse) + if err != nil { + return nil, err + } + + // Base condition for recursion + // return the security token obtained last in the following cases + // 1. if depth is more than 10 + // 2. if opc-parent-rpt-url header is not passed or is empty + // 3. if opc-parent-rpt-url matches the last rpt url + if depth >= 10 || parentRptURL == "" || strings.EqualFold(parentRptURL, rptUrl) { + return newPrincipalToken(sessionToken) + } + + fd, err := newStaticFederationClient(sessionToken, c.sessionKeySupplier) + + if err != nil { + err := fmt.Errorf("can not create resource principal, due to: %s ", err.Error()) + return nil, resourcePrincipalError{err: err} + } + + region, _ := keyProvider.Region() + + configProviderForNextCall := resourcePrincipalKeyProvider{ + fd, common.Region(region), + } + + return c.getSecurityTokenWithDepth(&configProviderForNextCall, depth+1, parentRptURL, publicKey) + +} + +func (c *resourcePrincipalV3Client) renewSecurityToken() (err error) { + if err = c.sessionKeySupplier.Refresh(); err != nil { + return fmt.Errorf("failed to refresh session key: %s", err.Error()) + } + + common.Logf("Renewing security token at: %v\n", time.Now().Format("15:04:05.000")) + if c.securityToken, err = c.getSecurityToken(); err != nil { + return fmt.Errorf("failed to get security token: %s", err.Error()) + } + common.Logf("Security token renewed at: %v\n", time.Now().Format("15:04:05.000")) + + return nil +} + +func (c *resourcePrincipalV3Client) renewSecurityTokenIfNotValid() (err error) { + if c.securityToken == nil || !c.securityToken.Valid() { + if err = c.renewSecurityToken(); err != nil { + return fmt.Errorf("failed to renew resource principal security token: %s", err.Error()) + } + } + return nil +} + +func (c *resourcePrincipalV3Client) PrivateKey() (*rsa.PrivateKey, error) { + c.mux.Lock() + defer c.mux.Unlock() + if err := c.renewSecurityTokenIfNotValid(); err != nil { + return nil, err + } + return c.sessionKeySupplier.PrivateKey(), nil +} + +func (c *resourcePrincipalV3Client) SecurityToken() (token string, err error) { + c.mux.Lock() + defer c.mux.Unlock() + + if err = c.renewSecurityTokenIfNotValid(); err != nil { + return "", err + } + return c.securityToken.String(), nil +} + +type resourcePrincipalKeyProviderV3 struct { + resourcePrincipalClient resourcePrincipalV3Client +} + +type resourcePrincipalV30ConfigurationProvider struct { + keyProvider resourcePrincipalKeyProviderV3 + region *common.Region +} + +func (r *resourcePrincipalV30ConfigurationProvider) Refreshable() bool { + return true +} + +func (r *resourcePrincipalV30ConfigurationProvider) PrivateRSAKey() (*rsa.PrivateKey, error) { + privateKey, err := r.keyProvider.resourcePrincipalClient.PrivateKey() + if err != nil { + err = fmt.Errorf("failed to get resource principal private key: %s", err.Error()) + return nil, err + } + return privateKey, nil +} + +func (r *resourcePrincipalV30ConfigurationProvider) KeyID() (string, error) { + var securityToken string + var err error + if securityToken, err = r.keyProvider.resourcePrincipalClient.SecurityToken(); err != nil { + return "", fmt.Errorf("failed to get resource principal security token: %s", err.Error()) + } + return fmt.Sprintf("ST$%s", securityToken), nil +} + +func (r *resourcePrincipalV30ConfigurationProvider) TenancyOCID() (string, error) { + return r.keyProvider.resourcePrincipalClient.leafResourcePrincipalKeyProvider.TenancyOCID() +} + +func (r *resourcePrincipalV30ConfigurationProvider) UserOCID() (string, error) { + return "", nil +} + +func (r *resourcePrincipalV30ConfigurationProvider) KeyFingerprint() (string, error) { + return "", nil +} + +func (r *resourcePrincipalV30ConfigurationProvider) Region() (string, error) { + if r.region == nil { + common.Debugf("Region in resource principal configuration provider v30 is nil.") + return "", nil + } + return string(*r.region), nil +} + +func (r *resourcePrincipalV30ConfigurationProvider) AuthType() (common.AuthConfig, error) { + return common.AuthConfig{common.UnknownAuthenticationType, false, nil}, + fmt.Errorf("unsupported, keep the interface") +} + +func (r *resourcePrincipalV30ConfigurationProvider) GetClaim(key string) (interface{}, error) { + //TODO implement me + panic("implement me") +} + +type resourcePrincipalV30ConfiguratorBuilder struct { + leafResourcePrincipalKeyProvider ConfigurationProviderWithClaimAccess + rptUrlForParent, rpstUrlForParent *string +} + +// ResourcePrincipalV3ConfiguratorBuilder creates a new resourcePrincipalV30ConfiguratorBuilder. +func ResourcePrincipalV3ConfiguratorBuilder(leafResourcePrincipalKeyProvider ConfigurationProviderWithClaimAccess) *resourcePrincipalV30ConfiguratorBuilder { + return &resourcePrincipalV30ConfiguratorBuilder{ + leafResourcePrincipalKeyProvider: leafResourcePrincipalKeyProvider, + } +} + +// WithParentRPTURL sets the rptUrlForParent field. +func (b *resourcePrincipalV30ConfiguratorBuilder) WithParentRPTURL(rptUrlForParent string) *resourcePrincipalV30ConfiguratorBuilder { + b.rptUrlForParent = &rptUrlForParent + return b +} + +// WithParentRPSTURL sets the rpstUrlForParent field. +func (b *resourcePrincipalV30ConfiguratorBuilder) WithParentRPSTURL(rpstUrlForParent string) *resourcePrincipalV30ConfiguratorBuilder { + b.rpstUrlForParent = &rpstUrlForParent + return b +} + +// Build creates a ConfigurationProviderWithClaimAccess based on the configured values. +func (b *resourcePrincipalV30ConfiguratorBuilder) Build() (ConfigurationProviderWithClaimAccess, error) { + + if b.rptUrlForParent == nil { + err := fmt.Errorf("can not create resource principal, environment variable: %s, not present", + ResourcePrincipalRptURLForParent) + return nil, resourcePrincipalError{err: err} + } + + if b.rpstUrlForParent == nil { + common.Debugf("Environment variable %s not present, setting to empty string", ResourcePrincipalRpstEndpointForParent) + *b.rpstUrlForParent = "" + } + + rpFedClient := resourcePrincipalV3Client{} + rpFedClient.rptUrl = *b.rptUrlForParent + rpFedClient.rpstUrl = *b.rpstUrlForParent + rpFedClient.sessionKeySupplier = newSessionKeySupplier() + rpFedClient.leafResourcePrincipalKeyProvider = b.leafResourcePrincipalKeyProvider + region, _ := b.leafResourcePrincipalKeyProvider.Region() + + return &resourcePrincipalV30ConfigurationProvider{ + keyProvider: resourcePrincipalKeyProviderV3{rpFedClient}, + region: (*common.Region)(®ion), + }, nil +} + +// ResourcePrincipalConfigurationProviderV3 ResourcePrincipalConfigurationProvider is a function that creates and configures a resource principal. +func ResourcePrincipalConfigurationProviderV3(leafResourcePrincipalKeyProvider ConfigurationProviderWithClaimAccess) (ConfigurationProviderWithClaimAccess, error) { + builder := ResourcePrincipalV3ConfiguratorBuilder(leafResourcePrincipalKeyProvider) + builder.rptUrlForParent = requireEnv(ResourcePrincipalRptURLForParent) + builder.rpstUrlForParent = requireEnv(ResourcePrincipalRpstEndpointForParent) + return builder.Build() +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/utils.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/utils.go new file mode 100644 index 000000000..f00ce7c5e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/utils.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "bytes" + "crypto/rsa" + "crypto/sha256" + "crypto/x509" + "encoding/base64" + "fmt" + "net/http" + "net/http/httputil" + "strings" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +// httpGet makes a simple HTTP GET request to the given URL, expecting only "200 OK" status code. +// This is basically for the Instance Metadata Service. +func httpGet(dispatcher common.HTTPRequestDispatcher, url string) (body bytes.Buffer, statusCode int, err error) { + var response *http.Response + request, err := http.NewRequest(http.MethodGet, url, nil) + + request.Header.Add("Authorization", "Bearer Oracle") + + if response, err = dispatcher.Do(request); err != nil { + return + } + + statusCode = response.StatusCode + common.IfDebug(func() { + if dump, e := httputil.DumpResponse(response, true); e == nil { + common.Logf("Dump Response %v", common.RedactSensitiveStringForLogs(string(dump))) + } else { + common.Debugln(e) + } + }) + + defer response.Body.Close() + if _, err = body.ReadFrom(response.Body); err != nil { + return + } + + if statusCode != http.StatusOK { + err = fmt.Errorf("HTTP Get failed: URL: %s, Status: %s, Message: %s", + url, response.Status, body.String()) + return + } + + return +} + +func extractTenancyIDFromCertificate(cert *x509.Certificate) string { + for _, nameAttr := range cert.Subject.Names { + value := nameAttr.Value.(string) + if strings.HasPrefix(value, "opc-tenant:") { + return value[len("opc-tenant:"):] + } + } + return "" +} + +func fingerprint(certificate *x509.Certificate) string { + fingerprint := sha256.Sum256(certificate.Raw) + return colonSeparatedString(fingerprint) +} + +func colonSeparatedString(fingerprint [sha256.Size]byte) string { + spaceSeparated := fmt.Sprintf("% x", fingerprint) + return strings.Replace(spaceSeparated, " ", ":", -1) +} + +func sanitizeCertificateString(certString string) string { + certString = strings.Replace(certString, "-----BEGIN CERTIFICATE-----", "", -1) + certString = strings.Replace(certString, "-----END CERTIFICATE-----", "", -1) + certString = strings.Replace(certString, "-----BEGIN PUBLIC KEY-----", "", -1) + certString = strings.Replace(certString, "-----END PUBLIC KEY-----", "", -1) + certString = strings.Replace(certString, "\n", "", -1) + return certString +} + +// GetGenericConfigurationProvider checks auth config paras in config file and return the final configuration provider +func GetGenericConfigurationProvider(configProvider common.ConfigurationProvider) (common.ConfigurationProvider, error) { + if authConfig, err := configProvider.AuthType(); err == nil && authConfig.IsFromConfigFile { + switch authConfig.AuthType { + case common.InstancePrincipalDelegationToken: + if region, err := configProvider.Region(); err == nil { + return InstancePrincipalDelegationTokenConfigurationProviderForRegion(authConfig.OboToken, common.StringToRegion(region)) + } + return InstancePrincipalDelegationTokenConfigurationProvider(authConfig.OboToken) + case common.InstancePrincipal: + return InstancePrincipalConfigurationProvider() + case common.UserPrincipal: + return configProvider, nil + } + } + return configProvider, nil +} + +// privateToPublicDERBase64 takes an RSA Private Key and returns a public key in +// DER format. +func privateToPublicDERBase64(pk *rsa.PrivateKey) (string, error) { + publicBytes, err := x509.MarshalPKIXPublicKey(pk.Public()) + if err != nil { + return "", err + } + return base64.StdEncoding.EncodeToString(publicBytes), nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/workload_identity_federation.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/workload_identity_federation.go new file mode 100644 index 000000000..86464478a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/auth/workload_identity_federation.go @@ -0,0 +1,241 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "crypto/md5" + "crypto/rsa" + "crypto/x509" + "encoding/base64" + "encoding/hex" + "fmt" + "strings" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +type TokenExchangeBuilder struct { + DomainUrl string + ClientId string + ClientSecret string + Region string + RequestedTokenType string + ResType string + RpstExp string + SubjectTokenType string + PublicKey string + InstancePrincipalProvider common.ConfigurationProvider +} + +// TokenIssuer defines a type capable of retrieving tokens for the issuing +// authorization server. +type TokenIssuer interface { + GetToken() (string, error) +} + +// StaticTokenIssuer is a defined TokenIssuer that holds a static token. Not suitable +// for use longer than the validity period of the token. +type StaticTokenIssuer struct { + token string +} + +// GetToken satisfies the TokenIssuer interface for StaticTokenIssuer by returning +// the token held by StaticTokenIssuer. +func (s StaticTokenIssuer) GetToken() (string, error) { + return s.token, nil +} + +// TokenExchangeConfigurationProvider provides OCI configuration via token exchange, +// exposing claims and supporting a custom HTTP client. +type TokenExchangeConfigurationProvider struct { + federationClient federationClient + region common.Region +} + +// TokenExchangeConfigurationProviderFromIssuer creates a Configuration Provider from a +// function provided to retrieve a token from an identity provider. +func TokenExchangeConfigurationProviderFromIssuer(tokenIssuer TokenIssuer, + tokenExchangeBuilder TokenExchangeBuilder) (common.ConfigurationProvider, error) { + + if tokenIssuer == nil { + return nil, fmt.Errorf("invalid TokenIssuer") + } + + var authCode string + if tokenExchangeBuilder.ClientId != "" && tokenExchangeBuilder.ClientSecret != "" { + authCode = base64.StdEncoding.EncodeToString([]byte( + tokenExchangeBuilder.ClientId + ":" + tokenExchangeBuilder.ClientSecret)) + } + + requestData := map[string][]string{ + "grant_type": {"urn:ietf:params:oauth:grant-type:token-exchange"}, + } + + if tokenExchangeBuilder.RequestedTokenType == "" { + return nil, fmt.Errorf("requested_token_type must be provided and non-empty") + } else { + requestData["requested_token_type"] = []string{tokenExchangeBuilder.RequestedTokenType} + } + + if tokenExchangeBuilder.SubjectTokenType != "" { + requestData["subject_token_type"] = []string{tokenExchangeBuilder.SubjectTokenType} + } + + if tokenExchangeBuilder.PublicKey != "" { + requestData["public_key"] = []string{tokenExchangeBuilder.PublicKey} + } + + if tokenExchangeBuilder.RequestedTokenType == "urn:oci:token-type:oci-rpst" { + if tokenExchangeBuilder.ResType != "" { + requestData["res_type"] = []string{tokenExchangeBuilder.ResType} + } else { + return nil, fmt.Errorf("res_type parameter is required when requested_token_type is urn:oci:token-type:oci-rpst") + } + + if tokenExchangeBuilder.RpstExp != "" { + requestData["rpst_exp"] = []string{tokenExchangeBuilder.RpstExp} + } + } + + instancePrincipalProvider := tokenExchangeBuilder.InstancePrincipalProvider + + if instancePrincipalProvider == nil && authCode == "" { + return nil, fmt.Errorf("InstancePrincipalProvider or ClientId and ClientSecret must be provided and non-nil") + } + + fc := newTokenExchangeFederationClient(tokenIssuer, tokenExchangeBuilder.DomainUrl, authCode, requestData, instancePrincipalProvider) + + return TokenExchangeConfigurationProvider{ + federationClient: fc, + region: common.StringToRegion(tokenExchangeBuilder.Region), + }, nil +} + +// TokenExchangeConfigurationProviderFromToken returns a new configuration provider +// from a static token. +func TokenExchangeConfigurationProviderFromToken(token string, tokenExchangeBuilder TokenExchangeBuilder) (common.ConfigurationProvider, error) { + + issuer := StaticTokenIssuer{token: token} + + return TokenExchangeConfigurationProviderFromIssuer(issuer, tokenExchangeBuilder) +} + +func (c TokenExchangeConfigurationProvider) GetClaim(key string) (interface{}, error) { + return c.federationClient.GetClaim(key) +} + +func (c TokenExchangeConfigurationProvider) KeyID() (string, error) { + return c.federationClient.SecurityToken() +} + +func (c TokenExchangeConfigurationProvider) PrivateRSAKey() (*rsa.PrivateKey, error) { + return c.federationClient.PrivateKey() +} + +// TenancyOCID provides the required receiver for the ConfigurationProvider interface +func (c TokenExchangeConfigurationProvider) TenancyOCID() (string, error) { + claim, err := c.federationClient.GetClaim("tenant") + if err != nil { + return "", err + } + + ocid, ok := claim.(string) + if !ok { + return "", ErrNonStringClaim + } + + return ocid, nil +} + +// UserOCID provides the required receiver for the ConfigurationProvider interface. +func (c TokenExchangeConfigurationProvider) UserOCID() (string, error) { + claim, err := c.federationClient.GetClaim("sub") + if err != nil { + return "", err + } + + ocid, ok := claim.(string) + if !ok { + return "", ErrNonStringClaim + } + + return ocid, nil +} + +// KeyFingerprint provides the required receiver for the ConfigurationProvider +// interface. +func (c TokenExchangeConfigurationProvider) KeyFingerprint() (string, error) { + privateKey, err := c.PrivateRSAKey() + if err != nil { + return "", err + } + der, err := x509.MarshalPKIXPublicKey(privateKey.Public()) + if err != nil { + return "", err + } + + sum := md5.Sum(der) + hexStr := hex.EncodeToString(sum[:]) // 32 hex chars + + var sb strings.Builder + for i := 0; i < len(hexStr); i += 2 { + if i > 0 { + sb.WriteByte(':') + } + sb.WriteString(hexStr[i : i+2]) + } + return sb.String(), nil + +} + +// Region provides the required receiver for the ConfigurationProvider interface. +func (c TokenExchangeConfigurationProvider) Region() (string, error) { + r := string(c.region) + if r == "" { + return "", fmt.Errorf("no region assigned") + } + + return r, nil +} + +// AuthType provides the required receiver for the ConfigurationProvider interface. +func (c TokenExchangeConfigurationProvider) AuthType() (common.AuthConfig, error) { + + return common.AuthConfig{ + AuthType: common.WorkloadIdentityFederation, + IsFromConfigFile: false, + }, nil +} + +// tokenExchangeToken contains token and any related fields. +type tokenExchangeToken struct { + token jwtToken +} + +// String implements fmt.Stringer. +func (t tokenExchangeToken) String() string { + return t.token.raw +} + +// Valid implements the securityToken interface. +func (t tokenExchangeToken) Valid() bool { + return !t.token.expired() +} + +// GetClaim implements the ClaimHolder interface. +func (t tokenExchangeToken) GetClaim(key string) (interface{}, error) { + + // Per RFC7519 parsers should return only the lexically last member in the case + // of duplicate claim names. We check payload first and return if claim found + // and check header only if claim is not found in payload. + if claim, ok := t.token.payload[key]; ok { + return claim, nil + } + + if claim, ok := t.token.header[key]; ok { + return claim, nil + } + + return nil, ErrNoSuchClaim +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/circuit_breaker.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/circuit_breaker.go new file mode 100644 index 000000000..7a65c8b89 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/circuit_breaker.go @@ -0,0 +1,412 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +import ( + "fmt" + "math/rand" + "net/http" + "os" + "strconv" + "sync" + "time" + + "github.com/sony/gobreaker/v2" +) + +const ( + // CircuitBreakerDefaultFailureRateThreshold is the requests failure rate which calculates in at most 120 seconds, once reaches to this rate, the circuit breaker state changes from closed to open + CircuitBreakerDefaultFailureRateThreshold float64 = 0.80 + // CircuitBreakerDefaultClosedWindow is the default value of closeStateWindow, which is the cyclic period of the closed state + CircuitBreakerDefaultClosedWindow time.Duration = 120 * time.Second + // CircuitBreakerDefaultResetTimeout is the default value of openStateWindow, which is the wait time before setting the breaker to halfOpen state from open state + CircuitBreakerDefaultResetTimeout time.Duration = 30 * time.Second + // CircuitBreakerDefaultVolumeThreshold is the default value of minimumRequests in closed status + CircuitBreakerDefaultVolumeThreshold uint32 = 10 + // DefaultCircuitBreakerName is the name of the circuit breaker + DefaultCircuitBreakerName string = "DefaultCircuitBreaker" + // DefaultCircuitBreakerServiceName is the servicename of the circuit breaker + DefaultCircuitBreakerServiceName string = "" + // DefaultCircuitBreakerHistoryCount is the default count of failed response history in circuit breaker + DefaultCircuitBreakerHistoryCount int = 5 + // MinAuthClientCircuitBreakerResetTimeout is the min value of openStateWindow, which is the wait time before setting the breaker to halfOpen state from open state + MinAuthClientCircuitBreakerResetTimeout = 30 + // MaxAuthClientCircuitBreakerResetTimeout is the max value of openStateWindow, which is the wait time before setting the breaker to halfOpen state from open state + MaxAuthClientCircuitBreakerResetTimeout = 49 + // AuthClientCircuitBreakerName is the default circuit breaker name for the DefaultAuthClientCircuitBreakerSetting + AuthClientCircuitBreakerName = "FederationClientCircuitBreaker" + // AuthClientCircuitBreakerDefaultFailureThreshold is the default requests failure rate for the DefaultAuthClientCircuitBreakerSetting + AuthClientCircuitBreakerDefaultFailureThreshold float64 = 0.65 + // AuthClientCircuitBreakerDefaultMinimumRequests is the default value of minimumRequests in closed status + AuthClientCircuitBreakerDefaultMinimumRequests uint32 = 3 +) + +// CircuitBreakerSetting wraps all exposed configurable params of circuit breaker +type CircuitBreakerSetting struct { + // Name is the Circuit Breaker's identifier + name string + // isEnabled is the switch of the circuit breaker, used for disable circuit breaker + isEnabled bool + // closeStateWindow is the cyclic period of the closed state, the default value is 120 seconds + closeStateWindow time.Duration + // openStateWindow is the wait time before setting the breaker to halfOpen state from open state, the default value is 30 seconds + openStateWindow time.Duration + // failureRateThreshold is the failure rate which calculates in at most closeStateWindow seconds, once reaches to this rate, the circuit breaker state changes from closed to open + // the circuit will transition from closed to open, the default value is 80% + failureRateThreshold float64 + // minimumRequests is the minimum number of counted requests in closed state, the default value is 10 requests + minimumRequests uint32 + // successStatCodeMap is the error(s) of StatusCode returned from service, which should be considered as the success or failure accounted by circuit breaker + // successStatCodeMap and successStatErrCodeMap are combined to use, if both StatusCode and ErrorCode are required, no need to add it to successStatCodeMap, + // the default value is [429, 500, 502, 503, 504] + successStatCodeMap map[int]bool + // successStatErrCodeMap is the error(s) of StatusCode and ErrorCode returned from service, which should be considered + // as the success or failure accounted by circuit breaker + // the default value is {409, "IncorrectState"}, {409, "LockConflict"} + successStatErrCodeMap map[StatErrCode]bool + // serviceName is the name of the service which can be set using withServiceName option for NewCircuitBreaker. + // the default value is empty string + serviceName string + // numberOfRecordedHistoryResponse is the number of failure responses stored in Circuit breaker history for debugging purpose + // the default value is 5 + numberOfRecordedHistoryResponse int +} + +// String Converts CircuitBreakerSetting to human-readable string representation +func (cbst CircuitBreakerSetting) String() string { + return fmt.Sprintf("{name=%v, isEnabled=%v, closeStateWindow=%v, openStateWindow=%v, failureRateThreshold=%v, minimumRequests=%v, successStatCodeMap=%v, successStatErrCodeMap=%v, serviceName=%v, historyCount=%v}", + cbst.name, cbst.isEnabled, cbst.closeStateWindow, cbst.openStateWindow, cbst.failureRateThreshold, cbst.minimumRequests, cbst.successStatCodeMap, cbst.successStatErrCodeMap, cbst.serviceName, cbst.numberOfRecordedHistoryResponse) +} + +// ResponseHistory wraps the response params +type ResponseHistory struct { + timestamp time.Time + opcReqID string + errorCode string + errorMessage string + statusCode int +} + +// String Converts ResponseHistory to human-readable string representation +func (rh ResponseHistory) String() string { + return fmt.Sprintf("Opc-Req-id - %v\nErrorCode - %v - %v\nErrorMessage - %v\n\n", rh.opcReqID, rh.statusCode, rh.errorCode, rh.errorMessage) +} + +// AddToHistory processed the response and adds to response history queue +func (ocb *OciCircuitBreaker) AddToHistory(resp *http.Response, err ServiceError) { + respHist := new(ResponseHistory) + respHist.opcReqID = err.GetOpcRequestID() + respHist.errorCode = err.GetCode() + respHist.errorMessage = err.GetMessage() + respHist.statusCode = err.GetHTTPStatusCode() + respHist.timestamp, _ = time.Parse(time.RFC1123, resp.Header.Get("Date")) + ocb.historyQueueMutex.Lock() + defer ocb.historyQueueMutex.Unlock() + ocb.historyQueue = append(ocb.historyQueue, *respHist) + // cleaning up older values + if len(ocb.historyQueue) > ocb.Cbst.numberOfRecordedHistoryResponse { + // We have reached the capacity. Clean up the oldest value + ocb.historyQueue = ocb.historyQueue[1:] + } + for index := len(ocb.historyQueue) - 1; index >= 0; index-- { + if time.Since(ocb.historyQueue[index].timestamp) > ocb.Cbst.closeStateWindow { + // This response is older than the circuit breaker closeStateWindow. + // Remove all the older responses from 0 to index + ocb.historyQueue = ocb.historyQueue[index+1:] + break + } + } + return +} + +// GetHistory processes the rsponse in queue to construct a String +func (ocb *OciCircuitBreaker) GetHistory() string { + getHistoryString := "" + ocb.historyQueueMutex.Lock() + defer ocb.historyQueueMutex.Unlock() + for _, value := range ocb.historyQueue { + getHistoryString += value.String() + } + return getHistoryString +} + +// OciCircuitBreaker wraps all exposed configurable params of circuit breaker and 3P gobreaker CircuitBreaker +type OciCircuitBreaker struct { + Cbst *CircuitBreakerSetting + Cb *gobreaker.CircuitBreaker[any] + historyQueue []ResponseHistory + historyQueueMutex sync.Mutex +} + +// NewOciCircuitBreaker is used for initializing specified oci circuit breaker configuration with circuit breaker settings +func NewOciCircuitBreaker(cbst *CircuitBreakerSetting, gbcb *gobreaker.CircuitBreaker[any]) *OciCircuitBreaker { + ocb := new(OciCircuitBreaker) + ocb.Cbst = cbst + if ocb.Cbst.numberOfRecordedHistoryResponse == 0 { + fmt.Println("num hist empty") + ocb.Cbst.numberOfRecordedHistoryResponse = getDefaultNumHistoryCount() + } + ocb.Cb = gbcb + ocb.historyQueue = make([]ResponseHistory, 0, ocb.Cbst.numberOfRecordedHistoryResponse) + + return ocb +} + +// CircuitBreakerOption is the type of the options for NewCircuitBreakerWithOptions. +type CircuitBreakerOption func(cbst *CircuitBreakerSetting) + +// NewGoCircuitBreaker is a function to initialize a CircuitBreaker object with the specified configuration +// Add the interface, to allow the user directly use the 3P gobreaker.Setting's params. +func NewGoCircuitBreaker(st gobreaker.Settings) *gobreaker.CircuitBreaker[any] { + return gobreaker.NewCircuitBreaker[any](st) +} + +// DefaultCircuitBreakerSetting is used for set circuit breaker with default config +func DefaultCircuitBreakerSetting() *CircuitBreakerSetting { + successStatErrCodeMap := map[StatErrCode]bool{ + {409, "IncorrectState"}: false, + {409, "LockConflict"}: false, + } + successStatCodeMap := map[int]bool{ + 429: false, + 500: false, + 502: false, + 503: false, + 504: false, + } + return newCircuitBreakerSetting( + WithName(DefaultCircuitBreakerName), + WithIsEnabled(true), + WithCloseStateWindow(CircuitBreakerDefaultClosedWindow), + WithOpenStateWindow(CircuitBreakerDefaultResetTimeout), + WithFailureRateThreshold(CircuitBreakerDefaultFailureRateThreshold), + WithMinimumRequests(CircuitBreakerDefaultVolumeThreshold), + WithSuccessStatErrCodeMap(successStatErrCodeMap), + WithSuccessStatCodeMap(successStatCodeMap), + WithHistoryCount(getDefaultNumHistoryCount())) +} + +// DefaultCircuitBreakerSettingWithServiceName is used for set circuit breaker with default config +func DefaultCircuitBreakerSettingWithServiceName(servicename string) *CircuitBreakerSetting { + successStatErrCodeMap := map[StatErrCode]bool{ + {409, "IncorrectState"}: false, + {409, "LockConflict"}: false, + } + successStatCodeMap := map[int]bool{ + 429: false, + 500: false, + 502: false, + 503: false, + 504: false, + } + return newCircuitBreakerSetting( + WithName(DefaultCircuitBreakerName), + WithIsEnabled(true), + WithCloseStateWindow(CircuitBreakerDefaultClosedWindow), + WithOpenStateWindow(CircuitBreakerDefaultResetTimeout), + WithFailureRateThreshold(CircuitBreakerDefaultFailureRateThreshold), + WithMinimumRequests(CircuitBreakerDefaultVolumeThreshold), + WithSuccessStatErrCodeMap(successStatErrCodeMap), + WithSuccessStatCodeMap(successStatCodeMap), + WithServiceName(servicename), + WithHistoryCount(getDefaultNumHistoryCount())) +} + +// NoCircuitBreakerSetting is used for disable Circuit Breaker +func NoCircuitBreakerSetting() *CircuitBreakerSetting { + return NewCircuitBreakerSettingWithOptions(WithIsEnabled(false)) +} + +// NewCircuitBreakerSettingWithOptions is a helper method to assemble a CircuitBreakerSetting object. +// It starts out with the values returned by defaultCircuitBreakerSetting(). +func NewCircuitBreakerSettingWithOptions(opts ...CircuitBreakerOption) *CircuitBreakerSetting { + cbst := DefaultCircuitBreakerSettingWithServiceName(DefaultCircuitBreakerServiceName) + // allow changing values + for _, opt := range opts { + opt(cbst) + } + if defaultLogger != nil && defaultLogger.LogLevel() == verboseLogging { + Debugf("Circuit Breaker setting: %s\n", cbst.String()) + } + + return cbst +} + +// NewCircuitBreaker is used for initialing specified circuit breaker configuration with base client +func NewCircuitBreaker(cbst *CircuitBreakerSetting) *OciCircuitBreaker { + if !cbst.isEnabled { + return nil + } + + st := gobreaker.Settings{} + customizeGoBreakerSetting(&st, cbst) + gbcb := gobreaker.NewCircuitBreaker[any](st) + + return NewOciCircuitBreaker(cbst, gbcb) +} + +func newCircuitBreakerSetting(opts ...CircuitBreakerOption) *CircuitBreakerSetting { + cbSetting := CircuitBreakerSetting{} + + // allow changing values + for _, opt := range opts { + opt(&cbSetting) + } + return &cbSetting +} + +// customizeGoBreakerSetting is used for converting CircuitBreakerSetting to 3P gobreaker's setting type +func customizeGoBreakerSetting(st *gobreaker.Settings, cbst *CircuitBreakerSetting) { + st.Name = cbst.name + st.Timeout = cbst.openStateWindow + st.Interval = cbst.closeStateWindow + st.OnStateChange = func(name string, from gobreaker.State, to gobreaker.State) { + if to == gobreaker.StateOpen { + Debugf("Circuit Breaker %s is now in Open State\n", name) + } + } + st.ReadyToTrip = func(counts gobreaker.Counts) bool { + failureRatio := float64(counts.TotalFailures) / float64(counts.Requests) + return counts.Requests >= cbst.minimumRequests && failureRatio >= cbst.failureRateThreshold + } + st.IsSuccessful = func(err error) bool { + if serviceErr, ok := IsServiceError(err); ok { + if isSuccessful, ok := cbst.successStatCodeMap[serviceErr.GetHTTPStatusCode()]; ok { + return isSuccessful + } + if isSuccessful, ok := cbst.successStatErrCodeMap[StatErrCode{serviceErr.GetHTTPStatusCode(), serviceErr.GetCode()}]; ok { + return isSuccessful + } + } + return true + } +} + +// WithName is the option for NewCircuitBreaker that sets the Name. +func WithName(name string) CircuitBreakerOption { + // this is the CircuitBreakerOption function type + return func(cbst *CircuitBreakerSetting) { + cbst.name = name + } +} + +// WithIsEnabled is the option for NewCircuitBreaker that sets the isEnabled. +func WithIsEnabled(isEnabled bool) CircuitBreakerOption { + // this is the CircuitBreakerOption function type + return func(cbst *CircuitBreakerSetting) { + cbst.isEnabled = isEnabled + } +} + +// WithCloseStateWindow is the option for NewCircuitBreaker that sets the closeStateWindow. +func WithCloseStateWindow(window time.Duration) CircuitBreakerOption { + // this is the CircuitBreakerOption function type + return func(cbst *CircuitBreakerSetting) { + cbst.closeStateWindow = window + } +} + +// WithOpenStateWindow is the option for NewCircuitBreaker that sets the openStateWindow. +func WithOpenStateWindow(window time.Duration) CircuitBreakerOption { + // this is the CircuitBreakerOption function type + return func(cbst *CircuitBreakerSetting) { + cbst.openStateWindow = window + } +} + +// WithFailureRateThreshold is the option for NewCircuitBreaker that sets the failureRateThreshold. +func WithFailureRateThreshold(threshold float64) CircuitBreakerOption { + // this is the CircuitBreakerOption function type + return func(cbst *CircuitBreakerSetting) { + cbst.failureRateThreshold = threshold + } +} + +// WithMinimumRequests is the option for NewCircuitBreaker that sets the minimumRequests. +func WithMinimumRequests(num uint32) CircuitBreakerOption { + // this is the CircuitBreakerOption function type + return func(cbst *CircuitBreakerSetting) { + cbst.minimumRequests = num + } +} + +// WithSuccessStatCodeMap is the option for NewCircuitBreaker that sets the successStatCodeMap. +func WithSuccessStatCodeMap(successStatCodeMap map[int]bool) CircuitBreakerOption { + // this is the CircuitBreakerOption function type + return func(cbst *CircuitBreakerSetting) { + cbst.successStatCodeMap = successStatCodeMap + } +} + +// WithSuccessStatErrCodeMap is the option for NewCircuitBreaker that sets the successStatErrCodeMap. +func WithSuccessStatErrCodeMap(successStatErrCodeMap map[StatErrCode]bool) CircuitBreakerOption { + // this is the CircuitBreakerOption function type + return func(cbst *CircuitBreakerSetting) { + cbst.successStatErrCodeMap = successStatErrCodeMap + } +} + +// WithServiceName is the option for NewCircuitBreaker that sets the ServiceName. +func WithServiceName(serviceName string) CircuitBreakerOption { + // this is the CircuitBreakerOption function type + return func(cbst *CircuitBreakerSetting) { + cbst.serviceName = serviceName + } +} + +// WithHistoryCount to set the number of failed responses +func WithHistoryCount(count int) CircuitBreakerOption { + // this is the CircuitBreakerOption function type + return func(cbst *CircuitBreakerSetting) { + cbst.numberOfRecordedHistoryResponse = count + } +} + +// getDefaultNumHistoryCount to set the number of failed responses +func getDefaultNumHistoryCount() int { + if val, isSet := os.LookupEnv(circuitBreakerNumberOfHistoryResponseEnv); isSet { + count, err := strconv.Atoi(val) + if err == nil && count > 0 { + return count + } + Debugf("Invalid history count specified. Resetting to default value") + } + return DefaultCircuitBreakerHistoryCount +} + +// GlobalCircuitBreakerSetting is global level circuit breaker setting, it would impact all services, the precedence is lower +// than client level circuit breaker +var GlobalCircuitBreakerSetting *CircuitBreakerSetting = nil + +// ConfigCircuitBreakerFromEnvVar is used for checking the circuit breaker environment variable setting, default value is nil +func ConfigCircuitBreakerFromEnvVar(baseClient *BaseClient) { + if IsEnvVarTrue(isDefaultCircuitBreakerEnabled) { + baseClient.Configuration.CircuitBreaker = NewCircuitBreaker(DefaultCircuitBreakerSetting()) + return + } + if IsEnvVarFalse(isDefaultCircuitBreakerEnabled) { + baseClient.Configuration.CircuitBreaker = nil + } +} + +// ConfigCircuitBreakerFromGlobalVar is used for checking if global circuitBreakerSetting is configured, the priority is higher than cb env var +func ConfigCircuitBreakerFromGlobalVar(baseClient *BaseClient) { + if GlobalCircuitBreakerSetting != nil { + baseClient.Configuration.CircuitBreaker = NewCircuitBreaker(GlobalCircuitBreakerSetting) + } +} + +// DefaultAuthClientCircuitBreakerSetting returns the default circuit breaker setting for the Auth Client +func DefaultAuthClientCircuitBreakerSetting() *CircuitBreakerSetting { + return NewCircuitBreakerSettingWithOptions( + WithOpenStateWindow(time.Duration(rand.Intn(MaxAuthClientCircuitBreakerResetTimeout+1-MinAuthClientCircuitBreakerResetTimeout)+MinAuthClientCircuitBreakerResetTimeout)*time.Second), + WithName(AuthClientCircuitBreakerName), + WithFailureRateThreshold(AuthClientCircuitBreakerDefaultFailureThreshold), + WithMinimumRequests(AuthClientCircuitBreakerDefaultMinimumRequests), + ) +} + +// GlobalAuthClientCircuitBreakerSetting is global level circuit breaker setting for the Auth Client +// than client level circuit breaker +var GlobalAuthClientCircuitBreakerSetting *CircuitBreakerSetting = nil diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/client.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/client.go new file mode 100644 index 000000000..3564ee8a7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/client.go @@ -0,0 +1,924 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +// Package common provides supporting functions and structs used by service packages +package common + +import ( + "bytes" + "context" + "fmt" + "io" + "io/ioutil" + "math/rand" + "net/http" + "net/http/httputil" + "net/url" + "os" + "os/user" + "path" + "path/filepath" + "reflect" + "regexp" + "runtime" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" +) + +const ( + // DefaultHostURLTemplate The default url template for service hosts + DefaultHostURLTemplate = "%s.%s.oraclecloud.com" + + // requestHeaderAccept The key for passing a header to indicate Accept + requestHeaderAccept = "Accept" + + // requestHeaderAuthorization The key for passing a header to indicate Authorization + requestHeaderAuthorization = "Authorization" + + // requestHeaderContentLength The key for passing a header to indicate Content Length + requestHeaderContentLength = "Content-Length" + + // requestHeaderContentType The key for passing a header to indicate Content Type + requestHeaderContentType = "Content-Type" + + // requestHeaderExpect The key for passing a header to indicate Expect/100-Continue + requestHeaderExpect = "Expect" + + // requestHeaderDate The key for passing a header to indicate Date + requestHeaderDate = "Date" + + // requestHeaderIfMatch The key for passing a header to indicate If Match + requestHeaderIfMatch = "if-match" + + // requestHeaderOpcClientInfo The key for passing a header to indicate OPC Client Info + requestHeaderOpcClientInfo = "opc-client-info" + + // requestHeaderOpcRetryToken The key for passing a header to indicate OPC Retry Token + requestHeaderOpcRetryToken = "opc-retry-token" + + // requestHeaderOpcRequestID The key for unique Oracle-assigned identifier for the request. + requestHeaderOpcRequestID = "opc-request-id" + + // requestHeaderOpcClientRequestID The key for unique Oracle-assigned identifier for the request. + requestHeaderOpcClientRequestID = "opc-client-request-id" + + // requestHeaderUserAgent The key for passing a header to indicate User Agent + requestHeaderUserAgent = "User-Agent" + + // requestHeaderXContentSHA256 The key for passing a header to indicate SHA256 hash + requestHeaderXContentSHA256 = "X-Content-SHA256" + + // requestHeaderOpcOboToken The key for passing a header to use obo token + requestHeaderOpcOboToken = "opc-obo-token" + + // private constants + defaultScheme = "https" + defaultSDKMarker = "Oracle-GoSDK" + defaultUserAgentTemplate = "%s/%s (%s/%s; go/%s)" //SDK/SDKVersion (OS/OSVersion; Lang/LangVersion) + // http.Client.Timeout includes Dial, TLSHandshake, Request, Response header and body + defaultTimeout = 60 * time.Second + defaultConfigFileName = "config" + defaultConfigDirName = ".oci" + configFilePathEnvVarName = "OCI_CONFIG_FILE" + + secondaryConfigDirName = ".oraclebmc" + maxBodyLenForDebug = 1024 * 1000 + + // appendUserAgentEnv The key for retrieving append user agent value from env var + appendUserAgentEnv = "OCI_SDK_APPEND_USER_AGENT" + + // requestHeaderOpcClientRetries The key for passing a header to set client retries info + requestHeaderOpcClientRetries = "opc-client-retries" + + // isDefaultRetryEnabled The key for set default retry disabled from env var + isDefaultRetryEnabled = "OCI_SDK_DEFAULT_RETRY_ENABLED" + + // isDefaultCircuitBreakerEnabled is the key for set default circuit breaker disabled from env var + isDefaultCircuitBreakerEnabled = "OCI_SDK_DEFAULT_CIRCUITBREAKER_ENABLED" + + //circuitBreakerNumberOfHistoryResponseEnv is the number of recorded history responses + circuitBreakerNumberOfHistoryResponseEnv = "OCI_SDK_CIRCUITBREAKER_NUM_HISTORY_RESPONSE" + + // ociDefaultRefreshIntervalForCustomCerts is the env var for overriding the defaultRefreshIntervalForCustomCerts. + // The value represents the refresh interval in minutes and has a higher precedence than defaultRefreshIntervalForCustomCerts + // but has a lower precedence then the refresh interval configured via OciGlobalRefreshIntervalForCustomCerts + // If the value is negative, then it is assumed that this property is not configured + // if the value is Zero, then the refresh of custom certs will be disabled + ociDefaultRefreshIntervalForCustomCerts = "OCI_DEFAULT_REFRESH_INTERVAL_FOR_CUSTOM_CERTS" + + // ociDefaultCertsPath is the env var for the path to the SSL cert file + ociDefaultCertsPath = "OCI_DEFAULT_CERTS_PATH" + + // ociDefaultClientCertsPath is the env var for the path to the custom client cert + ociDefaultClientCertsPath = "OCI_DEFAULT_CLIENT_CERTS_PATH" + + // ociDefaultClientCertsPrivateKeyPath is the env var for the path to the custom client cert private key + ociDefaultClientCertsPrivateKeyPath = "OCI_DEFAULT_CLIENT_CERTS_PRIVATE_KEY_PATH" + + //maxAttemptsForRefreshableRetry is the number of retry when 401 happened on a refreshable auth type + maxAttemptsForRefreshableRetry = 3 + + //defaultRefreshIntervalForCustomCerts is the default refresh interval in minutes + defaultRefreshIntervalForCustomCerts = 30 + + // CustomClientTimeoutEnvVar allows the user to set the timeout in seconds to be used by each service client. + CustomClientTimeoutEnvVar = "OCI_CUSTOM_CLIENT_TIMEOUT" + + // Environment variable to check whether dual stack endpoints should be enabled + ociDualStackEndpointEnabledEnvVar = "OCI_DUAL_STACK_ENDPOINT_ENABLED" + + // String representing a single "phrase" of an endpoint template option + endpointTemplateOptionPhrase = "((\\w|\\.|\\-)+)" + + // Checks for template for endpoint options + patternForEndpointTemplateOptions = "\\{" + endpointTemplateOptionPhrase + "\\?((" + endpointTemplateOptionPhrase + ":" + endpointTemplateOptionPhrase + ")" + + "|(" + endpointTemplateOptionPhrase + ":\\s*)|(\\s*:" + endpointTemplateOptionPhrase + "))}" + + dualStackOption = "{dualStack" +) + +// OciGlobalRefreshIntervalForCustomCerts is the global policy for overriding the refresh interval in minutes. +// This variable has a higher precedence than the env variable OCI_DEFAULT_REFRESH_INTERVAL_FOR_CUSTOM_CERTS +// and the defaultRefreshIntervalForCustomCerts values. +// If the value is negative, then it is assumed that this property is not configured +// if the value is Zero, then the refresh of custom certs will be disabled +var OciGlobalRefreshIntervalForCustomCerts int = -1 + +// RequestInterceptor function used to customize the request before calling the underlying service +type RequestInterceptor func(*http.Request) error + +// HTTPRequestDispatcher wraps the execution of a http request, it is generally implemented by +// http.Client.Do, but can be customized for testing +type HTTPRequestDispatcher interface { + Do(req *http.Request) (*http.Response, error) +} + +// CustomClientConfiguration contains configurations set at client level +type CustomClientConfiguration struct { + + // Retry policy used on calls made by the client + RetryPolicy *RetryPolicy + + // The Circuit Breaker used to regulate calls made by the client + CircuitBreaker *OciCircuitBreaker + + // Allows user to decide if they want to use realm specific endpoints + RealmSpecificServiceEndpointTemplateEnabled *bool + + // Allows user to decide if they want to use dual stack endpoints + EnableDualStackEndpoints *bool + + // Set on creation of the client, based on the below flag from the service spec + // x-obmcs-endpoint-template-options: dualStack: true/false + ServiceUsesDualStackByDefault *bool +} + +// BaseClient struct implements all basic operations to call oci web services. +type BaseClient struct { + //HTTPClient performs the http network operations + HTTPClient HTTPRequestDispatcher + + //Signer performs auth operation + Signer HTTPRequestSigner + + //A request interceptor can be used to customize the request before signing and dispatching + Interceptor RequestInterceptor + + //The host of the service + Host string + + //The user agent + UserAgent string + + //Base path for all operations of this client + BasePath string + + Configuration CustomClientConfiguration + + //Whether the OCI_INCLUDE_REQUEST_TELEMETRY_DATA environment variable was true at the time of client creation, + //indicating that x-oci-service-name and x-oci-operation-id headers should be sent. + ociIncludeRequestTelemetryDataEnabled bool +} + +// SetCustomClientConfiguration sets client with retry and other custom configurations +func (client *BaseClient) SetCustomClientConfiguration(config CustomClientConfiguration) { + client.Configuration = config +} + +// RetryPolicy returns the retryPolicy configured for client +func (client *BaseClient) RetryPolicy() *RetryPolicy { + return client.Configuration.RetryPolicy +} + +// Endpoint returns the endpoint configured for client +func (client *BaseClient) Endpoint() string { + host := client.Host + if !strings.Contains(host, "http") && + !strings.Contains(host, "https") { + host = fmt.Sprintf("%s://%s", defaultScheme, host) + } + return host +} + +func UpdateEndpointTemplateForOptions(client *BaseClient) { + templateRegex := regexp.MustCompile(patternForEndpointTemplateOptions) + templates := templateRegex.FindAllString(client.Host, -1) + for _, option := range templates { + optionParam := "" + optionEnabledParam := option[strings.Index(option, "?")+1 : strings.Index(option, ":")] + optionDisabledParam := option[strings.Index(option, ":")+1 : strings.Index(option, "}")] + + // Option case: Dual Stack Endpoints + if strings.Contains(option, dualStackOption) { + dualStackEnvVarValue := os.Getenv(ociDualStackEndpointEnabledEnvVar) + if client.IsServiceDualStackEnabledByDefault() { + if !client.IsDualStackEndpointEnabled() || (dualStackEnvVarValue != "" && strings.ToLower(dualStackEnvVarValue) == "false") { + optionParam = optionDisabledParam + } else { + optionParam = optionEnabledParam + } + } else { + if client.IsDualStackEndpointEnabled() || (dualStackEnvVarValue != "" && strings.ToLower(dualStackEnvVarValue) == "true") { + optionParam = optionEnabledParam + } else { + optionParam = optionDisabledParam + } + } + } + client.Host = strings.Replace(client.Host, option, optionParam, -1) + } +} + +// UseDualStackEndpointsByDefault sets whether dual stack endpoints are used by default +func (client *BaseClient) UseDualStackEndpointsByDefault(useByDefault bool) { + client.Configuration.EnableDualStackEndpoints = &useByDefault + client.Configuration.ServiceUsesDualStackByDefault = &useByDefault +} + +// EnableDualStackEndpoints sets whether dual stack endpoints should be used for this client +func (client *BaseClient) EnableDualStackEndpoints(EnableDualStack bool) { + client.Configuration.EnableDualStackEndpoints = &EnableDualStack +} + +// IsDualStackEndpointEnabled is used to check if Dual Stack Endpoints are Enabled +func (client *BaseClient) IsDualStackEndpointEnabled() bool { + return client.Configuration.EnableDualStackEndpoints != nil && *client.Configuration.EnableDualStackEndpoints +} + +// IsServiceDualStackEnabledByDefault is used to check if Dual Stack Endpoints enabled by default for the service of the client +func (client *BaseClient) IsServiceDualStackEnabledByDefault() bool { + return client.Configuration.ServiceUsesDualStackByDefault != nil && *client.Configuration.ServiceUsesDualStackByDefault +} + +func defaultUserAgent() string { + userAgent := fmt.Sprintf(defaultUserAgentTemplate, defaultSDKMarker, Version(), runtime.GOOS, runtime.GOARCH, runtime.Version()) + appendUA := os.Getenv(appendUserAgentEnv) + if appendUA != "" { + userAgent = fmt.Sprintf("%s %s", userAgent, appendUA) + } + return userAgent +} + +var clientCounter int64 + +func getNextSeed() int64 { + newCounterValue := atomic.AddInt64(&clientCounter, 1) + return newCounterValue + time.Now().UnixNano() +} + +func newBaseClient(signer HTTPRequestSigner, dispatcher HTTPRequestDispatcher) BaseClient { + rand.Seed(getNextSeed()) + + includeTelemetry := strings.EqualFold(os.Getenv("OCI_INCLUDE_REQUEST_TELEMETRY_DATA"), "true") + + baseClient := BaseClient{ + UserAgent: defaultUserAgent(), + Interceptor: nil, + Signer: signer, + HTTPClient: dispatcher, + ociIncludeRequestTelemetryDataEnabled: includeTelemetry, + } + + // check the default retry environment variable setting + if IsEnvVarTrue(isDefaultRetryEnabled) { + defaultRetry := DefaultRetryPolicy() + baseClient.Configuration.RetryPolicy = &defaultRetry + } else if IsEnvVarFalse(isDefaultRetryEnabled) { + policy := NoRetryPolicy() + baseClient.Configuration.RetryPolicy = &policy + } + // check if user defined global retry is configured + if GlobalRetry != nil { + baseClient.Configuration.RetryPolicy = GlobalRetry + } + + baseClient.UseDualStackEndpointsByDefault(false) + + return baseClient +} + +func defaultHTTPDispatcher() http.Client { + var httpClient http.Client + refreshInterval := getCustomCertRefreshInterval() + if refreshInterval <= 0 { + Debug("Custom cert refresh has been disabled") + } + var tp = &OciHTTPTransportWrapper{ + RefreshRate: time.Duration(refreshInterval) * time.Minute, + TLSConfigProvider: GetTLSConfigTemplateForTransport(), + } + + // Set client timeout to default or value set in environment variable + clientTimeout := defaultTimeout + if customTimeout := os.Getenv(CustomClientTimeoutEnvVar); customTimeout != "" { + if timeInSeconds, err := strconv.Atoi(customTimeout); err != nil || timeInSeconds < 0 { + Logf("WARNING: %s set but could not be converted to a postive integer", CustomClientTimeoutEnvVar) + } else { + Debugf("Using custom client timeout of %s seconds", customTimeout) + clientTimeout = time.Duration(timeInSeconds) * time.Second + } + } + + // Create the underlying HTTP client + httpClient = http.Client{ + Timeout: clientTimeout, + Transport: tp, + } + return httpClient +} + +func defaultBaseClient(provider KeyProvider) BaseClient { + dispatcher := defaultHTTPDispatcher() + signer := DefaultRequestSigner(provider) + return newBaseClient(signer, &dispatcher) +} + +// DefaultBaseClientWithSigner creates a default base client with a given signer +func DefaultBaseClientWithSigner(signer HTTPRequestSigner) BaseClient { + dispatcher := defaultHTTPDispatcher() + return newBaseClient(signer, &dispatcher) +} + +// NewClientWithConfig Create a new client with a configuration provider, the configuration provider +// will be used for the default signer as well as reading the region +// This function does not check for valid regions to implement forward compatibility +func NewClientWithConfig(configProvider ConfigurationProvider) (client BaseClient, err error) { + var ok bool + if ok, err = IsConfigurationProviderValid(configProvider); !ok { + err = fmt.Errorf("can not create client, bad configuration: %s", err.Error()) + return + } + + client = defaultBaseClient(configProvider) + + if authConfig, e := configProvider.AuthType(); e == nil && authConfig.OboToken != nil { + Debugf("authConfig's authType is %s", authConfig.AuthType) + signOboToken(&client, *authConfig.OboToken, configProvider) + } + + return +} + +// NewClientWithOboToken Create a new client that will use oboToken for auth +func NewClientWithOboToken(configProvider ConfigurationProvider, oboToken string) (client BaseClient, err error) { + client, err = NewClientWithConfig(configProvider) + if err != nil { + return + } + + signOboToken(&client, oboToken, configProvider) + + return +} + +// Add obo token header to Interceptor and sign to client +func signOboToken(client *BaseClient, oboToken string, configProvider ConfigurationProvider) { + // Interceptor to add obo token header + client.Interceptor = func(request *http.Request) error { + request.Header.Add(requestHeaderOpcOboToken, oboToken) + return nil + } + // Obo token will also be signed + defaultHeaders := append(DefaultGenericHeaders(), requestHeaderOpcOboToken) + client.Signer = RequestSigner(configProvider, defaultHeaders, DefaultBodyHeaders()) +} + +func getHomeFolder() string { + current, e := user.Current() + if e != nil { + //Give up and try to return something sensible + home := os.Getenv("HOME") + if home == "" { + home = os.Getenv("USERPROFILE") + } + return home + } + return current.HomeDir +} + +// DefaultConfigProvider returns the default config provider. The default config provider +// will look for configurations in 3 places: file in $HOME/.oci/config, HOME/.obmcs/config and +// variables names starting with the string TF_VAR. If the same configuration is found in multiple +// places the provider will prefer the first one. +// If the config file is not placed in the default location, the environment variable +// OCI_CONFIG_FILE can provide the config file location. +func DefaultConfigProvider() ConfigurationProvider { + defaultConfigFile := getDefaultConfigFilePath() + homeFolder := getHomeFolder() + secondaryConfigFile := filepath.Join(homeFolder, secondaryConfigDirName, defaultConfigFileName) + + defaultFileProvider, _ := ConfigurationProviderFromFile(defaultConfigFile, "") + secondaryFileProvider, _ := ConfigurationProviderFromFile(secondaryConfigFile, "") + environmentProvider := environmentConfigurationProvider{EnvironmentVariablePrefix: "TF_VAR"} + + provider, _ := ComposingConfigurationProvider([]ConfigurationProvider{defaultFileProvider, secondaryFileProvider, environmentProvider}) + Debugf("Configuration provided by: %s", provider) + return provider +} + +// CustomProfileSessionTokenConfigProvider returns the session token config provider of the given profile. +// This will look for the configuration in the given config file path. +func CustomProfileSessionTokenConfigProvider(customConfigPath string, profile string) ConfigurationProvider { + if customConfigPath == "" { + customConfigPath = getDefaultConfigFilePath() + } + + sessionTokenConfigurationProvider, _ := ConfigurationProviderForSessionTokenWithProfile(customConfigPath, profile, "") + Debugf("Configuration provided by: %s", sessionTokenConfigurationProvider) + return sessionTokenConfigurationProvider +} + +func getDefaultConfigFilePath() string { + homeFolder := getHomeFolder() + defaultConfigFile := filepath.Join(homeFolder, defaultConfigDirName, defaultConfigFileName) + if _, err := os.Stat(defaultConfigFile); err == nil { + return defaultConfigFile + } + Debugf("The %s does not exist, will check env var %s for file path.", defaultConfigFile, configFilePathEnvVarName) + // Read configuration file path from OCI_CONFIG_FILE env var + fallbackConfigFile, existed := os.LookupEnv(configFilePathEnvVarName) + if !existed { + Debugf("The env var %s does not exist...", configFilePathEnvVarName) + return defaultConfigFile + } + if _, err := os.Stat(fallbackConfigFile); os.IsNotExist(err) { + Debugf("The specified cfg file path in the env var %s does not exist: %s", configFilePathEnvVarName, fallbackConfigFile) + return defaultConfigFile + } + return fallbackConfigFile +} + +// setRawPath sets the Path and RawPath fields of the URL based on the provided +// escaped path p. It maintains the invariant that RawPath is only specified +// when it differs from the default encoding of the path. +// For example: +// - setPath("/foo/bar") will set Path="/foo/bar" and RawPath="" +// - setPath("/foo%2fbar") will set Path="/foo/bar" and RawPath="/foo%2fbar" +func setRawPath(u *url.URL) error { + oldPath := u.Path + path, err := url.PathUnescape(u.Path) + if err != nil { + return err + } + u.Path = path + if escp := u.EscapedPath(); oldPath == escp { + // Default encoding is fine. + u.RawPath = "" + } else { + u.RawPath = oldPath + } + return nil +} + +// CustomProfileConfigProvider returns the config provider of given profile. The custom profile config provider +// will look for configurations in 2 places: file in $HOME/.oci/config, and variables names starting with the +// string TF_VAR. If the same configuration is found in multiple places the provider will prefer the first one. +func CustomProfileConfigProvider(customConfigPath string, profile string) ConfigurationProvider { + homeFolder := getHomeFolder() + if customConfigPath == "" { + customConfigPath = filepath.Join(homeFolder, defaultConfigDirName, defaultConfigFileName) + } + customFileProvider, _ := ConfigurationProviderFromFileWithProfile(customConfigPath, profile, "") + defaultFileProvider, _ := ConfigurationProviderFromFileWithProfile(customConfigPath, "DEFAULT", "") + environmentProvider := environmentConfigurationProvider{EnvironmentVariablePrefix: "TF_VAR"} + provider, _ := ComposingConfigurationProvider([]ConfigurationProvider{customFileProvider, defaultFileProvider, environmentProvider}) + Debugf("Configuration provided by: %s", provider) + return provider +} + +func (client *BaseClient) prepareRequest(request *http.Request) (err error) { + if client.UserAgent == "" { + return fmt.Errorf("user agent can not be blank") + } + + if request.Header == nil { + request.Header = http.Header{} + } + request.Header.Set(requestHeaderUserAgent, client.UserAgent) + request.Header.Set(requestHeaderDate, time.Now().UTC().Format(http.TimeFormat)) + + if !strings.Contains(client.Host, "http") && + !strings.Contains(client.Host, "https") { + client.Host = fmt.Sprintf("%s://%s", defaultScheme, client.Host) + } + + clientURL, err := url.Parse(client.Host) + if err != nil { + return fmt.Errorf("host is invalid. %s", err.Error()) + } + if clientURL.Scheme != "http" && clientURL.Scheme != "https" { + return fmt.Errorf("host is invalid. endpoint scheme must be http or https") + } + if clientURL.User != nil || clientURL.Path != "" || clientURL.RawQuery != "" || clientURL.Fragment != "" { + return fmt.Errorf("host is invalid. endpoint must not contain user info, path, query, or fragment") + } + request.URL.Host = clientURL.Host + request.URL.Scheme = clientURL.Scheme + currentPath := request.URL.Path + if !strings.HasPrefix(currentPath, fmt.Sprintf("/%s", client.BasePath)) { + request.URL.Path = path.Clean(fmt.Sprintf("/%s/%s", client.BasePath, currentPath)) + err := setRawPath(request.URL) + if err != nil { + return err + } + } + return +} + +func (client BaseClient) intercept(request *http.Request) (err error) { + if client.Interceptor != nil { + err = client.Interceptor(request) + } + return +} + +// checkForSuccessfulResponse checks if the response is successful +// If Error Code is 4XX/5XX and debug level is set to info, will log the request and response +func checkForSuccessfulResponse(res *http.Response, requestBody *io.ReadCloser) error { + familyStatusCode := res.StatusCode / 100 + if familyStatusCode == 4 || familyStatusCode == 5 { + IfInfo(func() { + // If debug level is set to verbose, the request and request body will be dumped and logged under debug level, this is to avoid duplicate logging + if defaultLogger.LogLevel() < verboseLogging { + logRequest(res.Request, Logf, noLogging) + if requestBody != nil && *requestBody != http.NoBody { + bodyContent, _ := ioutil.ReadAll(*requestBody) + Logf("Dump Request Body: \n%s", RedactSensitiveStringForLogs(string(bodyContent))) + } + } + logResponse(res, Logf, infoLogging) + }) + return newServiceFailureFromResponse(res) + } + IfDebug(func() { + logResponse(res, Debugf, verboseLogging) + }) + return nil +} + +func logRequest(request *http.Request, fn func(format string, v ...interface{}), bodyLoggingLevel int) { + if request == nil { + return + } + dumpBody := true + if checkBodyLengthExceedLimit(request.ContentLength) { + fn("not dumping body too big\n") + dumpBody = false + } + + dumpBody = dumpBody && defaultLogger.LogLevel() >= bodyLoggingLevel && bodyLoggingLevel != noLogging + if dump, e := httputil.DumpRequestOut(request, dumpBody); e == nil { + fn("Dump Request %s", RedactSensitiveStringForLogs(string(dump))) + } else { + fn("%v\n", e) + } +} + +func logResponse(response *http.Response, fn func(format string, v ...interface{}), bodyLoggingLevel int) { + if response == nil { + return + } + dumpBody := true + if checkBodyLengthExceedLimit(response.ContentLength) { + fn("not dumping body too big\n") + dumpBody = false + } + dumpBody = dumpBody && defaultLogger.LogLevel() >= bodyLoggingLevel && bodyLoggingLevel != noLogging + if dump, e := httputil.DumpResponse(response, dumpBody); e == nil { + fn("Dump Response %s", RedactSensitiveStringForLogs(string(dump))) + } else { + fn("%v\n", e) + } +} + +func checkBodyLengthExceedLimit(contentLength int64) bool { + return contentLength > maxBodyLenForDebug +} + +// OCIRequest is any request made to an OCI service. +type OCIRequest interface { + // HTTPRequest assembles an HTTP request. + HTTPRequest(method, path string, binaryRequestBody *OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) +} + +// RequestMetadata is metadata about an OCIRequest. This structure represents the behavior exhibited by the SDK when +// issuing (or reissuing) a request. +type RequestMetadata struct { + // RetryPolicy is the policy for reissuing the request. If no retry policy is set on the request, + // then the request will be issued exactly once. + RetryPolicy *RetryPolicy +} + +// OCIReadSeekCloser is a thread-safe io.ReadSeekCloser to prevent racing with retrying binary requests +type OCIReadSeekCloser struct { + rc io.ReadCloser + lock sync.Mutex + isClosed bool +} + +// NewOCIReadSeekCloser constructs OCIReadSeekCloser, the only input is binary request body +func NewOCIReadSeekCloser(rc io.ReadCloser) *OCIReadSeekCloser { + rsc := OCIReadSeekCloser{} + rsc.rc = rc + return &rsc +} + +// Seek is a thread-safe operation, it implements io.seek() interface, if the original request body implements io.seek() +// interface, or implements "well-known" data type like os.File, io.SectionReader, or wrapped by ioutil.NopCloser can be supported +func (rsc *OCIReadSeekCloser) Seek(offset int64, whence int) (int64, error) { + rsc.lock.Lock() + defer rsc.lock.Unlock() + + if _, ok := rsc.rc.(io.Seeker); ok { + return rsc.rc.(io.Seeker).Seek(offset, whence) + } + // once the binary request body is wrapped with ioutil.NopCloser: + if isNopCloser(rsc.rc) { + unwrappedInterface := reflect.ValueOf(rsc.rc).Field(0).Interface() + if _, ok := unwrappedInterface.(io.Seeker); ok { + return unwrappedInterface.(io.Seeker).Seek(offset, whence) + } + } + return 0, fmt.Errorf("current binary request body type is not seekable, if want to use retry feature, please make sure the request body implements seek() method") +} + +// Close is a thread-safe operation, it closes the instance of the OCIReadSeekCloser's access to the underlying io.ReadCloser. +func (rsc *OCIReadSeekCloser) Close() error { + rsc.lock.Lock() + defer rsc.lock.Unlock() + rsc.isClosed = true + return nil +} + +// Read is a thread-safe operation, it implements io.Read() interface +func (rsc *OCIReadSeekCloser) Read(p []byte) (n int, err error) { + rsc.lock.Lock() + defer rsc.lock.Unlock() + + if rsc.isClosed { + return 0, io.EOF + } + + return rsc.rc.Read(p) +} + +// Seekable is used for check if the binary request body can be seek or no +func (rsc *OCIReadSeekCloser) Seekable() bool { + if rsc == nil { + return false + } + if _, ok := rsc.rc.(io.Seeker); ok { + return true + } + // once the binary request body is wrapped with ioutil.NopCloser: + if isNopCloser(rsc.rc) { + if _, ok := reflect.ValueOf(rsc.rc).Field(0).Interface().(io.Seeker); ok { + return true + } + } + return false +} + +// OCIResponse is the response from issuing a request to an OCI service. +type OCIResponse interface { + // HTTPResponse returns the raw HTTP response. + HTTPResponse() *http.Response +} + +// OCIOperation is the generalization of a request-response cycle undergone by an OCI service. +type OCIOperation func(context.Context, OCIRequest, *OCIReadSeekCloser, map[string]string) (OCIResponse, error) + +// ClientCallDetails a set of settings used by the a single Call operation of the http Client +type ClientCallDetails struct { + Signer HTTPRequestSigner + ServiceName string + OperationName string +} + +// Call executes the http request with the given context +func (client BaseClient) Call(ctx context.Context, request *http.Request) (response *http.Response, err error) { + details := ClientCallDetails{Signer: client.Signer} + if client.IsRefreshableAuthType() { + return client.RefreshableTokenWrappedCallWithDetails(ctx, request, details) + } + return client.CallWithDetails(ctx, request, details) +} + +// CallWithServiceAndOperationName executes the http request with the given context and known service and operation name +func (client BaseClient) CallWithServiceAndOperationName(ctx context.Context, request *http.Request, serviceName string, operationName string) (response *http.Response, err error) { + details := ClientCallDetails{Signer: client.Signer, ServiceName: serviceName, OperationName: operationName} + if client.IsRefreshableAuthType() { + return client.RefreshableTokenWrappedCallWithDetails(ctx, request, details) + } + return client.CallWithDetails(ctx, request, details) +} + +// RefreshableTokenWrappedCallWithDetails wraps the CallWithDetails with retry on 401 for Refreshable Token (Instance Principal, Resource Principal, etc.) +// This retry reduces transient 401s that can occur due to concurrent token refresh +func (client BaseClient) RefreshableTokenWrappedCallWithDetails(ctx context.Context, request *http.Request, details ClientCallDetails) (response *http.Response, err error) { + var ( + rsc *OCIReadSeekCloser + isSeekable bool + curPos int64 + initialSize int64 + ) + + // Prepare request body for potential retries + if request != nil && request.Body != nil && request.Body != http.NoBody { + rsc = NewOCIReadSeekCloser(request.Body) + request.Body = rsc + + if rsc.Seekable() { + isSeekable = true + + // Capture current position and total size so we can restore Content-Length on retries + curPos, _ = rsc.Seek(0, io.SeekCurrent) + if end, seekErr := rsc.Seek(0, io.SeekEnd); seekErr == nil { + initialSize = end + _, _ = rsc.Seek(curPos, io.SeekStart) + } + } + } + + for attempt := 0; attempt < maxAttemptsForRefreshableRetry; attempt++ { + // On retries, rewind request body and restore content length/header if seekable + if attempt > 0 && request != nil && request.Body != nil && request.Body != http.NoBody { + if !isSeekable { + return response, NonSeekableRequestRetryFailure{err} + } + + rsc = NewOCIReadSeekCloser(rsc.rc) + _, _ = rsc.Seek(curPos, io.SeekStart) + request.Body = rsc + + if initialSize > 0 { + request.ContentLength = initialSize - curPos + if request.Header == nil { + request.Header = make(http.Header) + } + request.Header.Set(requestHeaderContentLength, strconv.FormatInt(request.ContentLength, 10)) + } + } + + response, err = client.CallWithDetails(ctx, request, ClientCallDetails{Signer: client.Signer}) + // Retry only on a HTTP 401 response + if response == nil { + return nil, err + } + if response.StatusCode != http.StatusUnauthorized { + return response, err + } + time.Sleep(1 * time.Second) + } + return +} + +// CallWithDetails executes the http request, the given context using details specified in the parameters, this function +// provides a way to override some settings present in the client +func (client BaseClient) CallWithDetails(ctx context.Context, request *http.Request, details ClientCallDetails) (response *http.Response, err error) { + Debugln("Attempting to call downstream service") + request = request.WithContext(ctx) + + if client.ociIncludeRequestTelemetryDataEnabled { + if details.ServiceName != "" { + request.Header.Set("x-oci-service-name", details.ServiceName) + } + if details.ServiceName != "" { + request.Header.Set("x-oci-operation-id", details.OperationName) + } + } + + err = client.prepareRequest(request) + if err != nil { + return + } + //Intercept + err = client.intercept(request) + if err != nil { + return + } + //Sign the request + err = details.Signer.Sign(request) + if err != nil { + return + } + + //Execute the http request + if ociGoBreaker := client.Configuration.CircuitBreaker; ociGoBreaker != nil { + resp, cbErr := ociGoBreaker.Cb.Execute(func() (interface{}, error) { + return client.httpDo(request) + }) + if httpResp, ok := resp.(*http.Response); ok { + if httpResp != nil && httpResp.StatusCode != 200 { + if failure, ok := IsServiceError(cbErr); ok { + ociGoBreaker.AddToHistory(resp.(*http.Response), failure) + } + } + } + if cbErr != nil && IsCircuitBreakerError(cbErr) { + cbErr = getCircuitBreakerError(request, cbErr, ociGoBreaker) + } + if _, ok := resp.(*http.Response); !ok { + return nil, cbErr + } + return resp.(*http.Response), cbErr + } + return client.httpDo(request) +} + +// IsRefreshableAuthType validates if a signer is from a refreshable config provider +func (client BaseClient) IsRefreshableAuthType() bool { + if signer, ok := client.Signer.(ociRequestSigner); ok { + if provider, ok := signer.KeyProvider.(RefreshableConfigurationProvider); ok { + return provider.Refreshable() + } + } + return false +} + +func (client BaseClient) httpDo(request *http.Request) (response *http.Response, err error) { + + //Copy request body and save for logging + dumpRequestBody := ioutil.NopCloser(bytes.NewBuffer(nil)) + if request.Body != nil && !checkBodyLengthExceedLimit(request.ContentLength) { + if dumpRequestBody, request.Body, err = drainBody(request.Body); err != nil { + dumpRequestBody = ioutil.NopCloser(bytes.NewBuffer(nil)) + } + } + IfDebug(func() { + logRequest(request, Debugf, verboseLogging) + }) + + //Execute the http request + response, err = client.HTTPClient.Do(request) + + if err != nil { + IfInfo(func() { + Logf("%v\n", err) + }) + return response, err + } + + err = checkForSuccessfulResponse(response, &dumpRequestBody) + return response, err +} + +// CloseBodyIfValid closes the body of an http response if the response and the body are valid +func CloseBodyIfValid(httpResponse *http.Response) { + if httpResponse != nil && httpResponse.Body != nil { + if httpResponse.Header != nil && strings.ToLower(httpResponse.Header.Get("content-type")) == "text/event-stream" { + return + } + httpResponse.Body.Close() + } +} + +// IsOciRealmSpecificServiceEndpointTemplateEnabled returns true if the client is configured to use realm specific service endpoint template +// it will first check the client configuration, if not set, it will check the environment variable +func (client BaseClient) IsOciRealmSpecificServiceEndpointTemplateEnabled() bool { + if client.Configuration.RealmSpecificServiceEndpointTemplateEnabled != nil { + return *client.Configuration.RealmSpecificServiceEndpointTemplateEnabled + } + return IsEnvVarTrue(OciRealmSpecificServiceEndpointTemplateEnabledEnvVar) +} + +func getCustomCertRefreshInterval() int { + if OciGlobalRefreshIntervalForCustomCerts >= 0 { + Debugf("Setting refresh interval as %d for custom certs via OciGlobalRefreshIntervalForCustomCerts", OciGlobalRefreshIntervalForCustomCerts) + return OciGlobalRefreshIntervalForCustomCerts + } + if refreshIntervalValue, ok := os.LookupEnv(ociDefaultRefreshIntervalForCustomCerts); ok { + refreshInterval, err := strconv.Atoi(refreshIntervalValue) + if err != nil || refreshInterval < 0 { + Debugf("The environment variable %s is not a valid int or is a negative value, skipping this configuration", ociDefaultRefreshIntervalForCustomCerts) + } else { + Debugf("Setting refresh interval as %d for custom certs via the env variable %s", refreshInterval, ociDefaultRefreshIntervalForCustomCerts) + return refreshInterval + } + } + Debugf("Setting the default refresh interval %d for custom certs", defaultRefreshIntervalForCustomCerts) + return defaultRefreshIntervalForCustomCerts +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/common.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/common.go new file mode 100644 index 000000000..6fca92e6d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/common.go @@ -0,0 +1,651 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "os" + "path/filepath" + "regexp" + "strings" + "sync" + "time" +) + +// Region type for regions +type Region string + +const ( + instanceMetadataRegionInfoURLV2 = "http://169.254.169.254/opc/v2/instance/regionInfo" + + // Region Metadata Configuration File + regionMetadataCfgDirName = ".oci" + regionMetadataCfgFileName = "regions-config.json" + + // Region Metadata Environment Variable + regionMetadataEnvVarName = "OCI_REGION_METADATA" + + // Default Realm Environment Variable + defaultRealmEnvVarName = "OCI_DEFAULT_REALM" + + //EndpointTemplateForRegionWithDot Environment Variable + EndpointTemplateForRegionWithDot = "https://{endpoint_service_name}.{region}" + + // Region Metadata + regionIdentifierPropertyName = "regionIdentifier" // e.g. "ap-sydney-1" + realmKeyPropertyName = "realmKey" // e.g. "oc1" + realmDomainComponentPropertyName = "realmDomainComponent" // e.g. "oraclecloud.com" + regionKeyPropertyName = "regionKey" // e.g. "SYD" + + // OciRealmSpecificServiceEndpointTemplateEnabledEnvVar is the environment variable name to enable the realm specific service endpoint template. + OciRealmSpecificServiceEndpointTemplateEnabledEnvVar = "OCI_REALM_SPECIFIC_SERVICE_ENDPOINT_TEMPLATE_ENABLED" +) + +// External region metadata info flag, used to control adding these metadata region info only once. +var readCfgFile, readEnvVar, visitIMDS bool = true, true, false + +// getRegionInfoFromInstanceMetadataService gets the region information +var getRegionInfoFromInstanceMetadataService = getRegionInfoFromInstanceMetadataServiceProd + +// OciRealmSpecificServiceEndpointTemplateEnabled is the flag to enable the realm specific service endpoint template. This one has higher priority than the environment variable. +var OciRealmSpecificServiceEndpointTemplateEnabled *bool = nil + +// reNonWord precomiles the regex once at the package scope +var reNonWord = regexp.MustCompile(`[^\w]`) + +// OciSdkEnabledServicesMap is a list of services that are enabled, default is an empty list which means all services are enabled +var OciSdkEnabledServicesMap map[string]bool + +// OciSdkEnabledServicesOnce is a sync.Once variable to ensure the OciSdkEnabledServicesMap is initialized only once +var OciSdkEnabledServicesOnce sync.Once + +// OciSdkEnabledServicesMu is a mutex to protect access to the OciSdkEnabledServicesMap +var OciSdkEnabledServicesMu sync.RWMutex + +// OciDeveloperToolConfigurationFilePathEnvVar is the environment variable name for the OCI Developer Tool Config File Path +const OciDeveloperToolConfigurationFilePathEnvVar = "OCI_DEVELOPER_TOOL_CONFIGURATION_FILE_PATH" + +// OciAllowOnlyDeveloperToolConfigurationRegionsEnvVar is the environment variable name for the OCI Allow only Dev Tool Config Regions +const OciAllowOnlyDeveloperToolConfigurationRegionsEnvVar = "OCI_ALLOW_ONLY_DEVELOPER_TOOL_CONFIGURATION_REGIONS" + +// defaultRealmForUnknownDeveloperToolConfigurationRegion is the default realm for unknown Developer Tool Configuration Regions +const defaultRealmForUnknownDeveloperToolConfigurationRegion = "oraclecloud.com" + +// OciDeveloperToolConfigurationProvider is the provider name for the OCI Developer Tool Configuration file +var OciDeveloperToolConfigurationProvider string + +// ociAllowOnlyDeveloperToolConfigurationRegions is the flag to enable the OCI Allow Only Developer Tool Configuration Regions. This one has lower priority than the environment variable. +var ociAllowOnlyDeveloperToolConfigurationRegions bool + +var ociDeveloperToolConfigurationRegionSchemaList []map[string]string + +// Endpoint returns a endpoint for a service +func (region Region) Endpoint(service string) string { + // Endpoint for dotted region + if strings.Contains(string(region), ".") { + return fmt.Sprintf("%s.%s", service, region) + } + return fmt.Sprintf("%s.%s.%s", service, region, region.SecondLevelDomain()) +} + +// EndpointForTemplate returns a endpoint for a service based on template, only unknown region name can fall back to "oc1", but not short code region name. +func (region Region) EndpointForTemplate(service string, serviceEndpointTemplate string) string { + if strings.Contains(string(region), ".") { + endpoint, error := region.EndpointForTemplateDottedRegion(service, serviceEndpointTemplate, "") + if error != nil { + Debugf("%v", error) + + return "" + } + return endpoint + } + + if serviceEndpointTemplate == "" { + return region.Endpoint(service) + } + + // replace service prefix + endpoint := strings.Replace(serviceEndpointTemplate, "{serviceEndpointPrefix}", service, 1) + + // replace region + endpoint = strings.Replace(endpoint, "{region}", string(region), 1) + + // replace second level domain + endpoint = strings.Replace(endpoint, "{secondLevelDomain}", region.SecondLevelDomain(), 1) + + return endpoint +} + +// EndpointForTemplateDottedRegion returns a endpoint for a service based on the service name and EndpointTemplateForRegionWithDot template. If a service name is missing it is obtained from serviceEndpointTemplate and endpoint is constructed usingEndpointTemplateForRegionWithDot template. +func (region Region) EndpointForTemplateDottedRegion(service string, serviceEndpointTemplate string, endpointServiceName string) (string, error) { + if !strings.Contains(string(region), ".") { + var endpoint = "" + if serviceEndpointTemplate != "" { + endpoint = region.EndpointForTemplate(service, serviceEndpointTemplate) + return endpoint, nil + } + endpoint = region.EndpointForTemplate(service, "") + return endpoint, nil + } + + if endpointServiceName != "" { + endpoint := strings.Replace(EndpointTemplateForRegionWithDot, "{endpoint_service_name}", endpointServiceName, 1) + endpoint = strings.Replace(endpoint, "{region}", string(region), 1) + Debugf("Constructing endpoint from service name %s and region %s. Endpoint: %s", endpointServiceName, region, endpoint) + return endpoint, nil + } + if serviceEndpointTemplate != "" { + var endpoint = "" + res := strings.Split(serviceEndpointTemplate, "//") + if len(res) > 1 { + res = strings.Split(res[1], ".") + if len(res) > 1 { + endpoint = strings.Replace(EndpointTemplateForRegionWithDot, "{endpoint_service_name}", res[0], 1) + endpoint = strings.Replace(endpoint, "{region}", string(region), 1) + Debugf("Constructing endpoint from service endpoint template %s and region %s. Endpoint: %s", serviceEndpointTemplate, region, endpoint) + } else { + return endpoint, fmt.Errorf("Endpoint service name not present in endpoint template") + } + } else { + return endpoint, fmt.Errorf("invalid serviceEndpointTemplates. ServiceEndpointTemplate should start with https://") + } + return endpoint, nil + } + return "", fmt.Errorf("EndpointForTemplateDottedRegion function requires endpointServiceName or serviceEndpointTemplate, no endpointServiceName or serviceEndpointTemplate provided") +} + +func (region Region) SecondLevelDomain() string { + if realmID, ok := regionRealm[region]; ok { + if secondLevelDomain, ok := realm[realmID]; ok { + return secondLevelDomain + } + } + if value, ok := os.LookupEnv(defaultRealmEnvVarName); ok { + return value + } + Debugf("cannot find realm for region : %s, return default realm value.", region) + if _, ok := realm["oc1"]; !ok { + return defaultRealmForUnknownDeveloperToolConfigurationRegion + } + return realm["oc1"] +} + +// RealmID is used for getting realmID from region, if no region found, directly throw error +func (region Region) RealmID() (string, error) { + if realmID, ok := regionRealm[region]; ok { + return realmID, nil + } + + return "", fmt.Errorf("cannot find realm for region : %s", region) +} + +// StringToRegion convert a string to Region type +func StringToRegion(stringRegion string) (r Region) { + regionStr := strings.ToLower(stringRegion) + // check for PLC related regions + if checkAllowOnlyDeveloperToolConfigurationRegions() && (checkDeveloperToolConfigurationFile() || len(ociDeveloperToolConfigurationRegionSchemaList) != 0) { + Debugf("Developer Tool config detected and OCI_ALLOW_ONLY_DEVELOPER_TOOL_CONFIGURATION_REGIONS is set to True, SDK will only use regions defined for Developer Tool Configuration Regions") + setRegionMetadataFromDeveloperToolConfigurationFile(&stringRegion) + if len(ociDeveloperToolConfigurationRegionSchemaList) != 0 { + resetRegionInfo() + bulkAddRegionSchema(ociDeveloperToolConfigurationRegionSchemaList) + } + r = Region(stringRegion) + if _, ok := regionRealm[r]; !ok { + Logf("You're using the %s Developer Tool configuration file, the region you're targeting is not declared in this config file. Please check if this is the correct region you're targeting or contact the %s cloud provider for help. If you want to target both OCI regions and %s regions, please set the OCI_ALLOW_ONLY_DEVELOPER_TOOL_CONFIGURATION_REGIONS env var to False.", OciDeveloperToolConfigurationProvider, OciDeveloperToolConfigurationProvider, regionStr) + } + return r + } + + // check if short region name provided + if region, ok := shortNameRegion[regionStr]; ok { + r = region + return + } + // check if normal region name provided + potentialRegion := Region(regionStr) + if _, ok := regionRealm[potentialRegion]; ok { + r = potentialRegion + return + } + + Debugf("region named: %s, is not recognized from hard-coded region list, will check Region metadata info", stringRegion) + r = checkAndAddRegionMetadata(stringRegion) + + return +} + +// canStringBeRegion test if the string can be a region, if it can, returns the string as is, otherwise it +// returns an error +var blankRegex = regexp.MustCompile(`\s`) + +func canStringBeRegion(stringRegion string) (region string, err error) { + if blankRegex.MatchString(stringRegion) || stringRegion == "" { + return "", fmt.Errorf("region can not be empty or have spaces") + } + return stringRegion, nil +} + +// check region info from original map +func checkAndAddRegionMetadata(region string) Region { + switch { + case setRegionMetadataFromCfgFile(®ion): + case setRegionMetadataFromEnvVar(®ion): + case setRegionFromInstanceMetadataService(®ion): + default: + //err := fmt.Errorf("failed to get region metadata information.") + return Region(region) + } + return Region(region) +} + +// EnableInstanceMetadataServiceLookup provides the interface to lookup IMDS region info +func EnableInstanceMetadataServiceLookup() { + Debugf("Set visitIMDS 'true' to enable IMDS Lookup.") + visitIMDS = true +} + +// setRegionMetadataFromEnvVar checks if region metadata env variable is provided, once it's there, parse and added it +// to region map, and it can make sure the env var can only be visited once. +// Once successfully find the expected region(region name or short code), return true, region name will be stored in +// the input pointer. +func setRegionMetadataFromEnvVar(region *string) bool { + if !readEnvVar { + Debugf("metadata region env variable had already been checked, no need to check again.") + return false //no need to check it again. + } + // Mark readEnvVar Flag as false since it has already been visited. + readEnvVar = false + // check from env variable + if jsonStr, existed := os.LookupEnv(regionMetadataEnvVarName); existed { + Debugf("Raw content of region metadata env var: %s", jsonStr) + var regionSchema map[string]string + if err := json.Unmarshal([]byte(jsonStr), ®ionSchema); err != nil { + Debugf("Can't unmarshal env var, the error info is %v", err) + return false + } + // check if the specified region is in the env var. + if checkSchemaItems(regionSchema) { + // set mapping table + addRegionSchema(regionSchema) + if regionSchema[regionKeyPropertyName] == *region || + regionSchema[regionIdentifierPropertyName] == *region { + *region = regionSchema[regionIdentifierPropertyName] + return true + } + } + return false + } + Debugf("The Region Metadata Schema wasn't set in env variable - OCI_REGION_METADATA.") + return false +} + +func setRegionMetadataFromCfgFile(region *string) bool { + if setRegionMetadataFromDeveloperToolConfigurationFile(region) { + return true + } + if setRegionMetadataFromRegionCfgFile(region) { + return true + } + return false +} + +// setRegionMetadataFromCfgFile checks if region metadata config file is provided, once it's there, parse and add all +// the valid regions to region map, the configuration file can only be visited once. +// Once successfully find the expected region(region name or short code), return true, region name will be stored in +// the input pointer. +func setRegionMetadataFromRegionCfgFile(region *string) bool { + if !readCfgFile { + Debugf("metadata region config file had already been checked, no need to check again.") + return false //no need to check it again. + } + // Mark readCfgFile Flag as false since it has already been visited. + readCfgFile = false + homeFolder := getHomeFolder() + configFile := filepath.Join(homeFolder, regionMetadataCfgDirName, regionMetadataCfgFileName) + if jsonArr, ok := readAndParseConfigFile(&configFile); ok { + added := false + for _, jsonItem := range jsonArr { + if checkSchemaItems(jsonItem) { + addRegionSchema(jsonItem) + if jsonItem[regionKeyPropertyName] == *region || + jsonItem[regionIdentifierPropertyName] == *region { + *region = jsonItem[regionIdentifierPropertyName] + added = true + } + } + } + return added + } + return false +} + +// setRegionMetadataFromDeveloperToolConfigurationFile checks if Developer Tool config file is provided, once it's there, parse and add all +// The default location of the Developer Tool config file is ~/.oci/developer-tool-configuration.json. It will also check the environment variable +// the valid regions to region map, the configuration file can only be visited once. +// Once successfully find the expected region(region name or short code), return true, region name will be stored in +// the input pointer. +func setRegionMetadataFromDeveloperToolConfigurationFile(region *string) bool { + if jsonArr, ok := readAndParseDeveloperToolConfigurationFile(); ok { + added := false + if jsonArr["regions"] == nil { + return false + } + var regionJSON []map[string]string + originalJSONContent, err := json.Marshal(jsonArr["regions"]) + if err != nil { + return false + } + err = json.Unmarshal(originalJSONContent, ®ionJSON) + if err != nil { + return false + } + + if IsEnvVarTrue(OciAllowOnlyDeveloperToolConfigurationRegionsEnvVar) { + resetRegionInfo() + } + for _, jsonItem := range regionJSON { + if checkSchemaItems(jsonItem) { + addRegionSchema(jsonItem) + if jsonItem[regionKeyPropertyName] == *region || + jsonItem[regionIdentifierPropertyName] == *region { + *region = jsonItem[regionIdentifierPropertyName] + added = true + } + } + } + return added + } + return false +} + +func readAndParseConfigFile(configFileName *string) (fileContent []map[string]string, ok bool) { + if content, err := ioutil.ReadFile(*configFileName); err == nil { + Debugf("Raw content of region metadata config file content: %s", string(content[:])) + if err := json.Unmarshal(content, &fileContent); err != nil { + Debugf("Can't unmarshal config file, the error info is %v", err) + return + } + ok = true + return + } + Debugf("No Region Metadata Config File provided.") + return +} + +func readAndParseDeveloperToolConfigurationFile() (fileContent map[string]interface{}, ok bool) { + homeFolder := getHomeFolder() + configFileName := filepath.Join(homeFolder, regionMetadataCfgDirName, "developer-tool-configuration.json") + if path := os.Getenv(OciDeveloperToolConfigurationFilePathEnvVar); path != "" { + configFileName = path + } + if content, err := ioutil.ReadFile(configFileName); err == nil { + Debugf("Raw content of Developer Tool config file content: %s", string(content[:])) + if err := json.Unmarshal(content, &fileContent); err != nil { + Debugf("Can't unmarshal env var, the error info is %v", err) + return + } + ok = true + return + } + Debugf("No Developer Tool Config File provided.") + return +} + +func checkDeveloperToolConfigurationFile() bool { + homeFolder := getHomeFolder() + configFileName := filepath.Join(homeFolder, regionMetadataCfgDirName, "developer-tool-configuration.json") + if path := os.Getenv(OciDeveloperToolConfigurationFilePathEnvVar); path != "" { + configFileName = path + } + if _, err := os.Stat(configFileName); err == nil { + return true + } + return false +} + +// check map regionRealm's region name, if it's already there, no need to add it. +func addRegionSchema(regionSchema map[string]string) { + r := Region(strings.ToLower(regionSchema[regionIdentifierPropertyName])) + if _, ok := regionRealm[r]; !ok { + // set mapping table + shortNameRegion[regionSchema[regionKeyPropertyName]] = r + realm[regionSchema[realmKeyPropertyName]] = regionSchema[realmDomainComponentPropertyName] + regionRealm[r] = regionSchema[realmKeyPropertyName] + return + } + Debugf("Region %s has already been added, no need to add again.", regionSchema[regionIdentifierPropertyName]) +} + +// AddRegionSchemaForPlc add region schema to region map +func AddRegionSchemaForPlc(regionSchema map[string]string) { + ociDeveloperToolConfigurationRegionSchemaList = append(ociDeveloperToolConfigurationRegionSchemaList, regionSchema) + addRegionSchema(regionSchema) + // if !IsEnvVarTrue(OciPlcRegionExclusiveEnvVar) { + // addRegionSchema(regionSchema) + // return + // } + // Debugf("Plc region coexist is not enabled, remove exisiting OCI region schema and add PLC region schema.") + // resetRegionInfo() + // bulkAddRegionSchema(ociPlcRegionSchemaList) +} + +func resetRegionInfo() { + shortNameRegion = make(map[string]Region) + realm = make(map[string]string) + regionRealm = make(map[Region]string) +} + +func bulkAddRegionSchema(regionSchemaList []map[string]string) { + for _, regionSchema := range regionSchemaList { + if checkSchemaItems(regionSchema) { + addRegionSchema(regionSchema) + } + } +} + +// check region schema content if all the required contents are provided +func checkSchemaItems(regionSchema map[string]string) bool { + if checkSchemaItem(regionSchema, regionIdentifierPropertyName) && + checkSchemaItem(regionSchema, realmKeyPropertyName) && + checkSchemaItem(regionSchema, realmDomainComponentPropertyName) && + checkSchemaItem(regionSchema, regionKeyPropertyName) { + return true + } + return false +} + +// check region schema item is valid, if so, convert it to lower case. +func checkSchemaItem(regionSchema map[string]string, key string) bool { + if val, ok := regionSchema[key]; ok { + if val != "" { + regionSchema[key] = strings.ToLower(val) + return true + } + Debugf("Region metadata schema %s is provided,but content is empty.", key) + return false + } + Debugf("Region metadata schema %s is not provided, please update the content", key) + return false +} + +// setRegionFromInstanceMetadataService checks if region metadata can be provided from InstanceMetadataService. +// Once successfully find the expected region(region name or short code), return true, region name will be stored in +// the input pointer. +// setRegionFromInstanceMetadataService will only be checked on the instance, by default it will not be enabled unless +// user explicitly enable it. +func setRegionFromInstanceMetadataService(region *string) bool { + // example of content: + // { + // "realmKey" : "oc1", + // "realmDomainComponent" : "oraclecloud.com", + // "regionKey" : "YUL", + // "regionIdentifier" : "ca-montreal-1" + // } + // Mark visitIMDS Flag as false since it has already been visited. + if !visitIMDS { + Debugf("check from IMDS is disabled or IMDS had already been successfully visited, no need to check again.") + return false + } + content, err := getRegionInfoFromInstanceMetadataService() + if err != nil { + Debugf("Failed to get instance metadata. Error: %v", err) + return false + } + + // Mark visitIMDS Flag as false since we have already successfully get the region info from IMDS. + visitIMDS = false + + var regionInfo map[string]string + err = json.Unmarshal(content, ®ionInfo) + if err != nil { + Debugf("Failed to unmarshal the response content: %v \nError: %v", string(content), err) + return false + } + + if checkSchemaItems(regionInfo) { + addRegionSchema(regionInfo) + if regionInfo[regionKeyPropertyName] == *region || + regionInfo[regionIdentifierPropertyName] == *region { + *region = regionInfo[regionIdentifierPropertyName] + } + } else { + Debugf("Region information is not valid.") + return false + } + + return true +} + +// getRegionInfoFromInstanceMetadataServiceProd calls instance metadata service and get the region information +func getRegionInfoFromInstanceMetadataServiceProd() ([]byte, error) { + request, _ := http.NewRequest(http.MethodGet, instanceMetadataRegionInfoURLV2, nil) + request.Header.Add("Authorization", "Bearer Oracle") + + client := &http.Client{ + Timeout: time.Second * 10, + } + resp, err := client.Do(request) + if err != nil { + return nil, fmt.Errorf("failed to call instance metadata service. Error: %v", err) + } + + statusCode := resp.StatusCode + + defer resp.Body.Close() + + content, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, fmt.Errorf("failed to get region information from response body. Error: %v", err) + } + + if statusCode != http.StatusOK { + err = fmt.Errorf("HTTP Get failed: URL: %s, Status: %s, Message: %s", + instanceMetadataRegionInfoURLV2, resp.Status, string(content)) + return nil, err + } + + return content, nil +} + +// TemplateParamForPerRealmEndpoint is a template parameter for per-realm endpoint. +type TemplateParamForPerRealmEndpoint struct { + Template string + EndsWithDot bool +} + +// SetMissingTemplateParams function will parse the {} template in client host and replace with empty string. +func SetMissingTemplateParams(client *BaseClient) { + templateRegex := regexp.MustCompile(`{.*?}`) + templates := templateRegex.FindAllString(client.Host, -1) + for _, template := range templates { + client.Host = strings.Replace(client.Host, template, "", -1) + } +} + +func getOciSdkEnabledServicesMap() map[string]bool { + var enabledMap = make(map[string]bool) + if jsonArr, ok := readAndParseDeveloperToolConfigurationFile(); ok { + if jsonArr["provider"] != nil { + OciDeveloperToolConfigurationProvider = jsonArr["provider"].(string) + } + if jsonArr["allowOnlyDeveloperToolConfigurationRegions"] != nil && jsonArr["allowOnlyDeveloperToolConfigurationRegions"] == false { + ociAllowOnlyDeveloperToolConfigurationRegions = jsonArr["allowOnlyDeveloperToolConfigurationRegions"].(bool) + } + if jsonArr["services"] == nil { + return enabledMap + } + serviesJSON, ok := jsonArr["services"].([]interface{}) + if !ok { + return enabledMap + } + re, _ := regexp.Compile(`[^\w]`) + for _, jsonItem := range serviesJSON { + serviceName := strings.ToLower(fmt.Sprint(jsonItem)) + serviceName = re.ReplaceAllString(serviceName, "") + enabledMap[serviceName] = true + } + } + return enabledMap +} + +// AddServiceToEnabledServicesMap adds the service to the enabledServiceMap +// The service name will auto transit to lower case and remove all the non-word characters. +// Concurrency (goroutine-safe). The map is initialized with sync.Once, and writes are protected by a RWMutex. +func AddServiceToEnabledServicesMap(serviceName string) { + OciSdkEnabledServicesOnce.Do(func() { + OciSdkEnabledServicesMap = getOciSdkEnabledServicesMap() + if OciSdkEnabledServicesMap == nil { + OciSdkEnabledServicesMap = make(map[string]bool) + } + }) + serviceName = strings.ToLower(serviceName) + serviceName = reNonWord.ReplaceAllString(serviceName, "") + + OciSdkEnabledServicesMu.Lock() + defer OciSdkEnabledServicesMu.Unlock() + OciSdkEnabledServicesMap[serviceName] = true +} + +// CheckForEnabledServices checks if the service is enabled in the enabledServiceMap. +// It will first check if the map is initialized, if not, it will initialize the map. +// If the map is empty, it means all the services are enabled. +// If the map is not empty, it means only the services in the map and value is true are enabled. +// Concurrency (goroutine-safe). Initialization uses sync.Once and reads are protected by a RWMutex. +func CheckForEnabledServices(serviceName string) bool { + OciSdkEnabledServicesOnce.Do(func() { + OciSdkEnabledServicesMap = getOciSdkEnabledServicesMap() + if OciSdkEnabledServicesMap == nil { + OciSdkEnabledServicesMap = make(map[string]bool) + } + }) + serviceName = strings.ToLower(serviceName) + serviceName = reNonWord.ReplaceAllString(serviceName, "") + + OciSdkEnabledServicesMu.RLock() + defer OciSdkEnabledServicesMu.RUnlock() + + if len(OciSdkEnabledServicesMap) == 0 { + return true + } + allowed, ok := OciSdkEnabledServicesMap[serviceName] + if !ok { + return false + } + return allowed +} + +// CheckAllowOnlyDeveloperToolConfigurationRegions checks if only developer tool configuration regions are allowed +// This function will first check if the OCI_ALLOW_ONLY_DEVELOPER_TOOL_CONFIGURATION_REGIONS environment variable is set. +// If it is set, it will return the value. +// If it is not set, it will return the value from the ociAllowOnlyDeveloperToolConfigurationRegions variable. +func checkAllowOnlyDeveloperToolConfigurationRegions() bool { + if val, ok := os.LookupEnv("OCI_ALLOW_ONLY_DEVELOPER_TOOL_CONFIGURATION_REGIONS"); ok { + return val == "true" + } + return ociAllowOnlyDeveloperToolConfigurationRegions +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/configuration.go new file mode 100644 index 000000000..d62a181b6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/configuration.go @@ -0,0 +1,824 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +import ( + "crypto/rsa" + "errors" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "regexp" + "strings" + "sync" +) + +// AuthenticationType for auth +type AuthenticationType string + +const ( + // UserPrincipal is default auth type + UserPrincipal AuthenticationType = "user_principal" + // InstancePrincipal is used for instance principal auth type + InstancePrincipal AuthenticationType = "instance_principal" + // InstancePrincipalDelegationToken is used for instance principal delegation token auth type + InstancePrincipalDelegationToken AuthenticationType = "instance_principle_delegation_token" + // ResourcePrincipalDelegationToken is used for resource principal delegation token auth type + ResourcePrincipalDelegationToken AuthenticationType = "resource_principle_delegation_token" + // OAuth2DelegationToken is used for oauth delegation token auth type + OAuthDelegationToken AuthenticationType = "oauth_delegation_token" + // WorkloadIdentityFederation is used for token exchange grant auth type + WorkloadIdentityFederation AuthenticationType = "workload_identity_federation" + // UnknownAuthenticationType is used for none meaningful auth type + UnknownAuthenticationType AuthenticationType = "unknown_auth_type" +) + +// AuthConfig is used for getting auth related paras in config file +type AuthConfig struct { + AuthType AuthenticationType + // IsFromConfigFile is used to point out if the authConfig is from configuration file + IsFromConfigFile bool + OboToken *string +} + +// ConfigurationProvider wraps information about the account owner +type ConfigurationProvider interface { + KeyProvider + TenancyOCID() (string, error) + UserOCID() (string, error) + KeyFingerprint() (string, error) + Region() (string, error) + // AuthType() is used for specify the needed auth type, like UserPrincipal, InstancePrincipal, etc. + AuthType() (AuthConfig, error) +} + +var fileMutex = sync.Mutex{} +var fileCache = make(map[string][]byte) + +// Reads the file contents from cache if present otherwise reads the file. +// If file to be read is frequently updated/refreshed, please use readFile(filename) as readFileFromCache(filename) might return the old contents from the cache. +func readFileFromCache(filename string) ([]byte, error) { + fileMutex.Lock() + defer fileMutex.Unlock() + val, ok := fileCache[filename] + if ok { + return val, nil + } + val, err := ioutil.ReadFile(filename) + if err == nil { + fileCache[filename] = val + } + return val, err +} + +// Reads the file and returns the contents +func readFile(filename string) ([]byte, error) { + fileMutex.Lock() + defer fileMutex.Unlock() + val, err := os.ReadFile(filename) + return val, err +} + +// IsConfigurationProviderValid Tests all parts of the configuration provider do not return an error, this method will +// not check AuthType(), since authType() is not required to be there. +func IsConfigurationProviderValid(conf ConfigurationProvider) (ok bool, err error) { + baseFn := []func() (string, error){conf.TenancyOCID, conf.UserOCID, conf.KeyFingerprint, conf.Region, conf.KeyID} + for _, fn := range baseFn { + _, err = fn() + ok = err == nil + if err != nil { + return + } + } + + _, err = conf.PrivateRSAKey() + ok = err == nil + if err != nil { + return + } + return true, nil +} + +// rawConfigurationProvider allows a user to simply construct a configuration provider from raw values. +type rawConfigurationProvider struct { + tenancy string + user string + region string + fingerprint string + privateKey string + privateKeyPassphrase *string +} + +// NewRawConfigurationProvider will create a ConfigurationProvider with the arguments of the function +func NewRawConfigurationProvider(tenancy, user, region, fingerprint, privateKey string, privateKeyPassphrase *string) ConfigurationProvider { + return rawConfigurationProvider{tenancy, user, region, fingerprint, privateKey, privateKeyPassphrase} +} + +func (p rawConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey, err error) { + return PrivateKeyFromBytes([]byte(p.privateKey), p.privateKeyPassphrase) +} + +func (p rawConfigurationProvider) KeyID() (keyID string, err error) { + tenancy, err := p.TenancyOCID() + if err != nil { + return + } + + user, err := p.UserOCID() + if err != nil { + return + } + + fingerprint, err := p.KeyFingerprint() + if err != nil { + return + } + + return fmt.Sprintf("%s/%s/%s", tenancy, user, fingerprint), nil +} + +func (p rawConfigurationProvider) TenancyOCID() (string, error) { + if p.tenancy == "" { + return "", fmt.Errorf("tenancy OCID can not be empty") + } + return p.tenancy, nil +} + +func (p rawConfigurationProvider) UserOCID() (string, error) { + if p.user == "" { + return "", fmt.Errorf("user OCID can not be empty") + } + return p.user, nil +} + +func (p rawConfigurationProvider) KeyFingerprint() (string, error) { + if p.fingerprint == "" { + return "", fmt.Errorf("fingerprint can not be empty") + } + return p.fingerprint, nil +} + +func (p rawConfigurationProvider) Region() (string, error) { + return canStringBeRegion(p.region) +} + +func (p rawConfigurationProvider) AuthType() (AuthConfig, error) { + return AuthConfig{UnknownAuthenticationType, false, nil}, nil +} + +// environmentConfigurationProvider reads configuration from environment variables +type environmentConfigurationProvider struct { + PrivateKeyPassword string + EnvironmentVariablePrefix string +} + +// ConfigurationProviderEnvironmentVariables creates a ConfigurationProvider from a uniform set of environment variables starting with a prefix +// The env variables should look like: [prefix]_private_key_path, [prefix]_tenancy_ocid, [prefix]_user_ocid, [prefix]_fingerprint +// [prefix]_region +func ConfigurationProviderEnvironmentVariables(environmentVariablePrefix, privateKeyPassword string) ConfigurationProvider { + return environmentConfigurationProvider{EnvironmentVariablePrefix: environmentVariablePrefix, + PrivateKeyPassword: privateKeyPassword} +} + +func (p environmentConfigurationProvider) String() string { + return fmt.Sprintf("Configuration provided by environment variables prefixed with: %s", p.EnvironmentVariablePrefix) +} + +func (p environmentConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey, err error) { + environmentVariable := fmt.Sprintf("%s_%s", p.EnvironmentVariablePrefix, "private_key_path") + var ok bool + var value string + if value, ok = os.LookupEnv(environmentVariable); !ok { + return nil, fmt.Errorf("can not read PrivateKey from env variable: %s", environmentVariable) + } + + expandedPath := expandPath(value) + pemFileContent, err := readFileFromCache(expandedPath) + if err != nil { + Debugln("Can not read PrivateKey location from environment variable: " + environmentVariable) + return + } + + key, err = PrivateKeyFromBytes(pemFileContent, &p.PrivateKeyPassword) + return +} + +func (p environmentConfigurationProvider) KeyID() (keyID string, err error) { + ocid, err := p.TenancyOCID() + if err != nil { + return + } + + userocid, err := p.UserOCID() + if err != nil { + return + } + + fingerprint, err := p.KeyFingerprint() + if err != nil { + return + } + + return fmt.Sprintf("%s/%s/%s", ocid, userocid, fingerprint), nil +} + +func (p environmentConfigurationProvider) TenancyOCID() (value string, err error) { + environmentVariable := fmt.Sprintf("%s_%s", p.EnvironmentVariablePrefix, "tenancy_ocid") + var ok bool + if value, ok = os.LookupEnv(environmentVariable); !ok { + err = fmt.Errorf("can not read Tenancy from environment variable %s", environmentVariable) + } else if value == "" { + err = fmt.Errorf("tenancy OCID can not be empty when reading from environmental variable") + } + return +} + +func (p environmentConfigurationProvider) UserOCID() (value string, err error) { + environmentVariable := fmt.Sprintf("%s_%s", p.EnvironmentVariablePrefix, "user_ocid") + var ok bool + if value, ok = os.LookupEnv(environmentVariable); !ok { + err = fmt.Errorf("can not read user id from environment variable %s", environmentVariable) + } else if value == "" { + err = fmt.Errorf("user OCID can not be empty when reading from environmental variable") + } + return +} + +func (p environmentConfigurationProvider) KeyFingerprint() (value string, err error) { + environmentVariable := fmt.Sprintf("%s_%s", p.EnvironmentVariablePrefix, "fingerprint") + var ok bool + if value, ok = os.LookupEnv(environmentVariable); !ok { + err = fmt.Errorf("can not read fingerprint from environment variable %s", environmentVariable) + } else if value == "" { + err = fmt.Errorf("fingerprint can not be empty when reading from environmental variable") + } + return +} + +func (p environmentConfigurationProvider) Region() (value string, err error) { + environmentVariable := fmt.Sprintf("%s_%s", p.EnvironmentVariablePrefix, "region") + var ok bool + if value, ok = os.LookupEnv(environmentVariable); !ok { + err = fmt.Errorf("can not read region from environment variable %s", environmentVariable) + return value, err + } + + return canStringBeRegion(value) +} + +func (p environmentConfigurationProvider) AuthType() (AuthConfig, error) { + return AuthConfig{UnknownAuthenticationType, false, nil}, + fmt.Errorf("unsupported, keep the interface") +} + +// fileConfigurationProvider. reads configuration information from a file +type fileConfigurationProvider struct { + //The path to the configuration file + ConfigPath string + + //The password for the private key + PrivateKeyPassword string + + //The profile for the configuration + Profile string + + //ConfigFileInfo + FileInfo *configFileInfo + + //Mutex to protect the config file + configMux sync.Mutex +} + +type fileConfigurationProviderError struct { + err error +} + +func (fpe fileConfigurationProviderError) Error() string { + return fmt.Sprintf("%s\nFor more info about config file and how to get required information, see https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm", fpe.err) +} + +// ConfigurationProviderFromFile creates a configuration provider from a configuration file +// by reading the "DEFAULT" profile +func ConfigurationProviderFromFile(configFilePath, privateKeyPassword string) (ConfigurationProvider, error) { + if configFilePath == "" { + return nil, fmt.Errorf("config file path can not be empty") + } + + return fileConfigurationProvider{ + ConfigPath: configFilePath, + PrivateKeyPassword: privateKeyPassword, + Profile: "DEFAULT", + configMux: sync.Mutex{}}, nil +} + +// ConfigurationProviderFromFileWithProfile creates a configuration provider from a configuration file +// and the given profile +func ConfigurationProviderFromFileWithProfile(configFilePath, profile, privateKeyPassword string) (ConfigurationProvider, error) { + if configFilePath == "" { + return nil, fileConfigurationProviderError{err: fmt.Errorf("config file path can not be empty")} + } + + return fileConfigurationProvider{ + ConfigPath: configFilePath, + PrivateKeyPassword: privateKeyPassword, + Profile: profile, + configMux: sync.Mutex{}}, nil +} + +type configFileInfo struct { + UserOcid, Fingerprint, KeyFilePath, TenancyOcid, Region, Passphrase, SecurityTokenFilePath, DelegationTokenFilePath, + AuthenticationType string + PresentConfiguration rune +} + +const ( + hasTenancy = 1 << iota + hasUser + hasFingerprint + hasRegion + hasKeyFile + hasPassphrase + hasSecurityTokenFile + hasDelegationTokenFile + hasAuthenticationType + none +) + +var profileRegex = regexp.MustCompile(`^\[(.*)\]`) + +func parseConfigFile(data []byte, profile string) (info *configFileInfo, err error) { + + if len(data) == 0 { + return nil, fileConfigurationProviderError{err: fmt.Errorf("configuration file content is empty")} + } + + content := string(data) + splitContent := strings.Split(content, "\n") + + //Look for profile + for i, line := range splitContent { + if match := profileRegex.FindStringSubmatch(line); len(match) > 1 && match[1] == profile { + start := i + 1 + return parseConfigAtLine(start, splitContent) + } + } + + return nil, fileConfigurationProviderError{err: fmt.Errorf("configuration file did not contain profile: %s", profile)} +} + +func parseConfigAtLine(start int, content []string) (info *configFileInfo, err error) { + var configurationPresent rune + info = &configFileInfo{} + for i := start; i < len(content); i++ { + line := content[i] + if profileRegex.MatchString(line) { + break + } + + if !strings.Contains(line, "=") { + continue + } + + splits := strings.Split(line, "=") + switch key, value := strings.TrimSpace(splits[0]), strings.TrimSpace(splits[1]); strings.ToLower(key) { + case "passphrase", "pass_phrase": + configurationPresent = configurationPresent | hasPassphrase + info.Passphrase = value + case "user": + configurationPresent = configurationPresent | hasUser + info.UserOcid = value + case "fingerprint": + configurationPresent = configurationPresent | hasFingerprint + info.Fingerprint = value + case "key_file": + configurationPresent = configurationPresent | hasKeyFile + info.KeyFilePath = value + case "tenancy": + configurationPresent = configurationPresent | hasTenancy + info.TenancyOcid = value + case "region": + configurationPresent = configurationPresent | hasRegion + info.Region = value + case "security_token_file": + configurationPresent = configurationPresent | hasSecurityTokenFile + info.SecurityTokenFilePath = value + case "delegation_token_file": + configurationPresent = configurationPresent | hasDelegationTokenFile + info.DelegationTokenFilePath = value + case "authentication_type": + configurationPresent = configurationPresent | hasAuthenticationType + info.AuthenticationType = value + } + } + info.PresentConfiguration = configurationPresent + return + +} + +// cleans and expands the path if it contains a tilde , returns the expanded path or the input path as is if not expansion +// was performed +func expandPath(filename string) (expandedPath string) { + cleanedPath := filepath.Clean(filename) + expandedPath = cleanedPath + if strings.HasPrefix(cleanedPath, "~") { + rest := cleanedPath[2:] + expandedPath = filepath.Join(getHomeFolder(), rest) + } + return +} + +func openConfigFile(configFilePath string) (data []byte, err error) { + expandedPath := expandPath(configFilePath) + data, err = readFileFromCache(expandedPath) + if err != nil { + err = fmt.Errorf("can not read config file: %s due to: %s", configFilePath, err.Error()) + } + + return +} + +func (p fileConfigurationProvider) String() string { + return fmt.Sprintf("Configuration provided by file: %s", p.ConfigPath) +} + +func (p fileConfigurationProvider) readAndParseConfigFile() (info *configFileInfo, err error) { + p.configMux.Lock() + defer p.configMux.Unlock() + if p.FileInfo != nil { + return p.FileInfo, nil + } + + if p.ConfigPath == "" { + return nil, fileConfigurationProviderError{err: fmt.Errorf("configuration path can not be empty")} + } + + data, err := openConfigFile(p.ConfigPath) + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("error while parsing config file: %s. Due to: %s", p.ConfigPath, err.Error())} + return + } + + p.FileInfo, err = parseConfigFile(data, p.Profile) + return p.FileInfo, err +} + +func presentOrError(value string, expectedConf, presentConf rune, confMissing string) (string, error) { + if presentConf&expectedConf == expectedConf { + return value, nil + } + return "", fileConfigurationProviderError{err: errors.New(confMissing + " configuration is missing from file")} +} + +func (p fileConfigurationProvider) TenancyOCID() (value string, err error) { + info, err := p.readAndParseConfigFile() + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("can not read tenancy configuration due to: %s", err.Error())} + return + } + + value, err = presentOrError(info.TenancyOcid, hasTenancy, info.PresentConfiguration, "tenancy") + if err == nil && value == "" { + err = fileConfigurationProviderError{err: fmt.Errorf("tenancy OCID can not be empty when reading from config file")} + } + return +} + +func (p fileConfigurationProvider) UserOCID() (value string, err error) { + info, err := p.readAndParseConfigFile() + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("can not read tenancy configuration due to: %s", err.Error())} + return + } + + if value, err = presentOrError(info.UserOcid, hasUser, info.PresentConfiguration, "user"); err != nil { + // need to check if securityTokenPath is provided, if security token is provided, userOCID can be "". + if _, stErr := presentOrError(info.SecurityTokenFilePath, hasSecurityTokenFile, info.PresentConfiguration, + "securityTokenPath"); stErr == nil { + err = nil + } + } + return +} + +func (p fileConfigurationProvider) KeyFingerprint() (value string, err error) { + info, err := p.readAndParseConfigFile() + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("can not read tenancy configuration due to: %s", err.Error())} + return + } + value, err = presentOrError(info.Fingerprint, hasFingerprint, info.PresentConfiguration, "fingerprint") + if err == nil && value == "" { + return "", fmt.Errorf("fingerprint can not be empty when reading from config file") + } + return +} + +func (p fileConfigurationProvider) KeyID() (keyID string, err error) { + tenancy, err := p.TenancyOCID() + if err != nil { + return + } + + fingerprint, err := p.KeyFingerprint() + if err != nil { + return + } + + info, err := p.readAndParseConfigFile() + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("can not read tenancy configuration due to: %s", err.Error())} + return + } + if info.PresentConfiguration&hasUser == hasUser { + if info.UserOcid == "" { + err = fileConfigurationProviderError{err: fmt.Errorf("user cannot be empty in the config file")} + return + } + return fmt.Sprintf("%s/%s/%s", tenancy, info.UserOcid, fingerprint), nil + } + filePath, pathErr := presentOrError(info.SecurityTokenFilePath, hasSecurityTokenFile, info.PresentConfiguration, "securityTokenFilePath") + if pathErr == nil { + rawString, err := getTokenContent(filePath) + if err != nil { + return "", fileConfigurationProviderError{err: err} + } + return "ST$" + rawString, nil + } + err = fileConfigurationProviderError{err: fmt.Errorf("can not read SecurityTokenFilePath from configuration file due to: %s", pathErr.Error())} + return +} + +func (p fileConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey, err error) { + info, err := p.readAndParseConfigFile() + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("can not read tenancy configuration due to: %s", err.Error())} + return + } + + filePath, err := presentOrError(info.KeyFilePath, hasKeyFile, info.PresentConfiguration, "key file path") + if err != nil { + return + } + + expandedPath := expandPath(filePath) + pemFileContent, err := readFileFromCache(expandedPath) + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("can not read PrivateKey from configuration file due to: %s", err.Error())} + return + } + + password := p.PrivateKeyPassword + + if password == "" && ((info.PresentConfiguration & hasPassphrase) == hasPassphrase) { + password = info.Passphrase + } + + key, err = PrivateKeyFromBytes(pemFileContent, &password) + return +} + +func (p fileConfigurationProvider) Region() (value string, err error) { + info, err := p.readAndParseConfigFile() + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("can not read region configuration due to: %s", err.Error())} + return + } + + value, err = presentOrError(info.Region, hasRegion, info.PresentConfiguration, "region") + if err != nil { + val, error := getRegionFromEnvVar() + if error != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("region configuration is missing from file, nor for OCI_REGION env var")} + return + } + value = val + } + + return canStringBeRegion(value) +} + +func (p fileConfigurationProvider) AuthType() (AuthConfig, error) { + info, err := p.readAndParseConfigFile() + if err != nil { + err = fmt.Errorf("can not read tenancy configuration due to: %s", err.Error()) + return AuthConfig{UnknownAuthenticationType, true, nil}, err + } + val, _ := presentOrError(info.AuthenticationType, hasAuthenticationType, info.PresentConfiguration, "authentication_type") + + if val == "instance_principal" { + if filePath, err := presentOrError(info.DelegationTokenFilePath, hasDelegationTokenFile, info.PresentConfiguration, "delegationTokenFilePath"); err == nil { + if delegationToken, err := getTokenContent(filePath); err == nil && delegationToken != "" { + Debugf("delegation token loaded from config file") + return AuthConfig{InstancePrincipalDelegationToken, true, &delegationToken}, nil + } + return AuthConfig{UnknownAuthenticationType, true, nil}, err + + } + // normal instance principle + return AuthConfig{InstancePrincipal, true, nil}, nil + } + + // by default, if no "authentication_type" is provided, just treated as user principle type, and will not return error + return AuthConfig{UserPrincipal, true, nil}, nil +} + +func getTokenContent(filePath string) (string, error) { + expandedPath := expandPath(filePath) + tokenFileContent, err := readFile(expandedPath) + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("can not read token content from configuration file due to: %s", err.Error())} + return "", err + } + return string(tokenFileContent), nil +} + +// A configuration provider that look for information in multiple configuration providers +type composingConfigurationProvider struct { + Providers []ConfigurationProvider +} + +// ComposingConfigurationProvider creates a composing configuration provider with the given slice of configuration providers +// A composing provider will return the configuration of the first provider that has the required property +// if no provider has the property it will return an error. +func ComposingConfigurationProvider(providers []ConfigurationProvider) (ConfigurationProvider, error) { + if len(providers) == 0 { + return nil, fmt.Errorf("providers can not be an empty slice") + } + + for i, p := range providers { + if p == nil { + return nil, fmt.Errorf("provider in position: %d is nil. ComposingConfiurationProvider does not support nil values", i) + } + } + return composingConfigurationProvider{Providers: providers}, nil +} + +func (c composingConfigurationProvider) TenancyOCID() (string, error) { + for _, p := range c.Providers { + val, err := p.TenancyOCID() + if err == nil { + return val, nil + } + Debugf("did not find a proper configuration for tenancy, err: %v", err) + } + return "", fmt.Errorf("did not find a proper configuration for tenancy") +} + +func (c composingConfigurationProvider) UserOCID() (string, error) { + for _, p := range c.Providers { + val, err := p.UserOCID() + if err == nil { + return val, nil + } + Debugf("did not find a proper configuration for keyFingerprint, err: %v", err) + } + return "", fmt.Errorf("did not find a proper configuration for user") +} + +func (c composingConfigurationProvider) KeyFingerprint() (string, error) { + for _, p := range c.Providers { + val, err := p.KeyFingerprint() + if err == nil { + return val, nil + } + } + return "", fmt.Errorf("did not find a proper configuration for keyFingerprint") +} +func (c composingConfigurationProvider) Region() (string, error) { + for _, p := range c.Providers { + val, err := p.Region() + if err == nil { + return val, nil + } + } + if val, err := getRegionFromEnvVar(); err == nil { + return val, nil + } + return "", fmt.Errorf("did not find a proper configuration for region, nor for OCI_REGION env var") +} + +func (c composingConfigurationProvider) KeyID() (string, error) { + for _, p := range c.Providers { + val, err := p.KeyID() + if err == nil { + return val, nil + } + } + return "", fmt.Errorf("did not find a proper configuration for key id") +} + +func (c composingConfigurationProvider) PrivateRSAKey() (*rsa.PrivateKey, error) { + for _, p := range c.Providers { + val, err := p.PrivateRSAKey() + if err == nil { + return val, nil + } + } + return nil, fmt.Errorf("did not find a proper configuration for private key") +} + +func (c composingConfigurationProvider) AuthType() (AuthConfig, error) { + // only check the first default fileConfigProvider + authConfig, err := c.Providers[0].AuthType() + if err == nil && authConfig.AuthType != UnknownAuthenticationType { + return authConfig, nil + } + return AuthConfig{UnknownAuthenticationType, false, nil}, fmt.Errorf("did not find a proper configuration for auth type") +} + +func getRegionFromEnvVar() (string, error) { + regionEnvVar := "OCI_REGION" + if region, existed := os.LookupEnv(regionEnvVar); existed { + return region, nil + } + return "", fmt.Errorf("did not find OCI_REGION env var") +} + +type sessionTokenConfigurationProvider struct { + fileConfigurationProvider +} + +func (p sessionTokenConfigurationProvider) UserOCID() (value string, err error) { + info, err := p.readAndParseConfigFile() + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("can not read the configuration due to: %s", err.Error())} + return + } + // In case of session token-based authentication, userOCID will not be present + // need to check if session token path is provided in the configuration + if _, stErr := presentOrError(info.SecurityTokenFilePath, hasSecurityTokenFile, info.PresentConfiguration, + "securityTokenPath"); stErr == nil { + err = nil + } + return +} + +func (p sessionTokenConfigurationProvider) KeyID() (keyID string, err error) { + _, err = p.TenancyOCID() + if err != nil { + return + } + + _, err = p.KeyFingerprint() + if err != nil { + return + } + + info, err := p.readAndParseConfigFile() + if err != nil { + err = fileConfigurationProviderError{err: fmt.Errorf("can not read SessionTokenFilePath configuration due to: %s", err.Error())} + return + } + + filePath, pathErr := presentOrError(info.SecurityTokenFilePath, hasSecurityTokenFile, info.PresentConfiguration, "securityTokenFilePath") + if pathErr == nil { + rawString, err := getTokenContent(filePath) + if err != nil { + return "", fileConfigurationProviderError{err: err} + } + return "ST$" + rawString, nil + } + err = fileConfigurationProviderError{err: fmt.Errorf("can not read SessionTokenFilePath from configuration file due to: %s", pathErr.Error())} + return +} + +// ConfigurationProviderForSessionToken creates a session token configuration provider from a configuration file +// by reading the "DEFAULT" profile +func ConfigurationProviderForSessionToken(configFilePath, privateKeyPassword string) (ConfigurationProvider, error) { + if configFilePath == "" { + return nil, fileConfigurationProviderError{err: fmt.Errorf("config file path can not be empty")} + } + + return sessionTokenConfigurationProvider{ + fileConfigurationProvider{ + ConfigPath: configFilePath, + PrivateKeyPassword: privateKeyPassword, + Profile: "DEFAULT", + configMux: sync.Mutex{}}}, nil +} + +// ConfigurationProviderForSessionTokenWithProfile creates a session token configuration provider from a configuration file +// by reading the given profile +func ConfigurationProviderForSessionTokenWithProfile(configFilePath, profile, privateKeyPassword string) (ConfigurationProvider, error) { + if configFilePath == "" { + return nil, fileConfigurationProviderError{err: fmt.Errorf("config file path can not be empty")} + } + + return sessionTokenConfigurationProvider{ + fileConfigurationProvider{ + ConfigPath: configFilePath, + PrivateKeyPassword: privateKeyPassword, + Profile: profile, + configMux: sync.Mutex{}}}, nil +} + +func (p sessionTokenConfigurationProvider) Refreshable() bool { + return true +} + +// RefreshableConfigurationProvider the interface to identity if the config provider is refreshable +type RefreshableConfigurationProvider interface { + Refreshable() bool +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/errors.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/errors.go new file mode 100644 index 000000000..8621bf75b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/errors.go @@ -0,0 +1,306 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +import ( + "encoding/json" + "errors" + "fmt" + "io/ioutil" + "net" + "net/http" + "strings" + "syscall" + + "github.com/sony/gobreaker/v2" +) + +// ServiceError models all potential errors generated the service call +type ServiceError interface { + // The http status code of the error + GetHTTPStatusCode() int + + // The human-readable error string as sent by the service + GetMessage() string + + // A short error code that defines the error, meant for programmatic parsing. + // See https://docs.oracle.com/iaas/Content/API/References/apierrors.htm + GetCode() string + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + GetOpcRequestID() string +} + +// ServiceErrorRichInfo models all potential errors generated the service call and contains rich info for debugging purpose +type ServiceErrorRichInfo interface { + ServiceError + // The service this service call is sending to + GetTargetService() string + + // The API name this service call is sending to + GetOperationName() string + + // The timestamp when this request is made + GetTimestamp() SDKTime + + // The endpoint and the Http method of this service call + GetRequestTarget() string + + // The client version, in this case the oci go sdk version + GetClientVersion() string + + // The API reference doc link for this API, optional and maybe empty + GetOperationReferenceLink() string + + // Troubleshooting doc link + GetErrorTroubleshootingLink() string +} + +// ServiceErrorLocalizationMessage models all potential errors generated the service call and has localized error message info +type ServiceErrorLocalizationMessage interface { + ServiceErrorRichInfo + // The original error message string as sent by the service + GetOriginalMessage() string + + // The values to be substituted into the originalMessageTemplate, expressed as a string-to-string map. + GetMessageArgument() map[string]string + + // Template in ICU MessageFormat for the human-readable error string in English, but without the values replaced + GetOriginalMessageTemplate() string +} + +type servicefailure struct { + StatusCode int + Code string `json:"code,omitempty"` + Message string `json:"message,omitempty"` + OriginalMessage string `json:"originalMessage"` + OriginalMessageTemplate string `json:"originalMessageTemplate"` + MessageArgument map[string]string `json:"messageArguments"` + OpcRequestID string `json:"opc-request-id"` + // debugging information + TargetService string `json:"target-service"` + OperationName string `json:"operation-name"` + Timestamp SDKTime `json:"timestamp"` + RequestTarget string `json:"request-target"` + ClientVersion string `json:"client-version"` + + // troubleshooting guidance + OperationReferenceLink string `json:"operation-reference-link"` + ErrorTroubleshootingLink string `json:"error-troubleshooting-link"` +} + +func newServiceFailureFromResponse(response *http.Response) error { + var err error + var timestamp SDKTime + t, err := tryParsingTimeWithValidFormatsForHeaders([]byte(response.Header.Get("Date")), "Date") + + if err != nil { + timestamp = *now() + } else { + timestamp = sdkTimeFromTime(t) + } + + se := servicefailure{ + StatusCode: response.StatusCode, + Code: "BadErrorResponse", + OpcRequestID: response.Header.Get("opc-request-id"), + Timestamp: timestamp, + ClientVersion: defaultSDKMarker + "/" + Version(), + RequestTarget: fmt.Sprintf("%s %s", response.Request.Method, response.Request.URL), + } + + //If there is an error consume the body, entirely + body, err := ioutil.ReadAll(response.Body) + if err != nil { + se.Message = fmt.Sprintf("The body of the response was not readable, due to :%s", err.Error()) + return se + } + + err = json.Unmarshal(body, &se) + if err != nil { + Debugf("Error response could not be parsed due to: %s", err.Error()) + se.Message = fmt.Sprintf("Failed to parse json from response body due to: %s. With response body %s.", err.Error(), string(body[:])) + return se + } + return se +} + +// PostProcessServiceError process the service error after an error is raised and complete it with extra information +func PostProcessServiceError(err error, service string, method string, apiReferenceLink string) error { + var serviceFailure servicefailure + if _, ok := err.(servicefailure); !ok { + return err + } + serviceFailure = err.(servicefailure) + serviceFailure.OperationName = method + serviceFailure.TargetService = service + serviceFailure.ErrorTroubleshootingLink = fmt.Sprintf("https://docs.oracle.com/iaas/Content/API/References/apierrors.htm#apierrors_%v__%v_%s", serviceFailure.StatusCode, serviceFailure.StatusCode, strings.ToLower(serviceFailure.Code)) + serviceFailure.OperationReferenceLink = apiReferenceLink + return serviceFailure +} + +func (se servicefailure) Error() string { + return fmt.Sprintf(`Error returned by %s Service. Http Status Code: %d. Error Code: %s. Opc request id: %s. Message: %s +Operation Name: %s +Timestamp: %s +Client Version: %s +Request Endpoint: %s +Troubleshooting Tips: See %s for more information about resolving this error.%s +To get more info on the failing request, you can set OCI_GO_SDK_DEBUG env var to info or higher level to log the request/response details. +If you are unable to resolve this %s issue, please contact Oracle support and provide them this full error message.`, + se.TargetService, se.StatusCode, se.Code, se.OpcRequestID, se.Message, se.OperationName, se.Timestamp, se.ClientVersion, se.RequestTarget, se.ErrorTroubleshootingLink, se.getOperationReferenceMessage(), se.TargetService) +} + +func (se servicefailure) getOperationReferenceMessage() string { + if se.OperationReferenceLink == "" { + return "" + } + return fmt.Sprintf("\nAlso see %s for details on this operation's requirements.", se.OperationReferenceLink) +} + +func (se servicefailure) GetHTTPStatusCode() int { + return se.StatusCode + +} + +func (se servicefailure) GetMessage() string { + return se.Message +} + +func (se servicefailure) GetOriginalMessage() string { + return se.OriginalMessage +} + +func (se servicefailure) GetOriginalMessageTemplate() string { + return se.OriginalMessageTemplate +} + +func (se servicefailure) GetMessageArgument() map[string]string { + return se.MessageArgument +} + +func (se servicefailure) GetCode() string { + return se.Code +} + +func (se servicefailure) GetOpcRequestID() string { + return se.OpcRequestID +} + +func (se servicefailure) GetTargetService() string { + return se.TargetService +} + +func (se servicefailure) GetOperationName() string { + return se.OperationName +} + +func (se servicefailure) GetTimestamp() SDKTime { + return se.Timestamp +} + +func (se servicefailure) GetRequestTarget() string { + return se.RequestTarget +} + +func (se servicefailure) GetClientVersion() string { + return se.ClientVersion +} + +func (se servicefailure) GetOperationReferenceLink() string { + return se.OperationReferenceLink +} + +func (se servicefailure) GetErrorTroubleshootingLink() string { + return se.ErrorTroubleshootingLink +} + +// IsServiceError returns false if the error is not service side, otherwise true +// additionally it returns an interface representing the ServiceError +func IsServiceError(err error) (failure ServiceError, ok bool) { + failure, ok = err.(ServiceError) + return +} + +// IsServiceErrorRichInfo returns false if the error is not service side or is not containing rich info, otherwise true +// additionally it returns an interface representing the ServiceErrorRichInfo +func IsServiceErrorRichInfo(err error) (failure ServiceErrorRichInfo, ok bool) { + failure, ok = err.(ServiceErrorRichInfo) + return +} + +// IsServiceErrorLocalizationMessage returns false if the error is not service side, otherwise true +// additionally it returns an interface representing the ServiceErrorOriginalMessage +func IsServiceErrorLocalizationMessage(err error) (failure ServiceErrorLocalizationMessage, ok bool) { + failure, ok = err.(ServiceErrorLocalizationMessage) + return +} + +type deadlineExceededByBackoffError struct{} + +func (deadlineExceededByBackoffError) Error() string { + return "now() + computed backoff duration exceeds request deadline" +} + +// DeadlineExceededByBackoff is the error returned by Call() when GetNextDuration() returns a time.Duration that would +// force the user to wait past the request deadline before re-issuing a request. This enables us to exit early, since +// we cannot succeed based on the configured retry policy. +var DeadlineExceededByBackoff error = deadlineExceededByBackoffError{} + +// NonSeekableRequestRetryFailure is the error returned when the request is with binary request body, and is configured +// retry, but the request body is not retryable +type NonSeekableRequestRetryFailure struct { + err error +} + +func (ne NonSeekableRequestRetryFailure) Error() string { + if ne.err == nil { + return "Unable to perform Retry on this request body type, which did not implement seek() interface" + } + return fmt.Sprintf("%s. Unable to perform Retry on this request body type, which did not implement seek() interface", ne.err.Error()) +} + +// IsNetworkError validates if an error is a net.Error and check if it's temporary or timeout +func IsNetworkError(err error) bool { + if err == nil { + return false + } + + if errors.Is(err, syscall.ECONNRESET) { + return true + } + + if r, ok := err.(net.Error); ok && (r.Timeout() || strings.Contains(err.Error(), "net/http: HTTP/1.x transport connection broken")) { + return true + } + + return false +} + +// IsCircuitBreakerError validates if an error's text is Open state ErrOpenState or HalfOpen state ErrTooManyRequests +func IsCircuitBreakerError(err error) bool { + if err == nil { + return false + } + + if err.Error() == gobreaker.ErrOpenState.Error() || err.Error() == gobreaker.ErrTooManyRequests.Error() { + return true + } + return false +} + +func getCircuitBreakerError(request *http.Request, err error, cbr *OciCircuitBreaker) error { + cbErr := fmt.Errorf("%s, so this request was not sent to the %s service.\n\n The circuit breaker was opened because the %s service failed too many times recently. "+ + "Because the circuit breaker has been opened, requests within a %.2f second window of when the circuit breaker opened will not be sent to the %s service.\n\n"+ + "URL which circuit breaker prevented request to - %s \n Circuit Breaker Info \n Name - %s \n State - %s \n\n Errors from %s service which opened the circuit breaker:\n\n%s", + err, cbr.Cbst.serviceName, cbr.Cbst.serviceName, cbr.Cbst.openStateWindow.Seconds(), cbr.Cbst.serviceName, request.URL.Host+request.URL.Path, cbr.Cbst.name, cbr.Cb.State().String(), cbr.Cbst.serviceName, cbr.GetHistory()) + return cbErr +} + +// StatErrCode is a type which wraps error's statusCode and errorCode from service end +type StatErrCode struct { + statusCode int + errorCode string +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/eventual_consistency.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/eventual_consistency.go new file mode 100644 index 000000000..282b5f65a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/eventual_consistency.go @@ -0,0 +1,467 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +import ( + "bytes" + "errors" + "fmt" + "os" + "runtime" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" + + "github.com/gofrs/flock" +) + +const ( + // OciGoSdkEcConfigEnvVarName contains the name of the environment variable that can be used to configure the eventual consistency (EC) communication mode. + // Allowed values for environment variable: + // 1. OCI_GO_SDK_EC_CONFIG = "file,/path/to/shared/timestamp/file" + // 2. OCI_GO_SDK_EC_CONFIG = "inprocess" + // 3. absent -- same as OCI_GO_SDK_EC_CONFIG = "inprocess" + OciGoSdkEcConfigEnvVarName string = "OCI_GO_SDK_EC_CONFIG" +) + +// +// Eventual consistency communication mode +// + +// EcMode is the eventual consistency (EC) communication mode used. +type EcMode int64 + +const ( + // Uninitialized means the EC communication mode has not been set yet. + Uninitialized EcMode = iota // 0 + + // InProcess is the default EC communication mode which only communicates the end-of-window timestamp inside the same process. + InProcess + + // File is the EC communication mode that uses a file to communicate the end-of-window timestamp using a file visible across processes. + // Locking is performed using a lock file. + File +) + +var ( + affectedByEventualConsistencyRetryStatusCodeMap = map[StatErrCode]bool{ + {400, "RelatedResourceNotAuthorizedOrNotFound"}: true, + {404, "NotAuthorizedOrNotFound"}: true, + {409, "NotAuthorizedOrResourceAlreadyExists"}: true, + {409, "ResourceAlreadyExists"}: true, + {400, "InsufficientServicePermissions"}: true, + {400, "ResourceDisabled"}: true, + } +) + +// IsErrorAffectedByEventualConsistency returns true if the error is affected by eventual consistency. +func IsErrorAffectedByEventualConsistency(Error error) bool { + if err, ok := IsServiceError(Error); ok { + return affectedByEventualConsistencyRetryStatusCodeMap[StatErrCode{err.GetHTTPStatusCode(), err.GetCode()}] + } + return false +} + +func getEcMode(mode string) EcMode { + var lmode = strings.ToLower(mode) + switch lmode { + case "file": + return File + case "inprocess": + return InProcess + } + ecLogf("%s: Unknown ec mode '%s', assuming 'inprocess'", OciGoSdkEcConfigEnvVarName, mode) + return InProcess +} + +// EventuallyConsistentContext contains the information about the end of the eventually consistent window. +type EventuallyConsistentContext struct { + // memory-based + endOfWindow atomic.Value + lock sync.RWMutex + timeNowProvider func() time.Time + + // mode selector + ecMode EcMode + + // file-based + + // timestampFileName and timestampLockFile should be set to files that + // are accessible by all processes that need to share information about + // eventual consistency. + // A sensible choice are files inside the temp directory, as returned by os.TempDir() + timestampFileName *string + timestampFileLock *flock.Flock + + // lock and unlock functions + readLock func(e *EventuallyConsistentContext) error + readUnlock func(e *EventuallyConsistentContext) error + writeLock func(e *EventuallyConsistentContext) error + writeUnlock func(e *EventuallyConsistentContext) error + + // get/set functions + getEndOfWindowUnsynchronized func(e *EventuallyConsistentContext) (*time.Time, error) + setEndOfWindowUnsynchronized func(e *EventuallyConsistentContext, newEndOfWindowTime *time.Time) error +} + +// newEcContext creates a new EC context based on the OCI_GO_SDK_EC_CONFIG environment variable. +func newEcContext() *EventuallyConsistentContext { + ecConfig, ecConfigProvided := os.LookupEnv(OciGoSdkEcConfigEnvVarName) + if !ecConfigProvided { + ecConfig = "" + } + + commaIndex := strings.Index(ecConfig, ",") + var ecConfigMode = ecConfig + var ecConfigRest = "" + if commaIndex >= 0 { + ecConfigMode = ecConfig[:commaIndex] + ecConfigRest = ecConfig[commaIndex+1:] + } + ecMode := getEcMode(ecConfigMode) + + switch ecMode { + case File: + if len(ecConfigRest) < 1 { + ecLogf("%s: Expected file name after comma for 'File' mode ('file,/path/to/file'), was: '%s'", OciGoSdkEcConfigEnvVarName, ecConfig) + return nil + } + return newEcContextFile(ecConfigRest) + } + + return newEcContextInProcess() +} + +// newEcContextInProcess creates a new in-process EC context. +func newEcContextInProcess() *EventuallyConsistentContext { + ecContext := EventuallyConsistentContext{ + ecMode: InProcess, + readLock: ecInProcessReadLock, + readUnlock: ecInProcessReadUnlock, + writeLock: ecInProcessWriteLock, + writeUnlock: ecInProcessWriteUnlock, + getEndOfWindowUnsynchronized: ecInProcessGetEndOfWindowUnsynchronized, + setEndOfWindowUnsynchronized: ecInProcessSetEndOfWindowUnsynchronized, + timeNowProvider: func() time.Time { return time.Now() }, + } + return &ecContext +} + +// newEcContextFile creates a new EC context kept in a file. +// timestampFileName should be set to a file accessible by all processes that +// need to share information about eventual consistency. +// A sensible choice are files inside the temp directory, as returned by os.TempDir() +// The lock file will use the same name, with the suffix ".lock" added. +func newEcContextFile(timestampFileName string) *EventuallyConsistentContext { + timestampLockFileName := timestampFileName + ".lock" + ecContext := EventuallyConsistentContext{ + ecMode: File, + readLock: ecFileReadLock, + readUnlock: ecFileReadUnlock, + writeLock: ecFileWriteLock, + writeUnlock: ecFileWriteUnlock, + getEndOfWindowUnsynchronized: ecFileGetEndOfWindowUnsynchronized, + setEndOfWindowUnsynchronized: ecFileSetEndOfWindowUnsynchronized, + timeNowProvider: func() time.Time { return time.Now() }, + timestampFileName: ×tampFileName, + timestampFileLock: flock.New(timestampLockFileName), + } + ecDebugf("%s: Using file modification time of file '%s' and lock file '%s'", OciGoSdkEcConfigEnvVarName, *ecContext.timestampFileName, timestampLockFileName) + return &ecContext +} + +// InitializeEcContextFromEnvVar initializes the EcContext variable as configured +// in the OCI_GO_SDK_EC_CONFIG environment variable. +func InitializeEcContextFromEnvVar() { + EcContext = newEcContext() +} + +// InitializeEcContextInProcess initializes the EcContext variable to be in-process only. +func InitializeEcContextInProcess() { + EcContext = newEcContextInProcess() +} + +// InitializeEcContextFile initializes the EcContext variable to be kept in a timestamp file, +// protected by a lock file. +// timestampFileName should be set to a file accessible by all processes that +// need to share information about eventual consistency. +// A sensible choice are files inside the temp directory, as returned by os.TempDir() +// The lock file will use the same name, with the suffix ".lock" added. +func InitializeEcContextFile(timestampFileName string) { + EcContext = newEcContextFile(timestampFileName) +} + +// +// InProcess functions +// + +func ecInProcessReadLock(e *EventuallyConsistentContext) error { + e.lock.RLock() + return nil +} + +func ecInProcessReadUnlock(e *EventuallyConsistentContext) error { + e.lock.RUnlock() + return nil +} + +func ecInProcessWriteLock(e *EventuallyConsistentContext) error { + e.lock.Lock() + return nil +} + +func ecInProcessWriteUnlock(e *EventuallyConsistentContext) error { + e.lock.Unlock() + return nil +} + +// ecInProcessGetEndOfWindowUnsynchronized returns the end time of an eventually consistent window, +// or nil if no eventually consistent requests were made. +// There is no mutex synchronization. +func ecInProcessGetEndOfWindowUnsynchronized(e *EventuallyConsistentContext) (*time.Time, error) { + untyped := e.endOfWindow.Load() // returns nil if there has been no call to Store for this Value + if untyped == nil { + return (*time.Time)(nil), nil + } + t := untyped.(*time.Time) + + return t, nil +} + +// ecInProcessSetEndOfWindowUnsynchronized sets the end time of the eventually consistent window. +// There is no mutex synchronization. +func ecInProcessSetEndOfWindowUnsynchronized(e *EventuallyConsistentContext, newEndOfWindowTime *time.Time) error { + e.endOfWindow.Store(newEndOfWindowTime) // atomically replace the current object with the new one + return nil +} + +// +// File functions +// + +func ecFileReadLock(e *EventuallyConsistentContext) error { + return e.timestampFileLock.RLock() +} + +func ecFileReadUnlock(e *EventuallyConsistentContext) error { + return e.timestampFileLock.Unlock() +} + +func ecFileWriteLock(e *EventuallyConsistentContext) error { + return e.timestampFileLock.Lock() +} + +func ecFileWriteUnlock(e *EventuallyConsistentContext) error { + return e.timestampFileLock.Unlock() +} + +// ecFileGetEndOfWindowUnsynchronized returns the end time of an eventually consistent window, +// or nil if no eventually consistent requests were made. +// There is no mutex synchronization. +func ecFileGetEndOfWindowUnsynchronized(e *EventuallyConsistentContext) (*time.Time, error) { + file, err := os.Stat(*e.timestampFileName) + + if errors.Is(err, os.ErrNotExist) { + ecDebugf("%s: File '%s' does not exist, meaning no EC in effect", OciGoSdkEcConfigEnvVarName, *e.timestampFileName) + return (*time.Time)(nil), nil + } + if err != nil { + ecLogf("%s: Error getting modified time from file '%s', assuming no EC in effect: %s", OciGoSdkEcConfigEnvVarName, *e.timestampFileName, err) + return (*time.Time)(nil), err + } + + t := file.ModTime() + ecDebugf("%s: Read modified time of file '%s' as '%s'", OciGoSdkEcConfigEnvVarName, *e.timestampFileName, t) + + return &t, nil +} + +// ecFileSetEndOfWindowUnsynchronized sets the end time of the eventually consistent window. +// There is no mutex synchronization. +func ecFileSetEndOfWindowUnsynchronized(e *EventuallyConsistentContext, newEndOfWindowTime *time.Time) error { + if newEndOfWindowTime != nil { + ecDebugf("%s: Updating modified time of file '%s' to '%s'", OciGoSdkEcConfigEnvVarName, *e.timestampFileName, *newEndOfWindowTime) + } else { + ecDebugf("%s: Updating modified time of file '%s' to ", OciGoSdkEcConfigEnvVarName, *e.timestampFileName) + } + + if newEndOfWindowTime == nil { + err := os.Remove(*e.timestampFileName) + if err != nil && !errors.Is(err, os.ErrNotExist) { + ecLogf("%s: Error removing file '%s', may draw wrong EC conflusions: %s", OciGoSdkEcConfigEnvVarName, *e.timestampFileName, err) + } + return err + } + + atime := time.Now() + var err = os.Chtimes(*e.timestampFileName, atime, *newEndOfWindowTime) + if errors.Is(err, os.ErrNotExist) { + _, createErr := os.Create(*e.timestampFileName) + if createErr != nil { + ecLogf("%s: Error creating file '%s', will have to assume no EC in effect: %s", OciGoSdkEcConfigEnvVarName, *e.timestampFileName, createErr) + return createErr + } + err = os.Chtimes(*e.timestampFileName, atime, *newEndOfWindowTime) + } + if err != nil { + ecLogf("%s: Error changing modified time for file '%s', will have to assume no EC in effect: %s", OciGoSdkEcConfigEnvVarName, *e.timestampFileName, err) + return err + } + return nil +} + +// +// General functions for EC window handling, for all EC communication modes +// + +// GetEndOfWindow returns the end time an eventually consistent window, +// or nil if no eventually consistent requests were made +func (e *EventuallyConsistentContext) GetEndOfWindow() *time.Time { + e.readLock(e) // synchronize with potential writers + defer e.readUnlock(e) + + endOfWindowTime, _ := e.getEndOfWindowUnsynchronized(e) + + // TODO: this is noisy logging, consider removing + if endOfWindowTime != nil { + ecDebugln(fmt.Sprintf("EcContext.GetEndOfWindow returns %s", endOfWindowTime)) + } else { + ecDebugln("EcContext.GetEndOfWindow returns ") + } + + return endOfWindowTime +} + +// UpdateEndOfWindow sets the end time of the eventually consistent window the specified +// duration into the future +func (e *EventuallyConsistentContext) UpdateEndOfWindow(windowSize time.Duration) *time.Time { + e.writeLock(e) // synchronize with other potential writers + defer e.writeUnlock(e) + + currentEndOfWindowTime, _ := e.getEndOfWindowUnsynchronized(e) + var newEndOfWindowTime = e.timeNowProvider().Add(windowSize) + if currentEndOfWindowTime == nil || newEndOfWindowTime.After(*currentEndOfWindowTime) { + e.setEndOfWindowUnsynchronized(e, &newEndOfWindowTime) + + // TODO: this is noisy logging, consider removing + ecDebugln(fmt.Sprintf("EcContext.UpdateEndOfWindow to %s", newEndOfWindowTime)) + + return &newEndOfWindowTime + } + return currentEndOfWindowTime +} + +// setEndTimeOfEventuallyConsistentWindow sets the last time an eventually consistent request was made +// to the specified time +func (e *EventuallyConsistentContext) setEndOfWindow(newTime *time.Time) *time.Time { + e.writeLock(e) // synchronize with other potential writers + defer e.writeUnlock(e) + + e.setEndOfWindowUnsynchronized(e, newTime) + + // TODO: this is noisy logging, consider removing + if newTime != nil { + ecDebugln(fmt.Sprintf("EcContext.setEndOfWindow to %s", *newTime)) + } else { + ecDebugln("EcContext.setEndOfWindow to ") + } + + return newTime +} + +// EcContext contains the information about the end of the eventually consistent window for this process. +var EcContext = newEcContext() + +// +// Logging helpers +// + +// getGID returns the Goroutine id. This is purely for logging and debugging. +// See https://blog.sgmansfield.com/2015/12/goroutine-ids/ +func getGID() uint64 { + b := make([]byte, 64) + b = b[:runtime.Stack(b, false)] + b = bytes.TrimPrefix(b, []byte("goroutine ")) + b = b[:bytes.IndexByte(b, ' ')] + n, _ := strconv.ParseUint(string(b), 10, 64) + return n +} + +// some of these errors happen so early, defaultLogger may not have been +// initialized yet. +func initLogIfNecessary() { + if defaultLogger == nil { + l, _ := NewSDKLogger() + SetSDKLogger(l) + } +} + +// Debugf logs v with the provided format if debug mode is set. +// There is no mutex synchronization. You should have acquired e.lock first. +func ecDebugf(format string, v ...interface{}) { + defer func() { + // recover from panic if one occured. + if recover() != nil { + Debugln("ecDebugf failed") + } + }() + + str := fmt.Sprintf(format, v...) + + initLogIfNecessary() + + // prefix message with "(pid=25140, gid=5)" + Debugf("(pid=%d, gid=%d) %s", os.Getpid(), getGID(), str) +} + +// Debug logs v if debug mode is set. +// There is no mutex synchronization. You should have acquired e.lock first. +func ecDebug(v ...interface{}) { + defer func() { + // recover from panic if one occured. + if recover() != nil { + Debugln("ecDebug failed") + } + }() + + initLogIfNecessary() + + // prefix message with "(pid=25140, gid=5)" + Debug(append([]interface{}{"(pid=", os.Getpid(), ", gid=", getGID(), ") "}, v...)...) +} + +// Debugln logs v appending a new line if debug mode is set +// There is no mutex synchronization. You should have acquired e.lock first. +func ecDebugln(v ...interface{}) { + defer func() { + // recover from panic if one occured. + if recover() != nil { + Debugln("ecDebugln failed") + } + }() + + initLogIfNecessary() + + // prefix message with "(pid=25140, gid=5)" + Debugln(append([]interface{}{"(pid=", os.Getpid(), ", gid=", getGID(), ") "}, v...)...) +} + +// Logf logs v with the provided format if info mode is set. +// There is no mutex synchronization. You should have acquired e.lock first. +func ecLogf(format string, v ...interface{}) { + defer func() { + // recover from panic if one occured. + if recover() != nil { + Debugln("ecLogf failed") + } + }() + + initLogIfNecessary() + + str := fmt.Sprintf(format, v...) + // prefix message with "(pid=25140, gid=5)" + Logf("(pid=%d, gid=%d) %s", os.Getpid(), getGID(), str) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/helpers.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/helpers.go new file mode 100644 index 000000000..db6c1e992 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/helpers.go @@ -0,0 +1,308 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +//lint:file-ignore SA1019 older versions of staticcheck (those compatible with Golang 1.17) falsely flag x509.IsEncryptedPEMBlock and x509.DecryptPEMBlock. + +package common + +import ( + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "encoding/pem" + "errors" + "fmt" + "net/textproto" + "os" + "reflect" + "strconv" + "strings" + "time" + + "github.com/youmark/pkcs8" +) + +// String returns a pointer to the provided string +func String(value string) *string { + return &value +} + +// Int returns a pointer to the provided int +func Int(value int) *int { + return &value +} + +// Int64 returns a pointer to the provided int64 +func Int64(value int64) *int64 { + return &value +} + +// Uint returns a pointer to the provided uint +func Uint(value uint) *uint { + return &value +} + +// Float32 returns a pointer to the provided float32 +func Float32(value float32) *float32 { + return &value +} + +// Float64 returns a pointer to the provided float64 +func Float64(value float64) *float64 { + return &value +} + +// Bool returns a pointer to the provided bool +func Bool(value bool) *bool { + return &value +} + +// PointerString prints the values of pointers in a struct +// Producing a human friendly string for an struct with pointers. +// useful when debugging the values of a struct +func PointerString(datastruct interface{}) (representation string) { + val := reflect.ValueOf(datastruct) + typ := reflect.TypeOf(datastruct) + all := make([]string, 2) + all = append(all, "{") + for i := 0; i < typ.NumField(); i++ { + sf := typ.Field(i) + + //unexported + if sf.PkgPath != "" && !sf.Anonymous { + continue + } + + sv := val.Field(i) + stringValue := "" + if isNil(sv) { + stringValue = fmt.Sprintf("%s=", sf.Name) + } else { + if sv.Type().Kind() == reflect.Ptr { + sv = sv.Elem() + } + stringValue = fmt.Sprintf("%s=%v", sf.Name, sv) + } + all = append(all, stringValue) + } + all = append(all, "}") + representation = strings.TrimSpace(strings.Join(all, " ")) + return +} + +// SDKTime a struct that parses/renders to/from json using RFC339 date-time information +type SDKTime struct { + time.Time +} + +// SDKDate a struct that parses/renders to/from json using only date information +type SDKDate struct { + //Date date information + Date time.Time +} + +func sdkTimeFromTime(t time.Time) SDKTime { + return SDKTime{t} +} + +func sdkDateFromTime(t time.Time) SDKDate { + return SDKDate{Date: t} +} + +func formatTime(t SDKTime) string { + return t.Format(sdkTimeFormat) +} + +func formatDate(t SDKDate) string { + return t.Date.Format(sdkDateFormat) +} + +func now() *SDKTime { + t := SDKTime{time.Now()} + return &t +} + +var timeType = reflect.TypeOf(SDKTime{}) +var timeTypePtr = reflect.TypeOf(&SDKTime{}) + +var sdkDateType = reflect.TypeOf(SDKDate{}) +var sdkDateTypePtr = reflect.TypeOf(&SDKDate{}) + +// Formats for sdk supported time representations +const sdkTimeFormat = time.RFC3339Nano +const rfc1123OptionalLeadingDigitsInDay = "Mon, _2 Jan 2006 15:04:05 MST" +const sdkDateFormat = "2006-01-02" + +func tryParsingTimeWithValidFormatsForHeaders(data []byte, headerName string) (t time.Time, err error) { + header := strings.ToLower(headerName) + switch header { + case "lastmodified", "date": + t, err = tryParsing(data, time.RFC3339Nano, time.RFC3339, time.RFC1123, rfc1123OptionalLeadingDigitsInDay, time.RFC850, time.ANSIC) + return + default: //By default we parse with RFC3339 + t, err = time.Parse(sdkTimeFormat, string(data)) + return + } +} + +func tryParsing(data []byte, layouts ...string) (tm time.Time, err error) { + datestring := string(data) + for _, l := range layouts { + tm, err = time.Parse(l, datestring) + if err == nil { + return + } + } + err = fmt.Errorf("could not parse time: %s with formats: %s", datestring, layouts[:]) + return +} + +// String returns string representation of SDKDate +func (t *SDKDate) String() string { + return t.Date.Format(sdkDateFormat) +} + +// NewSDKDateFromString parses the dateString into SDKDate +func NewSDKDateFromString(dateString string) (*SDKDate, error) { + parsedTime, err := time.Parse(sdkDateFormat, dateString) + if err != nil { + return nil, err + } + + return &SDKDate{Date: parsedTime}, nil +} + +// UnmarshalJSON unmarshals from json +func (t *SDKTime) UnmarshalJSON(data []byte) (e error) { + s := string(data) + if s == "null" { + t.Time = time.Time{} + } else { + //Try parsing with RFC3339 + t.Time, e = time.Parse(`"`+sdkTimeFormat+`"`, string(data)) + } + return +} + +// MarshalJSON marshals to JSON +func (t *SDKTime) MarshalJSON() (buff []byte, e error) { + s := t.Format(sdkTimeFormat) + buff = []byte(`"` + s + `"`) + return +} + +// UnmarshalJSON unmarshals from json +func (t *SDKDate) UnmarshalJSON(data []byte) (e error) { + if string(data) == `"null"` { + t.Date = time.Time{} + return + } + + t.Date, e = tryParsing(data, + strconv.Quote(sdkDateFormat), + ) + return +} + +// MarshalJSON marshals to JSON +func (t *SDKDate) MarshalJSON() (buff []byte, e error) { + s := t.Date.Format(sdkDateFormat) + buff = []byte(strconv.Quote(s)) + return +} + +// PrivateKeyFromBytes is a helper function that will produce a RSA private +// key from bytes. This function is deprecated in favour of PrivateKeyFromBytesWithPassword +// Deprecated +func PrivateKeyFromBytes(pemData []byte, password *string) (key *rsa.PrivateKey, e error) { + if password == nil { + return PrivateKeyFromBytesWithPassword(pemData, nil) + } + + return PrivateKeyFromBytesWithPassword(pemData, []byte(*password)) +} + +// PrivateKeyFromBytesWithPassword is a helper function that will produce a RSA private +// key from bytes and a password. +func PrivateKeyFromBytesWithPassword(pemData, password []byte) (key *rsa.PrivateKey, e error) { + pemBlock, _ := pem.Decode(pemData) + if pemBlock == nil { + e = fmt.Errorf("PEM data was not found in buffer") + return + } + + decrypted := pemBlock.Bytes + // Support for encrypted PKCS8 format, this format can not be handled by x509.IsEncryptedPEMBlock func + if key, e = pkcs8.ParsePKCS8PrivateKeyRSA(pemBlock.Bytes, password); key != nil { + return + } + // if pemBlock.Type == "ENCRYPTED PRIVATE KEY" { + // return pkcs8.ParsePKCS8PrivateKeyRSA(pemData, password) + // } + if x509.IsEncryptedPEMBlock(pemBlock) { + if password == nil { + return nil, errors.New("private key password is required for encrypted private keys") + } + + if decrypted, e = x509.DecryptPEMBlock(pemBlock, password); e != nil { + return + } + } + key, e = parsePKCSPrivateKey(decrypted) + return +} + +// ParsePrivateKey using PKCS1 or PKCS8 +func parsePKCSPrivateKey(decryptedKey []byte) (*rsa.PrivateKey, error) { + if key, err := x509.ParsePKCS1PrivateKey(decryptedKey); err == nil { + return key, nil + } + if key, err := x509.ParsePKCS8PrivateKey(decryptedKey); err == nil { + switch key := key.(type) { + case *rsa.PrivateKey: + return key, nil + default: + return nil, fmt.Errorf("unsupportesd private key type in PKCS8 wrapping") + } + } + return nil, fmt.Errorf("failed to parse private key") +} + +// parseContentLength trims whitespace from cl and returns -1 if can't purse uint, or the value if it's no less than 0 +func parseContentLength(cl string) int64 { + cl = textproto.TrimString(cl) + n, err := strconv.ParseUint(cl, 10, 63) + if err != nil { + return -1 + } + return int64(n) +} + +func generateRandUUID() (string, error) { + b := make([]byte, 16) + _, err := rand.Read(b) + if err != nil { + return "", err + } + uuid := fmt.Sprintf("%x%x%x%x%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:]) + + return uuid, nil +} + +func makeACopy(original []string) []string { + tmp := make([]string, len(original)) + copy(tmp, original) + return tmp +} + +// IsEnvVarFalse is used for checking if an environment variable is explicitly set to false, otherwise would set it true by default +func IsEnvVarFalse(envVarKey string) bool { + val, existed := os.LookupEnv(envVarKey) + return existed && strings.ToLower(val) == "false" +} + +// IsEnvVarTrue is used for checking if an environment variable is explicitly set to true, otherwise would set it true by default +func IsEnvVarTrue(envVarKey string) bool { + val, existed := os.LookupEnv(envVarKey) + return existed && strings.ToLower(val) == "true" +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/http.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/http.go new file mode 100644 index 000000000..4d91ae40e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/http.go @@ -0,0 +1,1203 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/url" + "os" + "reflect" + "regexp" + "strconv" + "strings" + "time" +) + +const ( + //UsingExpectHeaderEnvVar is the key to determine whether expect 100-continue is enabled or not + UsingExpectHeaderEnvVar = "OCI_GOSDK_USING_EXPECT_HEADER" + //EncodePathParamsEnvVar determines if special characters in path params such as / and & are URL encoded + EncodePathParamsEnvVar = "OCI_GOSDK_ENCODE_PATH_PARAMS" + // EscapeJSONToASCIIEnvVar determines if non-ASCII characters in JSON strings are escaped + EscapeJSONToASCIIEnvVar = "OCI_GOSDK_ESCAPE_JSON_ASCII" +) + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//Request Marshaling +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +func isNil(v reflect.Value) bool { + return v.Kind() == reflect.Ptr && v.IsNil() +} + +// Returns the string representation of a reflect.Value +// Only transforms primitive values +func toStringValue(v reflect.Value, field reflect.StructField) (string, error) { + if v.Kind() == reflect.Ptr { + if v.IsNil() { + return "", fmt.Errorf("can not marshal a nil pointer") + } + v = v.Elem() + } + + if v.Type() == timeType { + t := v.Interface().(SDKTime) + return formatTime(t), nil + } + + if v.Type() == sdkDateType { + t := v.Interface().(SDKDate) + return formatDate(t), nil + } + + switch v.Kind() { + case reflect.Bool: + return strconv.FormatBool(v.Bool()), nil + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return strconv.FormatInt(v.Int(), 10), nil + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return strconv.FormatUint(v.Uint(), 10), nil + case reflect.String: + return v.String(), nil + case reflect.Float32: + return strconv.FormatFloat(v.Float(), 'f', -1, 32), nil + case reflect.Float64: + return strconv.FormatFloat(v.Float(), 'f', -1, 64), nil + default: + return "", fmt.Errorf("marshaling structure to a http.Request does not support field named: %s of type: %v", + field.Name, v.Type().String()) + } +} + +func addBinaryBody(request *http.Request, value reflect.Value, field reflect.StructField) (e error) { + readCloser, ok := value.Interface().(io.ReadCloser) + isMandatory, err := strconv.ParseBool(field.Tag.Get("mandatory")) + if err != nil { + return fmt.Errorf("mandatory tag is not valid for field %s", field.Name) + } + + if isMandatory && !ok { + e = fmt.Errorf("body of the request is mandatory and needs to be an io.ReadCloser interface. Can not marshal body of binary request") + return + } + + request.Body = readCloser + + //Set the default content type to application/octet-stream if not set + if request.Header.Get(requestHeaderContentType) == "" { + request.Header.Set(requestHeaderContentType, "application/octet-stream") + } + return nil +} + +// getTaggedNilFieldNameOrError, evaluates if a field with json and non mandatory tags is nil +// returns the json tag name, or an error if the tags are incorrectly present +func getTaggedNilFieldNameOrError(field reflect.StructField, fieldValue reflect.Value) (bool, string, error) { + currentTag := field.Tag + jsonTag := currentTag.Get("json") + + if jsonTag == "" { + return false, "", fmt.Errorf("json tag is not valid for field %s", field.Name) + } + + partsJSONTag := strings.Split(jsonTag, ",") + nameJSONField := partsJSONTag[0] + + if _, ok := currentTag.Lookup("mandatory"); !ok { + //No mandatory field set, no-op + return false, nameJSONField, nil + } + isMandatory, err := strconv.ParseBool(currentTag.Get("mandatory")) + if err != nil { + return false, "", fmt.Errorf("mandatory tag is not valid for field %s", field.Name) + } + + // If the field is marked as mandatory, no-op + if isMandatory { + return false, nameJSONField, nil + } + + Debugf("Adjusting tag: mandatory is false and json tag is valid on field: %s", field.Name) + + // If the field can not be nil, then no-op + if !isNillableType(&fieldValue) { + Debugf("WARNING json field is tagged with mandatory flags, but the type can not be nil, field name: %s", field.Name) + return false, nameJSONField, nil + } + + // If field value is nil, tag it as omitEmpty + return fieldValue.IsNil(), nameJSONField, nil + +} + +// isNillableType returns true if the filed can be nil +func isNillableType(value *reflect.Value) bool { + k := value.Kind() + switch k { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Slice: + return true + } + return false +} + +// omitNilFieldsInJSON, removes json keys whose struct value is nil, and the field is tagged with the json and +// mandatory:false tags +func omitNilFieldsInJSON(data interface{}, value reflect.Value) (interface{}, error) { + switch value.Kind() { + case reflect.Struct: + jsonMap := data.(map[string]interface{}) + fieldType := value.Type() + for i := 0; i < fieldType.NumField(); i++ { + currentField := fieldType.Field(i) + //unexported skip + if currentField.PkgPath != "" { + continue + } + + //Does not have json tag, no-op + if _, ok := currentField.Tag.Lookup("json"); !ok { + continue + } + + currentFieldValue := value.Field(i) + ok, jsonFieldName, err := getTaggedNilFieldNameOrError(currentField, currentFieldValue) + if err != nil { + return nil, fmt.Errorf("can not omit nil fields for field: %s, due to: %s", + currentField.Name, err.Error()) + } + + //Delete the struct field from the json representation + if ok { + delete(jsonMap, jsonFieldName) + continue + } + + // Check to make sure the field is part of the json representation of the value + if _, contains := jsonMap[jsonFieldName]; !contains { + Debugf("Field %s is not present in json, omitting", jsonFieldName) + continue + } + + if currentFieldValue.Type() == timeType || currentFieldValue.Type() == timeTypePtr || + currentField.Type == sdkDateType || currentField.Type == sdkDateTypePtr { + continue + } + // does it need to be adjusted? + var adjustedValue interface{} + adjustedValue, err = omitNilFieldsInJSON(jsonMap[jsonFieldName], currentFieldValue) + if err != nil { + return nil, fmt.Errorf("can not omit nil fields for field: %s, due to: %s", + currentField.Name, err.Error()) + } + jsonMap[jsonFieldName] = adjustedValue + } + return jsonMap, nil + case reflect.Slice, reflect.Array: + // Special case: a []byte may have been marshalled as a string + if data != nil && reflect.TypeOf(data).Kind() == reflect.String && value.Type().Elem().Kind() == reflect.Uint8 { + return data, nil + } + jsonList, ok := data.([]interface{}) + if !ok { + return nil, fmt.Errorf("can not omit nil fields, data was expected to be a not-nil list") + } + newList := make([]interface{}, len(jsonList)) + var err error + for i, val := range jsonList { + newList[i], err = omitNilFieldsInJSON(val, value.Index(i)) + if err != nil { + return nil, err + } + } + return newList, nil + case reflect.Map: + jsonMap, ok := data.(map[string]interface{}) + if !ok { + return nil, fmt.Errorf("can not omit nil fields, data was expected to be a not-nil map") + } + newMap := make(map[string]interface{}, len(jsonMap)) + var err error + for key, val := range jsonMap { + newMap[key], err = omitNilFieldsInJSON(val, value.MapIndex(reflect.ValueOf(key))) + if err != nil { + return nil, err + } + } + return newMap, nil + case reflect.Ptr, reflect.Interface: + valPtr := value.Elem() + return omitNilFieldsInJSON(data, valPtr) + default: + //Otherwise no-op + return data, nil + } +} + +// removeNilFieldsInJSONWithTaggedStruct remove struct fields tagged with json and mandatory false +// that are nil +func removeNilFieldsInJSONWithTaggedStruct(rawJSON []byte, value reflect.Value) ([]byte, error) { + var rawInterface interface{} + decoder := json.NewDecoder(bytes.NewBuffer(rawJSON)) + decoder.UseNumber() + var err error + if err = decoder.Decode(&rawInterface); err != nil { + return nil, err + } + + fixedMap, err := omitNilFieldsInJSON(rawInterface, value) + if err != nil { + return nil, err + } + return json.Marshal(fixedMap) +} + +// escapeJSONToASCII takes a JSON payload and returns an equivalent JSON where all string values are escaped to ASCII +func escapeJSONToASCII(rawJSON []byte) ([]byte, error) { + var rawInterface interface{} + decoder := json.NewDecoder(bytes.NewReader(rawJSON)) + decoder.UseNumber() + if err := decoder.Decode(&rawInterface); err != nil { + return nil, err + } + + // transform recursively visits the JSON value: + // - For objects (map[string[interface{}]]), recurse on each value + // - For arrays ([]interface{}), recurse on each element + // - For strings, produce a JSON-quoted ASCII-only representation + // - For other types, return as is + var transform func(interface{}) interface{} + transform = func(x interface{}) interface{} { + switch t := x.(type) { + case map[string]interface{}: + m := make(map[string]interface{}, len(t)) + for key, val := range t { + m[key] = transform(val) + } + return m + case []interface{}: + s := make([]interface{}, len(t)) + for i, val := range t { + s[i] = transform(val) + } + return s + case string: + // QuoteToASCII returns a 'quoted' JSON string containing only ASCII characters + // ex: input: "ハッピー" -> "\"\\u30cf\\u30c3\\u30d4\\u30fc\"" + // Returns as json.RawMessage so it gets embedded directly + q := strconv.AppendQuoteToASCII(nil, t) + return json.RawMessage(q) + default: + return x + } + } + + return json.Marshal(transform(rawInterface)) +} + +func addToBody(request *http.Request, value reflect.Value, field reflect.StructField, binaryBodySpecified *bool) (e error) { + Debugln("Marshaling to body from field:", field.Name) + if request.Body != nil { + Logf("The body of the request is already set. Structure: %s will overwrite it\n", field.Name) + } + tag := field.Tag + encoding := tag.Get("encoding") + + if encoding == "binary" { + *binaryBodySpecified = true + return addBinaryBody(request, value, field) + } + + rawJSON, e := json.Marshal(value.Interface()) + if e != nil { + return + } + marshaled, e := removeNilFieldsInJSONWithTaggedStruct(rawJSON, value) + if e != nil { + return + } + + if IsEnvVarTrue(EscapeJSONToASCIIEnvVar) { + marshaled, e = escapeJSONToASCII(marshaled) + if e != nil { + return + } + } + + if defaultLogger.LogLevel() == verboseLogging { + Debugf("Marshaled body is: %s\n", string(marshaled)) + } + + bodyBytes := bytes.NewReader(marshaled) + request.ContentLength = int64(bodyBytes.Len()) + request.Header.Set(requestHeaderContentLength, strconv.FormatInt(request.ContentLength, 10)) + request.Header.Set(requestHeaderContentType, "application/json") + request.Body = ioutil.NopCloser(bodyBytes) + snapshot := *bodyBytes + request.GetBody = func() (io.ReadCloser, error) { + r := snapshot + return ioutil.NopCloser(&r), nil + } + + return +} + +func checkBinaryBodyLength(request *http.Request) (contentLen int64, err error) { + if isNopCloser(request.Body) { + ioReader := reflect.ValueOf(request.Body).Field(0).Interface().(io.Reader) + switch t := ioReader.(type) { + case *bytes.Reader: + return int64(t.Len()), nil + case *bytes.Buffer: + return int64(t.Len()), nil + case *strings.Reader: + return int64(t.Len()), nil + default: + return getNormalBinaryBodyLength(request) + } + } + if reflect.TypeOf(request.Body) == reflect.TypeOf((*os.File)(nil)) { + fi, err := (request.Body.(*os.File)).Stat() + if err != nil { + return contentLen, err + } + return fi.Size(), nil + } + return getNormalBinaryBodyLength(request) +} + +// Helper function to judge if this struct is a nopCloser or nopCloserWriterTo +func isNopCloser(readCloser io.ReadCloser) bool { + if reflect.TypeOf(readCloser) == reflect.TypeOf(io.NopCloser(nil)) || reflect.TypeOf(readCloser) == reflect.TypeOf(io.NopCloser(struct { + io.Reader + io.WriterTo + }{})) { + return true + } + return false +} + +func getNormalBinaryBodyLength(request *http.Request) (contentLen int64, err error) { + // If binary body is seekable + seeker := getSeeker(request.Body) + if seeker != nil { + // save the current position, calculate the unread body length and seek it back to current position + if curPos, err := seeker.Seek(0, io.SeekCurrent); err == nil { + if endPos, err := seeker.Seek(0, io.SeekEnd); err == nil { + contentLen = endPos - curPos + if _, err = seeker.Seek(curPos, io.SeekStart); err == nil { + return contentLen, nil + } + } + } + } + + var dumpRequestBody io.ReadCloser + if dumpRequestBody, request.Body, err = drainBody(request.Body); err != nil { + return contentLen, err + } + contentBody, err := ioutil.ReadAll(dumpRequestBody) + if err != nil { + return contentLen, err + } + return int64(len(contentBody)), nil +} + +func getSeeker(readCloser io.ReadCloser) (seeker io.Seeker) { + if seeker, ok := readCloser.(io.Seeker); ok { + return seeker + } + // the binary body is wrapped with io.NopCloser + if isNopCloser(readCloser) { + if seeker, ok := reflect.ValueOf(readCloser).Field(0).Interface().(io.Seeker); ok { + return seeker + } + } + return seeker +} + +func addToQuery(request *http.Request, value reflect.Value, field reflect.StructField) (e error) { + Debugln("Marshaling to query from field: ", field.Name) + if request.URL == nil { + request.URL = &url.URL{} + } + query := request.URL.Query() + var queryParameterValue, queryParameterName string + + if queryParameterName = field.Tag.Get("name"); queryParameterName == "" { + return fmt.Errorf("marshaling request to a query requires the 'name' tag for field: %s ", field.Name) + } + + mandatory, _ := strconv.ParseBool(strings.ToLower(field.Tag.Get("mandatory"))) + + //If mandatory and nil. Error out + if mandatory && isNil(value) { + return fmt.Errorf("marshaling request to a header requires not nil pointer for field: %s", field.Name) + } + + //if not mandatory and nil. Omit + if !mandatory && isNil(value) { + Debugf("Query parameter value is not mandatory and is nil pointer in field: %s. Skipping query", field.Name) + return + } + + encoding := strings.ToLower(field.Tag.Get("collectionFormat")) + var collectionFormatStringValues []string + switch encoding { + case "csv", "multi": + if value.Kind() != reflect.Slice && value.Kind() != reflect.Array { + e = fmt.Errorf("query parameter is tagged as csv or multi yet its type is neither an Array nor a Slice: %s", field.Name) + break + } + + numOfElements := value.Len() + collectionFormatStringValues = make([]string, numOfElements) + for i := 0; i < numOfElements; i++ { + collectionFormatStringValues[i], e = toStringValue(value.Index(i), field) + if e != nil { + break + } + } + queryParameterValue = strings.Join(collectionFormatStringValues, ",") + case "": + queryParameterValue, e = toStringValue(value, field) + default: + e = fmt.Errorf("encoding of type %s is not supported for query param: %s", encoding, field.Name) + } + + if e != nil { + return + } + + //check for tag "omitEmpty", this is done to accomodate unset fields that do not + //support an empty string: enums in query params + if omitEmpty, present := field.Tag.Lookup("omitEmpty"); present { + omitEmptyBool, _ := strconv.ParseBool(strings.ToLower(omitEmpty)) + if queryParameterValue != "" || !omitEmptyBool { + addToQueryForEncoding(&query, encoding, queryParameterName, queryParameterValue, collectionFormatStringValues) + } else { + Debugf("Omitting %s, is empty and omitEmpty tag is set", field.Name) + } + } else { + addToQueryForEncoding(&query, encoding, queryParameterName, queryParameterValue, collectionFormatStringValues) + } + + request.URL.RawQuery = query.Encode() + return +} + +func addToQueryForEncoding(query *url.Values, encoding string, queryParameterName string, queryParameterValue string, collectionFormatStringValues []string) { + if encoding == "multi" { + for _, stringValue := range collectionFormatStringValues { + query.Add(queryParameterName, stringValue) + } + } else { + query.Set(queryParameterName, queryParameterValue) + } +} + +// Adds to the path of the url in the order they appear in the structure +func addToPath(request *http.Request, value reflect.Value, field reflect.StructField) (e error) { + var additionalURLPathPart string + if additionalURLPathPart, e = toStringValue(value, field); e != nil { + return fmt.Errorf("can not marshal to path in request for field %s. Due to %s", field.Name, e.Error()) + } + + // path should not be empty for any operations + if len(additionalURLPathPart) == 0 { + return fmt.Errorf("value cannot be empty for field %s in path", field.Name) + } + + // encode path param if EncodePathParamsEnvVar is set + if IsEnvVarTrue(EncodePathParamsEnvVar) { + additionalURLPathPart = url.PathEscape(additionalURLPathPart) + } + + if request.URL == nil { + request.URL = &url.URL{} + request.URL.Path = "" + } + var currentURLPath = request.URL.Path + + var templatedPathRegex, _ = regexp.Compile(".*{.+}.*") + if !templatedPathRegex.MatchString(currentURLPath) { + Debugln("Marshaling request to path by appending field:", field.Name) + allPath := []string{currentURLPath, additionalURLPathPart} + request.URL.Path = strings.Join(allPath, "/") + } else { + var fieldName string + if fieldName = field.Tag.Get("name"); fieldName == "" { + e = fmt.Errorf("marshaling request to path name and template requires a 'name' tag for field: %s", field.Name) + return + } + urlTemplate := currentURLPath + Debugln("Marshaling to path from field: ", field.Name, " in template: ", urlTemplate) + request.URL.Path = strings.Replace(urlTemplate, "{"+fieldName+"}", additionalURLPathPart, -1) + } + return +} + +func setWellKnownHeaders(request *http.Request, headerName, headerValue string, contentLenSpecified *bool) (e error) { + switch strings.ToLower(headerName) { + case "content-length": + var len int + len, e = strconv.Atoi(headerValue) + if e != nil { + return + } + request.ContentLength = int64(len) + *contentLenSpecified = true + } + return nil +} + +func addToHeader(request *http.Request, value reflect.Value, field reflect.StructField, contentLenSpecified *bool) (e error) { + Debugln("Marshaling to header from field: ", field.Name) + if request.Header == nil { + request.Header = http.Header{} + } + + var headerName, headerValue string + if headerName = field.Tag.Get("name"); headerName == "" { + return fmt.Errorf("marshaling request to a header requires the 'name' tag for field: %s", field.Name) + } + + mandatory, _ := strconv.ParseBool(strings.ToLower(field.Tag.Get("mandatory"))) + //If mandatory and nil. Error out + if mandatory && isNil(value) { + return fmt.Errorf("marshaling request to a header requires not nil pointer for field: %s", field.Name) + } + + // generate opc-request-id if header value is nil and header name matches + value = generateOpcRequestID(headerName, value) + + //if not mandatory and nil. Omit + if !mandatory && isNil(value) { + Debugf("Header value is not mandatory and is nil pointer in field: %s. Skipping header", field.Name) + return + } + + //Otherwise get value and set header + encoding := strings.ToLower(field.Tag.Get("collectionFormat")) + var collectionFormatStringValues []string + switch encoding { + case "csv", "multi": + if value.Kind() != reflect.Slice && value.Kind() != reflect.Array { + e = fmt.Errorf("header is tagged as csv or multi yet its type is neither an Array nor a Slice: %s", field.Name) + return + } + + numOfElements := value.Len() + collectionFormatStringValues = make([]string, numOfElements) + for i := 0; i < numOfElements; i++ { + collectionFormatStringValues[i], e = toStringValue(value.Index(i), field) + if e != nil { + Debugf("Header element could not be marshalled to a string: %v", e) + return + } + } + headerValue = strings.Join(collectionFormatStringValues, ",") + default: + if headerValue, e = toStringValue(value, field); e != nil { + return + } + } + + if e = setWellKnownHeaders(request, headerName, headerValue, contentLenSpecified); e != nil { + return + } + + if isUniqueHeaderRequired(headerName) { + request.Header.Set(headerName, headerValue) + } else { + request.Header.Add(headerName, headerValue) + } + return +} + +// Check if the header is required to be unique +func isUniqueHeaderRequired(headerName string) bool { + return strings.EqualFold(headerName, requestHeaderContentType) || strings.EqualFold(headerName, requestHeaderContentLength) +} + +// Header collection is a map of string to string that gets rendered as individual headers with a given prefix +func addToHeaderCollection(request *http.Request, value reflect.Value, field reflect.StructField) (e error) { + Debugln("Marshaling to header-collection from field:", field.Name) + if request.Header == nil { + request.Header = http.Header{} + } + + var headerPrefix string + if headerPrefix = field.Tag.Get("prefix"); headerPrefix == "" { + return fmt.Errorf("marshaling request to a header requires the 'prefix' tag for field: %s", field.Name) + } + + mandatory, _ := strconv.ParseBool(strings.ToLower(field.Tag.Get("mandatory"))) + //If mandatory and nil. Error out + if mandatory && isNil(value) { + return fmt.Errorf("marshaling request to a header requires not nil pointer for field: %s", field.Name) + } + + //if not mandatory and nil. Omit + if !mandatory && isNil(value) { + Debugf("Header value is not mandatory and is nil pointer in field: %s. Skipping header", field.Name) + return + } + + //cast to map + headerValues, ok := value.Interface().(map[string]string) + if !ok { + e = fmt.Errorf("header fields need to be of type map[string]string") + return + } + + for k, v := range headerValues { + headerName := fmt.Sprintf("%s%s", headerPrefix, k) + request.Header.Set(headerName, v) + } + return +} + +// Makes sure the incoming structure is able to be marshalled +// to a request +func checkForValidRequestStruct(s interface{}) (*reflect.Value, error) { + val := reflect.ValueOf(s) + for val.Kind() == reflect.Ptr { + if val.IsNil() { + return nil, fmt.Errorf("can not marshal to request a pointer to structure") + } + val = val.Elem() + } + + if s == nil { + return nil, fmt.Errorf("can not marshal to request a nil structure") + } + + if val.Kind() != reflect.Struct { + return nil, fmt.Errorf("can not marshal to request, expects struct input. Got %v", val.Kind()) + } + + return &val, nil +} + +// Populates the parts of a request by reading tags in the passed structure +// nested structs are followed recursively depth-first. +func structToRequestPart(request *http.Request, val reflect.Value) (err error) { + typ := val.Type() + contentLenSpecified := false + binaryBodySpecified := false + for i := 0; i < typ.NumField(); i++ { + if err != nil { + return + } + + sf := typ.Field(i) + //unexported + if sf.PkgPath != "" && !sf.Anonymous { + continue + } + + sv := val.Field(i) + if method := sv.MethodByName("ValidateEnumValue"); reflect.Value.IsValid(method) { + if validateResult := method.Call([]reflect.Value{})[1].Interface(); validateResult != nil { + if err = validateResult.(error); err != nil { + return + } + } + } + + tag := sf.Tag.Get("contributesTo") + switch tag { + case "header": + err = addToHeader(request, sv, sf, &contentLenSpecified) + case "header-collection": + err = addToHeaderCollection(request, sv, sf) + case "path": + err = addToPath(request, sv, sf) + case "query": + err = addToQuery(request, sv, sf) + case "body": + err = addToBody(request, sv, sf, &binaryBodySpecified) + case "": + Debugln(sf.Name, " does not contain contributes tag. Skipping.") + default: + err = fmt.Errorf("can not marshal field: %s. It needs to contain valid contributesTo tag", sf.Name) + } + } + + // if content-length is not specified but with binary body, calculate the content length according to request body + if !contentLenSpecified && binaryBodySpecified && request.Body != nil && request.Body != http.NoBody { + contentLen, err := checkBinaryBodyLength(request) + if err == nil { + request.Header.Set(requestHeaderContentLength, strconv.FormatInt(contentLen, 10)) + request.ContentLength = contentLen + } + } + + //If content length is zero, to avoid sending transfer-coding: chunked header, need to explicitly set the body to nil/Nobody. + if request.Header != nil && request.Body != nil && request.Body != http.NoBody && + parseContentLength(request.Header.Get(requestHeaderContentLength)) == 0 { + request.Body = http.NoBody + } + //If headers are and the content type was not set, we default to application/json + if request.Header != nil && request.Header.Get(requestHeaderContentType) == "" { + request.Header.Set(requestHeaderContentType, "application/json") + } + + return +} + +// HTTPRequestMarshaller marshals a structure to an http request using tag values in the struct +// The marshaller tag should like the following +// +// type A struct { +// ANumber string `contributesTo="query" name="number"` +// TheBody `contributesTo="body"` +// } +// +// where the contributesTo tag can be: header, path, query, body +// and the 'name' tag is the name of the value used in the http request(not applicable for path) +// If path is specified as part of the tag, the values are appened to the url path +// in the order they appear in the structure +// The current implementation only supports primitive types, except for the body tag, which needs a struct type. +// The body of a request will be marshaled using the tags of the structure +func HTTPRequestMarshaller(requestStruct interface{}, httpRequest *http.Request) (err error) { + var val *reflect.Value + if val, err = checkForValidRequestStruct(requestStruct); err != nil { + return + } + + Debugln("Marshaling to Request: ", val.Type().Name()) + err = structToRequestPart(httpRequest, *val) + return +} + +// MakeDefaultHTTPRequest creates the basic http request with the necessary headers set +func MakeDefaultHTTPRequest(method, path string) (httpRequest http.Request) { + httpRequest = http.Request{ + Proto: "HTTP/1.1", + ProtoMajor: 1, + ProtoMinor: 1, + Header: make(http.Header), + URL: &url.URL{}, + } + + httpRequest.Header.Set(requestHeaderContentLength, "0") + httpRequest.Header.Set(requestHeaderDate, time.Now().UTC().Format(http.TimeFormat)) + httpRequest.Header.Set(requestHeaderOpcClientInfo, strings.Join([]string{defaultSDKMarker, Version()}, "/")) + httpRequest.Header.Set(requestHeaderAccept, "*/*") + httpRequest.Method = method + httpRequest.URL.Path = path + return +} + +// MakeDefaultHTTPRequestWithTaggedStruct creates an http request from an struct with tagged fields, see HTTPRequestMarshaller +// for more information +func MakeDefaultHTTPRequestWithTaggedStruct(method, path string, requestStruct interface{}) (httpRequest http.Request, err error) { + httpRequest = MakeDefaultHTTPRequest(method, path) + err = HTTPRequestMarshaller(requestStruct, &httpRequest) + if err != nil { + return + } + + return +} + +// MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders creates an http request from an struct with tagged fields, see HTTPRequestMarshaller +// for more information +func MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path string, requestStruct interface{}, extraHeaders map[string]string) (httpRequest http.Request, err error) { + httpRequest, err = MakeDefaultHTTPRequestWithTaggedStruct(method, path, requestStruct) + for key, val := range extraHeaders { + httpRequest.Header.Set(key, val) + } + return +} + +// UpdateRequestBinaryBody updates the http request's body once it is binary request and the request body is seekable +// if the content length is zero, no need to update request body(since it's already been set to http.Nody) +func UpdateRequestBinaryBody(httpRequest *http.Request, rsc *OCIReadSeekCloser) { + if parseContentLength(httpRequest.Header.Get(requestHeaderContentLength)) == 0 { + return + } + httpRequest.Body = rsc + return +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//Request UnMarshaling +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// Makes sure the incoming structure is able to be unmarshaled +// to a request +func checkForValidResponseStruct(s interface{}) (*reflect.Value, error) { + val := reflect.ValueOf(s) + for val.Kind() == reflect.Ptr { + if val.IsNil() { + return nil, fmt.Errorf("can not unmarshal to response a pointer to nil structure") + } + val = val.Elem() + } + + if s == nil { + return nil, fmt.Errorf("can not unmarshal to response a nil structure") + } + + if val.Kind() != reflect.Struct { + return nil, fmt.Errorf("can not unmarshal to response, expects struct input. Got %v", val.Kind()) + } + + return &val, nil +} + +func intSizeFromKind(kind reflect.Kind) int { + switch kind { + case reflect.Int8, reflect.Uint8: + return 8 + case reflect.Int16, reflect.Uint16: + return 16 + case reflect.Int32, reflect.Uint32: + return 32 + case reflect.Int64, reflect.Uint64: + return 64 + case reflect.Int, reflect.Uint: + return strconv.IntSize + default: + Debugf("The type is not valid: %v. Returing int size for arch\n", kind.String()) + return strconv.IntSize + } + +} + +func analyzeValue(stringValue string, kind reflect.Kind, field reflect.StructField) (val reflect.Value, valPointer reflect.Value, err error) { + switch kind { + case timeType.Kind(): + var t time.Time + t, err = tryParsingTimeWithValidFormatsForHeaders([]byte(stringValue), field.Name) + if err != nil { + return + } + sdkTime := sdkTimeFromTime(t) + val = reflect.ValueOf(sdkTime) + valPointer = reflect.ValueOf(&sdkTime) + return + case sdkDateType.Kind(): + var t time.Time + t, err = tryParsingTimeWithValidFormatsForHeaders([]byte(stringValue), field.Name) + if err != nil { + return + } + sdkDate := sdkDateFromTime(t) + val = reflect.ValueOf(sdkDate) + valPointer = reflect.ValueOf(&sdkDate) + return + case reflect.Bool: + var bVal bool + if bVal, err = strconv.ParseBool(stringValue); err != nil { + return + } + val = reflect.ValueOf(bVal) + valPointer = reflect.ValueOf(&bVal) + return + case reflect.Int: + size := intSizeFromKind(kind) + var iVal int64 + if iVal, err = strconv.ParseInt(stringValue, 10, size); err != nil { + return + } + var iiVal int + iiVal = int(iVal) + val = reflect.ValueOf(iiVal) + valPointer = reflect.ValueOf(&iiVal) + return + case reflect.Int64: + size := intSizeFromKind(kind) + var iVal int64 + if iVal, err = strconv.ParseInt(stringValue, 10, size); err != nil { + return + } + val = reflect.ValueOf(iVal) + valPointer = reflect.ValueOf(&iVal) + return + case reflect.Uint: + size := intSizeFromKind(kind) + var iVal uint64 + if iVal, err = strconv.ParseUint(stringValue, 10, size); err != nil { + return + } + var uiVal uint + uiVal = uint(iVal) + val = reflect.ValueOf(uiVal) + valPointer = reflect.ValueOf(&uiVal) + return + case reflect.String: + val = reflect.ValueOf(stringValue) + valPointer = reflect.ValueOf(&stringValue) + case reflect.Float32: + var fVal float64 + if fVal, err = strconv.ParseFloat(stringValue, 32); err != nil { + return + } + var ffVal float32 + ffVal = float32(fVal) + val = reflect.ValueOf(ffVal) + valPointer = reflect.ValueOf(&ffVal) + return + case reflect.Float64: + var fVal float64 + if fVal, err = strconv.ParseFloat(stringValue, 64); err != nil { + return + } + val = reflect.ValueOf(fVal) + valPointer = reflect.ValueOf(&fVal) + return + default: + err = fmt.Errorf("value for kind: %s not supported", kind) + } + return +} + +// Sets the field of a struct, with the appropriate value of the string +// Only sets basic types +func fromStringValue(newValue string, val *reflect.Value, field reflect.StructField) (err error) { + + if !val.CanSet() { + err = fmt.Errorf("can not set field name: %s of type: %v", field.Name, val.Type().String()) + return + } + + kind := val.Kind() + isPointer := false + if val.Kind() == reflect.Ptr { + isPointer = true + kind = field.Type.Elem().Kind() + } + + value, valPtr, err := analyzeValue(newValue, kind, field) + valueType := val.Type() + if err != nil { + return + } + if !isPointer { + val.Set(value.Convert(valueType)) + } else { + val.Set(valPtr) + } + return +} + +// PolymorphicJSONUnmarshaler is the interface to unmarshal polymorphic json payloads +type PolymorphicJSONUnmarshaler interface { + UnmarshalPolymorphicJSON(data []byte) (interface{}, error) +} + +func valueFromPolymorphicJSON(content []byte, unmarshaler PolymorphicJSONUnmarshaler) (val interface{}, err error) { + err = json.Unmarshal(content, unmarshaler) + if err != nil { + return + } + val, err = unmarshaler.UnmarshalPolymorphicJSON(content) + return +} + +func valueFromJSONBody(response *http.Response, value *reflect.Value, unmarshaler PolymorphicJSONUnmarshaler) (val interface{}, err error) { + //Consumes the body, consider implementing it + //without body consumption + var content []byte + content, err = ioutil.ReadAll(response.Body) + if err != nil { + return + } + + if unmarshaler != nil { + val, err = valueFromPolymorphicJSON(content, unmarshaler) + return + } + + val = reflect.New(value.Type()).Interface() + err = json.Unmarshal(content, &val) + return +} + +func addFromBody(response *http.Response, value *reflect.Value, field reflect.StructField, unmarshaler PolymorphicJSONUnmarshaler) (err error) { + Debugln("Unmarshalling from body to field: ", field.Name) + if response.Body == nil { + Debugln("Unmarshalling body skipped due to nil body content for field: ", field.Name) + return nil + } + + tag := field.Tag + encoding := tag.Get("encoding") + var iVal interface{} + switch encoding { + case "binary": + value.Set(reflect.ValueOf(response.Body)) + return + case "plain-text": + //Expects UTF-8 + byteArr, e := ioutil.ReadAll(response.Body) + if e != nil { + return e + } + str := string(byteArr) + value.Set(reflect.ValueOf(&str)) + return + default: //If the encoding is not set. we'll decode with json + iVal, err = valueFromJSONBody(response, value, unmarshaler) + if err != nil { + return + } + + newVal := reflect.ValueOf(iVal) + if newVal.Kind() == reflect.Ptr { + newVal = newVal.Elem() + } + value.Set(newVal) + return + } +} + +func addFromHeader(response *http.Response, value *reflect.Value, field reflect.StructField) (err error) { + Debugln("Unmarshaling from header to field: ", field.Name) + var headerName string + if headerName = field.Tag.Get("name"); headerName == "" { + return fmt.Errorf("unmarshaling response to a header requires the 'name' tag for field: %s", field.Name) + } + + headerValue := response.Header.Get(headerName) + if headerValue == "" { + Debugf("Unmarshalling did not find header with name:%s", headerName) + return nil + } + + if err = fromStringValue(headerValue, value, field); err != nil { + return fmt.Errorf("unmarshaling response to a header failed for field %s, due to %s", field.Name, + err.Error()) + } + return +} + +func addFromHeaderCollection(response *http.Response, value *reflect.Value, field reflect.StructField) error { + Debugln("Unmarshaling from header-collection to field:", field.Name) + var headerPrefix string + if headerPrefix = field.Tag.Get("prefix"); headerPrefix == "" { + return fmt.Errorf("unmarshaling response to a header-collection requires the 'prefix' tag for field: %s", field.Name) + } + + mapCollection := make(map[string]string) + for name, value := range response.Header { + nameLowerCase := strings.ToLower(name) + if strings.HasPrefix(nameLowerCase, headerPrefix) { + headerNoPrefix := strings.TrimPrefix(nameLowerCase, headerPrefix) + mapCollection[headerNoPrefix] = value[0] + } + } + + Debugln("Marshalled header collection is:", mapCollection) + value.Set(reflect.ValueOf(mapCollection)) + return nil +} + +// Populates a struct from parts of a request by reading tags of the struct +func responseToStruct(response *http.Response, val *reflect.Value, unmarshaler PolymorphicJSONUnmarshaler) (err error) { + typ := val.Type() + for i := 0; i < typ.NumField(); i++ { + if err != nil { + return + } + + sf := typ.Field(i) + + //unexported + if sf.PkgPath != "" { + continue + } + + sv := val.Field(i) + tag := sf.Tag.Get("presentIn") + switch tag { + case "header": + err = addFromHeader(response, &sv, sf) + case "header-collection": + err = addFromHeaderCollection(response, &sv, sf) + case "body": + err = addFromBody(response, &sv, sf, unmarshaler) + case "": + Debugln(sf.Name, " does not contain presentIn tag. Skipping") + default: + err = fmt.Errorf("can not unmarshal field: %s. It needs to contain valid presentIn tag", sf.Name) + } + } + return +} + +// UnmarshalResponse hydrates the fields of a struct with the values of a http response, guided +// by the field tags. The directive tag is "presentIn" and it can be either +// - "header": Will look for the header tagged as "name" in the headers of the struct and set it value to that +// - "body": It will try to marshal the body from a json string to a struct tagged with 'presentIn: "body"'. +// +// Further this method will consume the body it should be safe to close it after this function +// Notice the current implementation only supports native types:int, strings, floats, bool as the field types +func UnmarshalResponse(httpResponse *http.Response, responseStruct interface{}) (err error) { + + // Check for text/event-stream content type, and return without unmarshalling + if httpResponse != nil && httpResponse.Header != nil && strings.ToLower(httpResponse.Header.Get("content-type")) == "text/event-stream" { + return + } + + var val *reflect.Value + if val, err = checkForValidResponseStruct(responseStruct); err != nil { + return + } + + if err = responseToStruct(httpResponse, val, nil); err != nil { + return + } + + return nil +} + +// UnmarshalResponseWithPolymorphicBody similar to UnmarshalResponse but assumes the body of the response +// contains polymorphic json. This function will use the unmarshaler argument to unmarshal json content +func UnmarshalResponseWithPolymorphicBody(httpResponse *http.Response, responseStruct interface{}, unmarshaler PolymorphicJSONUnmarshaler) (err error) { + + var val *reflect.Value + if val, err = checkForValidResponseStruct(responseStruct); err != nil { + return + } + + if err = responseToStruct(httpResponse, val, unmarshaler); err != nil { + return + } + + return nil +} + +// generate request id if user not provided and for each retry operation re-gen a new request id +func generateOpcRequestID(headerName string, value reflect.Value) (newValue reflect.Value) { + newValue = value + isNilValue := isNil(newValue) + isOpcRequestIDHeader := headerName == requestHeaderOpcRequestID || headerName == requestHeaderOpcClientRequestID + + if isNilValue && isOpcRequestIDHeader { + requestID, err := generateRandUUID() + + if err != nil { + // this will not fail the request, just skip add opc-request-id + Debugf("unable to generate opc-request-id. %s", err.Error()) + } else { + newValue = reflect.ValueOf(String(requestID)) + Debugf("add request id for header: %s, with value: %s", headerName, requestID) + } + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/http_signer.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/http_signer.go new file mode 100644 index 000000000..43e0692e5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/http_signer.go @@ -0,0 +1,270 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +import ( + "bytes" + "crypto" + "crypto/rand" + "crypto/rsa" + "crypto/sha256" + "encoding/base64" + "fmt" + "io" + "io/ioutil" + "net/http" + "strings" +) + +// HTTPRequestSigner the interface to sign a request +type HTTPRequestSigner interface { + Sign(r *http.Request) error +} + +// KeyProvider interface that wraps information about the key's account owner +type KeyProvider interface { + PrivateRSAKey() (*rsa.PrivateKey, error) + KeyID() (string, error) +} + +const signerVersion = "1" + +// SignerBodyHashPredicate a function that allows to disable/enable body hashing +// of requests and headers associated with body content +type SignerBodyHashPredicate func(r *http.Request) bool + +// ociRequestSigner implements the http-signatures-draft spec +// as described in https://tools.ietf.org/html/draft-cavage-http-signatures-08 +type ociRequestSigner struct { + KeyProvider KeyProvider + GenericHeaders []string + BodyHeaders []string + ShouldHashBody SignerBodyHashPredicate +} + +var ( + defaultGenericHeaders = []string{"date", "(request-target)", "host"} + defaultBodyHeaders = []string{"content-length", "content-type", "x-content-sha256"} + defaultBodyHashPredicate = func(r *http.Request) bool { + return r.Method == http.MethodPost || r.Method == http.MethodPut || r.Method == http.MethodPatch + } +) + +// DefaultGenericHeaders list of default generic headers that is used in signing +func DefaultGenericHeaders() []string { + return makeACopy(defaultGenericHeaders) +} + +// DefaultBodyHeaders list of default body headers that is used in signing +func DefaultBodyHeaders() []string { + return makeACopy(defaultBodyHeaders) +} + +// DefaultRequestSigner creates a signer with default parameters. +func DefaultRequestSigner(provider KeyProvider) HTTPRequestSigner { + return RequestSigner(provider, defaultGenericHeaders, defaultBodyHeaders) +} + +// RequestSignerExcludeBody creates a signer without hash the body. +func RequestSignerExcludeBody(provider KeyProvider) HTTPRequestSigner { + bodyHashPredicate := func(r *http.Request) bool { + // week request signer will not hash the body + return false + } + return RequestSignerWithBodyHashingPredicate(provider, defaultGenericHeaders, defaultBodyHeaders, bodyHashPredicate) +} + +// NewSignerFromOCIRequestSigner creates a copy of the request signer and attaches the new SignerBodyHashPredicate +// returns an error if the passed signer is not of type ociRequestSigner +func NewSignerFromOCIRequestSigner(oldSigner HTTPRequestSigner, predicate SignerBodyHashPredicate) (HTTPRequestSigner, error) { + if oldS, ok := oldSigner.(ociRequestSigner); ok { + s := ociRequestSigner{ + KeyProvider: oldS.KeyProvider, + GenericHeaders: oldS.GenericHeaders, + BodyHeaders: oldS.BodyHeaders, + ShouldHashBody: predicate, + } + return s, nil + + } + return nil, fmt.Errorf("can not create a signer, input signer needs to be of type ociRequestSigner") +} + +// RequestSigner creates a signer that utilizes the specified headers for signing +// and the default predicate for using the body of the request as part of the signature +func RequestSigner(provider KeyProvider, genericHeaders, bodyHeaders []string) HTTPRequestSigner { + return ociRequestSigner{ + KeyProvider: provider, + GenericHeaders: genericHeaders, + BodyHeaders: bodyHeaders, + ShouldHashBody: defaultBodyHashPredicate} +} + +// RequestSignerWithBodyHashingPredicate creates a signer that utilizes the specified headers for signing, as well as a predicate for using +// the body of the request and bodyHeaders parameter as part of the signature +func RequestSignerWithBodyHashingPredicate(provider KeyProvider, genericHeaders, bodyHeaders []string, shouldHashBody SignerBodyHashPredicate) HTTPRequestSigner { + return ociRequestSigner{ + KeyProvider: provider, + GenericHeaders: genericHeaders, + BodyHeaders: bodyHeaders, + ShouldHashBody: shouldHashBody} +} + +func (signer ociRequestSigner) getSigningHeaders(r *http.Request) []string { + var result []string + result = append(result, signer.GenericHeaders...) + + if signer.ShouldHashBody(r) { + result = append(result, signer.BodyHeaders...) + } + + return result +} + +func (signer ociRequestSigner) getSigningString(request *http.Request) string { + signingHeaders := signer.getSigningHeaders(request) + signingParts := make([]string, len(signingHeaders)) + for i, part := range signingHeaders { + var value string + part = strings.ToLower(part) + switch part { + case "(request-target)": + value = getRequestTarget(request) + case "host": + value = request.URL.Host + if len(value) == 0 { + value = request.Host + } + default: + value = request.Header.Get(part) + } + signingParts[i] = fmt.Sprintf("%s: %s", part, value) + } + + signingString := strings.Join(signingParts, "\n") + return signingString + +} + +func getRequestTarget(request *http.Request) string { + lowercaseMethod := strings.ToLower(request.Method) + return fmt.Sprintf("%s %s", lowercaseMethod, request.URL.RequestURI()) +} + +func calculateHashOfBody(request *http.Request) (err error) { + var hash string + hash, err = GetBodyHash(request) + if err != nil { + return + } + request.Header.Set(requestHeaderXContentSHA256, hash) + return +} + +// drainBody reads all of b to memory and then returns two equivalent +// ReadClosers yielding the same bytes. +// +// It returns an error if the initial slurp of all bytes fails. It does not attempt +// to make the returned ReadClosers have identical error-matching behavior. +func drainBody(b io.ReadCloser) (r1, r2 io.ReadCloser, err error) { + if b == http.NoBody { + // No copying needed. Preserve the magic sentinel meaning of NoBody. + return http.NoBody, http.NoBody, nil + } + var buf bytes.Buffer + if _, err = buf.ReadFrom(b); err != nil { + return nil, b, err + } + if err = b.Close(); err != nil { + return nil, b, err + } + return ioutil.NopCloser(&buf), ioutil.NopCloser(bytes.NewReader(buf.Bytes())), nil +} + +func hashAndEncode(data []byte) string { + hashedContent := sha256.Sum256(data) + hash := base64.StdEncoding.EncodeToString(hashedContent[:]) + return hash +} + +// GetBodyHash creates a base64 string from the hash of body the request +func GetBodyHash(request *http.Request) (hashString string, err error) { + if request.Body == nil { + request.ContentLength = 0 + request.Header.Set(requestHeaderContentLength, fmt.Sprintf("%v", request.ContentLength)) + return hashAndEncode([]byte("")), nil + } + + var data []byte + var bReader io.Reader + bReader, request.Body, err = drainBody(request.Body) + if err != nil { + return "", fmt.Errorf("can not read body of request while calculating body hash: %s", err.Error()) + } + + data, err = ioutil.ReadAll(bReader) + if err != nil { + return "", fmt.Errorf("can not read body of request while calculating body hash: %s", err.Error()) + } + + // Since the request can be coming from a binary body. Make an attempt to set the body length + request.ContentLength = int64(len(data)) + request.Header.Set(requestHeaderContentLength, fmt.Sprintf("%v", request.ContentLength)) + + hashString = hashAndEncode(data) + return +} + +func (signer ociRequestSigner) computeSignature(request *http.Request) (signature string, err error) { + signingString := signer.getSigningString(request) + hasher := sha256.New() + hasher.Write([]byte(signingString)) + hashed := hasher.Sum(nil) + + privateKey, err := signer.KeyProvider.PrivateRSAKey() + if err != nil { + return + } + + var unencodedSig []byte + unencodedSig, e := rsa.SignPKCS1v15(rand.Reader, privateKey, crypto.SHA256, hashed) + if e != nil { + err = fmt.Errorf("can not compute signature while signing the request %s: ", e.Error()) + return + } + + signature = base64.StdEncoding.EncodeToString(unencodedSig) + return +} + +// Sign signs the http request, by inspecting the necessary headers. Once signed +// the request will have the proper 'Authorization' header set, otherwise +// and error is returned +func (signer ociRequestSigner) Sign(request *http.Request) (err error) { + if signer.ShouldHashBody(request) { + err = calculateHashOfBody(request) + if err != nil { + return + } + } + + var signature string + if signature, err = signer.computeSignature(request); err != nil { + return + } + + signingHeaders := strings.Join(signer.getSigningHeaders(request), " ") + + var keyID string + if keyID, err = signer.KeyProvider.KeyID(); err != nil { + return + } + + authValue := fmt.Sprintf("Signature version=\"%s\",headers=\"%s\",keyId=\"%s\",algorithm=\"rsa-sha256\",signature=\"%s\"", + signerVersion, signingHeaders, keyID, signature) + + request.Header.Set(requestHeaderAuthorization, authValue) + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/log.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/log.go new file mode 100644 index 000000000..95dbd26a9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/log.go @@ -0,0 +1,267 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +import ( + "fmt" + "io" + "io/ioutil" + "log" + "os" + "regexp" + "strings" + "sync" + "time" +) + +// sdkLogger an interface for logging in the SDK +type sdkLogger interface { + //LogLevel returns the log level of sdkLogger + LogLevel() int + + //Log logs v with the provided format if the current log level is loglevel + Log(logLevel int, format string, v ...interface{}) error +} + +// noLogging no logging messages +const noLogging = 0 + +// infoLogging minimal logging messages +const infoLogging = 1 + +// debugLogging some logging messages +const debugLogging = 2 + +// verboseLogging all logging messages +const verboseLogging = 3 + +// DefaultSDKLogger the default implementation of the sdkLogger +type DefaultSDKLogger struct { + currentLoggingLevel int + verboseLogger *log.Logger + debugLogger *log.Logger + infoLogger *log.Logger + nullLogger *log.Logger +} + +// defaultLogger is the defaultLogger in the SDK +var defaultLogger sdkLogger +var loggerLock sync.Mutex +var file *os.File +var sensitiveLogRedactors = []struct { + pattern *regexp.Regexp + replacement string +}{ + { + pattern: regexp.MustCompile(`(?im)^(Authorization:\s*)(.+)$`), + replacement: `${1}`, + }, + { + pattern: regexp.MustCompile(`(?im)^(X-Api-Key:\s*)(.+)$`), + replacement: `${1}`, + }, + { + pattern: regexp.MustCompile(`(?im)^(opc-obo-token:\s*)(.+)$`), + replacement: `${1}`, + }, + { + pattern: regexp.MustCompile(`(?i)("(?:token|access_token|refresh_token|id_token|delegationToken|delegation_token|securityToken|security_token|serviceAccountToken|service_account_token|client_secret|clientSecret|passphrase|password|privateKey|private_key|publicKey|public_key|podKey|pod_key)"\s*:\s*)"([^"]*)"`), + replacement: `${1}""`, + }, + { + pattern: regexp.MustCompile(`(?i)(^|[&\s])((?:token|access_token|refresh_token|id_token|delegationtoken|delegation_token|securitytoken|security_token|serviceaccounttoken|service_account_token|subject_token|client_secret|clientsecret|passphrase|password|privatekey|private_key|publickey|public_key|podkey|pod_key)=)([^&\s]*)`), + replacement: `${1}${2}`, + }, +} + +// initializes the SDK defaultLogger as a defaultLogger +func init() { + l, _ := NewSDKLogger() + SetSDKLogger(l) +} + +// SetSDKLogger sets the logger used by the sdk +func SetSDKLogger(logger sdkLogger) { + loggerLock.Lock() + defaultLogger = logger + loggerLock.Unlock() +} + +// NewSDKLogger creates a defaultSDKLogger +// Debug logging is turned on/off by the presence of the environment variable "OCI_GO_SDK_DEBUG" +// The value of the "OCI_GO_SDK_DEBUG" environment variable controls the logging level. +// "null" outputs no log messages +// "i" or "info" outputs minimal log messages +// "d" or "debug" outputs some logs messages +// "v" or "verbose" outputs all logs messages, including body of requests +func NewSDKLogger() (DefaultSDKLogger, error) { + logger := DefaultSDKLogger{} + + logger.currentLoggingLevel = noLogging + logger.verboseLogger = log.New(os.Stderr, "VERBOSE ", log.Ldate|log.Lmicroseconds|log.Lshortfile) + logger.debugLogger = log.New(os.Stderr, "DEBUG ", log.Ldate|log.Lmicroseconds|log.Lshortfile) + logger.infoLogger = log.New(os.Stderr, "INFO ", log.Ldate|log.Lmicroseconds|log.Lshortfile) + logger.nullLogger = log.New(ioutil.Discard, "", log.Ldate|log.Lmicroseconds|log.Lshortfile) + + configured, isLogEnabled := os.LookupEnv("OCI_GO_SDK_DEBUG") + + // If env variable not present turn logging off + if !isLogEnabled { + logger.currentLoggingLevel = noLogging + } else { + logOutputModeConfig(logger) + + switch strings.ToLower(configured) { + case "null": + logger.currentLoggingLevel = noLogging + break + case "i", "info": + logger.currentLoggingLevel = infoLogging + break + case "d", "debug": + logger.currentLoggingLevel = debugLogging + break + //1 here for backwards compatibility + case "v", "verbose", "1": + logger.currentLoggingLevel = verboseLogging + break + default: + logger.currentLoggingLevel = infoLogging + } + logger.infoLogger.Println("logger level set to: ", logger.currentLoggingLevel) + } + + return logger, nil +} + +func (l DefaultSDKLogger) getLoggerForLevel(logLevel int) *log.Logger { + if logLevel > l.currentLoggingLevel { + return l.nullLogger + } + + switch logLevel { + case noLogging: + return l.nullLogger + case infoLogging: + return l.infoLogger + case debugLogging: + return l.debugLogger + case verboseLogging: + return l.verboseLogger + default: + return l.nullLogger + } +} + +// Set SDK Log output mode +// Output mode is switched based on environment variable "OCI_GO_SDK_LOG_OUPUT_MODE" +// "file" outputs log to a specific file +// "combine" outputs log to both stderr and specific file +// other unsupported value outputs log to stderr +// output file can be set via environment variable "OCI_GO_SDK_LOG_FILE" +// if this environment variable is not set, a default log file will be created under project root path +func logOutputModeConfig(logger DefaultSDKLogger) { + logMode, isLogOutputModeEnabled := os.LookupEnv("OCI_GO_SDK_LOG_OUTPUT_MODE") + if !isLogOutputModeEnabled { + return + } + fileName, isLogFileNameProvided := os.LookupEnv("OCI_GO_SDK_LOG_FILE") + if !isLogFileNameProvided { + fileName = fmt.Sprintf("logging_%v%s", time.Now().Unix(), ".log") + } + + switch strings.ToLower(logMode) { + case "file", "f": + file = openLogOutputFile(logger, fileName) + logger.infoLogger.SetOutput(file) + logger.debugLogger.SetOutput(file) + logger.verboseLogger.SetOutput(file) + break + case "combine", "c": + file = openLogOutputFile(logger, fileName) + wrt := io.MultiWriter(os.Stderr, file) + + logger.infoLogger.SetOutput(wrt) + logger.debugLogger.SetOutput(wrt) + logger.verboseLogger.SetOutput(wrt) + break + } +} + +func openLogOutputFile(logger DefaultSDKLogger, fileName string) *os.File { + file, err := os.OpenFile(fileName, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644) + if err != nil { + logger.verboseLogger.Fatal(err) + } + return file +} + +// CloseLogFile close the logging file and return error +func CloseLogFile() error { + return file.Close() +} + +// RedactSensitiveStringForLogs removes common credential-bearing fields before they are written to logs +func RedactSensitiveStringForLogs(value string) string { + redacted := value + for _, redactor := range sensitiveLogRedactors { + redacted = redactor.pattern.ReplaceAllString(redacted, redactor.replacement) + } + return redacted +} + +// LogLevel returns the current debug level +func (l DefaultSDKLogger) LogLevel() int { + return l.currentLoggingLevel +} + +// Log logs v with the provided format if the current log level is loglevel +func (l DefaultSDKLogger) Log(logLevel int, format string, v ...interface{}) error { + logger := l.getLoggerForLevel(logLevel) + logger.Output(4, fmt.Sprintf(format, v...)) + return nil +} + +// Logln logs v appending a new line at the end +// Deprecated +func Logln(v ...interface{}) { + m := fmt.Sprint(v...) + defaultLogger.Log(infoLogging, "%s\n", RedactSensitiveStringForLogs(m)) +} + +// Logf logs v with the provided format +func Logf(format string, v ...interface{}) { + defaultLogger.Log(infoLogging, "%s", RedactSensitiveStringForLogs(fmt.Sprintf(format, v...))) +} + +// Debugf logs v with the provided format if debug mode is set +func Debugf(format string, v ...interface{}) { + defaultLogger.Log(debugLogging, "%s", RedactSensitiveStringForLogs(fmt.Sprintf(format, v...))) +} + +// Debug logs v if debug mode is set +func Debug(v ...interface{}) { + m := fmt.Sprint(v...) + defaultLogger.Log(debugLogging, "%s", RedactSensitiveStringForLogs(m)) +} + +// Debugln logs v appending a new line if debug mode is set +func Debugln(v ...interface{}) { + m := fmt.Sprint(v...) + defaultLogger.Log(debugLogging, "%s\n", RedactSensitiveStringForLogs(m)) +} + +// IfDebug executes closure if debug is enabled +func IfDebug(fn func()) { + if defaultLogger.LogLevel() >= debugLogging { + fn() + } +} + +// IfInfo executes closure if info is enabled +func IfInfo(fn func()) { + if defaultLogger.LogLevel() >= infoLogging { + fn() + } +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/oci_http_transport_wrapper.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/oci_http_transport_wrapper.go new file mode 100644 index 000000000..bbce7df2f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/oci_http_transport_wrapper.go @@ -0,0 +1,120 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +import ( + "fmt" + "net/http" + "sync" + "time" +) + +// OciHTTPTransportWrapper is a http.RoundTripper that periodically refreshes +// the underlying http.Transport according to its templates. +// Upon the first use (or once the RefreshRate duration is elapsed), +// a new transport will be created from the TransportTemplate (if set). +type OciHTTPTransportWrapper struct { + // RefreshRate specifies the duration at which http.Transport + // (with its tls.Config) must be refreshed. + // Defaults to 5 minutes. + RefreshRate time.Duration + + // TLSConfigProvider creates a new tls.Config. + // If not set, nil tls.Config is returned. + TLSConfigProvider TLSConfigProvider + + // ClientTemplate is responsible for creating a new http.Client with + // a given tls.Config. + // + // If not set, a new http.Client with a cloned http.DefaultTransport is returned. + TransportTemplate TransportTemplateProvider + + // mutable properties + mux sync.RWMutex + lastRefreshedAt time.Time + delegate http.RoundTripper +} + +// RoundTrip implements http.RoundTripper. +func (t *OciHTTPTransportWrapper) RoundTrip(req *http.Request) (*http.Response, error) { + delegate, err := t.refreshDelegate(false /* force */) + if err != nil { + return nil, err + } + + return delegate.RoundTrip(req) +} + +// Refresh forces refresh of the underlying delegate. +func (t *OciHTTPTransportWrapper) Refresh(force bool) error { + _, err := t.refreshDelegate(force) + return err +} + +// Delegate returns the currently active http.RoundTripper. +// Might be nil. +func (t *OciHTTPTransportWrapper) Delegate() http.RoundTripper { + t.mux.RLock() + defer t.mux.RUnlock() + + return t.delegate +} + +// refreshDelegate refreshes the delegate (and its TLS config) if: +// - force is true +// - it's been more than RefreshRate since the last time the client was refreshed. +func (t *OciHTTPTransportWrapper) refreshDelegate(force bool) (http.RoundTripper, error) { + // read-lock first, since it's cheaper than write lock + t.mux.RLock() + if !t.shouldRefreshLocked(force) { + delegate := t.delegate + t.mux.RUnlock() + + return delegate, nil + } + + // upgrade to write-lock, and we'll need to check again for the same condition as above + // to avoid multiple initializations by multiple "refresher" goroutines + t.mux.RUnlock() + t.mux.Lock() + defer t.mux.Unlock() + if !t.shouldRefreshLocked(force) { + return t.delegate, nil + } + + // For this check we need the delegate to be set once before we check for change in cert files + if t.delegate != nil && !t.TLSConfigProvider.WatchedFilesModified() { + Debug("No modification in custom certs or ca bundle skipping refresh") + // Updating the last refresh time to make sure the next check is only done after the refresh interval has passed + t.lastRefreshedAt = time.Now() + return t.delegate, nil + } + + Logf("Loading tls config from TLSConfigProvider") + tlsConfig, err := t.TLSConfigProvider.NewOrDefault() + if err != nil { + return nil, fmt.Errorf("refreshing tls.Config from template: %w", err) + } + + t.delegate, err = t.TransportTemplate.NewOrDefault(tlsConfig) + if err != nil { + return nil, fmt.Errorf("refreshing http.RoundTripper from template: %w", err) + } + + t.lastRefreshedAt = time.Now() + return t.delegate, nil +} + +// shouldRefreshLocked returns whether the client (and its TLS config) +// needs to be refreshed. +func (t *OciHTTPTransportWrapper) shouldRefreshLocked(force bool) bool { + if force || t.delegate == nil { + return true + } + return t.refreshRate() > 0 && time.Since(t.lastRefreshedAt) > t.refreshRate() +} + +func (t *OciHTTPTransportWrapper) refreshRate() time.Duration { + return t.RefreshRate +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.go new file mode 100644 index 000000000..b512544f0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.go @@ -0,0 +1,395 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +const ( + //RegionAPChuncheon1 region Chuncheon + RegionAPChuncheon1 Region = "ap-chuncheon-1" + //RegionAPHyderabad1 region Hyderabad + RegionAPHyderabad1 Region = "ap-hyderabad-1" + //RegionAPMelbourne1 region Melbourne + RegionAPMelbourne1 Region = "ap-melbourne-1" + //RegionAPMumbai1 region Mumbai + RegionAPMumbai1 Region = "ap-mumbai-1" + //RegionAPOsaka1 region Osaka + RegionAPOsaka1 Region = "ap-osaka-1" + //RegionAPSeoul1 region Seoul + RegionAPSeoul1 Region = "ap-seoul-1" + //RegionAPSydney1 region Sydney + RegionAPSydney1 Region = "ap-sydney-1" + //RegionAPTokyo1 region Tokyo + RegionAPTokyo1 Region = "ap-tokyo-1" + //RegionCAMontreal1 region Montreal + RegionCAMontreal1 Region = "ca-montreal-1" + //RegionCAToronto1 region Toronto + RegionCAToronto1 Region = "ca-toronto-1" + //RegionEUAmsterdam1 region Amsterdam + RegionEUAmsterdam1 Region = "eu-amsterdam-1" + //RegionFRA region Frankfurt + RegionFRA Region = "eu-frankfurt-1" + //RegionEUZurich1 region Zurich + RegionEUZurich1 Region = "eu-zurich-1" + //RegionMEJeddah1 region Jeddah + RegionMEJeddah1 Region = "me-jeddah-1" + //RegionMEDubai1 region Dubai + RegionMEDubai1 Region = "me-dubai-1" + //RegionSASaopaulo1 region Saopaulo + RegionSASaopaulo1 Region = "sa-saopaulo-1" + //RegionUKCardiff1 region Cardiff + RegionUKCardiff1 Region = "uk-cardiff-1" + //RegionLHR region London + RegionLHR Region = "uk-london-1" + //RegionIAD region Ashburn + RegionIAD Region = "us-ashburn-1" + //RegionPHX region Phoenix + RegionPHX Region = "us-phoenix-1" + //RegionSJC1 region Sanjose + RegionSJC1 Region = "us-sanjose-1" + //RegionSAVinhedo1 region Vinhedo + RegionSAVinhedo1 Region = "sa-vinhedo-1" + //RegionSASantiago1 region Santiago + RegionSASantiago1 Region = "sa-santiago-1" + //RegionILJerusalem1 region Jerusalem + RegionILJerusalem1 Region = "il-jerusalem-1" + //RegionEUMarseille1 region Marseille + RegionEUMarseille1 Region = "eu-marseille-1" + //RegionAPSingapore1 region Singapore + RegionAPSingapore1 Region = "ap-singapore-1" + //RegionMEAbudhabi1 region Abudhabi + RegionMEAbudhabi1 Region = "me-abudhabi-1" + //RegionEUMilan1 region Milan + RegionEUMilan1 Region = "eu-milan-1" + //RegionEUStockholm1 region Stockholm + RegionEUStockholm1 Region = "eu-stockholm-1" + //RegionAFJohannesburg1 region Johannesburg + RegionAFJohannesburg1 Region = "af-johannesburg-1" + //RegionEUParis1 region Paris + RegionEUParis1 Region = "eu-paris-1" + //RegionMXQueretaro1 region Queretaro + RegionMXQueretaro1 Region = "mx-queretaro-1" + //RegionEUMadrid1 region Madrid + RegionEUMadrid1 Region = "eu-madrid-1" + //RegionUSChicago1 region Chicago + RegionUSChicago1 Region = "us-chicago-1" + //RegionMXMonterrey1 region Monterrey + RegionMXMonterrey1 Region = "mx-monterrey-1" + //RegionUSSaltlake2 region Saltlake + RegionUSSaltlake2 Region = "us-saltlake-2" + //RegionSABogota1 region Bogota + RegionSABogota1 Region = "sa-bogota-1" + //RegionSAValparaiso1 region Valparaiso + RegionSAValparaiso1 Region = "sa-valparaiso-1" + //RegionAPSingapore2 region Singapore + RegionAPSingapore2 Region = "ap-singapore-2" + //RegionMERiyadh1 region Riyadh + RegionMERiyadh1 Region = "me-riyadh-1" + //RegionAPDelhi1 region Delhi + RegionAPDelhi1 Region = "ap-delhi-1" + //RegionAPBatam1 region Batam + RegionAPBatam1 Region = "ap-batam-1" + //RegionEUMadrid3 region Madrid + RegionEUMadrid3 Region = "eu-madrid-3" + //RegionEUTurin1 region Turin + RegionEUTurin1 Region = "eu-turin-1" + //RegionAPKulai2 region Kulai + RegionAPKulai2 Region = "ap-kulai-2" + //RegionAFCasablanca1 region Casablanca + RegionAFCasablanca1 Region = "af-casablanca-1" + //RegionUSLangley1 region Langley + RegionUSLangley1 Region = "us-langley-1" + //RegionUSLuke1 region Luke + RegionUSLuke1 Region = "us-luke-1" + //RegionUSGovAshburn1 gov region Ashburn + RegionUSGovAshburn1 Region = "us-gov-ashburn-1" + //RegionUSGovChicago1 gov region Chicago + RegionUSGovChicago1 Region = "us-gov-chicago-1" + //RegionUSGovPhoenix1 gov region Phoenix + RegionUSGovPhoenix1 Region = "us-gov-phoenix-1" + //RegionUKGovLondon1 gov region London + RegionUKGovLondon1 Region = "uk-gov-london-1" + //RegionUKGovCardiff1 gov region Cardiff + RegionUKGovCardiff1 Region = "uk-gov-cardiff-1" + //RegionAPChiyoda1 region Chiyoda + RegionAPChiyoda1 Region = "ap-chiyoda-1" + //RegionAPIbaraki1 region Ibaraki + RegionAPIbaraki1 Region = "ap-ibaraki-1" + //RegionMEDccMuscat1 region Muscat + RegionMEDccMuscat1 Region = "me-dcc-muscat-1" + //RegionMEIbri1 region Ibri + RegionMEIbri1 Region = "me-ibri-1" + //RegionAPDccCanberra1 region Canberra + RegionAPDccCanberra1 Region = "ap-dcc-canberra-1" + //RegionEUDccMilan1 region Milan + RegionEUDccMilan1 Region = "eu-dcc-milan-1" + //RegionEUDccMilan2 region Milan + RegionEUDccMilan2 Region = "eu-dcc-milan-2" + //RegionEUDccDublin2 region Dublin + RegionEUDccDublin2 Region = "eu-dcc-dublin-2" + //RegionEUDccRating2 region Rating + RegionEUDccRating2 Region = "eu-dcc-rating-2" + //RegionEUDccRating1 region Rating + RegionEUDccRating1 Region = "eu-dcc-rating-1" + //RegionEUDccDublin1 region Dublin + RegionEUDccDublin1 Region = "eu-dcc-dublin-1" + //RegionAPDccGazipur1 region Gazipur + RegionAPDccGazipur1 Region = "ap-dcc-gazipur-1" + //RegionEUMadrid2 region Madrid + RegionEUMadrid2 Region = "eu-madrid-2" + //RegionEUFrankfurt2 region Frankfurt + RegionEUFrankfurt2 Region = "eu-frankfurt-2" + //RegionEUJovanovac1 region Jovanovac + RegionEUJovanovac1 Region = "eu-jovanovac-1" + //RegionMEDccDoha1 region Doha + RegionMEDccDoha1 Region = "me-dcc-doha-1" + //RegionMEAlrayyan1 region Alrayyan + RegionMEAlrayyan1 Region = "me-alrayyan-1" + //RegionUSSomerset1 region Somerset + RegionUSSomerset1 Region = "us-somerset-1" + //RegionUSThames1 region Thames + RegionUSThames1 Region = "us-thames-1" + //RegionEUDccZurich1 region Zurich + RegionEUDccZurich1 Region = "eu-dcc-zurich-1" + //RegionEUCrissier1 region Crissier + RegionEUCrissier1 Region = "eu-crissier-1" + //RegionMEAbudhabi3 region Abudhabi + RegionMEAbudhabi3 Region = "me-abudhabi-3" + //RegionMEAlain1 region Alain + RegionMEAlain1 Region = "me-alain-1" + //RegionMEAbudhabi2 region Abudhabi + RegionMEAbudhabi2 Region = "me-abudhabi-2" + //RegionMEAbudhabi4 region Abudhabi + RegionMEAbudhabi4 Region = "me-abudhabi-4" + //RegionAPSeoul2 region Seoul + RegionAPSeoul2 Region = "ap-seoul-2" + //RegionAPSuwon1 region Suwon + RegionAPSuwon1 Region = "ap-suwon-1" + //RegionAPChuncheon2 region Chuncheon + RegionAPChuncheon2 Region = "ap-chuncheon-2" + //RegionUSAshburn2 region Ashburn + RegionUSAshburn2 Region = "us-ashburn-2" + //RegionUSNewark1 region Newark + RegionUSNewark1 Region = "us-newark-1" + //RegionEUBudapest1 region Budapest + RegionEUBudapest1 Region = "eu-budapest-1" + //RegionSARiodejaneiro1 region Riodejaneiro + RegionSARiodejaneiro1 Region = "sa-riodejaneiro-1" +) + +var shortNameRegion = map[string]Region{ + "yny": RegionAPChuncheon1, + "hyd": RegionAPHyderabad1, + "mel": RegionAPMelbourne1, + "bom": RegionAPMumbai1, + "kix": RegionAPOsaka1, + "icn": RegionAPSeoul1, + "syd": RegionAPSydney1, + "nrt": RegionAPTokyo1, + "yul": RegionCAMontreal1, + "yyz": RegionCAToronto1, + "ams": RegionEUAmsterdam1, + "fra": RegionFRA, + "zrh": RegionEUZurich1, + "jed": RegionMEJeddah1, + "dxb": RegionMEDubai1, + "gru": RegionSASaopaulo1, + "cwl": RegionUKCardiff1, + "lhr": RegionLHR, + "iad": RegionIAD, + "phx": RegionPHX, + "sjc": RegionSJC1, + "vcp": RegionSAVinhedo1, + "scl": RegionSASantiago1, + "mtz": RegionILJerusalem1, + "mrs": RegionEUMarseille1, + "sin": RegionAPSingapore1, + "auh": RegionMEAbudhabi1, + "lin": RegionEUMilan1, + "arn": RegionEUStockholm1, + "jnb": RegionAFJohannesburg1, + "cdg": RegionEUParis1, + "qro": RegionMXQueretaro1, + "mad": RegionEUMadrid1, + "ord": RegionUSChicago1, + "mty": RegionMXMonterrey1, + "aga": RegionUSSaltlake2, + "bog": RegionSABogota1, + "vap": RegionSAValparaiso1, + "xsp": RegionAPSingapore2, + "ruh": RegionMERiyadh1, + "onm": RegionAPDelhi1, + "hsg": RegionAPBatam1, + "orf": RegionEUMadrid3, + "nrq": RegionEUTurin1, + "jbp": RegionAPKulai2, + "lej": RegionAFCasablanca1, + "lfi": RegionUSLangley1, + "luf": RegionUSLuke1, + "ric": RegionUSGovAshburn1, + "pia": RegionUSGovChicago1, + "tus": RegionUSGovPhoenix1, + "ltn": RegionUKGovLondon1, + "brs": RegionUKGovCardiff1, + "nja": RegionAPChiyoda1, + "ukb": RegionAPIbaraki1, + "mct": RegionMEDccMuscat1, + "ibr": RegionMEIbri1, + "wga": RegionAPDccCanberra1, + "bgy": RegionEUDccMilan1, + "mxp": RegionEUDccMilan2, + "snn": RegionEUDccDublin2, + "dtm": RegionEUDccRating2, + "dus": RegionEUDccRating1, + "ork": RegionEUDccDublin1, + "dac": RegionAPDccGazipur1, + "vll": RegionEUMadrid2, + "str": RegionEUFrankfurt2, + "beg": RegionEUJovanovac1, + "doh": RegionMEDccDoha1, + "vve": RegionMEAlrayyan1, + "ebb": RegionUSSomerset1, + "ebl": RegionUSThames1, + "avz": RegionEUDccZurich1, + "avf": RegionEUCrissier1, + "ahu": RegionMEAbudhabi3, + "rba": RegionMEAlain1, + "rkt": RegionMEAbudhabi2, + "shj": RegionMEAbudhabi4, + "dtz": RegionAPSeoul2, + "dln": RegionAPSuwon1, + "bno": RegionAPChuncheon2, + "yxj": RegionUSAshburn2, + "pgc": RegionUSNewark1, + "jsk": RegionEUBudapest1, + "hnw": RegionSARiodejaneiro1, +} + +var realm = map[string]string{ + "oc1": "oraclecloud.com", + "oc2": "oraclegovcloud.com", + "oc3": "oraclegovcloud.com", + "oc4": "oraclegovcloud.uk", + "oc8": "oraclecloud8.com", + "oc9": "oraclecloud9.com", + "oc10": "oraclecloud10.com", + "oc14": "oraclecloud14.com", + "oc15": "oraclecloud15.com", + "oc19": "oraclecloud.eu", + "oc20": "oraclecloud20.com", + "oc21": "oraclecloud21.com", + "oc23": "oraclecloud23.com", + "oc24": "oraclecloud24.com", + "oc26": "oraclecloud26.com", + "oc29": "oraclecloud29.com", + "oc35": "oraclecloud35.com", + "oc42": "oraclecloud42.com", + "oc51": "oraclecloud51.com", + "oc52": "oraclecloud52.com", +} + +var regionRealm = map[Region]string{ + RegionAPChuncheon1: "oc1", + RegionAPHyderabad1: "oc1", + RegionAPMelbourne1: "oc1", + RegionAPMumbai1: "oc1", + RegionAPOsaka1: "oc1", + RegionAPSeoul1: "oc1", + RegionAPSydney1: "oc1", + RegionAPTokyo1: "oc1", + RegionCAMontreal1: "oc1", + RegionCAToronto1: "oc1", + RegionEUAmsterdam1: "oc1", + RegionFRA: "oc1", + RegionEUZurich1: "oc1", + RegionMEJeddah1: "oc1", + RegionMEDubai1: "oc1", + RegionSASaopaulo1: "oc1", + RegionUKCardiff1: "oc1", + RegionLHR: "oc1", + RegionIAD: "oc1", + RegionPHX: "oc1", + RegionSJC1: "oc1", + RegionSAVinhedo1: "oc1", + RegionSASantiago1: "oc1", + RegionILJerusalem1: "oc1", + RegionEUMarseille1: "oc1", + RegionAPSingapore1: "oc1", + RegionMEAbudhabi1: "oc1", + RegionEUMilan1: "oc1", + RegionEUStockholm1: "oc1", + RegionAFJohannesburg1: "oc1", + RegionEUParis1: "oc1", + RegionMXQueretaro1: "oc1", + RegionEUMadrid1: "oc1", + RegionUSChicago1: "oc1", + RegionMXMonterrey1: "oc1", + RegionUSSaltlake2: "oc1", + RegionSABogota1: "oc1", + RegionSAValparaiso1: "oc1", + RegionAPSingapore2: "oc1", + RegionMERiyadh1: "oc1", + RegionAPDelhi1: "oc1", + RegionAPBatam1: "oc1", + RegionEUMadrid3: "oc1", + RegionEUTurin1: "oc1", + RegionAPKulai2: "oc1", + RegionAFCasablanca1: "oc1", + + RegionUSLangley1: "oc2", + RegionUSLuke1: "oc2", + + RegionUSGovAshburn1: "oc3", + RegionUSGovChicago1: "oc3", + RegionUSGovPhoenix1: "oc3", + + RegionUKGovLondon1: "oc4", + RegionUKGovCardiff1: "oc4", + + RegionAPChiyoda1: "oc8", + RegionAPIbaraki1: "oc8", + + RegionMEDccMuscat1: "oc9", + RegionMEIbri1: "oc9", + + RegionAPDccCanberra1: "oc10", + + RegionEUDccMilan1: "oc14", + RegionEUDccMilan2: "oc14", + RegionEUDccDublin2: "oc14", + RegionEUDccRating2: "oc14", + RegionEUDccRating1: "oc14", + RegionEUDccDublin1: "oc14", + + RegionAPDccGazipur1: "oc15", + + RegionEUMadrid2: "oc19", + RegionEUFrankfurt2: "oc19", + + RegionEUJovanovac1: "oc20", + + RegionMEDccDoha1: "oc21", + RegionMEAlrayyan1: "oc21", + + RegionUSSomerset1: "oc23", + RegionUSThames1: "oc23", + + RegionEUDccZurich1: "oc24", + RegionEUCrissier1: "oc24", + + RegionMEAbudhabi3: "oc26", + RegionMEAlain1: "oc26", + + RegionMEAbudhabi2: "oc29", + RegionMEAbudhabi4: "oc29", + + RegionAPSeoul2: "oc35", + RegionAPSuwon1: "oc35", + RegionAPChuncheon2: "oc35", + + RegionUSAshburn2: "oc42", + RegionUSNewark1: "oc42", + + RegionEUBudapest1: "oc51", + + RegionSARiodejaneiro1: "oc52", +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.json b/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.json new file mode 100644 index 000000000..207d7ab91 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.json @@ -0,0 +1,512 @@ +[ + { + "regionKey": "yny", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "ap-chuncheon-1", + "realmKey": "oc1" + }, + { + "regionKey": "hyd", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "ap-hyderabad-1", + "realmKey": "oc1" + }, + { + "regionKey": "mel", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "ap-melbourne-1", + "realmKey": "oc1" + }, + { + "regionKey": "bom", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "ap-mumbai-1", + "realmKey": "oc1" + }, + { + "regionKey": "kix", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "ap-osaka-1", + "realmKey": "oc1" + }, + { + "regionKey": "icn", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "ap-seoul-1", + "realmKey": "oc1" + }, + { + "regionKey": "syd", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "ap-sydney-1", + "realmKey": "oc1" + }, + { + "regionKey": "nrt", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "ap-tokyo-1", + "realmKey": "oc1" + }, + { + "regionKey": "yul", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "ca-montreal-1", + "realmKey": "oc1" + }, + { + "regionKey": "yyz", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "ca-toronto-1", + "realmKey": "oc1" + }, + { + "regionKey": "ams", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "eu-amsterdam-1", + "realmKey": "oc1" + }, + { + "regionKey": "fra", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "eu-frankfurt-1", + "realmKey": "oc1" + }, + { + "regionKey": "zrh", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "eu-zurich-1", + "realmKey": "oc1" + }, + { + "regionKey": "jed", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "me-jeddah-1", + "realmKey": "oc1" + }, + { + "regionKey": "dxb", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "me-dubai-1", + "realmKey": "oc1" + }, + { + "regionKey": "gru", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "sa-saopaulo-1", + "realmKey": "oc1" + }, + { + "regionKey": "cwl", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "uk-cardiff-1", + "realmKey": "oc1" + }, + { + "regionKey": "lhr", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "uk-london-1", + "realmKey": "oc1" + }, + { + "regionKey": "iad", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "us-ashburn-1", + "realmKey": "oc1" + }, + { + "regionKey": "phx", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "us-phoenix-1", + "realmKey": "oc1" + }, + { + "regionKey": "sjc", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "us-sanjose-1", + "realmKey": "oc1" + }, + { + "regionKey": "vcp", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "sa-vinhedo-1", + "realmKey": "oc1" + }, + { + "regionKey": "scl", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "sa-santiago-1", + "realmKey": "oc1" + }, + { + "regionKey": "lfi", + "realmDomainComponent": "oraclegovcloud.com", + "regionIdentifier": "us-langley-1", + "realmKey": "oc2" + }, + { + "regionKey": "luf", + "realmDomainComponent": "oraclegovcloud.com", + "regionIdentifier": "us-luke-1", + "realmKey": "oc2" + }, + { + "regionKey": "ric", + "realmDomainComponent": "oraclegovcloud.com", + "regionIdentifier": "us-gov-ashburn-1", + "realmKey": "oc3" + }, + { + "regionKey": "pia", + "realmDomainComponent": "oraclegovcloud.com", + "regionIdentifier": "us-gov-chicago-1", + "realmKey": "oc3" + }, + { + "regionKey": "tus", + "realmDomainComponent": "oraclegovcloud.com", + "regionIdentifier": "us-gov-phoenix-1", + "realmKey": "oc3" + }, + { + "regionKey": "ltn", + "realmDomainComponent": "oraclegovcloud.uk", + "regionIdentifier": "uk-gov-london-1", + "realmKey": "oc4" + }, + { + "regionKey": "brs", + "realmDomainComponent": "oraclegovcloud.uk", + "regionIdentifier": "uk-gov-cardiff-1", + "realmKey": "oc4" + }, + { + "regionKey": "nja", + "realmDomainComponent": "oraclecloud8.com", + "regionIdentifier": "ap-chiyoda-1", + "realmKey": "oc8" + }, + { + "regionKey": "ukb", + "realmDomainComponent": "oraclecloud8.com", + "regionIdentifier": "ap-ibaraki-1", + "realmKey": "oc8" + }, + { + "regionKey": "mtz", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "il-jerusalem-1", + "realmKey": "oc1" + }, + { + "regionKey": "mrs", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "eu-marseille-1", + "realmKey": "oc1" + }, + { + "regionKey": "sin", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "ap-singapore-1", + "realmKey": "oc1" + }, + { + "regionKey": "auh", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "me-abudhabi-1", + "realmKey": "oc1" + }, + { + "regionKey": "lin", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "eu-milan-1", + "realmKey": "oc1" + }, + { + "regionKey": "arn", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "eu-stockholm-1", + "realmKey": "oc1" + }, + { + "regionKey": "jnb", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "af-johannesburg-1", + "realmKey": "oc1" + }, + { + "regionKey": "mct", + "realmDomainComponent": "oraclecloud9.com", + "regionIdentifier": "me-dcc-muscat-1", + "realmKey": "oc9" + }, + { + "regionKey": "wga", + "realmDomainComponent": "oraclecloud10.com", + "regionIdentifier": "ap-dcc-canberra-1", + "realmKey": "oc10" + }, + { + "regionKey": "cdg", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "eu-paris-1", + "realmKey": "oc1" + }, + { + "regionKey": "qro", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "mx-queretaro-1", + "realmKey": "oc1" + }, + { + "regionKey": "mad", + "realmDomainComponent": "oraclecloud.com", + "regionIdentifier": "eu-madrid-1", + "realmKey": "oc1" + }, + { + "regionKey": "bgy", + "realmDomainComponent": "oraclecloud14.com", + "regionIdentifier": "eu-dcc-milan-1", + "realmKey": "oc14" + }, + { + "regionKey": "ord", + "realmKey": "oc1", + "regionIdentifier": "us-chicago-1", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "mxp", + "realmKey": "oc14", + "regionIdentifier": "eu-dcc-milan-2", + "realmDomainComponent": "oraclecloud14.com" + }, + { + "regionKey": "snn", + "realmKey": "oc14", + "regionIdentifier": "eu-dcc-dublin-2", + "realmDomainComponent": "oraclecloud14.com" + }, + { + "regionKey": "dtm", + "realmKey": "oc14", + "regionIdentifier": "eu-dcc-rating-2", + "realmDomainComponent": "oraclecloud14.com" + }, + { + "regionKey": "dus", + "realmKey": "oc14", + "regionIdentifier": "eu-dcc-rating-1", + "realmDomainComponent": "oraclecloud14.com" + }, + { + "regionKey": "ork", + "realmKey": "oc14", + "regionIdentifier": "eu-dcc-dublin-1", + "realmDomainComponent": "oraclecloud14.com" + }, + { + "regionKey": "beg", + "realmKey": "oc20", + "regionIdentifier": "eu-jovanovac-1", + "realmDomainComponent": "oraclecloud20.com" + }, + { + "regionKey": "vll", + "realmKey": "oc19", + "regionIdentifier": "eu-madrid-2", + "realmDomainComponent": "oraclecloud.eu" + }, + { + "regionKey": "str", + "realmKey": "oc19", + "regionIdentifier": "eu-frankfurt-2", + "realmDomainComponent": "oraclecloud.eu" + }, + { + "regionKey": "mty", + "realmKey": "oc1", + "regionIdentifier": "mx-monterrey-1", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "aga", + "realmKey": "oc1", + "regionIdentifier": "us-saltlake-2", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "avz", + "realmKey": "oc24", + "regionIdentifier": "eu-dcc-zurich-1", + "realmDomainComponent": "oraclecloud24.com" + }, + { + "regionKey": "bog", + "realmKey": "oc1", + "regionIdentifier": "sa-bogota-1", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "vap", + "realmKey": "oc1", + "regionIdentifier": "sa-valparaiso-1", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "doh", + "realmKey": "oc21", + "regionIdentifier": "me-dcc-doha-1", + "realmDomainComponent": "oraclecloud21.com" + }, + { + "regionKey": "ahu", + "realmKey": "oc26", + "regionIdentifier": "me-abudhabi-3", + "realmDomainComponent": "oraclecloud26.com" + }, + { + "regionKey": "dac", + "realmKey": "oc15", + "regionIdentifier": "ap-dcc-gazipur-1", + "realmDomainComponent": "oraclecloud15.com" + }, + { + "regionKey": "xsp", + "realmKey": "oc1", + "regionIdentifier": "ap-singapore-2", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "rkt", + "realmKey": "oc29", + "regionIdentifier": "me-abudhabi-2", + "realmDomainComponent": "oraclecloud29.com" + }, + { + "regionKey": "ruh", + "realmKey": "oc1", + "regionIdentifier": "me-riyadh-1", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "shj", + "realmKey": "oc29", + "regionIdentifier": "me-abudhabi-4", + "realmDomainComponent": "oraclecloud29.com" + }, + { + "regionKey": "avf", + "realmKey": "oc24", + "regionIdentifier": "eu-crissier-1", + "realmDomainComponent": "oraclecloud24.com" + }, + { + "regionKey": "ebb", + "realmKey": "oc23", + "regionIdentifier": "us-somerset-1", + "realmDomainComponent": "oraclecloud23.com" + }, + { + "regionKey": "ebl", + "realmKey": "oc23", + "regionIdentifier": "us-thames-1", + "realmDomainComponent": "oraclecloud23.com" + }, + { + "regionKey": "dtz", + "realmKey": "oc35", + "regionIdentifier": "ap-seoul-2", + "realmDomainComponent": "oraclecloud35.com" + }, + { + "regionKey": "dln", + "realmKey": "oc35", + "regionIdentifier": "ap-suwon-1", + "realmDomainComponent": "oraclecloud35.com" + }, + { + "regionKey": "bno", + "realmKey": "oc35", + "regionIdentifier": "ap-chuncheon-2", + "realmDomainComponent": "oraclecloud35.com" + }, + { + "regionKey": "rba", + "realmKey": "oc26", + "regionIdentifier": "me-alain-1", + "realmDomainComponent": "oraclecloud26.com" + }, + { + "regionKey": "yxj", + "realmKey": "oc42", + "regionIdentifier": "us-ashburn-2", + "realmDomainComponent": "oraclecloud42.com" + }, + { + "regionKey": "onm", + "realmKey": "oc1", + "regionIdentifier": "ap-delhi-1", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "hsg", + "realmKey": "oc1", + "regionIdentifier": "ap-batam-1", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "pgc", + "realmKey": "oc42", + "regionIdentifier": "us-newark-1", + "realmDomainComponent": "oraclecloud42.com" + }, + { + "regionKey": "jsk", + "realmKey": "oc51", + "regionIdentifier": "eu-budapest-1", + "realmDomainComponent": "oraclecloud51.com" + }, + { + "regionKey": "ibr", + "realmKey": "oc9", + "regionIdentifier": "me-ibri-1", + "realmDomainComponent": "oraclecloud9.com" + }, + { + "regionKey": "orf", + "realmKey": "oc1", + "regionIdentifier": "eu-madrid-3", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "nrq", + "realmKey": "oc1", + "regionIdentifier": "eu-turin-1", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "hnw", + "realmKey": "oc52", + "regionIdentifier": "sa-riodejaneiro-1", + "realmDomainComponent": "oraclecloud52.com" + }, + { + "regionKey": "jbp", + "realmKey": "oc1", + "regionIdentifier": "ap-kulai-2", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "lej", + "realmKey": "oc1", + "regionIdentifier": "af-casablanca-1", + "realmDomainComponent": "oraclecloud.com" + }, + { + "regionKey": "vve", + "realmKey": "oc21", + "regionIdentifier": "me-alrayyan-1", + "realmDomainComponent": "oraclecloud21.com" + } +] \ No newline at end of file diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/retry.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/retry.go new file mode 100644 index 000000000..18c473e0a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/retry.go @@ -0,0 +1,922 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +import ( + "context" + "errors" + "fmt" + "io" + "math" + "math/rand" + "runtime" + "strings" + "time" +) + +const ( + // UnlimitedNumAttemptsValue is the value for indicating unlimited attempts for reaching success + UnlimitedNumAttemptsValue = uint(0) + + // number of characters contained in the generated retry token + generatedRetryTokenLength = 32 +) + +// OCIRetryableRequest represents a request that can be reissued according to the specified policy. +type OCIRetryableRequest interface { + // Any retryable request must implement the OCIRequest interface + OCIRequest + + // Each operation should implement this method, if has binary body, return OCIReadSeekCloser and true, otherwise return nil, false + BinaryRequestBody() (*OCIReadSeekCloser, bool) + + // Each operation specifies default retry behavior. By passing no arguments to this method, the default retry + // behavior, as determined on a per-operation-basis, will be honored. Variadic retry policy option arguments + // passed to this method will override the default behavior. + RetryPolicy() *RetryPolicy +} + +// OCIOperationResponse represents the output of an OCIOperation, with additional context of error message +// and operation attempt number. +type OCIOperationResponse struct { + // Response from OCI Operation + Response OCIResponse + + // Error from OCI Operation + Error error + + // Operation Attempt Number (one-based) + AttemptNumber uint + + // End of eventually consistent effects, or nil if no such effects + EndOfWindowTime *time.Time + + // Backoff scaling factor (only used for dealing with eventual consistency) + BackoffScalingFactor float64 + + // Time of the initial attempt + InitialAttemptTime time.Time +} + +const ( + defaultMaximumNumberAttempts = uint(8) + defaultExponentialBackoffBase = 2.0 + defaultMinSleepBetween = 0.0 + defaultMaxSleepBetween = 30.0 + + ecMaximumNumberAttempts = uint(9) + ecExponentialBackoffBase = 3.52 + ecMinSleepBetween = 0.0 + ecMaxSleepBetween = 45.0 +) + +var ( + defaultRetryStatusCodeMap = map[StatErrCode]bool{ + {409, "IncorrectState"}: true, + {409, "LockConflict"}: true, + {429, "TooManyRequests"}: true, + + {501, "MethodNotImplemented"}: false, + } +) + +// IsErrorRetryableByDefault returns true if the error is retryable by OCI default retry policy +func IsErrorRetryableByDefault(err error) bool { + if err == nil { + return false + } + + if IsNetworkError(err) { + return true + } + + if err == io.EOF { + return true + } + + if err, ok := IsServiceError(err); ok { + if shouldRetry, ok := defaultRetryStatusCodeMap[StatErrCode{err.GetHTTPStatusCode(), err.GetCode()}]; ok { + return shouldRetry + } + + return 500 <= err.GetHTTPStatusCode() && err.GetHTTPStatusCode() < 505 + } + + return false +} + +// NewOCIOperationResponse assembles an OCI Operation Response object. +// Note that InitialAttemptTime is not set, nor is EndOfWindowTime, and BackoffScalingFactor is set to 1.0. +// EndOfWindowTime and BackoffScalingFactor are only important for eventual consistency. +// InitialAttemptTime can be useful for time-based (as opposed to count-based) retry policies. +func NewOCIOperationResponse(response OCIResponse, err error, attempt uint) OCIOperationResponse { + return OCIOperationResponse{ + Response: response, + Error: err, + AttemptNumber: attempt, + BackoffScalingFactor: 1.0, + } +} + +// NewOCIOperationResponseExtended assembles an OCI Operation Response object, with the value for the EndOfWindowTime, BackoffScalingFactor, and InitialAttemptTime set. +// EndOfWindowTime and BackoffScalingFactor are only important for eventual consistency. +// InitialAttemptTime can be useful for time-based (as opposed to count-based) retry policies. +func NewOCIOperationResponseExtended(response OCIResponse, err error, attempt uint, endOfWindowTime *time.Time, backoffScalingFactor float64, + initialAttemptTime time.Time) OCIOperationResponse { + return OCIOperationResponse{ + Response: response, + Error: err, + AttemptNumber: attempt, + EndOfWindowTime: endOfWindowTime, + BackoffScalingFactor: backoffScalingFactor, + InitialAttemptTime: initialAttemptTime, + } +} + +// +// RetryPolicy +// + +// RetryPolicy is the class that holds all relevant information for retrying operations. +type RetryPolicy struct { + // MaximumNumberAttempts is the maximum number of times to retry a request. Zero indicates an unlimited + // number of attempts. + MaximumNumberAttempts uint + + // ShouldRetryOperation inspects the http response, error, and operation attempt number, and + // - returns true if we should retry the operation + // - returns false otherwise + ShouldRetryOperation func(OCIOperationResponse) bool + + // GetNextDuration computes the duration to pause between operation retries. + NextDuration func(OCIOperationResponse) time.Duration + + // minimum sleep between attempts in seconds + MinSleepBetween float64 + + // maximum sleep between attempts in seconds + MaxSleepBetween float64 + + // the base for the exponential backoff + ExponentialBackoffBase float64 + + // DeterminePolicyToUse may modify the policy to handle eventual consistency; the return values are + // the retry policy to use, the end of the eventually consistent time window, and the backoff scaling factor + // If eventual consistency is not considered, this function should return the unmodified policy that was + // provided as input, along with (*time.Time)(nil) (no time window), and 1.0 (unscaled backoff). + DeterminePolicyToUse func(policy RetryPolicy) (RetryPolicy, *time.Time, float64) + + // if the retry policy considers eventual consistency, but there is no eventual consistency present + // the retries will fall back to the policy specified here; recommendation is to set this to DefaultRetryPolicyWithoutEventualConsistency() + NonEventuallyConsistentPolicy *RetryPolicy + + // Stores the maximum cumulative backoff in seconds. This can usually be calculated using + // MaximumNumberAttempts, MinSleepBetween, MaxSleepBetween, and ExponentialBackoffBase, + // but if MaximumNumberAttempts is 0 (unlimited attempts), then this needs to be set explicitly + // for Eventual Consistency retries to work. + MaximumCumulativeBackoffWithoutJitter float64 +} + +// GlobalRetry is user defined global level retry policy, it would impact all services, the precedence is lower +// than user defined client/request level retry policy +var GlobalRetry *RetryPolicy = nil + +// RetryPolicyOption is the type of the options for NewRetryPolicy. +type RetryPolicyOption func(rp *RetryPolicy) + +// String converts retry policy to human-readable string representation +// Safe to call on a nil *RetryPolicy +func (rp *RetryPolicy) String() string { + if rp == nil { + return "" + } + + nonECPolicy := "" + if rp.NonEventuallyConsistentPolicy != nil { + nonECPolicy = rp.NonEventuallyConsistentPolicy.String() + } + + return fmt.Sprintf("{MaximumNumberAttempts=%v, MinSleepBetween=%v, MaxSleepBetween=%v, ExponentialBackoffBase=%v, NonEventuallyConsistentPolicy=%v}", + rp.MaximumNumberAttempts, rp.MinSleepBetween, rp.MaxSleepBetween, rp.ExponentialBackoffBase, nonECPolicy) +} + +// Validate returns true if the RetryPolicy is valid; if not, it also returns an error. +func (rp *RetryPolicy) validate() (success bool, err error) { + var errorStrings []string + if rp.ShouldRetryOperation == nil { + errorStrings = append(errorStrings, "ShouldRetryOperation may not be nil") + } + if rp.NextDuration == nil { + errorStrings = append(errorStrings, "NextDuration may not be nil") + } + if rp.NonEventuallyConsistentPolicy != nil { + if rp.MaximumNumberAttempts == 0 && rp.MaximumCumulativeBackoffWithoutJitter <= 0 { + errorStrings = append(errorStrings, "If eventual consistency is handled, and the MaximumNumberAttempts of the EC retry policy is 0 (unlimited attempts), then the MaximumCumulativeBackoffWithoutJitter of the EC retry policy must be positive; used WithUnlimitedAttempts instead") + } + nonEcRp := rp.NonEventuallyConsistentPolicy + if nonEcRp.MaximumNumberAttempts == 0 && nonEcRp.MaximumCumulativeBackoffWithoutJitter <= 0 { + errorStrings = append(errorStrings, "If eventual consistency is handled, and the MaximumNumberAttempts of the non-EC retry policy is 0 (unlimited attempts), then the MaximumCumulativeBackoffWithoutJitter of the non-EC retry policy must be positive; used WithUnlimitedAttempts instead") + } + } + if len(errorStrings) > 0 { + return false, errors.New(strings.Join(errorStrings, ", ")) + } + + // some legacy code constructing RetryPolicy instances directly may not have set DeterminePolicyToUse. + // In that case, just assume that it doesn't handle eventual consistency. + if rp.DeterminePolicyToUse == nil { + rp.DeterminePolicyToUse = returnSamePolicy + } + + return true, nil +} + +// GetMaximumCumulativeBackoffWithoutJitter returns the maximum cumulative backoff the retry policy would do, +// taking into account whether eventually consistency is considered or not. +// This function uses either GetMaximumCumulativeBackoffWithoutJitter or GetMaximumCumulativeEventuallyConsistentBackoffWithoutJitter, +// whichever is appropriate +func (rp RetryPolicy) GetMaximumCumulativeBackoffWithoutJitter() time.Duration { + if rp.NonEventuallyConsistentPolicy == nil { + return GetMaximumCumulativeBackoffWithoutJitter(rp) + } + return GetMaximumCumulativeEventuallyConsistentBackoffWithoutJitter(rp) +} + +// +// Functions to calculate backoff and maximum cumulative backoff +// + +// GetBackoffWithoutJitter calculates the backoff without jitter for the attempt, given the retry policy. +func GetBackoffWithoutJitter(policy RetryPolicy, attempt uint) time.Duration { + return time.Duration(getBackoffWithoutJitterHelper(policy.MinSleepBetween, policy.MaxSleepBetween, policy.ExponentialBackoffBase, attempt)) * time.Second +} + +// getBackoffWithoutJitterHelper calculates the backoff without jitter for the attempt, given the loose retry policy values. +func getBackoffWithoutJitterHelper(minSleepBetween float64, maxSleepBetween float64, exponentialBackoffBase float64, attempt uint) float64 { + sleepTime := math.Pow(exponentialBackoffBase, float64(attempt-1)) + if sleepTime < minSleepBetween { + sleepTime = minSleepBetween + } + if sleepTime > maxSleepBetween { + sleepTime = maxSleepBetween + } + return sleepTime +} + +// GetMaximumCumulativeBackoffWithoutJitter calculates the maximum backoff without jitter, according to the retry +// policy, if every retry attempt is made. +func GetMaximumCumulativeBackoffWithoutJitter(policy RetryPolicy) time.Duration { + return getMaximumCumulativeBackoffWithoutJitterHelper(policy.MinSleepBetween, policy.MaxSleepBetween, policy.ExponentialBackoffBase, policy.MaximumNumberAttempts, policy.MaximumCumulativeBackoffWithoutJitter) +} + +func getMaximumCumulativeBackoffWithoutJitterHelper(minSleepBetween float64, maxSleepBetween float64, exponentialBackoffBase float64, MaximumNumberAttempts uint, MaximumCumulativeBackoffWithoutJitter float64) time.Duration { + var cumulative time.Duration = 0 + + if MaximumNumberAttempts == 0 { + // unlimited + return time.Duration(MaximumCumulativeBackoffWithoutJitter) * time.Second + } + + // use a one-based counter because it's easier to think about operation retry in terms of attempt numbering + for currentOperationAttempt := uint(1); currentOperationAttempt < MaximumNumberAttempts; currentOperationAttempt++ { + cumulative += time.Duration(getBackoffWithoutJitterHelper(minSleepBetween, maxSleepBetween, exponentialBackoffBase, currentOperationAttempt)) * time.Second + } + return cumulative +} + +// +// Functions to calculate backoff and maximum cumulative backoff for eventual consistency +// + +// GetEventuallyConsistentBackoffWithoutJitter calculates the backoff without jitter for the attempt, given the retry policy +// and dealing with eventually consistent effects. The result is then multiplied by backoffScalingFactor. +func GetEventuallyConsistentBackoffWithoutJitter(policy RetryPolicy, attempt uint, backoffScalingFactor float64) time.Duration { + return time.Duration(getEventuallyConsistentBackoffWithoutJitterHelper(policy.MinSleepBetween, policy.MaxSleepBetween, policy.ExponentialBackoffBase, attempt, backoffScalingFactor, + func(minSleepBetween float64, maxSleepBetween float64, exponentialBackoffBase float64, attempt uint) float64 { + rp := policy.NonEventuallyConsistentPolicy + return getBackoffWithoutJitterHelper(rp.MinSleepBetween, rp.MaxSleepBetween, rp.ExponentialBackoffBase, attempt) + })*1000) * time.Millisecond +} + +// getEventuallyConsistentBackoffWithoutJitterHelper calculates the backoff without jitter for the attempt, given the loose retry policy values, +// and dealing with eventually consistent effects. The result is then multiplied by backoffScalingFactor. +func getEventuallyConsistentBackoffWithoutJitterHelper(minSleepBetween float64, maxSleepBetween float64, exponentialBackoffBase float64, attempt uint, backoffScalingFactor float64, + defaultBackoffWithoutJitterHelper func(minSleepBetween float64, maxSleepBetween float64, exponentialBackoffBase float64, attempt uint) float64) float64 { + var sleepTime = math.Pow(exponentialBackoffBase, float64(attempt-1)) + if sleepTime < minSleepBetween { + sleepTime = minSleepBetween + } + if sleepTime > maxSleepBetween { + sleepTime = maxSleepBetween + } + sleepTime = sleepTime * backoffScalingFactor + defaultSleepTime := defaultBackoffWithoutJitterHelper(minSleepBetween, maxSleepBetween, exponentialBackoffBase, attempt) + if defaultSleepTime > sleepTime { + sleepTime = defaultSleepTime + } + return sleepTime +} + +// GetMaximumCumulativeEventuallyConsistentBackoffWithoutJitter calculates the maximum backoff without jitter, according to the retry +// policy and taking eventually consistent effects into account, if every retry attempt is made. +func GetMaximumCumulativeEventuallyConsistentBackoffWithoutJitter(policy RetryPolicy) time.Duration { + return getMaximumCumulativeEventuallyConsistentBackoffWithoutJitterHelper(policy.MinSleepBetween, policy.MaxSleepBetween, policy.ExponentialBackoffBase, + policy.MaximumNumberAttempts, policy.MaximumCumulativeBackoffWithoutJitter, + func(minSleepBetween float64, maxSleepBetween float64, exponentialBackoffBase float64, attempt uint) float64 { + rp := policy.NonEventuallyConsistentPolicy + return getBackoffWithoutJitterHelper(rp.MinSleepBetween, rp.MaxSleepBetween, rp.ExponentialBackoffBase, attempt) + }) +} + +func getMaximumCumulativeEventuallyConsistentBackoffWithoutJitterHelper(minSleepBetween float64, maxSleepBetween float64, exponentialBackoffBase float64, MaximumNumberAttempts uint, + MaximumCumulativeBackoffWithoutJitter float64, + defaultBackoffWithoutJitterHelper func(minSleepBetween float64, maxSleepBetween float64, exponentialBackoffBase float64, attempt uint) float64) time.Duration { + if MaximumNumberAttempts == 0 { + // unlimited + return time.Duration(MaximumCumulativeBackoffWithoutJitter) * time.Second + } + + var cumulative time.Duration = 0 + // use a one-based counter because it's easier to think about operation retry in terms of attempt numbering + for currentOperationAttempt := uint(1); currentOperationAttempt < MaximumNumberAttempts; currentOperationAttempt++ { + cumulative += time.Duration(getEventuallyConsistentBackoffWithoutJitterHelper(minSleepBetween, maxSleepBetween, exponentialBackoffBase, currentOperationAttempt, 1.0, defaultBackoffWithoutJitterHelper)*1000) * time.Millisecond + } + return cumulative +} + +func returnSamePolicy(policy RetryPolicy) (RetryPolicy, *time.Time, float64) { + // we're returning the end of window time nonetheless, even though the default non-eventual consistency (EC) + // retry policy doesn't use it; this is useful in case developers wants to write an EC-aware retry policy + // on their own + eowt := EcContext.GetEndOfWindow() + return policy, eowt, 1.0 +} + +// NoRetryPolicy is a helper method that assembles and returns a return policy that indicates an operation should +// never be retried (the operation is performed exactly once). +func NoRetryPolicy() RetryPolicy { + dontRetryOperation := func(OCIOperationResponse) bool { return false } + zeroNextDuration := func(OCIOperationResponse) time.Duration { return 0 * time.Second } + return newRetryPolicyWithOptionsNoDefault( + WithMaximumNumberAttempts(1), + WithShouldRetryOperation(dontRetryOperation), + WithNextDuration(zeroNextDuration), + withMinSleepBetween(0.0*time.Second), + withMaxSleepBetween(0.0*time.Second), + withExponentialBackoffBase(0.0), + withDeterminePolicyToUse(returnSamePolicy), + withNonEventuallyConsistentPolicy(nil)) +} + +// DefaultShouldRetryOperation is the function that should be used for RetryPolicy.ShouldRetryOperation when +// not taking eventual consistency into account. +func DefaultShouldRetryOperation(r OCIOperationResponse) bool { + if r.Error == nil && 199 < r.Response.HTTPResponse().StatusCode && r.Response.HTTPResponse().StatusCode < 300 { + // success + return false + } + return IsErrorRetryableByDefault(r.Error) +} + +// DefaultRetryPolicy is a helper method that assembles and returns a return policy that is defined to be a default one +// The default retry policy will retry on (409, IncorrectState), (409, LockConflict), (429, TooManyRequests) and any 5XX errors except (501, MethodNotImplemented) +// The default retry behavior is using exponential backoff with jitter, the maximum wait time is 30s plus 1s jitter +// The maximum cumulative backoff after all 8 attempts have been made is about 1.5 minutes. +// It will also retry on errors affected by eventual consistency. +// The eventual consistency retry behavior is using exponential backoff with jitter, the maximum wait time is 45s plus 1s jitter +// Under eventual consistency, the maximum cumulative backoff after all 9 attempts have been made is about 4 minutes. +func DefaultRetryPolicy() RetryPolicy { + return NewRetryPolicyWithOptions( + ReplaceWithValuesFromRetryPolicy(DefaultRetryPolicyWithoutEventualConsistency()), + WithEventualConsistency()) +} + +// DefaultRetryPolicyWithoutEventualConsistency is a helper method that assembles and returns a return policy that is defined to be a default one +// The default retry policy will retry on (409, IncorrectState), (409, LockConflict), (429, TooManyRequests) and any 5XX errors except (501, MethodNotImplemented) +// It will not retry on errors affected by eventual consistency. +// The default retry behavior is using exponential backoff with jitter, the maximum wait time is 30s plus 1s jitter +func DefaultRetryPolicyWithoutEventualConsistency() RetryPolicy { + exponentialBackoffWithJitter := func(r OCIOperationResponse) time.Duration { + sleepTime := getBackoffWithoutJitterHelper(defaultMinSleepBetween, defaultMaxSleepBetween, defaultExponentialBackoffBase, r.AttemptNumber) + nextDuration := time.Duration(1000.0*(sleepTime+rand.Float64())) * time.Millisecond + return nextDuration + } + return newRetryPolicyWithOptionsNoDefault( + WithMaximumNumberAttempts(defaultMaximumNumberAttempts), + WithShouldRetryOperation(DefaultShouldRetryOperation), + WithNextDuration(exponentialBackoffWithJitter), + withMinSleepBetween(defaultMinSleepBetween*time.Second), + withMaxSleepBetween(defaultMaxSleepBetween*time.Second), + withExponentialBackoffBase(defaultExponentialBackoffBase), + withDeterminePolicyToUse(returnSamePolicy), + withNonEventuallyConsistentPolicy(nil)) +} + +// EventuallyConsistentShouldRetryOperation is the function that should be used for RetryPolicy.ShouldRetryOperation when +// taking eventual consistency into account +func EventuallyConsistentShouldRetryOperation(r OCIOperationResponse) bool { + if r.Error == nil && 199 < r.Response.HTTPResponse().StatusCode && r.Response.HTTPResponse().StatusCode < 300 { + // success + Debugln(fmt.Sprintf("EC.ShouldRetryOperation, status = %v, 2xx, returning false", r.Response.HTTPResponse().StatusCode)) + return false + } + if IsErrorRetryableByDefault(r.Error) { + return true + } + // not retryable by default + if _, ok := IsServiceError(r.Error); ok { + now := EcContext.timeNowProvider() + if r.EndOfWindowTime == nil || r.EndOfWindowTime.Before(now) { + // either no eventually consistent effects, or they have disappeared by now + Debugln(fmt.Sprintf("EC.ShouldRetryOperation, no EC or in the past, returning false: endOfWindowTime = %v, now = %v", r.EndOfWindowTime, now)) + return false + } + // there were eventually consistent effects present at the time of the first request + // and they could still affect the retries + if IsErrorAffectedByEventualConsistency(r.Error) { + // and it's one of the three affected error codes + Debugln(fmt.Sprintf("EC.ShouldRetryOperation, affected by EC, EC is present: endOfWindowTime = %v, now = %v", r.EndOfWindowTime, now)) + return true + } + return false + } + + return false +} + +// EventuallyConsistentRetryPolicy is a helper method that assembles and returns a return policy that is defined to be a default one +// plus dealing with errors affected by eventual consistency. +// The default retry behavior is using exponential backoff with jitter, the maximum wait time is 45s plus 1s jitter +func EventuallyConsistentRetryPolicy(nonEventuallyConsistentPolicy RetryPolicy) RetryPolicy { + if nonEventuallyConsistentPolicy.NonEventuallyConsistentPolicy != nil { + // already deals with eventual consistency + return nonEventuallyConsistentPolicy + } + exponentialBackoffWithJitter := func(r OCIOperationResponse) time.Duration { + sleepTime := getEventuallyConsistentBackoffWithoutJitterHelper(ecMinSleepBetween, ecMaxSleepBetween, ecExponentialBackoffBase, r.AttemptNumber, r.BackoffScalingFactor, + func(minSleepBetween float64, maxSleepBetween float64, exponentialBackoffBase float64, attempt uint) float64 { + rp := nonEventuallyConsistentPolicy + return getBackoffWithoutJitterHelper(rp.MinSleepBetween, rp.MaxSleepBetween, rp.ExponentialBackoffBase, attempt) + }) + nextDuration := time.Duration(1000.0*(sleepTime+rand.Float64())) * time.Millisecond + Debugln(fmt.Sprintf("EventuallyConsistentRetryPolicy.NextDuration for attempt %v: sleepTime = %.1fs, nextDuration = %v", r.AttemptNumber, sleepTime, nextDuration)) + return nextDuration + } + returnModifiedPolicy := func(policy RetryPolicy) (RetryPolicy, *time.Time, float64) { return determinePolicyToUse(policy) } + nonEventuallyConsistentPolicyCopy := newRetryPolicyWithOptionsNoDefault( + ReplaceWithValuesFromRetryPolicy(nonEventuallyConsistentPolicy)) + return newRetryPolicyWithOptionsNoDefault( + WithMaximumNumberAttempts(ecMaximumNumberAttempts), + WithShouldRetryOperation(EventuallyConsistentShouldRetryOperation), + WithNextDuration(exponentialBackoffWithJitter), + withMinSleepBetween(ecMinSleepBetween*time.Second), + withMaxSleepBetween(ecMaxSleepBetween*time.Second), + withExponentialBackoffBase(ecExponentialBackoffBase), + withDeterminePolicyToUse(returnModifiedPolicy), + withNonEventuallyConsistentPolicy(&nonEventuallyConsistentPolicyCopy)) +} + +// NewRetryPolicy is a helper method for assembling a Retry Policy object. It does not handle eventual consistency, so as to not break existing code. +// If you want to handle eventual consistency, the simplest way to do that is to replace the code +// +// NewRetryPolicy(a, r, n) +// +// with the code +// +// NewRetryPolicyWithOptions( +// WithMaximumNumberAttempts(a), +// WithFixedBackoff(fb) // fb is the fixed backoff duration +// WithShouldRetryOperation(r)) +// +// or +// +// NewRetryPolicyWithOptions( +// WithMaximumNumberAttempts(a), +// WithExponentialBackoff(mb, e) // mb is the maximum backoff duration, and e is the base for exponential backoff, e.g. 2.0 +// WithShouldRetryOperation(r)) +// +// or, if a == 0 (the maximum number of attempts is unlimited) +// +// NewRetryPolicyWithEventualConsistencyUnlimitedAttempts(a, r, n, mcb) // mcb is the maximum cumulative backoff duration without jitter +func NewRetryPolicy(attempts uint, retryOperation func(OCIOperationResponse) bool, nextDuration func(OCIOperationResponse) time.Duration) RetryPolicy { + return NewRetryPolicyWithOptions( + ReplaceWithValuesFromRetryPolicy(DefaultRetryPolicyWithoutEventualConsistency()), + WithMaximumNumberAttempts(attempts), + WithShouldRetryOperation(retryOperation), + WithNextDuration(nextDuration), + ) +} + +// NewRetryPolicyWithEventualConsistencyUnlimitedAttempts is a helper method for assembling a Retry Policy object. +// It does handle eventual consistency, but other than that, it is very similar to NewRetryPolicy. +// NewRetryPolicyWithEventualConsistency does not support limited attempts, use NewRetryPolicyWithEventualConsistency instead. +func NewRetryPolicyWithEventualConsistencyUnlimitedAttempts(attempts uint, retryOperation func(OCIOperationResponse) bool, nextDuration func(OCIOperationResponse) time.Duration, + maximumCumulativeBackoffWithoutJitter time.Duration) (*RetryPolicy, error) { + + if attempts != 0 { + return nil, fmt.Errorf("NewRetryPolicyWithEventualConsistencyUnlimitedAttempts cannot be used with attempts != 0 (limited attempts), use NewRetryPolicyWithEventualConsistency instead") + } + + result := NewRetryPolicyWithOptions( + ReplaceWithValuesFromRetryPolicy(DefaultRetryPolicyWithoutEventualConsistency()), + WithUnlimitedAttempts(maximumCumulativeBackoffWithoutJitter), + WithShouldRetryOperation(retryOperation), + WithNextDuration(nextDuration), + ) + return &result, nil +} + +// NewRetryPolicyWithOptions is a helper method for assembling a Retry Policy object. +// It starts out with the values returned by DefaultRetryPolicy() and does handle eventual consistency, +// unless you replace all options set using ReplaceWithValuesFromRetryPolicy(DefaultRetryPolicyWithoutEventualConsistency()). +func NewRetryPolicyWithOptions(opts ...RetryPolicyOption) RetryPolicy { + rp := &RetryPolicy{} + + // start with the default retry policy + ReplaceWithValuesFromRetryPolicy(DefaultRetryPolicyWithoutEventualConsistency())(rp) + WithEventualConsistency()(rp) + + // then allow changing values + for _, opt := range opts { + opt(rp) + } + + if rp.DeterminePolicyToUse == nil { + rp.DeterminePolicyToUse = returnSamePolicy + } + + return *rp +} + +// newRetryPolicyWithOptionsNoDefault is a helper method for assembling a Retry Policy object. +// Contrary to newRetryPolicyWithOptions, it does not start out with the values returned by +// DefaultRetryPolicy(). +func newRetryPolicyWithOptionsNoDefault(opts ...RetryPolicyOption) RetryPolicy { + rp := &RetryPolicy{} + + // then allow changing values + for _, opt := range opts { + opt(rp) + } + + if rp.DeterminePolicyToUse == nil { + rp.DeterminePolicyToUse = returnSamePolicy + } + + return *rp +} + +// WithMaximumNumberAttempts is the option for NewRetryPolicyWithOptions that sets the maximum number of attempts. +func WithMaximumNumberAttempts(attempts uint) RetryPolicyOption { + // this is the RetryPolicyOption function type + return func(rp *RetryPolicy) { + rp.MaximumNumberAttempts = attempts + } +} + +// WithUnlimitedAttempts is the option for NewRetryPolicyWithOptions that sets unlimited number of attempts, +// but it needs to set a MaximumCumulativeBackoffWithoutJitter duration. +// If you use WithUnlimitedAttempts, you should set your own NextDuration function using WithNextDuration. +func WithUnlimitedAttempts(maximumCumulativeBackoffWithoutJitter time.Duration) RetryPolicyOption { + // this is the RetryPolicyOption function type + return func(rp *RetryPolicy) { + rp.MaximumNumberAttempts = 0 + rp.MaximumCumulativeBackoffWithoutJitter = float64(maximumCumulativeBackoffWithoutJitter / time.Second) + } +} + +// WithShouldRetryOperation is the option for NewRetryPolicyWithOptions that sets the function that checks +// whether retries should be performed. +func WithShouldRetryOperation(retryOperation func(OCIOperationResponse) bool) RetryPolicyOption { + // this is the RetryPolicyOption function type + return func(rp *RetryPolicy) { + rp.ShouldRetryOperation = retryOperation + } +} + +// WithNextDuration is the option for NewRetryPolicyWithOptions that sets the function for computing the next +// backoff duration. +// It is preferred to use WithFixedBackoff or WithExponentialBackoff instead. +func WithNextDuration(nextDuration func(OCIOperationResponse) time.Duration) RetryPolicyOption { + // this is the RetryPolicyOption function type + return func(rp *RetryPolicy) { + rp.NextDuration = nextDuration + } +} + +// withMinSleepBetween is the option for NewRetryPolicyWithOptions that sets the minimum backoff duration. +func withMinSleepBetween(minSleepBetween time.Duration) RetryPolicyOption { + // this is the RetryPolicyOption function type + return func(rp *RetryPolicy) { + rp.MinSleepBetween = float64(minSleepBetween / time.Second) + } +} + +// withMaxsSleepBetween is the option for NewRetryPolicyWithOptions that sets the maximum backoff duration. +func withMaxSleepBetween(maxSleepBetween time.Duration) RetryPolicyOption { + // this is the RetryPolicyOption function type + return func(rp *RetryPolicy) { + rp.MaxSleepBetween = float64(maxSleepBetween / time.Second) + } +} + +// withExponentialBackoffBase is the option for NewRetryPolicyWithOptions that sets the base for the +// exponential backoff +func withExponentialBackoffBase(base float64) RetryPolicyOption { + // this is the RetryPolicyOption function type + return func(rp *RetryPolicy) { + rp.ExponentialBackoffBase = base + } +} + +// withDeterminePolicyToUse is the option for NewRetryPolicyWithOptions that sets the function that +// determines which polich should be used and if eventual consistency should be considered +func withDeterminePolicyToUse(determinePolicyToUse func(policy RetryPolicy) (RetryPolicy, *time.Time, float64)) RetryPolicyOption { + // this is the RetryPolicyOption function type + return func(rp *RetryPolicy) { + rp.DeterminePolicyToUse = determinePolicyToUse + } +} + +// withNonEventuallyConsistentPolicy is the option for NewRetryPolicyWithOptions that sets the fallback +// strategy if eventual consistency should not be considered +func withNonEventuallyConsistentPolicy(nonEventuallyConsistentPolicy *RetryPolicy) RetryPolicyOption { + // this is the RetryPolicyOption function type + return func(rp *RetryPolicy) { + // we want a non-EC policy for NonEventuallyConsistentPolicy; make sure that NonEventuallyConsistentPolicy is nil + for nonEventuallyConsistentPolicy != nil && nonEventuallyConsistentPolicy.NonEventuallyConsistentPolicy != nil { + nonEventuallyConsistentPolicy = nonEventuallyConsistentPolicy.NonEventuallyConsistentPolicy + } + rp.NonEventuallyConsistentPolicy = nonEventuallyConsistentPolicy + } +} + +// WithExponentialBackoff is an option for NewRetryPolicyWithOptions that sets the exponential backoff base, +// minimum and maximum sleep between attempts, and next duration function. +// Therefore, WithExponentialBackoff is a combination of WithNextDuration, withMinSleepBetween, withMaxSleepBetween, +// and withExponentialBackoffBase. +func WithExponentialBackoff(newMaxSleepBetween time.Duration, newExponentialBackoffBase float64) RetryPolicyOption { + exponentialBackoffWithJitter := func(r OCIOperationResponse) time.Duration { + sleepTime := getBackoffWithoutJitterHelper(defaultMinSleepBetween, newMaxSleepBetween.Seconds(), newExponentialBackoffBase, r.AttemptNumber) + nextDuration := time.Duration(1000.0*(sleepTime+rand.Float64())) * time.Millisecond + Debugln(fmt.Sprintf("NextDuration for attempt %v: sleepTime = %.1fs, nextDuration = %v", r.AttemptNumber, sleepTime, nextDuration)) + return nextDuration + } + + // this is the RetryPolicyOption function type + return func(rp *RetryPolicy) { + withMinSleepBetween(0)(rp) + withMaxSleepBetween(newMaxSleepBetween)(rp) + withExponentialBackoffBase(newExponentialBackoffBase)(rp) + WithNextDuration(exponentialBackoffWithJitter)(rp) + } +} + +// WithFixedBackoff is an option for NewRetryPolicyWithOptions that sets the backoff to always be exactly the same value. There is no jitter either. +// Therefore, WithFixedBackoff is a combination of WithNextDuration, withMinSleepBetween, withMaxSleepBetween, and withExponentialBackoffBase. +func WithFixedBackoff(newSleepBetween time.Duration) RetryPolicyOption { + fixedBackoffWithoutJitter := func(r OCIOperationResponse) time.Duration { + nextDuration := newSleepBetween + Debugln(fmt.Sprintf("NextDuration for attempt %v: nextDuration = %v", r.AttemptNumber, nextDuration)) + return nextDuration + } + + // this is the RetryPolicyOption function type + return func(rp *RetryPolicy) { + withMinSleepBetween(newSleepBetween)(rp) + withMaxSleepBetween(newSleepBetween)(rp) + withExponentialBackoffBase(1.0)(rp) + WithNextDuration(fixedBackoffWithoutJitter)(rp) + } +} + +// WithEventualConsistency is the option for NewRetryPolicyWithOptions that enables considering eventual backoff for the policy. +func WithEventualConsistency() RetryPolicyOption { + // this is the RetryPolicyOption function type + return func(rp *RetryPolicy) { + copy := RetryPolicy{ + MaximumNumberAttempts: rp.MaximumNumberAttempts, + ShouldRetryOperation: rp.ShouldRetryOperation, + NextDuration: rp.NextDuration, + MinSleepBetween: rp.MinSleepBetween, + MaxSleepBetween: rp.MaxSleepBetween, + ExponentialBackoffBase: rp.ExponentialBackoffBase, + DeterminePolicyToUse: rp.DeterminePolicyToUse, + NonEventuallyConsistentPolicy: rp.NonEventuallyConsistentPolicy, + } + ecrp := EventuallyConsistentRetryPolicy(copy) + rp.MaximumNumberAttempts = ecrp.MaximumNumberAttempts + rp.ShouldRetryOperation = ecrp.ShouldRetryOperation + rp.NextDuration = ecrp.NextDuration + rp.MinSleepBetween = ecrp.MinSleepBetween + rp.MaxSleepBetween = ecrp.MaxSleepBetween + rp.ExponentialBackoffBase = ecrp.ExponentialBackoffBase + rp.DeterminePolicyToUse = ecrp.DeterminePolicyToUse + rp.NonEventuallyConsistentPolicy = ecrp.NonEventuallyConsistentPolicy + } +} + +// WithConditionalOption is an option for NewRetryPolicyWithOptions that enables or disables another option. +func WithConditionalOption(enabled bool, otherOption RetryPolicyOption) RetryPolicyOption { + // this is the RetryPolicyOption function type + return func(rp *RetryPolicy) { + if enabled { + otherOption(rp) + } + } +} + +// ReplaceWithValuesFromRetryPolicy is an option for NewRetryPolicyWithOptions that copies over all settings from another RetryPolicy +func ReplaceWithValuesFromRetryPolicy(other RetryPolicy) RetryPolicyOption { + // this is the RetryPolicyOption function type + return func(rp *RetryPolicy) { + rp.MaximumNumberAttempts = other.MaximumNumberAttempts + rp.ShouldRetryOperation = other.ShouldRetryOperation + rp.NextDuration = other.NextDuration + rp.MinSleepBetween = other.MinSleepBetween + rp.MaxSleepBetween = other.MaxSleepBetween + rp.ExponentialBackoffBase = other.ExponentialBackoffBase + rp.DeterminePolicyToUse = other.DeterminePolicyToUse + rp.NonEventuallyConsistentPolicy = other.NonEventuallyConsistentPolicy + rp.MaximumCumulativeBackoffWithoutJitter = other.MaximumCumulativeBackoffWithoutJitter + } +} + +// shouldContinueIssuingRequests returns true if we should continue retrying a request, based on the current attempt +// number and the maximum number of attempts specified, or false otherwise. +func shouldContinueIssuingRequests(current, maximum uint) bool { + return maximum == UnlimitedNumAttemptsValue || current <= maximum +} + +// RetryToken generates a retry token that must be included on any request passed to the Retry method. +func RetryToken() string { + alphanumericChars := []rune("abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ") + retryToken := make([]rune, generatedRetryTokenLength) + for i := range retryToken { + retryToken[i] = alphanumericChars[rand.Intn(len(alphanumericChars))] + } + return string(retryToken) +} + +func determinePolicyToUse(policy RetryPolicy) (RetryPolicy, *time.Time, float64) { + initialAttemptTime := EcContext.timeNowProvider() + var useDefaultTimingInstead = true + var endOfWindowTime = (*time.Time)(nil) + var backoffScalingFactor = 1.0 + var policyToUse = policy + + eowt := EcContext.GetEndOfWindow() + if eowt != nil { + // there was an eventually consistent request + if eowt.After(initialAttemptTime) { + // and the eventually consistent effects may still be present + endOfWindowTime = eowt + // if the time between now and the end of the window is less than the time we normally would retry, use the default timing + durationToEndOfWindow := endOfWindowTime.Sub(initialAttemptTime) + maxCumulativeBackoffWithoutJitter := GetMaximumCumulativeBackoffWithoutJitter(*policy.NonEventuallyConsistentPolicy) + Debugln(fmt.Sprintf("durationToEndOfWindow = %v, maxCumulativeBackoffWithoutJitter = %v", durationToEndOfWindow, maxCumulativeBackoffWithoutJitter)) + if durationToEndOfWindow > maxCumulativeBackoffWithoutJitter { + // the end of the eventually consistent window is later than when default retries would end + // do not use default timing + maximumCumulativeBackoffWithoutJitter := GetMaximumCumulativeEventuallyConsistentBackoffWithoutJitter(policy) + backoffScalingFactor = float64(durationToEndOfWindow) / float64(maximumCumulativeBackoffWithoutJitter) + useDefaultTimingInstead = false + Debugln(fmt.Sprintf("Use eventually consistent timing, durationToEndOfWindow = %v, maximumCumulativeBackoffWithoutJitter = %v, backoffScalingFactor = %.2f", + durationToEndOfWindow, maximumCumulativeBackoffWithoutJitter, backoffScalingFactor)) + } else { + Debugln("Use default timing, end of EC window is sooner than default retries") + } + } else { + useDefaultTimingInstead = false + policyToUse = *policy.NonEventuallyConsistentPolicy + Debugln("Use default timing and strategy, end of EC window is in the past") + } + } else { + useDefaultTimingInstead = false + policyToUse = *policy.NonEventuallyConsistentPolicy + Debugln("Use default timing and strategy, no EC window set") + } + + if useDefaultTimingInstead { + // use timing from defaultRetryPolicy, but whether to retry from the policy that was passed into this request + policyToUse = NewRetryPolicyWithOptions( + ReplaceWithValuesFromRetryPolicy(*policy.NonEventuallyConsistentPolicy), + WithShouldRetryOperation(policy.ShouldRetryOperation)) + } + + return policyToUse, endOfWindowTime, backoffScalingFactor +} + +// Retry is a package-level operation that executes the retryable request using the specified operation and retry policy. +func Retry(ctx context.Context, request OCIRetryableRequest, operation OCIOperation, policy RetryPolicy) (OCIResponse, error) { + type retrierResult struct { + response OCIResponse + err error + } + + var response OCIResponse + var err error + retrierChannel := make(chan retrierResult, 1) + + validated, validateError := policy.validate() + if !validated { + return nil, validateError + } + + initialAttemptTime := time.Now() + + go func() { + // Deal with panics more graciously + defer func() { + if r := recover(); r != nil { + stackBuffer := make([]byte, 1024) + bytesWritten := runtime.Stack(stackBuffer, false) + stack := string(stackBuffer[:bytesWritten]) + error := fmt.Errorf("panicked while retrying operation. Panic was: %s\nStack: %s", r, stack) + Debugln(error) + retrierChannel <- retrierResult{nil, error} + } + }() + // if request body is binary request body and seekable, save the current position + var curPos int64 = 0 + isSeekable := false + rsc, isBinaryRequest := request.BinaryRequestBody() + if rsc != nil && rsc.rc != nil { + defer rsc.rc.Close() + } + if policy.MaximumNumberAttempts != uint(1) { + if rsc.Seekable() { + isSeekable = true + curPos, _ = rsc.Seek(0, io.SeekCurrent) + } + } + + // some legacy code constructing RetryPolicy instances directly may not have set DeterminePolicyToUse. + // In that case, just assume that it doesn't handle eventual consistency. + if policy.DeterminePolicyToUse == nil { + policy.DeterminePolicyToUse = returnSamePolicy + } + + // this determines which policy to use, when the eventual consistency window ends, and what the backoff + // scaling factor should be + policyToUse, endOfWindowTime, backoffScalingFactor := policy.DeterminePolicyToUse(policy) + Debugln(fmt.Sprintf("Retry policy to use: %v", policyToUse)) + retryStartTime := time.Now() + extraHeaders := make(map[string]string) + + if policy.MaximumNumberAttempts == 1 { + extraHeaders[requestHeaderOpcClientRetries] = "false" + } else { + extraHeaders[requestHeaderOpcClientRetries] = "true" + } + + // use a one-based counter because it's easier to think about operation retry in terms of attempt numbering + for currentOperationAttempt := uint(1); shouldContinueIssuingRequests(currentOperationAttempt, policyToUse.MaximumNumberAttempts); currentOperationAttempt++ { + Debugln(fmt.Sprintf("operation attempt #%v", currentOperationAttempt)) + // rewind body once needed + if isSeekable { + rsc = NewOCIReadSeekCloser(rsc.rc) + rsc.Seek(curPos, io.SeekStart) + } + response, err = operation(ctx, request, rsc, extraHeaders) + + operationResponse := NewOCIOperationResponseExtended(response, err, currentOperationAttempt, endOfWindowTime, backoffScalingFactor, initialAttemptTime) + + if !policyToUse.ShouldRetryOperation(operationResponse) { + // we should NOT retry operation based on response and/or error => return + retrierChannel <- retrierResult{response, err} + return + } + + // if the request body type is stream, requested retry but doesn't resettable, throw error and stop retrying + if isBinaryRequest && !isSeekable { + retrierChannel <- retrierResult{response, NonSeekableRequestRetryFailure{err}} + return + } + + duration := policyToUse.NextDuration(operationResponse) + //The following condition is kept for backwards compatibility reasons + if deadline, ok := ctx.Deadline(); ok && EcContext.timeNowProvider().Add(duration).After(deadline) { + // we want to retry the operation, but the policy is telling us to wait for a duration that exceeds + // the specified overall deadline for the operation => instead of waiting for however long that + // time period is and then aborting, abort now and save the cycles + retrierChannel <- retrierResult{response, DeadlineExceededByBackoff} + return + } + Debugln(fmt.Sprintf("waiting %v before retrying operation", duration)) + // sleep before retrying the operation + <-time.After(duration) + } + retryEndTime := time.Now() + Debugln(fmt.Sprintf("Total Latency for this API call is: %v ms", retryEndTime.Sub(retryStartTime).Milliseconds())) + retrierChannel <- retrierResult{response, err} + }() + + select { + case <-ctx.Done(): + return response, ctx.Err() + case result := <-retrierChannel: + return result.response, result.err + } +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/sseReader.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/sseReader.go new file mode 100644 index 000000000..850cd3563 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/sseReader.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +import ( + "bufio" + "bytes" + "context" + "io" + "net/http" +) + +type SseReader struct { + HttpBody io.ReadCloser + eventScanner bufio.Scanner + OnClose func(r *SseReader) +} + +// InvalidSSEResponseError returned in the case that a nil response body was given +// to NewSSEReader() +type InvalidSSEResponseError struct { +} + +const InvalidResponseErrorMessage = "invalid response struct given to NewSSEReader" + +func (e InvalidSSEResponseError) Error() string { + return InvalidResponseErrorMessage +} + +// NewSSEReader returns an SSE Reader given an sse response +func NewSSEReader(response *http.Response) (*SseReader, error) { + + if response == nil || response.Body == nil { + return nil, InvalidSSEResponseError{} + } + + reader := &SseReader{ + HttpBody: response.Body, + eventScanner: *bufio.NewScanner(response.Body), + OnClose: func(r *SseReader) { r.HttpBody.Close() }, // Default on close function, ensures body is closed after use + } + return reader, nil +} + +// Take the response in bytes and trim it if necessary +func processEvent(e []byte) []byte { + e = bytes.TrimPrefix(e, []byte("data: ")) // Text/event-stream always prefixed with 'data: ' + return e +} + +// ReadNextEvent reads the next event in the stream, return it unmarshalled +func (r *SseReader) ReadNextEvent() (event []byte, err error) { + if r.eventScanner.Scan() { + eventBytes := r.eventScanner.Bytes() + return processEvent(eventBytes), nil + } else { + + // Close out the stream since we are finished reading from it + if r.OnClose != nil { + r.OnClose(r) + } + + err := r.eventScanner.Err() + if err == context.Canceled || err == nil { + err = io.EOF + } + return nil, err + } + +} + +// ReadAllEvents reads all events from the response stream, and processes each with given event handler +func (r *SseReader) ReadAllEvents(eventHandler func(e []byte)) error { + for { + + event, err := r.ReadNextEvent() + + if err != nil { + + if err == io.EOF { + err = nil + } + return err + } + + // Ignore empty events + if len(event) > 0 { + eventHandler(event) + } + } +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/tls_config_provider.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/tls_config_provider.go new file mode 100644 index 000000000..d01ec07d7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/tls_config_provider.go @@ -0,0 +1,156 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +import ( + "crypto/tls" + "crypto/x509" + "fmt" + "os" + "sync" +) + +// GetTLSConfigTemplateForTransport returns the TLSConfigTemplate to used depending on whether any additional +// CA Bundle or client side certs have been configured +func GetTLSConfigTemplateForTransport() TLSConfigProvider { + certPath := os.Getenv(ociDefaultClientCertsPath) + keyPath := os.Getenv(ociDefaultClientCertsPrivateKeyPath) + caBundlePath := os.Getenv(ociDefaultCertsPath) + if certPath != "" && keyPath != "" { + return &DefaultMTLSConfigProvider{ + caBundlePath: caBundlePath, + clientCertPath: certPath, + clientKeyPath: keyPath, + watchedFilesStatsMap: make(map[string]os.FileInfo), + } + } + return &DefaultTLSConfigProvider{ + caBundlePath: caBundlePath, + } +} + +// TLSConfigProvider is an interface the defines a function that creates a new *tls.Config. +type TLSConfigProvider interface { + NewOrDefault() (*tls.Config, error) + WatchedFilesModified() bool +} + +// DefaultTLSConfigProvider is a provider that provides a TLS tls.config for the HTTPTransport +type DefaultTLSConfigProvider struct { + caBundlePath string + mux sync.Mutex + currentStat os.FileInfo +} + +// NewOrDefault returns a default tls.Config which +// sets its RootCAs to be a *x509.CertPool from caBundlePath. +func (t *DefaultTLSConfigProvider) NewOrDefault() (*tls.Config, error) { + if t.caBundlePath == "" { + return &tls.Config{}, nil + } + + // Keep the current Stat info from the ca bundle in a map + Debugf("Getting Initial Stats for file: %s", t.caBundlePath) + caBundleStat, err := os.Stat(t.caBundlePath) + if err != nil { + return nil, err + } + t.mux.Lock() + defer t.mux.Unlock() + t.currentStat = caBundleStat + + rootCAs, err := CertPoolFrom(t.caBundlePath) + if err != nil { + return nil, err + } + return &tls.Config{ + RootCAs: rootCAs, + }, nil +} + +// WatchedFilesModified returns true if any files in the watchedFilesStatsMap has been modified else returns false +func (t *DefaultTLSConfigProvider) WatchedFilesModified() bool { + modified := false + if t.caBundlePath != "" { + newStat, err := os.Stat(t.caBundlePath) + if err == nil && (t.currentStat.Size() != newStat.Size() || t.currentStat.ModTime() != newStat.ModTime()) { + Logf("Modification detected in cert/ca-bundle file: %s", t.caBundlePath) + modified = true + t.mux.Lock() + defer t.mux.Unlock() + t.currentStat = newStat + } + } + return modified +} + +// DefaultMTLSConfigProvider is a provider that provides a MTLS tls.config for the HTTPTransport +type DefaultMTLSConfigProvider struct { + caBundlePath string + clientCertPath string + clientKeyPath string + mux sync.Mutex + watchedFilesStatsMap map[string]os.FileInfo +} + +// NewOrDefault returns a default tls.Config which sets its RootCAs +// to be a *x509.CertPool from caBundlePath and calls +// tls.LoadX509KeyPair(clientCertPath, clientKeyPath) to set mtls client certs. +func (t *DefaultMTLSConfigProvider) NewOrDefault() (*tls.Config, error) { + rootCAs, err := CertPoolFrom(t.caBundlePath) + if err != nil { + return nil, err + } + cert, err := tls.LoadX509KeyPair(t.clientCertPath, t.clientKeyPath) + if err != nil { + return nil, err + } + + // Configure the initial certs file stats, error skipped because we error out before this if the files don't exist + t.mux.Lock() + defer t.mux.Unlock() + t.watchedFilesStatsMap[t.caBundlePath], _ = os.Stat(t.caBundlePath) + t.watchedFilesStatsMap[t.clientCertPath], _ = os.Stat(t.clientCertPath) + t.watchedFilesStatsMap[t.clientKeyPath], _ = os.Stat(t.clientKeyPath) + + return &tls.Config{ + RootCAs: rootCAs, + Certificates: []tls.Certificate{cert}, + }, nil +} + +// WatchedFilesModified returns true if any files in the watchedFilesStatsMap has been modified else returns false +func (t *DefaultMTLSConfigProvider) WatchedFilesModified() bool { + modified := false + + t.mux.Lock() + defer t.mux.Unlock() + for k, v := range t.watchedFilesStatsMap { + if k != "" { + currentStat, err := os.Stat(k) + if err == nil && (v.Size() != currentStat.Size() || v.ModTime() != currentStat.ModTime()) { + modified = true + Logf("Modification detected in cert/ca-bundle file: %s", k) + t.watchedFilesStatsMap[k] = currentStat + } + } + } + + return modified +} + +// CertPoolFrom creates a new x509.CertPool from a given file. +func CertPoolFrom(caBundleFile string) (*x509.CertPool, error) { + pemCerts, err := os.ReadFile(caBundleFile) + if err != nil { + return nil, err + } + + trust := x509.NewCertPool() + if !trust.AppendCertsFromPEM(pemCerts) { + return nil, fmt.Errorf("creating a new x509.CertPool from %s: no certs added", caBundleFile) + } + + return trust, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/transport_template_provider.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/transport_template_provider.go new file mode 100644 index 000000000..f37ab0f0d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/transport_template_provider.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +import ( + "crypto/tls" + "net" + "net/http" + "time" +) + +// TransportTemplateProvider defines a function that creates a new http transport +// from a given TLS client config. +type TransportTemplateProvider func(tlsClientConfig *tls.Config) (http.RoundTripper, error) + +// NewOrDefault creates a new TransportTemplate +// If t is nil, then DefaultTransport is returned +func (t TransportTemplateProvider) NewOrDefault(tlsClientConfig *tls.Config) (http.RoundTripper, error) { + if t == nil { + return DefaultTransport(tlsClientConfig) + } + return t(tlsClientConfig) +} + +// DefaultTransport creates a clone of http.DefaultTransport +// and applies the tlsClientConfig on top of it. +// The result is never nil, to prevent panics in client code. +// Never returns any errors, but needs to return an error +// to adhere to TransportTemplate interface. +func DefaultTransport(tlsClientConfig *tls.Config) (*http.Transport, error) { + transport := CloneHTTPDefaultTransport() + if isExpectHeaderDisabled := IsEnvVarFalse(UsingExpectHeaderEnvVar); !isExpectHeaderDisabled { + transport.Proxy = http.ProxyFromEnvironment + transport.DialContext = (&net.Dialer{ + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + DualStack: true, + }).DialContext + transport.ForceAttemptHTTP2 = true + transport.MaxIdleConns = 100 + transport.IdleConnTimeout = 90 * time.Second + transport.TLSHandshakeTimeout = 10 * time.Second + transport.ExpectContinueTimeout = 3 * time.Second + } + transport.TLSClientConfig = tlsClientConfig + return transport, nil +} + +// CloneHTTPDefaultTransport returns a clone of http.DefaultTransport. +func CloneHTTPDefaultTransport() *http.Transport { + return http.DefaultTransport.(*http.Transport).Clone() +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/utils/opc_request_id.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/utils/opc_request_id.go new file mode 100644 index 000000000..db3293383 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/utils/opc_request_id.go @@ -0,0 +1,30 @@ +package utils + +import ( + "crypto/rand" + "encoding/hex" + "fmt" +) + +// GenerateOpcRequestID - +// Maximum segment length: 32 characters +// Allowed segment contents: regular expression pattern /^[a-zA-Z0-9]{0,32}$/ +func GenerateOpcRequestID() string { + clientId := generateUniqueID() + stackId := generateUniqueID() + individualId := generateUniqueID() + + opcRequestId := fmt.Sprintf("%s/%s/%s", clientId, stackId, individualId) + + return opcRequestId +} + +func generateUniqueID() string { + b := make([]byte, 16) + _, err := rand.Read(b) + if err != nil { + return "" + } + + return hex.EncodeToString(b) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go new file mode 100644 index 000000000..d0cbe5c68 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go @@ -0,0 +1,37 @@ +// Copyright (c) 2016, 2018, 2020, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated by go generate; DO NOT EDIT + +package common + +import ( + "bytes" + "fmt" + "sync" +) + +const ( + major = "65" + minor = "117" + patch = "1" + tag = "" +) + +var once sync.Once +var version string + +// Version returns semantic version of the sdk +func Version() string { + once.Do(func() { + ver := fmt.Sprintf("%s.%s.%s", major, minor, patch) + verBuilder := bytes.NewBufferString(ver) + if tag != "" && tag != "-" { + _, err := verBuilder.WriteString(tag) + if err != nil { + verBuilder = bytes.NewBufferString(ver) + } + } + version = verBuilder.String() + }) + return version +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/accept_shielded_integrity_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/accept_shielded_integrity_policy_request_response.go new file mode 100644 index 000000000..c3f93b396 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/accept_shielded_integrity_policy_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AcceptShieldedIntegrityPolicyRequest wrapper for the AcceptShieldedIntegrityPolicy operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AcceptShieldedIntegrityPolicy.go.html to see an example of how to use AcceptShieldedIntegrityPolicyRequest. +type AcceptShieldedIntegrityPolicyRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AcceptShieldedIntegrityPolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AcceptShieldedIntegrityPolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AcceptShieldedIntegrityPolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AcceptShieldedIntegrityPolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AcceptShieldedIntegrityPolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AcceptShieldedIntegrityPolicyResponse wrapper for the AcceptShieldedIntegrityPolicy operation +type AcceptShieldedIntegrityPolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AcceptShieldedIntegrityPolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AcceptShieldedIntegrityPolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_distribution_statement_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_distribution_statement_details.go new file mode 100644 index 000000000..95b1b2d33 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_distribution_statement_details.go @@ -0,0 +1,129 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddDrgRouteDistributionStatementDetails Details used to add a route distribution statement. +type AddDrgRouteDistributionStatementDetails struct { + + // The action is applied only if all of the match criteria is met. + MatchCriteria []DrgRouteDistributionMatchCriteria `mandatory:"true" json:"matchCriteria"` + + // Accept: import/export the route "as is" + Action AddDrgRouteDistributionStatementDetailsActionEnum `mandatory:"true" json:"action"` + + // This field is used to specify the priority of each statement in a route distribution. + // The priority will be represented as a number between 0 and 65535 where a lower number + // indicates a higher priority. When a route is processed, statements are applied in the order + // defined by their priority. The first matching rule dictates the action that will be taken + // on the route. + Priority *int `mandatory:"true" json:"priority"` +} + +func (m AddDrgRouteDistributionStatementDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddDrgRouteDistributionStatementDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAddDrgRouteDistributionStatementDetailsActionEnum(string(m.Action)); !ok && m.Action != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Action: %s. Supported values are: %s.", m.Action, strings.Join(GetAddDrgRouteDistributionStatementDetailsActionEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *AddDrgRouteDistributionStatementDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + MatchCriteria []drgroutedistributionmatchcriteria `json:"matchCriteria"` + Action AddDrgRouteDistributionStatementDetailsActionEnum `json:"action"` + Priority *int `json:"priority"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.MatchCriteria = make([]DrgRouteDistributionMatchCriteria, len(model.MatchCriteria)) + for i, n := range model.MatchCriteria { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.MatchCriteria[i] = nn.(DrgRouteDistributionMatchCriteria) + } else { + m.MatchCriteria[i] = nil + } + } + m.Action = model.Action + + m.Priority = model.Priority + + return +} + +// AddDrgRouteDistributionStatementDetailsActionEnum Enum with underlying type: string +type AddDrgRouteDistributionStatementDetailsActionEnum string + +// Set of constants representing the allowable values for AddDrgRouteDistributionStatementDetailsActionEnum +const ( + AddDrgRouteDistributionStatementDetailsActionAccept AddDrgRouteDistributionStatementDetailsActionEnum = "ACCEPT" +) + +var mappingAddDrgRouteDistributionStatementDetailsActionEnum = map[string]AddDrgRouteDistributionStatementDetailsActionEnum{ + "ACCEPT": AddDrgRouteDistributionStatementDetailsActionAccept, +} + +var mappingAddDrgRouteDistributionStatementDetailsActionEnumLowerCase = map[string]AddDrgRouteDistributionStatementDetailsActionEnum{ + "accept": AddDrgRouteDistributionStatementDetailsActionAccept, +} + +// GetAddDrgRouteDistributionStatementDetailsActionEnumValues Enumerates the set of values for AddDrgRouteDistributionStatementDetailsActionEnum +func GetAddDrgRouteDistributionStatementDetailsActionEnumValues() []AddDrgRouteDistributionStatementDetailsActionEnum { + values := make([]AddDrgRouteDistributionStatementDetailsActionEnum, 0) + for _, v := range mappingAddDrgRouteDistributionStatementDetailsActionEnum { + values = append(values, v) + } + return values +} + +// GetAddDrgRouteDistributionStatementDetailsActionEnumStringValues Enumerates the set of values in String for AddDrgRouteDistributionStatementDetailsActionEnum +func GetAddDrgRouteDistributionStatementDetailsActionEnumStringValues() []string { + return []string{ + "ACCEPT", + } +} + +// GetMappingAddDrgRouteDistributionStatementDetailsActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAddDrgRouteDistributionStatementDetailsActionEnum(val string) (AddDrgRouteDistributionStatementDetailsActionEnum, bool) { + enum, ok := mappingAddDrgRouteDistributionStatementDetailsActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_distribution_statements_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_distribution_statements_details.go new file mode 100644 index 000000000..f159d2d29 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_distribution_statements_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddDrgRouteDistributionStatementsDetails Details request to add statements to a route distribution. +type AddDrgRouteDistributionStatementsDetails struct { + + // The collection of route distribution statements to insert into the route distribution. + Statements []AddDrgRouteDistributionStatementDetails `mandatory:"true" json:"statements"` +} + +func (m AddDrgRouteDistributionStatementsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddDrgRouteDistributionStatementsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_distribution_statements_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_distribution_statements_request_response.go new file mode 100644 index 000000000..674354ccb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_distribution_statements_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddDrgRouteDistributionStatementsRequest wrapper for the AddDrgRouteDistributionStatements operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddDrgRouteDistributionStatements.go.html to see an example of how to use AddDrgRouteDistributionStatementsRequest. +type AddDrgRouteDistributionStatementsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route distribution. + DrgRouteDistributionId *string `mandatory:"true" contributesTo:"path" name:"drgRouteDistributionId"` + + // Request with one or more route distribution statements to be inserted into the route distribution. + AddDrgRouteDistributionStatementsDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddDrgRouteDistributionStatementsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddDrgRouteDistributionStatementsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddDrgRouteDistributionStatementsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddDrgRouteDistributionStatementsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddDrgRouteDistributionStatementsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddDrgRouteDistributionStatementsResponse wrapper for the AddDrgRouteDistributionStatements operation +type AddDrgRouteDistributionStatementsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []DrgRouteDistributionStatement instance + Items []DrgRouteDistributionStatement `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AddDrgRouteDistributionStatementsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddDrgRouteDistributionStatementsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_rule_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_rule_details.go new file mode 100644 index 000000000..7ea1f2c46 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_rule_details.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddDrgRouteRuleDetails Details needed when adding a DRG route rule. +type AddDrgRouteRuleDetails struct { + + // Type of destination for the rule. + // Allowed values: + // * `CIDR_BLOCK`: If the rule's `destination` is an IP address range in CIDR notation. + DestinationType AddDrgRouteRuleDetailsDestinationTypeEnum `mandatory:"true" json:"destinationType"` + + // This is the range of IP addresses used for matching when routing + // traffic. Only CIDR_BLOCK values are allowed. + // Potential values: + // * IP address range in CIDR notation. This can be an IPv4 CIDR block or IPv6 prefix. For example: `192.168.1.0/24` + // or `2001:0db8:0123:45::/56`. + Destination *string `mandatory:"true" json:"destination"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the next hop DRG attachment. The next hop DRG attachment is responsible + // for reaching the network destination. + NextHopDrgAttachmentId *string `mandatory:"true" json:"nextHopDrgAttachmentId"` +} + +func (m AddDrgRouteRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddDrgRouteRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAddDrgRouteRuleDetailsDestinationTypeEnum(string(m.DestinationType)); !ok && m.DestinationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DestinationType: %s. Supported values are: %s.", m.DestinationType, strings.Join(GetAddDrgRouteRuleDetailsDestinationTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddDrgRouteRuleDetailsDestinationTypeEnum Enum with underlying type: string +type AddDrgRouteRuleDetailsDestinationTypeEnum string + +// Set of constants representing the allowable values for AddDrgRouteRuleDetailsDestinationTypeEnum +const ( + AddDrgRouteRuleDetailsDestinationTypeCidrBlock AddDrgRouteRuleDetailsDestinationTypeEnum = "CIDR_BLOCK" +) + +var mappingAddDrgRouteRuleDetailsDestinationTypeEnum = map[string]AddDrgRouteRuleDetailsDestinationTypeEnum{ + "CIDR_BLOCK": AddDrgRouteRuleDetailsDestinationTypeCidrBlock, +} + +var mappingAddDrgRouteRuleDetailsDestinationTypeEnumLowerCase = map[string]AddDrgRouteRuleDetailsDestinationTypeEnum{ + "cidr_block": AddDrgRouteRuleDetailsDestinationTypeCidrBlock, +} + +// GetAddDrgRouteRuleDetailsDestinationTypeEnumValues Enumerates the set of values for AddDrgRouteRuleDetailsDestinationTypeEnum +func GetAddDrgRouteRuleDetailsDestinationTypeEnumValues() []AddDrgRouteRuleDetailsDestinationTypeEnum { + values := make([]AddDrgRouteRuleDetailsDestinationTypeEnum, 0) + for _, v := range mappingAddDrgRouteRuleDetailsDestinationTypeEnum { + values = append(values, v) + } + return values +} + +// GetAddDrgRouteRuleDetailsDestinationTypeEnumStringValues Enumerates the set of values in String for AddDrgRouteRuleDetailsDestinationTypeEnum +func GetAddDrgRouteRuleDetailsDestinationTypeEnumStringValues() []string { + return []string{ + "CIDR_BLOCK", + } +} + +// GetMappingAddDrgRouteRuleDetailsDestinationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAddDrgRouteRuleDetailsDestinationTypeEnum(val string) (AddDrgRouteRuleDetailsDestinationTypeEnum, bool) { + enum, ok := mappingAddDrgRouteRuleDetailsDestinationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_rules_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_rules_details.go new file mode 100644 index 000000000..4574fe40c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_rules_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddDrgRouteRulesDetails Details used in a request to add static routes to a DRG route table. +type AddDrgRouteRulesDetails struct { + + // The collection of static rules used to insert routes into the DRG route table. + RouteRules []AddDrgRouteRuleDetails `mandatory:"false" json:"routeRules"` +} + +func (m AddDrgRouteRulesDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddDrgRouteRulesDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_rules_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_rules_request_response.go new file mode 100644 index 000000000..622195bf0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_drg_route_rules_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddDrgRouteRulesRequest wrapper for the AddDrgRouteRules operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddDrgRouteRules.go.html to see an example of how to use AddDrgRouteRulesRequest. +type AddDrgRouteRulesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table. + DrgRouteTableId *string `mandatory:"true" contributesTo:"path" name:"drgRouteTableId"` + + // Request for one or more route rules to be inserted into the DRG route table. + AddDrgRouteRulesDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddDrgRouteRulesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddDrgRouteRulesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddDrgRouteRulesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddDrgRouteRulesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddDrgRouteRulesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddDrgRouteRulesResponse wrapper for the AddDrgRouteRules operation +type AddDrgRouteRulesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []DrgRouteRule instance + Items []DrgRouteRule `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AddDrgRouteRulesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddDrgRouteRulesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_image_shape_compatibility_entry_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_image_shape_compatibility_entry_details.go new file mode 100644 index 000000000..34843cf17 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_image_shape_compatibility_entry_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddImageShapeCompatibilityEntryDetails Image shape compatibility details. +type AddImageShapeCompatibilityEntryDetails struct { + MemoryConstraints *ImageMemoryConstraints `mandatory:"false" json:"memoryConstraints"` + + OcpuConstraints *ImageOcpuConstraints `mandatory:"false" json:"ocpuConstraints"` +} + +func (m AddImageShapeCompatibilityEntryDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddImageShapeCompatibilityEntryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_image_shape_compatibility_entry_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_image_shape_compatibility_entry_request_response.go new file mode 100644 index 000000000..f8e079c3b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_image_shape_compatibility_entry_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddImageShapeCompatibilityEntryRequest wrapper for the AddImageShapeCompatibilityEntry operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddImageShapeCompatibilityEntry.go.html to see an example of how to use AddImageShapeCompatibilityEntryRequest. +type AddImageShapeCompatibilityEntryRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. + ImageId *string `mandatory:"true" contributesTo:"path" name:"imageId"` + + // Shape name. + ShapeName *string `mandatory:"true" contributesTo:"path" name:"shapeName"` + + // Image shape compatibility details + AddImageShapeCompatibilityEntryDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddImageShapeCompatibilityEntryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddImageShapeCompatibilityEntryRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddImageShapeCompatibilityEntryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddImageShapeCompatibilityEntryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddImageShapeCompatibilityEntryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddImageShapeCompatibilityEntryResponse wrapper for the AddImageShapeCompatibilityEntry operation +type AddImageShapeCompatibilityEntryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ImageShapeCompatibilityEntry instance + ImageShapeCompatibilityEntry `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AddImageShapeCompatibilityEntryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddImageShapeCompatibilityEntryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv4_subnet_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv4_subnet_cidr_details.go new file mode 100644 index 000000000..10b45de1e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv4_subnet_cidr_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddIpv4SubnetCidrDetails Details used when adding an IPv4 prefix to a subnet. +type AddIpv4SubnetCidrDetails struct { + + // The CIDR IP address range of the subnet. The CIDR must maintain the following rules - + // a. The CIDR block is valid and correctly formatted. + // b. The new range is within one of the parent VCN ranges. + // Example: `10.0.1.0/24` + Ipv4CidrBlock *string `mandatory:"true" json:"ipv4CidrBlock"` +} + +func (m AddIpv4SubnetCidrDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddIpv4SubnetCidrDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv4_subnet_cidr_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv4_subnet_cidr_request_response.go new file mode 100644 index 000000000..8725fbc29 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv4_subnet_cidr_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddIpv4SubnetCidrRequest wrapper for the AddIpv4SubnetCidr operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddIpv4SubnetCidr.go.html to see an example of how to use AddIpv4SubnetCidrRequest. +type AddIpv4SubnetCidrRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // Details object for adding an IPv4 prefix to a subnet. + AddIpv4SubnetCidrDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddIpv4SubnetCidrRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddIpv4SubnetCidrRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddIpv4SubnetCidrRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddIpv4SubnetCidrRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddIpv4SubnetCidrRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddIpv4SubnetCidrResponse wrapper for the AddIpv4SubnetCidr operation +type AddIpv4SubnetCidrResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response AddIpv4SubnetCidrResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddIpv4SubnetCidrResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv6_subnet_cidr_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv6_subnet_cidr_request_response.go new file mode 100644 index 000000000..89ff82969 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv6_subnet_cidr_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddIpv6SubnetCidrRequest wrapper for the AddIpv6SubnetCidr operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddIpv6SubnetCidr.go.html to see an example of how to use AddIpv6SubnetCidrRequest. +type AddIpv6SubnetCidrRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // Details object for adding an IPv6 prefix to a subnet. + AddSubnetIpv6CidrDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddIpv6SubnetCidrRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddIpv6SubnetCidrRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddIpv6SubnetCidrRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddIpv6SubnetCidrRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddIpv6SubnetCidrRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddIpv6SubnetCidrResponse wrapper for the AddIpv6SubnetCidr operation +type AddIpv6SubnetCidrResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response AddIpv6SubnetCidrResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddIpv6SubnetCidrResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv6_vcn_cidr_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv6_vcn_cidr_request_response.go new file mode 100644 index 000000000..3e79648b2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_ipv6_vcn_cidr_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddIpv6VcnCidrRequest wrapper for the AddIpv6VcnCidr operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddIpv6VcnCidr.go.html to see an example of how to use AddIpv6VcnCidrRequest. +type AddIpv6VcnCidrRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Details object for adding an IPv6 VCN CIDR. + AddVcnIpv6CidrDetails `contributesTo:"body"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddIpv6VcnCidrRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddIpv6VcnCidrRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddIpv6VcnCidrRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddIpv6VcnCidrRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddIpv6VcnCidrRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddIpv6VcnCidrResponse wrapper for the AddIpv6VcnCidr operation +type AddIpv6VcnCidrResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response AddIpv6VcnCidrResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddIpv6VcnCidrResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_network_security_group_security_rules_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_network_security_group_security_rules_details.go new file mode 100644 index 000000000..bf1312f5f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_network_security_group_security_rules_details.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddNetworkSecurityGroupSecurityRulesDetails The representation of AddNetworkSecurityGroupSecurityRulesDetails +type AddNetworkSecurityGroupSecurityRulesDetails struct { + + // An array of security rules to add to the NSG. You can add up to 25 rules in a single + // `AddNetworkSecurityGroupSecurityRules` operation. + // Adding more than 25 rules requires multiple operations. + SecurityRules []AddSecurityRuleDetails `mandatory:"false" json:"securityRules"` +} + +func (m AddNetworkSecurityGroupSecurityRulesDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddNetworkSecurityGroupSecurityRulesDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_network_security_group_security_rules_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_network_security_group_security_rules_request_response.go new file mode 100644 index 000000000..bee05cc5d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_network_security_group_security_rules_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddNetworkSecurityGroupSecurityRulesRequest wrapper for the AddNetworkSecurityGroupSecurityRules operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddNetworkSecurityGroupSecurityRules.go.html to see an example of how to use AddNetworkSecurityGroupSecurityRulesRequest. +type AddNetworkSecurityGroupSecurityRulesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security group. + NetworkSecurityGroupId *string `mandatory:"true" contributesTo:"path" name:"networkSecurityGroupId"` + + // Request with one or more security rules to be associated with the network security group. + AddNetworkSecurityGroupSecurityRulesDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddNetworkSecurityGroupSecurityRulesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddNetworkSecurityGroupSecurityRulesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddNetworkSecurityGroupSecurityRulesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddNetworkSecurityGroupSecurityRulesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddNetworkSecurityGroupSecurityRulesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddNetworkSecurityGroupSecurityRulesResponse wrapper for the AddNetworkSecurityGroupSecurityRules operation +type AddNetworkSecurityGroupSecurityRulesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The AddedNetworkSecurityGroupSecurityRules instance + AddedNetworkSecurityGroupSecurityRules `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AddNetworkSecurityGroupSecurityRulesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddNetworkSecurityGroupSecurityRulesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_public_ip_pool_capacity_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_public_ip_pool_capacity_details.go new file mode 100644 index 000000000..6e0e1b421 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_public_ip_pool_capacity_details.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddPublicIpPoolCapacityDetails The information used to add capacity to an IP pool. +type AddPublicIpPoolCapacityDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource to which the CIDR block belongs. + ByoipRangeId *string `mandatory:"true" json:"byoipRangeId"` + + // The CIDR block to add to the public IP pool. It could be all of the CIDR block identified in `byoipRangeId`, or a subrange. + // Example: `10.0.1.0/24` + CidrBlock *string `mandatory:"true" json:"cidrBlock"` +} + +func (m AddPublicIpPoolCapacityDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddPublicIpPoolCapacityDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_public_ip_pool_capacity_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_public_ip_pool_capacity_request_response.go new file mode 100644 index 000000000..aba98c5b0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_public_ip_pool_capacity_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddPublicIpPoolCapacityRequest wrapper for the AddPublicIpPoolCapacity operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddPublicIpPoolCapacity.go.html to see an example of how to use AddPublicIpPoolCapacityRequest. +type AddPublicIpPoolCapacityRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP pool. + PublicIpPoolId *string `mandatory:"true" contributesTo:"path" name:"publicIpPoolId"` + + // Byoip Range prefix and a cidr from it + AddPublicIpPoolCapacityDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddPublicIpPoolCapacityRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddPublicIpPoolCapacityRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddPublicIpPoolCapacityRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddPublicIpPoolCapacityRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddPublicIpPoolCapacityRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddPublicIpPoolCapacityResponse wrapper for the AddPublicIpPoolCapacity operation +type AddPublicIpPoolCapacityResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIpPool instance + PublicIpPool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AddPublicIpPoolCapacityResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddPublicIpPoolCapacityResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_security_rule_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_security_rule_details.go new file mode 100644 index 000000000..e444ea3b3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_security_rule_details.go @@ -0,0 +1,258 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddSecurityRuleDetails A rule for allowing inbound (INGRESS) or outbound (EGRESS) IP packets. +type AddSecurityRuleDetails struct { + + // Direction of the security rule. Set to `EGRESS` for rules to allow outbound IP packets, + // or `INGRESS` for rules to allow inbound IP packets. + Direction AddSecurityRuleDetailsDirectionEnum `mandatory:"true" json:"direction"` + + // The transport protocol. Specify either `all` or an IPv4 protocol number as + // defined in + // Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). + // Options are supported only for ICMP ("1"), TCP ("6"), UDP ("17"), and ICMPv6 ("58"). + Protocol *string `mandatory:"true" json:"protocol"` + + // An optional description of your choice for the rule. Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Conceptually, this is the range of IP addresses that a packet originating from the instance + // can go to. + // Allowed values: + // * An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + // IPv6 addressing is supported for all commercial and government regions. See + // IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // * The `cidrBlock` value for a Service, if you're + // setting up a security rule for traffic destined for a particular `Service` through + // a service gateway. For example: `oci-phx-objectstorage`. + // * The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a NetworkSecurityGroup in the same + // VCN. The value can be the NSG that the rule belongs to if the rule's intent is to control + // traffic between VNICs in the same NSG. + Destination *string `mandatory:"false" json:"destination"` + + // Type of destination for the rule. Required if `direction` = `EGRESS`. + // Allowed values: + // * `CIDR_BLOCK`: If the rule's `destination` is an IP address range in CIDR notation. + // * `SERVICE_CIDR_BLOCK`: If the rule's `destination` is the `cidrBlock` value for a + // Service (the rule is for traffic destined for a + // particular `Service` through a service gateway). + // * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a + // NetworkSecurityGroup. + DestinationType AddSecurityRuleDetailsDestinationTypeEnum `mandatory:"false" json:"destinationType,omitempty"` + + IcmpOptions *IcmpOptions `mandatory:"false" json:"icmpOptions"` + + // A stateless rule allows traffic in one direction. Remember to add a corresponding + // stateless rule in the other direction if you need to support bidirectional traffic. For + // example, if egress traffic allows TCP destination port 80, there should be an ingress + // rule to allow TCP source port 80. Defaults to false, which means the rule is stateful + // and a corresponding rule is not necessary for bidirectional traffic. + IsStateless *bool `mandatory:"false" json:"isStateless"` + + // Conceptually, this is the range of IP addresses that a packet coming into the instance + // can come from. + // Allowed values: + // * An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + // IPv6 addressing is supported for all commercial and government regions. See + // IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // * The `cidrBlock` value for a Service, if you're + // setting up a security rule for traffic coming from a particular `Service` through + // a service gateway. For example: `oci-phx-objectstorage`. + // * The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a NetworkSecurityGroup in the same + // VCN. The value can be the NSG that the rule belongs to if the rule's intent is to control + // traffic between VNICs in the same NSG. + Source *string `mandatory:"false" json:"source"` + + // Type of source for the rule. Required if `direction` = `INGRESS`. + // * `CIDR_BLOCK`: If the rule's `source` is an IP address range in CIDR notation. + // * `SERVICE_CIDR_BLOCK`: If the rule's `source` is the `cidrBlock` value for a + // Service (the rule is for traffic coming from a + // particular `Service` through a service gateway). + // * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a + // NetworkSecurityGroup. + SourceType AddSecurityRuleDetailsSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` + + TcpOptions *TcpOptions `mandatory:"false" json:"tcpOptions"` + + UdpOptions *UdpOptions `mandatory:"false" json:"udpOptions"` +} + +func (m AddSecurityRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddSecurityRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAddSecurityRuleDetailsDirectionEnum(string(m.Direction)); !ok && m.Direction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Direction: %s. Supported values are: %s.", m.Direction, strings.Join(GetAddSecurityRuleDetailsDirectionEnumStringValues(), ","))) + } + + if _, ok := GetMappingAddSecurityRuleDetailsDestinationTypeEnum(string(m.DestinationType)); !ok && m.DestinationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DestinationType: %s. Supported values are: %s.", m.DestinationType, strings.Join(GetAddSecurityRuleDetailsDestinationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingAddSecurityRuleDetailsSourceTypeEnum(string(m.SourceType)); !ok && m.SourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceType: %s. Supported values are: %s.", m.SourceType, strings.Join(GetAddSecurityRuleDetailsSourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddSecurityRuleDetailsDestinationTypeEnum Enum with underlying type: string +type AddSecurityRuleDetailsDestinationTypeEnum string + +// Set of constants representing the allowable values for AddSecurityRuleDetailsDestinationTypeEnum +const ( + AddSecurityRuleDetailsDestinationTypeCidrBlock AddSecurityRuleDetailsDestinationTypeEnum = "CIDR_BLOCK" + AddSecurityRuleDetailsDestinationTypeServiceCidrBlock AddSecurityRuleDetailsDestinationTypeEnum = "SERVICE_CIDR_BLOCK" + AddSecurityRuleDetailsDestinationTypeNetworkSecurityGroup AddSecurityRuleDetailsDestinationTypeEnum = "NETWORK_SECURITY_GROUP" +) + +var mappingAddSecurityRuleDetailsDestinationTypeEnum = map[string]AddSecurityRuleDetailsDestinationTypeEnum{ + "CIDR_BLOCK": AddSecurityRuleDetailsDestinationTypeCidrBlock, + "SERVICE_CIDR_BLOCK": AddSecurityRuleDetailsDestinationTypeServiceCidrBlock, + "NETWORK_SECURITY_GROUP": AddSecurityRuleDetailsDestinationTypeNetworkSecurityGroup, +} + +var mappingAddSecurityRuleDetailsDestinationTypeEnumLowerCase = map[string]AddSecurityRuleDetailsDestinationTypeEnum{ + "cidr_block": AddSecurityRuleDetailsDestinationTypeCidrBlock, + "service_cidr_block": AddSecurityRuleDetailsDestinationTypeServiceCidrBlock, + "network_security_group": AddSecurityRuleDetailsDestinationTypeNetworkSecurityGroup, +} + +// GetAddSecurityRuleDetailsDestinationTypeEnumValues Enumerates the set of values for AddSecurityRuleDetailsDestinationTypeEnum +func GetAddSecurityRuleDetailsDestinationTypeEnumValues() []AddSecurityRuleDetailsDestinationTypeEnum { + values := make([]AddSecurityRuleDetailsDestinationTypeEnum, 0) + for _, v := range mappingAddSecurityRuleDetailsDestinationTypeEnum { + values = append(values, v) + } + return values +} + +// GetAddSecurityRuleDetailsDestinationTypeEnumStringValues Enumerates the set of values in String for AddSecurityRuleDetailsDestinationTypeEnum +func GetAddSecurityRuleDetailsDestinationTypeEnumStringValues() []string { + return []string{ + "CIDR_BLOCK", + "SERVICE_CIDR_BLOCK", + "NETWORK_SECURITY_GROUP", + } +} + +// GetMappingAddSecurityRuleDetailsDestinationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAddSecurityRuleDetailsDestinationTypeEnum(val string) (AddSecurityRuleDetailsDestinationTypeEnum, bool) { + enum, ok := mappingAddSecurityRuleDetailsDestinationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// AddSecurityRuleDetailsDirectionEnum Enum with underlying type: string +type AddSecurityRuleDetailsDirectionEnum string + +// Set of constants representing the allowable values for AddSecurityRuleDetailsDirectionEnum +const ( + AddSecurityRuleDetailsDirectionEgress AddSecurityRuleDetailsDirectionEnum = "EGRESS" + AddSecurityRuleDetailsDirectionIngress AddSecurityRuleDetailsDirectionEnum = "INGRESS" +) + +var mappingAddSecurityRuleDetailsDirectionEnum = map[string]AddSecurityRuleDetailsDirectionEnum{ + "EGRESS": AddSecurityRuleDetailsDirectionEgress, + "INGRESS": AddSecurityRuleDetailsDirectionIngress, +} + +var mappingAddSecurityRuleDetailsDirectionEnumLowerCase = map[string]AddSecurityRuleDetailsDirectionEnum{ + "egress": AddSecurityRuleDetailsDirectionEgress, + "ingress": AddSecurityRuleDetailsDirectionIngress, +} + +// GetAddSecurityRuleDetailsDirectionEnumValues Enumerates the set of values for AddSecurityRuleDetailsDirectionEnum +func GetAddSecurityRuleDetailsDirectionEnumValues() []AddSecurityRuleDetailsDirectionEnum { + values := make([]AddSecurityRuleDetailsDirectionEnum, 0) + for _, v := range mappingAddSecurityRuleDetailsDirectionEnum { + values = append(values, v) + } + return values +} + +// GetAddSecurityRuleDetailsDirectionEnumStringValues Enumerates the set of values in String for AddSecurityRuleDetailsDirectionEnum +func GetAddSecurityRuleDetailsDirectionEnumStringValues() []string { + return []string{ + "EGRESS", + "INGRESS", + } +} + +// GetMappingAddSecurityRuleDetailsDirectionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAddSecurityRuleDetailsDirectionEnum(val string) (AddSecurityRuleDetailsDirectionEnum, bool) { + enum, ok := mappingAddSecurityRuleDetailsDirectionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// AddSecurityRuleDetailsSourceTypeEnum Enum with underlying type: string +type AddSecurityRuleDetailsSourceTypeEnum string + +// Set of constants representing the allowable values for AddSecurityRuleDetailsSourceTypeEnum +const ( + AddSecurityRuleDetailsSourceTypeCidrBlock AddSecurityRuleDetailsSourceTypeEnum = "CIDR_BLOCK" + AddSecurityRuleDetailsSourceTypeServiceCidrBlock AddSecurityRuleDetailsSourceTypeEnum = "SERVICE_CIDR_BLOCK" + AddSecurityRuleDetailsSourceTypeNetworkSecurityGroup AddSecurityRuleDetailsSourceTypeEnum = "NETWORK_SECURITY_GROUP" +) + +var mappingAddSecurityRuleDetailsSourceTypeEnum = map[string]AddSecurityRuleDetailsSourceTypeEnum{ + "CIDR_BLOCK": AddSecurityRuleDetailsSourceTypeCidrBlock, + "SERVICE_CIDR_BLOCK": AddSecurityRuleDetailsSourceTypeServiceCidrBlock, + "NETWORK_SECURITY_GROUP": AddSecurityRuleDetailsSourceTypeNetworkSecurityGroup, +} + +var mappingAddSecurityRuleDetailsSourceTypeEnumLowerCase = map[string]AddSecurityRuleDetailsSourceTypeEnum{ + "cidr_block": AddSecurityRuleDetailsSourceTypeCidrBlock, + "service_cidr_block": AddSecurityRuleDetailsSourceTypeServiceCidrBlock, + "network_security_group": AddSecurityRuleDetailsSourceTypeNetworkSecurityGroup, +} + +// GetAddSecurityRuleDetailsSourceTypeEnumValues Enumerates the set of values for AddSecurityRuleDetailsSourceTypeEnum +func GetAddSecurityRuleDetailsSourceTypeEnumValues() []AddSecurityRuleDetailsSourceTypeEnum { + values := make([]AddSecurityRuleDetailsSourceTypeEnum, 0) + for _, v := range mappingAddSecurityRuleDetailsSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetAddSecurityRuleDetailsSourceTypeEnumStringValues Enumerates the set of values in String for AddSecurityRuleDetailsSourceTypeEnum +func GetAddSecurityRuleDetailsSourceTypeEnumStringValues() []string { + return []string{ + "CIDR_BLOCK", + "SERVICE_CIDR_BLOCK", + "NETWORK_SECURITY_GROUP", + } +} + +// GetMappingAddSecurityRuleDetailsSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAddSecurityRuleDetailsSourceTypeEnum(val string) (AddSecurityRuleDetailsSourceTypeEnum, bool) { + enum, ok := mappingAddSecurityRuleDetailsSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_subnet_ipv6_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_subnet_ipv6_cidr_details.go new file mode 100644 index 000000000..baca91110 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_subnet_ipv6_cidr_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddSubnetIpv6CidrDetails Details used when adding an IPv6 prefix to a subnet. +type AddSubnetIpv6CidrDetails struct { + + // This field is not required and should only be specified when adding an IPv6 prefix + // to a subnet's IPv6 address space. + // SeeIPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // Example: `2001:0db8:0123::/64` + Ipv6CidrBlock *string `mandatory:"true" json:"ipv6CidrBlock"` +} + +func (m AddSubnetIpv6CidrDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddSubnetIpv6CidrDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_vcn_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_vcn_cidr_details.go new file mode 100644 index 000000000..94c701512 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_vcn_cidr_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddVcnCidrDetails Details used to add a CIDR block to a VCN. +type AddVcnCidrDetails struct { + + // The CIDR block to add. + CidrBlock *string `mandatory:"true" json:"cidrBlock"` +} + +func (m AddVcnCidrDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddVcnCidrDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_vcn_cidr_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_vcn_cidr_request_response.go new file mode 100644 index 000000000..c69425f9d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_vcn_cidr_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddVcnCidrRequest wrapper for the AddVcnCidr operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddVcnCidr.go.html to see an example of how to use AddVcnCidrRequest. +type AddVcnCidrRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` + + // Details object for deleting a VCN CIDR. + AddVcnCidrDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddVcnCidrRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddVcnCidrRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddVcnCidrRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddVcnCidrRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddVcnCidrRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddVcnCidrResponse wrapper for the AddVcnCidr operation +type AddVcnCidrResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response AddVcnCidrResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddVcnCidrResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/add_vcn_ipv6_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_vcn_ipv6_cidr_details.go new file mode 100644 index 000000000..cc99f4541 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/add_vcn_ipv6_cidr_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddVcnIpv6CidrDetails Details used when adding a ULA or private IPv6 prefix or an IPv6 GUA assigned by Oracle or a BYOIPv6 prefix. You can add only one of these per request. +type AddVcnIpv6CidrDetails struct { + + // This field is not required and should only be specified if a ULA or private IPv6 prefix is desired for VCN's private IP address space. + // SeeIPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // Example: `2001:0db8:0123::/48` or `fd00:1000:0:1::/64` + Ipv6PrivateCidrBlock *string `mandatory:"false" json:"ipv6PrivateCidrBlock"` + + // Indicates whether Oracle will allocate an IPv6 GUA. Only one prefix of /56 size can be allocated by Oracle as a GUA. + IsOracleGuaAllocationEnabled *bool `mandatory:"false" json:"isOracleGuaAllocationEnabled"` + + Byoipv6CidrDetail *Byoipv6CidrDetails `mandatory:"false" json:"byoipv6CidrDetail"` +} + +func (m AddVcnIpv6CidrDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddVcnIpv6CidrDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/added_network_security_group_security_rules.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/added_network_security_group_security_rules.go new file mode 100644 index 000000000..0d95591e0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/added_network_security_group_security_rules.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddedNetworkSecurityGroupSecurityRules The representation of AddedNetworkSecurityGroupSecurityRules +type AddedNetworkSecurityGroupSecurityRules struct { + + // The NSG security rules that were added. + SecurityRules []SecurityRule `mandatory:"false" json:"securityRules"` +} + +func (m AddedNetworkSecurityGroupSecurityRules) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddedNetworkSecurityGroupSecurityRules) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/address_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/address_type.go new file mode 100644 index 000000000..d2831844d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/address_type.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "strings" +) + +// AddressTypeEnum Enum with underlying type: string +type AddressTypeEnum string + +// Set of constants representing the allowable values for AddressTypeEnum +const ( + AddressTypePrivateIPv4 AddressTypeEnum = "Private_IPv4" + AddressTypeOracleAllocatedPublicIPv4 AddressTypeEnum = "Oracle_Allocated_Public_IPv4" + AddressTypeByoipIPv4 AddressTypeEnum = "BYOIP_IPv4" + AddressTypeUlaIPv6 AddressTypeEnum = "ULA_IPv6" + AddressTypeOracleAllocatedGuaIPv6 AddressTypeEnum = "Oracle_Allocated_GUA_IPv6" + AddressTypeByoipIPv6 AddressTypeEnum = "BYOIP_IPv6" +) + +var mappingAddressTypeEnum = map[string]AddressTypeEnum{ + "Private_IPv4": AddressTypePrivateIPv4, + "Oracle_Allocated_Public_IPv4": AddressTypeOracleAllocatedPublicIPv4, + "BYOIP_IPv4": AddressTypeByoipIPv4, + "ULA_IPv6": AddressTypeUlaIPv6, + "Oracle_Allocated_GUA_IPv6": AddressTypeOracleAllocatedGuaIPv6, + "BYOIP_IPv6": AddressTypeByoipIPv6, +} + +var mappingAddressTypeEnumLowerCase = map[string]AddressTypeEnum{ + "private_ipv4": AddressTypePrivateIPv4, + "oracle_allocated_public_ipv4": AddressTypeOracleAllocatedPublicIPv4, + "byoip_ipv4": AddressTypeByoipIPv4, + "ula_ipv6": AddressTypeUlaIPv6, + "oracle_allocated_gua_ipv6": AddressTypeOracleAllocatedGuaIPv6, + "byoip_ipv6": AddressTypeByoipIPv6, +} + +// GetAddressTypeEnumValues Enumerates the set of values for AddressTypeEnum +func GetAddressTypeEnumValues() []AddressTypeEnum { + values := make([]AddressTypeEnum, 0) + for _, v := range mappingAddressTypeEnum { + values = append(values, v) + } + return values +} + +// GetAddressTypeEnumStringValues Enumerates the set of values in String for AddressTypeEnum +func GetAddressTypeEnumStringValues() []string { + return []string{ + "Private_IPv4", + "Oracle_Allocated_Public_IPv4", + "BYOIP_IPv4", + "ULA_IPv6", + "Oracle_Allocated_GUA_IPv6", + "BYOIP_IPv6", + } +} + +// GetMappingAddressTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAddressTypeEnum(val string) (AddressTypeEnum, bool) { + enum, ok := mappingAddressTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/advertise_byoip_range_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/advertise_byoip_range_request_response.go new file mode 100644 index 000000000..352fbd72c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/advertise_byoip_range_request_response.go @@ -0,0 +1,88 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AdvertiseByoipRangeRequest wrapper for the AdvertiseByoipRange operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AdvertiseByoipRange.go.html to see an example of how to use AdvertiseByoipRangeRequest. +type AdvertiseByoipRangeRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource containing the BYOIP CIDR block. + ByoipRangeId *string `mandatory:"true" contributesTo:"path" name:"byoipRangeId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AdvertiseByoipRangeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AdvertiseByoipRangeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AdvertiseByoipRangeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AdvertiseByoipRangeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AdvertiseByoipRangeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AdvertiseByoipRangeResponse wrapper for the AdvertiseByoipRange operation +type AdvertiseByoipRangeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AdvertiseByoipRangeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AdvertiseByoipRangeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/allowed_ike_ip_sec_parameters.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/allowed_ike_ip_sec_parameters.go new file mode 100644 index 000000000..a1bcbfa1f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/allowed_ike_ip_sec_parameters.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AllowedIkeIpSecParameters Lists the current allowed and default IPSec tunnel parameters. +type AllowedIkeIpSecParameters struct { + AllowedPhaseOneParameters *AllowedPhaseOneParameters `mandatory:"true" json:"allowedPhaseOneParameters"` + + AllowedPhaseTwoParameters *AllowedPhaseTwoParameters `mandatory:"true" json:"allowedPhaseTwoParameters"` + + DefaultPhaseOneParameters *DefaultPhaseOneParameters `mandatory:"true" json:"defaultPhaseOneParameters"` + + DefaultPhaseTwoParameters *DefaultPhaseTwoParameters `mandatory:"true" json:"defaultPhaseTwoParameters"` +} + +func (m AllowedIkeIpSecParameters) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AllowedIkeIpSecParameters) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/allowed_phase_one_parameters.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/allowed_phase_one_parameters.go new file mode 100644 index 000000000..7a17dd654 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/allowed_phase_one_parameters.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AllowedPhaseOneParameters Allowed phase one parameters. +type AllowedPhaseOneParameters struct { + + // Allowed phase one encryption algorithms. + EncryptionAlgorithms []string `mandatory:"false" json:"encryptionAlgorithms"` + + // Allowed phase one authentication algorithms. + AuthenticationAlgorithms []string `mandatory:"false" json:"authenticationAlgorithms"` + + // Allowed phase one Diffie-Hellman groups. + DhGroups []string `mandatory:"false" json:"dhGroups"` +} + +func (m AllowedPhaseOneParameters) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AllowedPhaseOneParameters) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/allowed_phase_two_parameters.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/allowed_phase_two_parameters.go new file mode 100644 index 000000000..a674b9015 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/allowed_phase_two_parameters.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AllowedPhaseTwoParameters Allowed phase two parameters. +type AllowedPhaseTwoParameters struct { + + // Allowed phase two encryption algorithms. + EncryptionAlgorithms []string `mandatory:"false" json:"encryptionAlgorithms"` + + // Allowed phase two authentication algorithms. + AuthenticationAlgorithms []string `mandatory:"false" json:"authenticationAlgorithms"` + + // Allowed perfect forward secrecy Diffie-Hellman groups. + PfsDhGroups []string `mandatory:"false" json:"pfsDhGroups"` +} + +func (m AllowedPhaseTwoParameters) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AllowedPhaseTwoParameters) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_gpu_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_gpu_launch_instance_platform_config.go new file mode 100644 index 000000000..34c1e893b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_gpu_launch_instance_platform_config.go @@ -0,0 +1,172 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AmdMilanBmGpuLaunchInstancePlatformConfig The platform configuration used when launching a bare metal GPU instance with the following shape: BM.GPU.GM4.8 (also +// named BM.GPU.A100-v2.8) (the AMD Milan platform). +type AmdMilanBmGpuLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m AmdMilanBmGpuLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m AmdMilanBmGpuLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m AmdMilanBmGpuLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m AmdMilanBmGpuLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m AmdMilanBmGpuLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AmdMilanBmGpuLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AmdMilanBmGpuLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAmdMilanBmGpuLaunchInstancePlatformConfig AmdMilanBmGpuLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAmdMilanBmGpuLaunchInstancePlatformConfig + }{ + "AMD_MILAN_BM_GPU", + (MarshalTypeAmdMilanBmGpuLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps0 AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS0" + AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps1 AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps2 AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" + AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps4 AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS4" + AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps6 AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS0": AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "NPS1": AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "NPS4": AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "NPS6": AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +var mappingAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps0": AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "nps1": AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "nps4": AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "nps6": AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +// GetAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_gpu_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_gpu_platform_config.go new file mode 100644 index 000000000..a3173fab7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_gpu_platform_config.go @@ -0,0 +1,172 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AmdMilanBmGpuPlatformConfig The platform configuration used when launching a bare metal GPU instance with the following shape: BM.GPU.GM4.8 (also +// named BM.GPU.A100-v2.8) (the AMD Milan platform). +type AmdMilanBmGpuPlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m AmdMilanBmGpuPlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m AmdMilanBmGpuPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m AmdMilanBmGpuPlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m AmdMilanBmGpuPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m AmdMilanBmGpuPlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AmdMilanBmGpuPlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetAmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AmdMilanBmGpuPlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAmdMilanBmGpuPlatformConfig AmdMilanBmGpuPlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAmdMilanBmGpuPlatformConfig + }{ + "AMD_MILAN_BM_GPU", + (MarshalTypeAmdMilanBmGpuPlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum +const ( + AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps0 AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum = "NPS0" + AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps1 AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum = "NPS1" + AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps2 AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum = "NPS2" + AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps4 AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum = "NPS4" + AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps6 AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingAmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum = map[string]AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum{ + "NPS0": AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps0, + "NPS1": AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps1, + "NPS2": AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps2, + "NPS4": AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps4, + "NPS6": AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps6, +} + +var mappingAmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum{ + "nps0": AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps0, + "nps1": AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps1, + "nps2": AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps2, + "nps4": AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps4, + "nps6": AmdMilanBmGpuPlatformConfigNumaNodesPerSocketNps6, +} + +// GetAmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum +func GetAmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnumValues() []AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum { + values := make([]AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingAmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetAmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum +func GetAmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingAmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum(val string) (AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingAmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_launch_instance_platform_config.go new file mode 100644 index 000000000..0ca52ec09 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_launch_instance_platform_config.go @@ -0,0 +1,180 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AmdMilanBmLaunchInstancePlatformConfig The platform configuration used when launching a bare metal instance with one of the following shapes: BM.Standard.E4.128 +// or BM.DenseIO.E4.128 (the AMD Milan platform). +type AmdMilanBmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m AmdMilanBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m AmdMilanBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m AmdMilanBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m AmdMilanBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m AmdMilanBmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AmdMilanBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AmdMilanBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAmdMilanBmLaunchInstancePlatformConfig AmdMilanBmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAmdMilanBmLaunchInstancePlatformConfig + }{ + "AMD_MILAN_BM", + (MarshalTypeAmdMilanBmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0 AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS0" + AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" + AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4 AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS4" + AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6 AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS0": AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "NPS1": AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "NPS4": AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "NPS6": AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +var mappingAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps0": AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "nps1": AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "nps4": AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "nps6": AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +// GetAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_platform_config.go new file mode 100644 index 000000000..4c8d1d831 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_milan_bm_platform_config.go @@ -0,0 +1,180 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AmdMilanBmPlatformConfig The platform configuration used when launching a bare metal instance with one of the following shapes: BM.Standard.E4.128 +// or BM.DenseIO.E4.128 (the AMD Milan platform). +type AmdMilanBmPlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket AmdMilanBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m AmdMilanBmPlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m AmdMilanBmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m AmdMilanBmPlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m AmdMilanBmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m AmdMilanBmPlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AmdMilanBmPlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAmdMilanBmPlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetAmdMilanBmPlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AmdMilanBmPlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAmdMilanBmPlatformConfig AmdMilanBmPlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAmdMilanBmPlatformConfig + }{ + "AMD_MILAN_BM", + (MarshalTypeAmdMilanBmPlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// AmdMilanBmPlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type AmdMilanBmPlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for AmdMilanBmPlatformConfigNumaNodesPerSocketEnum +const ( + AmdMilanBmPlatformConfigNumaNodesPerSocketNps0 AmdMilanBmPlatformConfigNumaNodesPerSocketEnum = "NPS0" + AmdMilanBmPlatformConfigNumaNodesPerSocketNps1 AmdMilanBmPlatformConfigNumaNodesPerSocketEnum = "NPS1" + AmdMilanBmPlatformConfigNumaNodesPerSocketNps2 AmdMilanBmPlatformConfigNumaNodesPerSocketEnum = "NPS2" + AmdMilanBmPlatformConfigNumaNodesPerSocketNps4 AmdMilanBmPlatformConfigNumaNodesPerSocketEnum = "NPS4" + AmdMilanBmPlatformConfigNumaNodesPerSocketNps6 AmdMilanBmPlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingAmdMilanBmPlatformConfigNumaNodesPerSocketEnum = map[string]AmdMilanBmPlatformConfigNumaNodesPerSocketEnum{ + "NPS0": AmdMilanBmPlatformConfigNumaNodesPerSocketNps0, + "NPS1": AmdMilanBmPlatformConfigNumaNodesPerSocketNps1, + "NPS2": AmdMilanBmPlatformConfigNumaNodesPerSocketNps2, + "NPS4": AmdMilanBmPlatformConfigNumaNodesPerSocketNps4, + "NPS6": AmdMilanBmPlatformConfigNumaNodesPerSocketNps6, +} + +var mappingAmdMilanBmPlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]AmdMilanBmPlatformConfigNumaNodesPerSocketEnum{ + "nps0": AmdMilanBmPlatformConfigNumaNodesPerSocketNps0, + "nps1": AmdMilanBmPlatformConfigNumaNodesPerSocketNps1, + "nps2": AmdMilanBmPlatformConfigNumaNodesPerSocketNps2, + "nps4": AmdMilanBmPlatformConfigNumaNodesPerSocketNps4, + "nps6": AmdMilanBmPlatformConfigNumaNodesPerSocketNps6, +} + +// GetAmdMilanBmPlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for AmdMilanBmPlatformConfigNumaNodesPerSocketEnum +func GetAmdMilanBmPlatformConfigNumaNodesPerSocketEnumValues() []AmdMilanBmPlatformConfigNumaNodesPerSocketEnum { + values := make([]AmdMilanBmPlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingAmdMilanBmPlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetAmdMilanBmPlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for AmdMilanBmPlatformConfigNumaNodesPerSocketEnum +func GetAmdMilanBmPlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingAmdMilanBmPlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAmdMilanBmPlatformConfigNumaNodesPerSocketEnum(val string) (AmdMilanBmPlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingAmdMilanBmPlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_gpu_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_gpu_launch_instance_platform_config.go new file mode 100644 index 000000000..63acf73a0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_gpu_launch_instance_platform_config.go @@ -0,0 +1,172 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AmdRomeBmGpuLaunchInstancePlatformConfig The platform configuration used when launching a bare metal GPU instance with the BM.GPU4.8 shape +// (the AMD Rome platform). +type AmdRomeBmGpuLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m AmdRomeBmGpuLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m AmdRomeBmGpuLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m AmdRomeBmGpuLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m AmdRomeBmGpuLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m AmdRomeBmGpuLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AmdRomeBmGpuLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AmdRomeBmGpuLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAmdRomeBmGpuLaunchInstancePlatformConfig AmdRomeBmGpuLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAmdRomeBmGpuLaunchInstancePlatformConfig + }{ + "AMD_ROME_BM_GPU", + (MarshalTypeAmdRomeBmGpuLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps0 AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS0" + AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps1 AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps2 AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" + AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps4 AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS4" + AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps6 AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS0": AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "NPS1": AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "NPS4": AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "NPS6": AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +var mappingAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps0": AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "nps1": AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "nps4": AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "nps6": AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +// GetAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_gpu_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_gpu_platform_config.go new file mode 100644 index 000000000..b1f1b33cb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_gpu_platform_config.go @@ -0,0 +1,172 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AmdRomeBmGpuPlatformConfig The platform configuration of a bare metal GPU instance that uses the BM.GPU4.8 shape +// (the AMD Rome platform). +type AmdRomeBmGpuPlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m AmdRomeBmGpuPlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m AmdRomeBmGpuPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m AmdRomeBmGpuPlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m AmdRomeBmGpuPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m AmdRomeBmGpuPlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AmdRomeBmGpuPlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetAmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AmdRomeBmGpuPlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAmdRomeBmGpuPlatformConfig AmdRomeBmGpuPlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAmdRomeBmGpuPlatformConfig + }{ + "AMD_ROME_BM_GPU", + (MarshalTypeAmdRomeBmGpuPlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum +const ( + AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps0 AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum = "NPS0" + AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps1 AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum = "NPS1" + AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps2 AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum = "NPS2" + AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps4 AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum = "NPS4" + AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps6 AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingAmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum = map[string]AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum{ + "NPS0": AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps0, + "NPS1": AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps1, + "NPS2": AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps2, + "NPS4": AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps4, + "NPS6": AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps6, +} + +var mappingAmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum{ + "nps0": AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps0, + "nps1": AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps1, + "nps2": AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps2, + "nps4": AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps4, + "nps6": AmdRomeBmGpuPlatformConfigNumaNodesPerSocketNps6, +} + +// GetAmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum +func GetAmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnumValues() []AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum { + values := make([]AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingAmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetAmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum +func GetAmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingAmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum(val string) (AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingAmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_launch_instance_platform_config.go new file mode 100644 index 000000000..5151856b6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_launch_instance_platform_config.go @@ -0,0 +1,180 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AmdRomeBmLaunchInstancePlatformConfig The platform configuration used when launching a bare metal instance with the BM.Standard.E3.128 shape +// (the AMD Rome platform). +type AmdRomeBmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m AmdRomeBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m AmdRomeBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m AmdRomeBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m AmdRomeBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m AmdRomeBmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AmdRomeBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AmdRomeBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAmdRomeBmLaunchInstancePlatformConfig AmdRomeBmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAmdRomeBmLaunchInstancePlatformConfig + }{ + "AMD_ROME_BM", + (MarshalTypeAmdRomeBmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0 AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS0" + AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" + AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4 AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS4" + AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6 AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS0": AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "NPS1": AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "NPS4": AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "NPS6": AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +var mappingAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps0": AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "nps1": AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "nps4": AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "nps6": AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +// GetAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_platform_config.go new file mode 100644 index 000000000..1d2e596f7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_rome_bm_platform_config.go @@ -0,0 +1,179 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AmdRomeBmPlatformConfig The platform configuration of a bare metal instance that uses the BM.Standard.E3.128 shape (the AMD Rome platform). +type AmdRomeBmPlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket AmdRomeBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m AmdRomeBmPlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m AmdRomeBmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m AmdRomeBmPlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m AmdRomeBmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m AmdRomeBmPlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AmdRomeBmPlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAmdRomeBmPlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetAmdRomeBmPlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AmdRomeBmPlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAmdRomeBmPlatformConfig AmdRomeBmPlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAmdRomeBmPlatformConfig + }{ + "AMD_ROME_BM", + (MarshalTypeAmdRomeBmPlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// AmdRomeBmPlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type AmdRomeBmPlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for AmdRomeBmPlatformConfigNumaNodesPerSocketEnum +const ( + AmdRomeBmPlatformConfigNumaNodesPerSocketNps0 AmdRomeBmPlatformConfigNumaNodesPerSocketEnum = "NPS0" + AmdRomeBmPlatformConfigNumaNodesPerSocketNps1 AmdRomeBmPlatformConfigNumaNodesPerSocketEnum = "NPS1" + AmdRomeBmPlatformConfigNumaNodesPerSocketNps2 AmdRomeBmPlatformConfigNumaNodesPerSocketEnum = "NPS2" + AmdRomeBmPlatformConfigNumaNodesPerSocketNps4 AmdRomeBmPlatformConfigNumaNodesPerSocketEnum = "NPS4" + AmdRomeBmPlatformConfigNumaNodesPerSocketNps6 AmdRomeBmPlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingAmdRomeBmPlatformConfigNumaNodesPerSocketEnum = map[string]AmdRomeBmPlatformConfigNumaNodesPerSocketEnum{ + "NPS0": AmdRomeBmPlatformConfigNumaNodesPerSocketNps0, + "NPS1": AmdRomeBmPlatformConfigNumaNodesPerSocketNps1, + "NPS2": AmdRomeBmPlatformConfigNumaNodesPerSocketNps2, + "NPS4": AmdRomeBmPlatformConfigNumaNodesPerSocketNps4, + "NPS6": AmdRomeBmPlatformConfigNumaNodesPerSocketNps6, +} + +var mappingAmdRomeBmPlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]AmdRomeBmPlatformConfigNumaNodesPerSocketEnum{ + "nps0": AmdRomeBmPlatformConfigNumaNodesPerSocketNps0, + "nps1": AmdRomeBmPlatformConfigNumaNodesPerSocketNps1, + "nps2": AmdRomeBmPlatformConfigNumaNodesPerSocketNps2, + "nps4": AmdRomeBmPlatformConfigNumaNodesPerSocketNps4, + "nps6": AmdRomeBmPlatformConfigNumaNodesPerSocketNps6, +} + +// GetAmdRomeBmPlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for AmdRomeBmPlatformConfigNumaNodesPerSocketEnum +func GetAmdRomeBmPlatformConfigNumaNodesPerSocketEnumValues() []AmdRomeBmPlatformConfigNumaNodesPerSocketEnum { + values := make([]AmdRomeBmPlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingAmdRomeBmPlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetAmdRomeBmPlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for AmdRomeBmPlatformConfigNumaNodesPerSocketEnum +func GetAmdRomeBmPlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingAmdRomeBmPlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAmdRomeBmPlatformConfigNumaNodesPerSocketEnum(val string) (AmdRomeBmPlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingAmdRomeBmPlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_launch_instance_platform_config.go new file mode 100644 index 000000000..9b175e9d9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_launch_instance_platform_config.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AmdVmLaunchInstancePlatformConfig The platform configuration used when launching a virtual machine instance with the AMD platform. +type AmdVmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m AmdVmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m AmdVmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m AmdVmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m AmdVmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m AmdVmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AmdVmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AmdVmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAmdVmLaunchInstancePlatformConfig AmdVmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAmdVmLaunchInstancePlatformConfig + }{ + "AMD_VM", + (MarshalTypeAmdVmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_platform_config.go new file mode 100644 index 000000000..7bd2a2b12 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_platform_config.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AmdVmPlatformConfig The platform configuration of a virtual machine instance that uses the AMD platform. +type AmdVmPlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m AmdVmPlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m AmdVmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m AmdVmPlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m AmdVmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m AmdVmPlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AmdVmPlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AmdVmPlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAmdVmPlatformConfig AmdVmPlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAmdVmPlatformConfig + }{ + "AMD_VM", + (MarshalTypeAmdVmPlatformConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_update_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_update_instance_platform_config.go new file mode 100644 index 000000000..33271b3be --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_update_instance_platform_config.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AmdVmUpdateInstancePlatformConfig The platform configuration used when updating a virtual machine instance with the AMD platform. +type AmdVmUpdateInstancePlatformConfig struct { + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` +} + +func (m AmdVmUpdateInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AmdVmUpdateInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AmdVmUpdateInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAmdVmUpdateInstancePlatformConfig AmdVmUpdateInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAmdVmUpdateInstancePlatformConfig + }{ + "AMD_VM", + (MarshalTypeAmdVmUpdateInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing.go new file mode 100644 index 000000000..caf152ac1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AppCatalogListing Listing details. +type AppCatalogListing struct { + + // Listing's contact URL. + ContactUrl *string `mandatory:"false" json:"contactUrl"` + + // Description of the listing. + Description *string `mandatory:"false" json:"description"` + + // The OCID of the listing. + ListingId *string `mandatory:"false" json:"listingId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Date and time the listing was published, in RFC3339 (https://tools.ietf.org/html/rfc3339) format. + // Example: `2018-03-20T12:32:53.532Z` + TimePublished *common.SDKTime `mandatory:"false" json:"timePublished"` + + // Publisher's logo URL. + PublisherLogoUrl *string `mandatory:"false" json:"publisherLogoUrl"` + + // Name of the publisher who published this listing. + PublisherName *string `mandatory:"false" json:"publisherName"` + + // Summary of the listing. + Summary *string `mandatory:"false" json:"summary"` +} + +func (m AppCatalogListing) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AppCatalogListing) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing_resource_version.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing_resource_version.go new file mode 100644 index 000000000..addff673e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing_resource_version.go @@ -0,0 +1,140 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AppCatalogListingResourceVersion Listing Resource Version +type AppCatalogListingResourceVersion struct { + + // The OCID of the listing this resource version belongs to. + ListingId *string `mandatory:"false" json:"listingId"` + + // Date and time the listing resource version was published, in RFC3339 (https://tools.ietf.org/html/rfc3339) format. + // Example: `2018-03-20T12:32:53.532Z` + TimePublished *common.SDKTime `mandatory:"false" json:"timePublished"` + + // OCID of the listing resource. + ListingResourceId *string `mandatory:"false" json:"listingResourceId"` + + // Resource Version. + ListingResourceVersion *string `mandatory:"false" json:"listingResourceVersion"` + + // List of regions that this listing resource version is available. + // For information about regions, see + // Regions and Availability Domains (https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). + // Example: `["us-ashburn-1", "us-phoenix-1"]` + AvailableRegions []string `mandatory:"false" json:"availableRegions"` + + // Array of shapes compatible with this resource. + // You can enumerate all available shapes by calling ListShapes. + // Example: `["VM.Standard1.1", "VM.Standard1.2"]` + CompatibleShapes []string `mandatory:"false" json:"compatibleShapes"` + + // List of accessible ports for instances launched with this listing resource version. + AccessiblePorts []int `mandatory:"false" json:"accessiblePorts"` + + // Allowed actions for the listing resource. + AllowedActions []AppCatalogListingResourceVersionAllowedActionsEnum `mandatory:"false" json:"allowedActions,omitempty"` +} + +func (m AppCatalogListingResourceVersion) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AppCatalogListingResourceVersion) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AllowedActions { + if _, ok := GetMappingAppCatalogListingResourceVersionAllowedActionsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AllowedActions: %s. Supported values are: %s.", val, strings.Join(GetAppCatalogListingResourceVersionAllowedActionsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AppCatalogListingResourceVersionAllowedActionsEnum Enum with underlying type: string +type AppCatalogListingResourceVersionAllowedActionsEnum string + +// Set of constants representing the allowable values for AppCatalogListingResourceVersionAllowedActionsEnum +const ( + AppCatalogListingResourceVersionAllowedActionsSnapshot AppCatalogListingResourceVersionAllowedActionsEnum = "SNAPSHOT" + AppCatalogListingResourceVersionAllowedActionsBootVolumeDetach AppCatalogListingResourceVersionAllowedActionsEnum = "BOOT_VOLUME_DETACH" + AppCatalogListingResourceVersionAllowedActionsPreserveBootVolume AppCatalogListingResourceVersionAllowedActionsEnum = "PRESERVE_BOOT_VOLUME" + AppCatalogListingResourceVersionAllowedActionsSerialConsoleAccess AppCatalogListingResourceVersionAllowedActionsEnum = "SERIAL_CONSOLE_ACCESS" + AppCatalogListingResourceVersionAllowedActionsBootRecovery AppCatalogListingResourceVersionAllowedActionsEnum = "BOOT_RECOVERY" + AppCatalogListingResourceVersionAllowedActionsBackupBootVolume AppCatalogListingResourceVersionAllowedActionsEnum = "BACKUP_BOOT_VOLUME" + AppCatalogListingResourceVersionAllowedActionsCaptureConsoleHistory AppCatalogListingResourceVersionAllowedActionsEnum = "CAPTURE_CONSOLE_HISTORY" +) + +var mappingAppCatalogListingResourceVersionAllowedActionsEnum = map[string]AppCatalogListingResourceVersionAllowedActionsEnum{ + "SNAPSHOT": AppCatalogListingResourceVersionAllowedActionsSnapshot, + "BOOT_VOLUME_DETACH": AppCatalogListingResourceVersionAllowedActionsBootVolumeDetach, + "PRESERVE_BOOT_VOLUME": AppCatalogListingResourceVersionAllowedActionsPreserveBootVolume, + "SERIAL_CONSOLE_ACCESS": AppCatalogListingResourceVersionAllowedActionsSerialConsoleAccess, + "BOOT_RECOVERY": AppCatalogListingResourceVersionAllowedActionsBootRecovery, + "BACKUP_BOOT_VOLUME": AppCatalogListingResourceVersionAllowedActionsBackupBootVolume, + "CAPTURE_CONSOLE_HISTORY": AppCatalogListingResourceVersionAllowedActionsCaptureConsoleHistory, +} + +var mappingAppCatalogListingResourceVersionAllowedActionsEnumLowerCase = map[string]AppCatalogListingResourceVersionAllowedActionsEnum{ + "snapshot": AppCatalogListingResourceVersionAllowedActionsSnapshot, + "boot_volume_detach": AppCatalogListingResourceVersionAllowedActionsBootVolumeDetach, + "preserve_boot_volume": AppCatalogListingResourceVersionAllowedActionsPreserveBootVolume, + "serial_console_access": AppCatalogListingResourceVersionAllowedActionsSerialConsoleAccess, + "boot_recovery": AppCatalogListingResourceVersionAllowedActionsBootRecovery, + "backup_boot_volume": AppCatalogListingResourceVersionAllowedActionsBackupBootVolume, + "capture_console_history": AppCatalogListingResourceVersionAllowedActionsCaptureConsoleHistory, +} + +// GetAppCatalogListingResourceVersionAllowedActionsEnumValues Enumerates the set of values for AppCatalogListingResourceVersionAllowedActionsEnum +func GetAppCatalogListingResourceVersionAllowedActionsEnumValues() []AppCatalogListingResourceVersionAllowedActionsEnum { + values := make([]AppCatalogListingResourceVersionAllowedActionsEnum, 0) + for _, v := range mappingAppCatalogListingResourceVersionAllowedActionsEnum { + values = append(values, v) + } + return values +} + +// GetAppCatalogListingResourceVersionAllowedActionsEnumStringValues Enumerates the set of values in String for AppCatalogListingResourceVersionAllowedActionsEnum +func GetAppCatalogListingResourceVersionAllowedActionsEnumStringValues() []string { + return []string{ + "SNAPSHOT", + "BOOT_VOLUME_DETACH", + "PRESERVE_BOOT_VOLUME", + "SERIAL_CONSOLE_ACCESS", + "BOOT_RECOVERY", + "BACKUP_BOOT_VOLUME", + "CAPTURE_CONSOLE_HISTORY", + } +} + +// GetMappingAppCatalogListingResourceVersionAllowedActionsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAppCatalogListingResourceVersionAllowedActionsEnum(val string) (AppCatalogListingResourceVersionAllowedActionsEnum, bool) { + enum, ok := mappingAppCatalogListingResourceVersionAllowedActionsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing_resource_version_agreements.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing_resource_version_agreements.go new file mode 100644 index 000000000..e837557a1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing_resource_version_agreements.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AppCatalogListingResourceVersionAgreements Agreements for a listing resource version. +type AppCatalogListingResourceVersionAgreements struct { + + // The OCID of the listing associated with these agreements. + ListingId *string `mandatory:"false" json:"listingId"` + + // Listing resource version associated with these agreements. + ListingResourceVersion *string `mandatory:"false" json:"listingResourceVersion"` + + // Oracle TOU link + OracleTermsOfUseLink *string `mandatory:"false" json:"oracleTermsOfUseLink"` + + // EULA link + EulaLink *string `mandatory:"false" json:"eulaLink"` + + // Date and time the agreements were retrieved, in RFC3339 (https://tools.ietf.org/html/rfc3339) format. + // Example: `2018-03-20T12:32:53.532Z` + TimeRetrieved *common.SDKTime `mandatory:"false" json:"timeRetrieved"` + + // A generated signature for this agreement retrieval operation which should be used in the create subscription call. + Signature *string `mandatory:"false" json:"signature"` +} + +func (m AppCatalogListingResourceVersionAgreements) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AppCatalogListingResourceVersionAgreements) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing_resource_version_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing_resource_version_summary.go new file mode 100644 index 000000000..b6b3b5118 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing_resource_version_summary.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AppCatalogListingResourceVersionSummary Listing Resource Version summary +type AppCatalogListingResourceVersionSummary struct { + + // The OCID of the listing this resource version belongs to. + ListingId *string `mandatory:"false" json:"listingId"` + + // Date and time the listing resource version was published, in RFC3339 (https://tools.ietf.org/html/rfc3339) format. + // Example: `2018-03-20T12:32:53.532Z` + TimePublished *common.SDKTime `mandatory:"false" json:"timePublished"` + + // OCID of the listing resource. + ListingResourceId *string `mandatory:"false" json:"listingResourceId"` + + // Resource Version. + ListingResourceVersion *string `mandatory:"false" json:"listingResourceVersion"` +} + +func (m AppCatalogListingResourceVersionSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AppCatalogListingResourceVersionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing_summary.go new file mode 100644 index 000000000..a34baaaa5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_listing_summary.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AppCatalogListingSummary A summary of a listing. +type AppCatalogListingSummary struct { + + // the region free ocid of the listing resource. + ListingId *string `mandatory:"false" json:"listingId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The short summary for the listing. + Summary *string `mandatory:"false" json:"summary"` + + // The name of the publisher who published this listing. + PublisherName *string `mandatory:"false" json:"publisherName"` +} + +func (m AppCatalogListingSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AppCatalogListingSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_subscription.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_subscription.go new file mode 100644 index 000000000..819d0d4d3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_subscription.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AppCatalogSubscription a subscription for a listing resource version. +type AppCatalogSubscription struct { + + // Name of the publisher who published this listing. + PublisherName *string `mandatory:"false" json:"publisherName"` + + // The ocid of the listing resource. + ListingId *string `mandatory:"false" json:"listingId"` + + // Listing resource version. + ListingResourceVersion *string `mandatory:"false" json:"listingResourceVersion"` + + // Listing resource id. + ListingResourceId *string `mandatory:"false" json:"listingResourceId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The short summary to the listing. + Summary *string `mandatory:"false" json:"summary"` + + // The compartmentID of the subscription. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Date and time at which the subscription was created, in RFC3339 (https://tools.ietf.org/html/rfc3339) format. + // Example: `2018-03-20T12:32:53.532Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m AppCatalogSubscription) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AppCatalogSubscription) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_subscription_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_subscription_summary.go new file mode 100644 index 000000000..34458c159 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/app_catalog_subscription_summary.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AppCatalogSubscriptionSummary a subscription summary for a listing resource version. +type AppCatalogSubscriptionSummary struct { + + // Name of the publisher who published this listing. + PublisherName *string `mandatory:"false" json:"publisherName"` + + // The ocid of the listing resource. + ListingId *string `mandatory:"false" json:"listingId"` + + // Listing resource version. + ListingResourceVersion *string `mandatory:"false" json:"listingResourceVersion"` + + // Listing resource id. + ListingResourceId *string `mandatory:"false" json:"listingResourceId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The short summary to the listing. + Summary *string `mandatory:"false" json:"summary"` + + // The compartmentID of the subscription. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Date and time at which the subscription was created, in RFC3339 (https://tools.ietf.org/html/rfc3339) format. + // Example: `2018-03-20T12:32:53.532Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m AppCatalogSubscriptionSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AppCatalogSubscriptionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/apply_host_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/apply_host_configuration_request_response.go new file mode 100644 index 000000000..25568a717 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/apply_host_configuration_request_response.go @@ -0,0 +1,114 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ApplyHostConfigurationRequest wrapper for the ApplyHostConfiguration operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ApplyHostConfiguration.go.html to see an example of how to use ApplyHostConfigurationRequest. +type ApplyHostConfigurationRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + ComputeHostId *string `mandatory:"true" contributesTo:"path" name:"computeHostId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ApplyHostConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ApplyHostConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ApplyHostConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ApplyHostConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ApplyHostConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ApplyHostConfigurationResponse wrapper for the ApplyHostConfiguration operation +type ApplyHostConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeHost instance + ComputeHost `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Location of the resource. + Location *string `presentIn:"header" name:"location"` +} + +func (response ApplyHostConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ApplyHostConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_boot_volume_details.go new file mode 100644 index 000000000..86c9865f6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_boot_volume_details.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AttachBootVolumeDetails The representation of AttachBootVolumeDetails +type AttachBootVolumeDetails struct { + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"true" json:"bootVolumeId"` + + // The OCID of the instance. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Refer the top-level definition of encryptionInTransitType. + // The default value is NONE. + EncryptionInTransitType EncryptionInTransitTypeEnum `mandatory:"false" json:"encryptionInTransitType,omitempty"` +} + +func (m AttachBootVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AttachBootVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingEncryptionInTransitTypeEnum(string(m.EncryptionInTransitType)); !ok && m.EncryptionInTransitType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncryptionInTransitType: %s. Supported values are: %s.", m.EncryptionInTransitType, strings.Join(GetEncryptionInTransitTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_boot_volume_request_response.go new file mode 100644 index 000000000..e64a36e3a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_boot_volume_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AttachBootVolumeRequest wrapper for the AttachBootVolume operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachBootVolume.go.html to see an example of how to use AttachBootVolumeRequest. +type AttachBootVolumeRequest struct { + + // Attach boot volume request + AttachBootVolumeDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AttachBootVolumeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AttachBootVolumeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AttachBootVolumeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AttachBootVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AttachBootVolumeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AttachBootVolumeResponse wrapper for the AttachBootVolume operation +type AttachBootVolumeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolumeAttachment instance + BootVolumeAttachment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AttachBootVolumeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AttachBootVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_compute_host_group_host_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_compute_host_group_host_details.go new file mode 100644 index 000000000..7701c458a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_compute_host_group_host_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AttachComputeHostGroupHostDetails Specifies the host group id +type AttachComputeHostGroupHostDetails struct { + + // 'The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host group.' + ComputeHostGroupId *string `mandatory:"true" json:"computeHostGroupId"` +} + +func (m AttachComputeHostGroupHostDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AttachComputeHostGroupHostDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_compute_host_group_host_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_compute_host_group_host_request_response.go new file mode 100644 index 000000000..c86d5d2b0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_compute_host_group_host_request_response.go @@ -0,0 +1,117 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AttachComputeHostGroupHostRequest wrapper for the AttachComputeHostGroupHost operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachComputeHostGroupHost.go.html to see an example of how to use AttachComputeHostGroupHostRequest. +type AttachComputeHostGroupHostRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + ComputeHostId *string `mandatory:"true" contributesTo:"path" name:"computeHostId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host group. + AttachComputeHostGroupHostDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AttachComputeHostGroupHostRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AttachComputeHostGroupHostRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AttachComputeHostGroupHostRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AttachComputeHostGroupHostRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AttachComputeHostGroupHostRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AttachComputeHostGroupHostResponse wrapper for the AttachComputeHostGroupHost operation +type AttachComputeHostGroupHostResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeHost instance + ComputeHost `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Location of the resource. + Location *string `presentIn:"header" name:"location"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response AttachComputeHostGroupHostResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AttachComputeHostGroupHostResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_emulated_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_emulated_volume_details.go new file mode 100644 index 000000000..83c0a1dd3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_emulated_volume_details.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AttachEmulatedVolumeDetails The representation of AttachEmulatedVolumeDetails +type AttachEmulatedVolumeDetails struct { + + // The OCID of the instance. For AttachVolume operation, this is a required field for the request, + // see AttachVolume. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The OCID of the volume. If CreateVolumeDetails is specified, this field must be omitted from the request. + VolumeId *string `mandatory:"true" json:"volumeId"` + + // The device name. To retrieve a list of devices for a given instance, see ListInstanceDevices. + Device *string `mandatory:"false" json:"device"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether the attachment was created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + IsShareable *bool `mandatory:"false" json:"isShareable"` +} + +// GetDevice returns Device +func (m AttachEmulatedVolumeDetails) GetDevice() *string { + return m.Device +} + +// GetDisplayName returns DisplayName +func (m AttachEmulatedVolumeDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetInstanceId returns InstanceId +func (m AttachEmulatedVolumeDetails) GetInstanceId() *string { + return m.InstanceId +} + +// GetIsReadOnly returns IsReadOnly +func (m AttachEmulatedVolumeDetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetIsShareable returns IsShareable +func (m AttachEmulatedVolumeDetails) GetIsShareable() *bool { + return m.IsShareable +} + +// GetVolumeId returns VolumeId +func (m AttachEmulatedVolumeDetails) GetVolumeId() *string { + return m.VolumeId +} + +func (m AttachEmulatedVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AttachEmulatedVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AttachEmulatedVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAttachEmulatedVolumeDetails AttachEmulatedVolumeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAttachEmulatedVolumeDetails + }{ + "emulated", + (MarshalTypeAttachEmulatedVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_i_scsi_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_i_scsi_volume_details.go new file mode 100644 index 000000000..d7f1d6408 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_i_scsi_volume_details.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AttachIScsiVolumeDetails The representation of AttachIScsiVolumeDetails +type AttachIScsiVolumeDetails struct { + + // The OCID of the instance. For AttachVolume operation, this is a required field for the request, + // see AttachVolume. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The OCID of the volume. If CreateVolumeDetails is specified, this field must be omitted from the request. + VolumeId *string `mandatory:"true" json:"volumeId"` + + // The device name. To retrieve a list of devices for a given instance, see ListInstanceDevices. + Device *string `mandatory:"false" json:"device"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether the attachment was created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + IsShareable *bool `mandatory:"false" json:"isShareable"` + + // Whether to use CHAP authentication for the volume attachment. Defaults to false. + UseChap *bool `mandatory:"false" json:"useChap"` + + // Whether to enable Oracle Cloud Agent to perform the iSCSI login and logout commands after the volume attach or detach operations for non multipath-enabled iSCSI attachments. + IsAgentAutoIscsiLoginEnabled *bool `mandatory:"false" json:"isAgentAutoIscsiLoginEnabled"` + + // Refer the top-level definition of encryptionInTransitType. + // The default value is NONE. + EncryptionInTransitType EncryptionInTransitTypeEnum `mandatory:"false" json:"encryptionInTransitType,omitempty"` +} + +// GetDevice returns Device +func (m AttachIScsiVolumeDetails) GetDevice() *string { + return m.Device +} + +// GetDisplayName returns DisplayName +func (m AttachIScsiVolumeDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetInstanceId returns InstanceId +func (m AttachIScsiVolumeDetails) GetInstanceId() *string { + return m.InstanceId +} + +// GetIsReadOnly returns IsReadOnly +func (m AttachIScsiVolumeDetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetIsShareable returns IsShareable +func (m AttachIScsiVolumeDetails) GetIsShareable() *bool { + return m.IsShareable +} + +// GetVolumeId returns VolumeId +func (m AttachIScsiVolumeDetails) GetVolumeId() *string { + return m.VolumeId +} + +func (m AttachIScsiVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AttachIScsiVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingEncryptionInTransitTypeEnum(string(m.EncryptionInTransitType)); !ok && m.EncryptionInTransitType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncryptionInTransitType: %s. Supported values are: %s.", m.EncryptionInTransitType, strings.Join(GetEncryptionInTransitTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AttachIScsiVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAttachIScsiVolumeDetails AttachIScsiVolumeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAttachIScsiVolumeDetails + }{ + "iscsi", + (MarshalTypeAttachIScsiVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_instance_pool_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_instance_pool_instance_details.go new file mode 100644 index 000000000..91b00146a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_instance_pool_instance_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AttachInstancePoolInstanceDetails An instance that is to be attached to an instance pool. +type AttachInstancePoolInstanceDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + InstanceId *string `mandatory:"true" json:"instanceId"` +} + +func (m AttachInstancePoolInstanceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AttachInstancePoolInstanceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_instance_pool_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_instance_pool_instance_request_response.go new file mode 100644 index 000000000..afdb1e949 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_instance_pool_instance_request_response.go @@ -0,0 +1,112 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AttachInstancePoolInstanceRequest wrapper for the AttachInstancePoolInstance operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachInstancePoolInstance.go.html to see an example of how to use AttachInstancePoolInstanceRequest. +type AttachInstancePoolInstanceRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // Attach an instance to a pool + AttachInstancePoolInstanceDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AttachInstancePoolInstanceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AttachInstancePoolInstanceRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AttachInstancePoolInstanceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AttachInstancePoolInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AttachInstancePoolInstanceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AttachInstancePoolInstanceResponse wrapper for the AttachInstancePoolInstance operation +type AttachInstancePoolInstanceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstancePoolInstance instance + InstancePoolInstance `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Location of the resource. + Location *string `presentIn:"header" name:"location"` +} + +func (response AttachInstancePoolInstanceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AttachInstancePoolInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_load_balancer_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_load_balancer_details.go new file mode 100644 index 000000000..9865e5b18 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_load_balancer_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AttachLoadBalancerDetails Represents a load balancer that is to be attached to an instance pool. +type AttachLoadBalancerDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the load balancer to attach to the instance pool. + LoadBalancerId *string `mandatory:"true" json:"loadBalancerId"` + + // The name of the backend set on the load balancer to add instances to. + BackendSetName *string `mandatory:"true" json:"backendSetName"` + + // The port value to use when creating the backend set. + Port *int `mandatory:"true" json:"port"` + + // Indicates which VNIC on each instance in the pool should be used to associate with the load balancer. + // Possible values are "PrimaryVnic" or the displayName of one of the secondary VNICs on the instance configuration + // that is associated with the instance pool. + VnicSelection *string `mandatory:"true" json:"vnicSelection"` +} + +func (m AttachLoadBalancerDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AttachLoadBalancerDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_load_balancer_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_load_balancer_request_response.go new file mode 100644 index 000000000..bbe6303c5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_load_balancer_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AttachLoadBalancerRequest wrapper for the AttachLoadBalancer operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachLoadBalancer.go.html to see an example of how to use AttachLoadBalancerRequest. +type AttachLoadBalancerRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // Load balancer being attached + AttachLoadBalancerDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AttachLoadBalancerRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AttachLoadBalancerRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AttachLoadBalancerRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AttachLoadBalancerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AttachLoadBalancerRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AttachLoadBalancerResponse wrapper for the AttachLoadBalancer operation +type AttachLoadBalancerResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstancePool instance + InstancePool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AttachLoadBalancerResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AttachLoadBalancerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_paravirtualized_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_paravirtualized_volume_details.go new file mode 100644 index 000000000..aad09d7c7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_paravirtualized_volume_details.go @@ -0,0 +1,113 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AttachParavirtualizedVolumeDetails The representation of AttachParavirtualizedVolumeDetails +type AttachParavirtualizedVolumeDetails struct { + + // The OCID of the instance. For AttachVolume operation, this is a required field for the request, + // see AttachVolume. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The OCID of the volume. If CreateVolumeDetails is specified, this field must be omitted from the request. + VolumeId *string `mandatory:"true" json:"volumeId"` + + // The device name. To retrieve a list of devices for a given instance, see ListInstanceDevices. + Device *string `mandatory:"false" json:"device"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether the attachment was created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + IsShareable *bool `mandatory:"false" json:"isShareable"` + + // Whether to enable in-transit encryption for the data volume's paravirtualized attachment. The default value is false. + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` +} + +// GetDevice returns Device +func (m AttachParavirtualizedVolumeDetails) GetDevice() *string { + return m.Device +} + +// GetDisplayName returns DisplayName +func (m AttachParavirtualizedVolumeDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetInstanceId returns InstanceId +func (m AttachParavirtualizedVolumeDetails) GetInstanceId() *string { + return m.InstanceId +} + +// GetIsReadOnly returns IsReadOnly +func (m AttachParavirtualizedVolumeDetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetIsShareable returns IsShareable +func (m AttachParavirtualizedVolumeDetails) GetIsShareable() *bool { + return m.IsShareable +} + +// GetVolumeId returns VolumeId +func (m AttachParavirtualizedVolumeDetails) GetVolumeId() *string { + return m.VolumeId +} + +func (m AttachParavirtualizedVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AttachParavirtualizedVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AttachParavirtualizedVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAttachParavirtualizedVolumeDetails AttachParavirtualizedVolumeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAttachParavirtualizedVolumeDetails + }{ + "paravirtualized", + (MarshalTypeAttachParavirtualizedVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_service_determined_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_service_determined_volume_details.go new file mode 100644 index 000000000..d50a32af7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_service_determined_volume_details.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AttachServiceDeterminedVolumeDetails The representation of AttachServiceDeterminedVolumeDetails +type AttachServiceDeterminedVolumeDetails struct { + + // The OCID of the instance. For AttachVolume operation, this is a required field for the request, + // see AttachVolume. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The OCID of the volume. If CreateVolumeDetails is specified, this field must be omitted from the request. + VolumeId *string `mandatory:"true" json:"volumeId"` + + // The device name. To retrieve a list of devices for a given instance, see ListInstanceDevices. + Device *string `mandatory:"false" json:"device"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether the attachment was created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + IsShareable *bool `mandatory:"false" json:"isShareable"` +} + +// GetDevice returns Device +func (m AttachServiceDeterminedVolumeDetails) GetDevice() *string { + return m.Device +} + +// GetDisplayName returns DisplayName +func (m AttachServiceDeterminedVolumeDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetInstanceId returns InstanceId +func (m AttachServiceDeterminedVolumeDetails) GetInstanceId() *string { + return m.InstanceId +} + +// GetIsReadOnly returns IsReadOnly +func (m AttachServiceDeterminedVolumeDetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetIsShareable returns IsShareable +func (m AttachServiceDeterminedVolumeDetails) GetIsShareable() *bool { + return m.IsShareable +} + +// GetVolumeId returns VolumeId +func (m AttachServiceDeterminedVolumeDetails) GetVolumeId() *string { + return m.VolumeId +} + +func (m AttachServiceDeterminedVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AttachServiceDeterminedVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AttachServiceDeterminedVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAttachServiceDeterminedVolumeDetails AttachServiceDeterminedVolumeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAttachServiceDeterminedVolumeDetails + }{ + "service_determined", + (MarshalTypeAttachServiceDeterminedVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_service_id_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_service_id_request_response.go new file mode 100644 index 000000000..95ef07db6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_service_id_request_response.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AttachServiceIdRequest wrapper for the AttachServiceId operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachServiceId.go.html to see an example of how to use AttachServiceIdRequest. +type AttachServiceIdRequest struct { + + // The service gateway's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + ServiceGatewayId *string `mandatory:"true" contributesTo:"path" name:"serviceGatewayId"` + + // ServiceId of Service to be attached to a service gateway. + AttachServiceDetails ServiceIdRequestDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AttachServiceIdRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AttachServiceIdRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AttachServiceIdRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AttachServiceIdRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AttachServiceIdRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AttachServiceIdResponse wrapper for the AttachServiceId operation +type AttachServiceIdResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ServiceGateway instance + ServiceGateway `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AttachServiceIdResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AttachServiceIdResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_vnic_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_vnic_details.go new file mode 100644 index 000000000..8c7b993c4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_vnic_details.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AttachVnicDetails The representation of AttachVnicDetails +type AttachVnicDetails struct { + CreateVnicDetails *CreateVnicDetails `mandatory:"true" json:"createVnicDetails"` + + // The OCID of the instance. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Which physical network interface card (NIC) the VNIC will use. Defaults to 0. + // Certain bare metal instance shapes have two active physical NICs (0 and 1). If + // you add a secondary VNIC to one of these instances, you can specify which NIC + // the VNIC will use. For more information, see + // Virtual Network Interface Cards (VNICs) (https://docs.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). + NicIndex *int `mandatory:"false" json:"nicIndex"` +} + +func (m AttachVnicDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AttachVnicDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_vnic_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_vnic_request_response.go new file mode 100644 index 000000000..225865147 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_vnic_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AttachVnicRequest wrapper for the AttachVnic operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachVnic.go.html to see an example of how to use AttachVnicRequest. +type AttachVnicRequest struct { + + // Attach VNIC details. + AttachVnicDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AttachVnicRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AttachVnicRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AttachVnicRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AttachVnicRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AttachVnicRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AttachVnicResponse wrapper for the AttachVnic operation +type AttachVnicResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VnicAttachment instance + VnicAttachment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AttachVnicResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AttachVnicResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_volume_details.go new file mode 100644 index 000000000..68e7351d1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_volume_details.go @@ -0,0 +1,160 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AttachVolumeDetails The representation of AttachVolumeDetails +type AttachVolumeDetails interface { + + // The OCID of the instance. For AttachVolume operation, this is a required field for the request, + // see AttachVolume. + GetInstanceId() *string + + // The OCID of the volume. If CreateVolumeDetails is specified, this field must be omitted from the request. + GetVolumeId() *string + + // The device name. To retrieve a list of devices for a given instance, see ListInstanceDevices. + GetDevice() *string + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + GetDisplayName() *string + + // Whether the attachment was created in read-only mode. + GetIsReadOnly() *bool + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + GetIsShareable() *bool +} + +type attachvolumedetails struct { + JsonData []byte + Device *string `mandatory:"false" json:"device"` + DisplayName *string `mandatory:"false" json:"displayName"` + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + IsShareable *bool `mandatory:"false" json:"isShareable"` + InstanceId *string `mandatory:"true" json:"instanceId"` + VolumeId *string `mandatory:"true" json:"volumeId"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *attachvolumedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerattachvolumedetails attachvolumedetails + s := struct { + Model Unmarshalerattachvolumedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.InstanceId = s.Model.InstanceId + m.VolumeId = s.Model.VolumeId + m.Device = s.Model.Device + m.DisplayName = s.Model.DisplayName + m.IsReadOnly = s.Model.IsReadOnly + m.IsShareable = s.Model.IsShareable + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *attachvolumedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "service_determined": + mm := AttachServiceDeterminedVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "emulated": + mm := AttachEmulatedVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "iscsi": + mm := AttachIScsiVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "paravirtualized": + mm := AttachParavirtualizedVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for AttachVolumeDetails: %s.", m.Type) + return *m, nil + } +} + +// GetDevice returns Device +func (m attachvolumedetails) GetDevice() *string { + return m.Device +} + +// GetDisplayName returns DisplayName +func (m attachvolumedetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetIsReadOnly returns IsReadOnly +func (m attachvolumedetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetIsShareable returns IsShareable +func (m attachvolumedetails) GetIsShareable() *bool { + return m.IsShareable +} + +// GetInstanceId returns InstanceId +func (m attachvolumedetails) GetInstanceId() *string { + return m.InstanceId +} + +// GetVolumeId returns VolumeId +func (m attachvolumedetails) GetVolumeId() *string { + return m.VolumeId +} + +func (m attachvolumedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m attachvolumedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_volume_request_response.go new file mode 100644 index 000000000..f2de17166 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/attach_volume_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AttachVolumeRequest wrapper for the AttachVolume operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachVolume.go.html to see an example of how to use AttachVolumeRequest. +type AttachVolumeRequest struct { + + // Attach volume request + AttachVolumeDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AttachVolumeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AttachVolumeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AttachVolumeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AttachVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AttachVolumeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AttachVolumeResponse wrapper for the AttachVolume operation +type AttachVolumeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeAttachment instance + VolumeAttachment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response AttachVolumeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AttachVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/autotune_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/autotune_policy.go new file mode 100644 index 000000000..a85b62cd2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/autotune_policy.go @@ -0,0 +1,129 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AutotunePolicy An autotune policy automatically tunes the volume's performace based on the type of the policy. +type AutotunePolicy interface { +} + +type autotunepolicy struct { + JsonData []byte + AutotuneType string `json:"autotuneType"` +} + +// UnmarshalJSON unmarshals json +func (m *autotunepolicy) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerautotunepolicy autotunepolicy + s := struct { + Model Unmarshalerautotunepolicy + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.AutotuneType = s.Model.AutotuneType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *autotunepolicy) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.AutotuneType { + case "DETACHED_VOLUME": + mm := DetachedVolumeAutotunePolicy{} + err = json.Unmarshal(data, &mm) + return mm, err + case "PERFORMANCE_BASED": + mm := PerformanceBasedAutotunePolicy{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for AutotunePolicy: %s.", m.AutotuneType) + return *m, nil + } +} + +func (m autotunepolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m autotunepolicy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AutotunePolicyAutotuneTypeEnum Enum with underlying type: string +type AutotunePolicyAutotuneTypeEnum string + +// Set of constants representing the allowable values for AutotunePolicyAutotuneTypeEnum +const ( + AutotunePolicyAutotuneTypeDetachedVolume AutotunePolicyAutotuneTypeEnum = "DETACHED_VOLUME" + AutotunePolicyAutotuneTypePerformanceBased AutotunePolicyAutotuneTypeEnum = "PERFORMANCE_BASED" +) + +var mappingAutotunePolicyAutotuneTypeEnum = map[string]AutotunePolicyAutotuneTypeEnum{ + "DETACHED_VOLUME": AutotunePolicyAutotuneTypeDetachedVolume, + "PERFORMANCE_BASED": AutotunePolicyAutotuneTypePerformanceBased, +} + +var mappingAutotunePolicyAutotuneTypeEnumLowerCase = map[string]AutotunePolicyAutotuneTypeEnum{ + "detached_volume": AutotunePolicyAutotuneTypeDetachedVolume, + "performance_based": AutotunePolicyAutotuneTypePerformanceBased, +} + +// GetAutotunePolicyAutotuneTypeEnumValues Enumerates the set of values for AutotunePolicyAutotuneTypeEnum +func GetAutotunePolicyAutotuneTypeEnumValues() []AutotunePolicyAutotuneTypeEnum { + values := make([]AutotunePolicyAutotuneTypeEnum, 0) + for _, v := range mappingAutotunePolicyAutotuneTypeEnum { + values = append(values, v) + } + return values +} + +// GetAutotunePolicyAutotuneTypeEnumStringValues Enumerates the set of values in String for AutotunePolicyAutotuneTypeEnum +func GetAutotunePolicyAutotuneTypeEnumStringValues() []string { + return []string{ + "DETACHED_VOLUME", + "PERFORMANCE_BASED", + } +} + +// GetMappingAutotunePolicyAutotuneTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAutotunePolicyAutotuneTypeEnum(val string) (AutotunePolicyAutotuneTypeEnum, bool) { + enum, ok := mappingAutotunePolicyAutotuneTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bgp_session_info.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bgp_session_info.go new file mode 100644 index 000000000..ffd2af9e5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bgp_session_info.go @@ -0,0 +1,189 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BgpSessionInfo Information for establishing a BGP session for the IPSec tunnel. +type BgpSessionInfo struct { + + // The IP address for the Oracle end of the inside tunnel interface. + // If the tunnel's `routing` attribute is set to `BGP` + // (see IPSecConnectionTunnel), this IP address + // is required and used for the tunnel's BGP session. + // If `routing` is instead set to `STATIC`, this IP address is optional. You can set this IP + // address so you can troubleshoot or monitor the tunnel. + // The value must be a /30 or /31. + // Example: `10.0.0.4/31` + OracleInterfaceIp *string `mandatory:"false" json:"oracleInterfaceIp"` + + // The IP address for the CPE end of the inside tunnel interface. + // If the tunnel's `routing` attribute is set to `BGP` + // (see IPSecConnectionTunnel), this IP address + // is required and used for the tunnel's BGP session. + // If `routing` is instead set to `STATIC`, this IP address is optional. You can set this IP + // address so you can troubleshoot or monitor the tunnel. + // The value must be a /30 or /31. + // Example: `10.0.0.5/31` + CustomerInterfaceIp *string `mandatory:"false" json:"customerInterfaceIp"` + + // The IPv6 address for the Oracle end of the inside tunnel interface. This IP address is optional. + // If the tunnel's `routing` attribute is set to `BGP` + // (see IPSecConnectionTunnel), this IP address + // is used for the tunnel's BGP session. + // If `routing` is instead set to `STATIC`, you can set this IP + // address to troubleshoot or monitor the tunnel. + // Only subnet masks from /64 up to /127 are allowed. + // Example: `2001:db8::1/64` + OracleInterfaceIpv6 *string `mandatory:"false" json:"oracleInterfaceIpv6"` + + // The IPv6 address for the CPE end of the inside tunnel interface. This IP address is optional. + // If the tunnel's `routing` attribute is set to `BGP` + // (see IPSecConnectionTunnel), this IP address + // is used for the tunnel's BGP session. + // If `routing` is instead set to `STATIC`, you can set this IP + // address to troubleshoot or monitor the tunnel. + // Only subnet masks from /64 up to /127 are allowed. + // Example: `2001:db8::1/64` + CustomerInterfaceIpv6 *string `mandatory:"false" json:"customerInterfaceIpv6"` + + // The Oracle BGP ASN. + OracleBgpAsn *string `mandatory:"false" json:"oracleBgpAsn"` + + // If the tunnel's `routing` attribute is set to `BGP` + // (see IPSecConnectionTunnel), this ASN + // is required and used for the tunnel's BGP session. This is the ASN of the network on the + // CPE end of the BGP session. Can be a 2-byte or 4-byte ASN. Uses "asplain" format. + // If the tunnel uses static routing, the `customerBgpAsn` must be null. + // Example: `12345` (2-byte) or `1587232876` (4-byte) + CustomerBgpAsn *string `mandatory:"false" json:"customerBgpAsn"` + + // The state of the BGP session. + BgpState BgpSessionInfoBgpStateEnum `mandatory:"false" json:"bgpState,omitempty"` + + // The state of the BGP IPv6 session. + BgpIpv6State BgpSessionInfoBgpIpv6StateEnum `mandatory:"false" json:"bgpIpv6State,omitempty"` +} + +func (m BgpSessionInfo) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BgpSessionInfo) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingBgpSessionInfoBgpStateEnum(string(m.BgpState)); !ok && m.BgpState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BgpState: %s. Supported values are: %s.", m.BgpState, strings.Join(GetBgpSessionInfoBgpStateEnumStringValues(), ","))) + } + if _, ok := GetMappingBgpSessionInfoBgpIpv6StateEnum(string(m.BgpIpv6State)); !ok && m.BgpIpv6State != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BgpIpv6State: %s. Supported values are: %s.", m.BgpIpv6State, strings.Join(GetBgpSessionInfoBgpIpv6StateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BgpSessionInfoBgpStateEnum Enum with underlying type: string +type BgpSessionInfoBgpStateEnum string + +// Set of constants representing the allowable values for BgpSessionInfoBgpStateEnum +const ( + BgpSessionInfoBgpStateUp BgpSessionInfoBgpStateEnum = "UP" + BgpSessionInfoBgpStateDown BgpSessionInfoBgpStateEnum = "DOWN" +) + +var mappingBgpSessionInfoBgpStateEnum = map[string]BgpSessionInfoBgpStateEnum{ + "UP": BgpSessionInfoBgpStateUp, + "DOWN": BgpSessionInfoBgpStateDown, +} + +var mappingBgpSessionInfoBgpStateEnumLowerCase = map[string]BgpSessionInfoBgpStateEnum{ + "up": BgpSessionInfoBgpStateUp, + "down": BgpSessionInfoBgpStateDown, +} + +// GetBgpSessionInfoBgpStateEnumValues Enumerates the set of values for BgpSessionInfoBgpStateEnum +func GetBgpSessionInfoBgpStateEnumValues() []BgpSessionInfoBgpStateEnum { + values := make([]BgpSessionInfoBgpStateEnum, 0) + for _, v := range mappingBgpSessionInfoBgpStateEnum { + values = append(values, v) + } + return values +} + +// GetBgpSessionInfoBgpStateEnumStringValues Enumerates the set of values in String for BgpSessionInfoBgpStateEnum +func GetBgpSessionInfoBgpStateEnumStringValues() []string { + return []string{ + "UP", + "DOWN", + } +} + +// GetMappingBgpSessionInfoBgpStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBgpSessionInfoBgpStateEnum(val string) (BgpSessionInfoBgpStateEnum, bool) { + enum, ok := mappingBgpSessionInfoBgpStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// BgpSessionInfoBgpIpv6StateEnum Enum with underlying type: string +type BgpSessionInfoBgpIpv6StateEnum string + +// Set of constants representing the allowable values for BgpSessionInfoBgpIpv6StateEnum +const ( + BgpSessionInfoBgpIpv6StateUp BgpSessionInfoBgpIpv6StateEnum = "UP" + BgpSessionInfoBgpIpv6StateDown BgpSessionInfoBgpIpv6StateEnum = "DOWN" +) + +var mappingBgpSessionInfoBgpIpv6StateEnum = map[string]BgpSessionInfoBgpIpv6StateEnum{ + "UP": BgpSessionInfoBgpIpv6StateUp, + "DOWN": BgpSessionInfoBgpIpv6StateDown, +} + +var mappingBgpSessionInfoBgpIpv6StateEnumLowerCase = map[string]BgpSessionInfoBgpIpv6StateEnum{ + "up": BgpSessionInfoBgpIpv6StateUp, + "down": BgpSessionInfoBgpIpv6StateDown, +} + +// GetBgpSessionInfoBgpIpv6StateEnumValues Enumerates the set of values for BgpSessionInfoBgpIpv6StateEnum +func GetBgpSessionInfoBgpIpv6StateEnumValues() []BgpSessionInfoBgpIpv6StateEnum { + values := make([]BgpSessionInfoBgpIpv6StateEnum, 0) + for _, v := range mappingBgpSessionInfoBgpIpv6StateEnum { + values = append(values, v) + } + return values +} + +// GetBgpSessionInfoBgpIpv6StateEnumStringValues Enumerates the set of values in String for BgpSessionInfoBgpIpv6StateEnum +func GetBgpSessionInfoBgpIpv6StateEnumStringValues() []string { + return []string{ + "UP", + "DOWN", + } +} + +// GetMappingBgpSessionInfoBgpIpv6StateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBgpSessionInfoBgpIpv6StateEnum(val string) (BgpSessionInfoBgpIpv6StateEnum, bool) { + enum, ok := mappingBgpSessionInfoBgpIpv6StateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/block_volume_replica.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/block_volume_replica.go new file mode 100644 index 000000000..5fcd6e59b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/block_volume_replica.go @@ -0,0 +1,163 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BlockVolumeReplica An asynchronous replica of a block volume that can then be used to create +// a new block volume or recover a block volume. For more information, see Overview +// of Cross-Region Volume Replication (https://docs.oracle.com/iaas/Content/Block/Concepts/volumereplication.htm) +// To use any of the API operations, you must be authorized in an IAM policy. +// If you're not authorized, talk to an administrator. If you're an administrator +// who needs to write policies to give users access, see Getting Started with +// Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type BlockVolumeReplica struct { + + // The availability domain of the block volume replica. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the block volume replica. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The block volume replica's Oracle ID (OCID). + Id *string `mandatory:"true" json:"id"` + + // The current state of a block volume replica. + LifecycleState BlockVolumeReplicaLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The size of the source block volume, in GBs. + SizeInGBs *int64 `mandatory:"true" json:"sizeInGBs"` + + // The date and time the block volume replica was created. Format defined + // by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time the block volume replica was last synced from the source block volume. + // Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeLastSynced *common.SDKTime `mandatory:"true" json:"timeLastSynced"` + + // The OCID of the source block volume. + BlockVolumeId *string `mandatory:"true" json:"blockVolumeId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The total size of the data transferred from the source block volume to the block volume replica, in GBs. + TotalDataTransferredInGBs *int64 `mandatory:"false" json:"totalDataTransferredInGBs"` + + // The OCID of the volume group replica. + VolumeGroupReplicaId *string `mandatory:"false" json:"volumeGroupReplicaId"` + + // The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m BlockVolumeReplica) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BlockVolumeReplica) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingBlockVolumeReplicaLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetBlockVolumeReplicaLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BlockVolumeReplicaLifecycleStateEnum Enum with underlying type: string +type BlockVolumeReplicaLifecycleStateEnum string + +// Set of constants representing the allowable values for BlockVolumeReplicaLifecycleStateEnum +const ( + BlockVolumeReplicaLifecycleStateProvisioning BlockVolumeReplicaLifecycleStateEnum = "PROVISIONING" + BlockVolumeReplicaLifecycleStateAvailable BlockVolumeReplicaLifecycleStateEnum = "AVAILABLE" + BlockVolumeReplicaLifecycleStateActivating BlockVolumeReplicaLifecycleStateEnum = "ACTIVATING" + BlockVolumeReplicaLifecycleStateTerminating BlockVolumeReplicaLifecycleStateEnum = "TERMINATING" + BlockVolumeReplicaLifecycleStateTerminated BlockVolumeReplicaLifecycleStateEnum = "TERMINATED" + BlockVolumeReplicaLifecycleStateFaulty BlockVolumeReplicaLifecycleStateEnum = "FAULTY" +) + +var mappingBlockVolumeReplicaLifecycleStateEnum = map[string]BlockVolumeReplicaLifecycleStateEnum{ + "PROVISIONING": BlockVolumeReplicaLifecycleStateProvisioning, + "AVAILABLE": BlockVolumeReplicaLifecycleStateAvailable, + "ACTIVATING": BlockVolumeReplicaLifecycleStateActivating, + "TERMINATING": BlockVolumeReplicaLifecycleStateTerminating, + "TERMINATED": BlockVolumeReplicaLifecycleStateTerminated, + "FAULTY": BlockVolumeReplicaLifecycleStateFaulty, +} + +var mappingBlockVolumeReplicaLifecycleStateEnumLowerCase = map[string]BlockVolumeReplicaLifecycleStateEnum{ + "provisioning": BlockVolumeReplicaLifecycleStateProvisioning, + "available": BlockVolumeReplicaLifecycleStateAvailable, + "activating": BlockVolumeReplicaLifecycleStateActivating, + "terminating": BlockVolumeReplicaLifecycleStateTerminating, + "terminated": BlockVolumeReplicaLifecycleStateTerminated, + "faulty": BlockVolumeReplicaLifecycleStateFaulty, +} + +// GetBlockVolumeReplicaLifecycleStateEnumValues Enumerates the set of values for BlockVolumeReplicaLifecycleStateEnum +func GetBlockVolumeReplicaLifecycleStateEnumValues() []BlockVolumeReplicaLifecycleStateEnum { + values := make([]BlockVolumeReplicaLifecycleStateEnum, 0) + for _, v := range mappingBlockVolumeReplicaLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetBlockVolumeReplicaLifecycleStateEnumStringValues Enumerates the set of values in String for BlockVolumeReplicaLifecycleStateEnum +func GetBlockVolumeReplicaLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "ACTIVATING", + "TERMINATING", + "TERMINATED", + "FAULTY", + } +} + +// GetMappingBlockVolumeReplicaLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBlockVolumeReplicaLifecycleStateEnum(val string) (BlockVolumeReplicaLifecycleStateEnum, bool) { + enum, ok := mappingBlockVolumeReplicaLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/block_volume_replica_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/block_volume_replica_details.go new file mode 100644 index 000000000..1732397fc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/block_volume_replica_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BlockVolumeReplicaDetails Contains the details for the block volume replica +type BlockVolumeReplicaDetails struct { + + // The availability domain of the block volume replica. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID of the Vault service key which is the master encryption key for the cross region block volume replicas, which will be used in the destination region to encrypt the block volume replica's encryption keys. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + XrrKmsKeyId *string `mandatory:"false" json:"xrrKmsKeyId"` +} + +func (m BlockVolumeReplicaDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BlockVolumeReplicaDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/block_volume_replica_info.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/block_volume_replica_info.go new file mode 100644 index 000000000..36fa7baaa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/block_volume_replica_info.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BlockVolumeReplicaInfo Information about the block volume replica in the destination availability domain. +type BlockVolumeReplicaInfo struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The block volume replica's Oracle ID (OCID). + BlockVolumeReplicaId *string `mandatory:"true" json:"blockVolumeReplicaId"` + + // The availability domain of the block volume replica. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m BlockVolumeReplicaInfo) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BlockVolumeReplicaInfo) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boolean_image_capability_schema_descriptor.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boolean_image_capability_schema_descriptor.go new file mode 100644 index 000000000..84882a8f0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boolean_image_capability_schema_descriptor.go @@ -0,0 +1,70 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BooleanImageCapabilitySchemaDescriptor Boolean type ImageCapabilitySchemaDescriptor +type BooleanImageCapabilitySchemaDescriptor struct { + + // the default value + DefaultValue *bool `mandatory:"false" json:"defaultValue"` + + Source ImageCapabilitySchemaDescriptorSourceEnum `mandatory:"true" json:"source"` +} + +// GetSource returns Source +func (m BooleanImageCapabilitySchemaDescriptor) GetSource() ImageCapabilitySchemaDescriptorSourceEnum { + return m.Source +} + +func (m BooleanImageCapabilitySchemaDescriptor) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BooleanImageCapabilitySchemaDescriptor) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingImageCapabilitySchemaDescriptorSourceEnum(string(m.Source)); !ok && m.Source != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Source: %s. Supported values are: %s.", m.Source, strings.Join(GetImageCapabilitySchemaDescriptorSourceEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m BooleanImageCapabilitySchemaDescriptor) MarshalJSON() (buff []byte, e error) { + type MarshalTypeBooleanImageCapabilitySchemaDescriptor BooleanImageCapabilitySchemaDescriptor + s := struct { + DiscriminatorParam string `json:"descriptorType"` + MarshalTypeBooleanImageCapabilitySchemaDescriptor + }{ + "boolean", + (MarshalTypeBooleanImageCapabilitySchemaDescriptor)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume.go new file mode 100644 index 000000000..9d3316c7e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume.go @@ -0,0 +1,290 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BootVolume A detachable boot volume device that contains the image used to boot a Compute instance. For more information, see +// Overview of Boot Volumes (https://docs.oracle.com/iaas/Content/Block/Concepts/bootvolumes.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type BootVolume struct { + + // The availability domain of the boot volume. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the boot volume. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The boot volume's Oracle ID (OCID). + Id *string `mandatory:"true" json:"id"` + + // The current state of a boot volume. + LifecycleState BootVolumeLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The size of the volume in MBs. The value must be a multiple of 1024. + // This field is deprecated. Please use sizeInGBs. + SizeInMBs *int64 `mandatory:"true" json:"sizeInMBs"` + + // The date and time the boot volume was created. Format defined + // by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The image OCID used to create the boot volume. + ImageId *string `mandatory:"false" json:"imageId"` + + // Specifies whether the boot volume's data has finished copying + // from the source boot volume or boot volume backup. + IsHydrated *bool `mandatory:"false" json:"isHydrated"` + + // The clusterPlacementGroup Id of the volume for volume placement. + ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` + + // The number of volume performance units (VPUs) that will be applied to this boot volume per GB, + // representing the Block Volume service's elastic performance options. + // See Block Volume Performance Levels (https://docs.oracle.com/iaas/Content/Block/Concepts/blockvolumeperformance.htm#perf_levels) for more information. + // Allowed values: + // * `10`: Represents Balanced option. + // * `20`: Represents Higher Performance option. + // * `30`-`120`: Represents the Ultra High Performance option. + // For performance autotune enabled volumes, it would be the Default(Minimum) VPUs/GB. + VpusPerGB *int64 `mandatory:"false" json:"vpusPerGB"` + + // The size of the boot volume in GBs. + SizeInGBs *int64 `mandatory:"false" json:"sizeInGBs"` + + SourceDetails BootVolumeSourceDetails `mandatory:"false" json:"sourceDetails"` + + // The OCID of the source volume group. + VolumeGroupId *string `mandatory:"false" json:"volumeGroupId"` + + // The OCID of the Vault service master encryption key assigned to the boot volume. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // Specifies whether the auto-tune performance is enabled for this boot volume. This field is deprecated. + // Use the `DetachedVolumeAutotunePolicy` instead to enable the volume for detached autotune. + IsAutoTuneEnabled *bool `mandatory:"false" json:"isAutoTuneEnabled"` + + // The number of Volume Performance Units per GB that this boot volume is effectively tuned to. + AutoTunedVpusPerGB *int64 `mandatory:"false" json:"autoTunedVpusPerGB"` + + // The list of boot volume replicas of this boot volume + BootVolumeReplicas []BootVolumeReplicaInfo `mandatory:"false" json:"bootVolumeReplicas"` + + // The list of autotune policies enabled for this volume. + AutotunePolicies []AutotunePolicy `mandatory:"false" json:"autotunePolicies"` +} + +func (m BootVolume) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BootVolume) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingBootVolumeLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetBootVolumeLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *BootVolume) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + ImageId *string `json:"imageId"` + IsHydrated *bool `json:"isHydrated"` + ClusterPlacementGroupId *string `json:"clusterPlacementGroupId"` + VpusPerGB *int64 `json:"vpusPerGB"` + SizeInGBs *int64 `json:"sizeInGBs"` + SourceDetails bootvolumesourcedetails `json:"sourceDetails"` + VolumeGroupId *string `json:"volumeGroupId"` + KmsKeyId *string `json:"kmsKeyId"` + IsAutoTuneEnabled *bool `json:"isAutoTuneEnabled"` + AutoTunedVpusPerGB *int64 `json:"autoTunedVpusPerGB"` + BootVolumeReplicas []BootVolumeReplicaInfo `json:"bootVolumeReplicas"` + AutotunePolicies []autotunepolicy `json:"autotunePolicies"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + Id *string `json:"id"` + LifecycleState BootVolumeLifecycleStateEnum `json:"lifecycleState"` + SizeInMBs *int64 `json:"sizeInMBs"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.ImageId = model.ImageId + + m.IsHydrated = model.IsHydrated + + m.ClusterPlacementGroupId = model.ClusterPlacementGroupId + + m.VpusPerGB = model.VpusPerGB + + m.SizeInGBs = model.SizeInGBs + + nn, e = model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.SourceDetails = nn.(BootVolumeSourceDetails) + } else { + m.SourceDetails = nil + } + + m.VolumeGroupId = model.VolumeGroupId + + m.KmsKeyId = model.KmsKeyId + + m.IsAutoTuneEnabled = model.IsAutoTuneEnabled + + m.AutoTunedVpusPerGB = model.AutoTunedVpusPerGB + + m.BootVolumeReplicas = make([]BootVolumeReplicaInfo, len(model.BootVolumeReplicas)) + copy(m.BootVolumeReplicas, model.BootVolumeReplicas) + m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) + for i, n := range model.AutotunePolicies { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.AutotunePolicies[i] = nn.(AutotunePolicy) + } else { + m.AutotunePolicies[i] = nil + } + } + m.AvailabilityDomain = model.AvailabilityDomain + + m.CompartmentId = model.CompartmentId + + m.Id = model.Id + + m.LifecycleState = model.LifecycleState + + m.SizeInMBs = model.SizeInMBs + + m.TimeCreated = model.TimeCreated + + return +} + +// BootVolumeLifecycleStateEnum Enum with underlying type: string +type BootVolumeLifecycleStateEnum string + +// Set of constants representing the allowable values for BootVolumeLifecycleStateEnum +const ( + BootVolumeLifecycleStateProvisioning BootVolumeLifecycleStateEnum = "PROVISIONING" + BootVolumeLifecycleStateRestoring BootVolumeLifecycleStateEnum = "RESTORING" + BootVolumeLifecycleStateAvailable BootVolumeLifecycleStateEnum = "AVAILABLE" + BootVolumeLifecycleStateTerminating BootVolumeLifecycleStateEnum = "TERMINATING" + BootVolumeLifecycleStateTerminated BootVolumeLifecycleStateEnum = "TERMINATED" + BootVolumeLifecycleStateFaulty BootVolumeLifecycleStateEnum = "FAULTY" +) + +var mappingBootVolumeLifecycleStateEnum = map[string]BootVolumeLifecycleStateEnum{ + "PROVISIONING": BootVolumeLifecycleStateProvisioning, + "RESTORING": BootVolumeLifecycleStateRestoring, + "AVAILABLE": BootVolumeLifecycleStateAvailable, + "TERMINATING": BootVolumeLifecycleStateTerminating, + "TERMINATED": BootVolumeLifecycleStateTerminated, + "FAULTY": BootVolumeLifecycleStateFaulty, +} + +var mappingBootVolumeLifecycleStateEnumLowerCase = map[string]BootVolumeLifecycleStateEnum{ + "provisioning": BootVolumeLifecycleStateProvisioning, + "restoring": BootVolumeLifecycleStateRestoring, + "available": BootVolumeLifecycleStateAvailable, + "terminating": BootVolumeLifecycleStateTerminating, + "terminated": BootVolumeLifecycleStateTerminated, + "faulty": BootVolumeLifecycleStateFaulty, +} + +// GetBootVolumeLifecycleStateEnumValues Enumerates the set of values for BootVolumeLifecycleStateEnum +func GetBootVolumeLifecycleStateEnumValues() []BootVolumeLifecycleStateEnum { + values := make([]BootVolumeLifecycleStateEnum, 0) + for _, v := range mappingBootVolumeLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetBootVolumeLifecycleStateEnumStringValues Enumerates the set of values in String for BootVolumeLifecycleStateEnum +func GetBootVolumeLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "RESTORING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + "FAULTY", + } +} + +// GetMappingBootVolumeLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBootVolumeLifecycleStateEnum(val string) (BootVolumeLifecycleStateEnum, bool) { + enum, ok := mappingBootVolumeLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_attachment.go new file mode 100644 index 000000000..fd33f3689 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_attachment.go @@ -0,0 +1,138 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BootVolumeAttachment Represents an attachment between a boot volume and an instance. +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type BootVolumeAttachment struct { + + // The availability domain of an instance. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"true" json:"bootVolumeId"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the boot volume attachment. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the instance the boot volume is attached to. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The current state of the boot volume attachment. + LifecycleState BootVolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the boot volume was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The date and time the boot volume attachment was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Whether in-transit encryption for the boot volume's paravirtualized attachment is enabled or not. + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` + + // Refer the top-level definition of encryptionInTransitType. + // The default value is NONE. + EncryptionInTransitType EncryptionInTransitTypeEnum `mandatory:"false" json:"encryptionInTransitType,omitempty"` +} + +func (m BootVolumeAttachment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BootVolumeAttachment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingBootVolumeAttachmentLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetBootVolumeAttachmentLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingEncryptionInTransitTypeEnum(string(m.EncryptionInTransitType)); !ok && m.EncryptionInTransitType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncryptionInTransitType: %s. Supported values are: %s.", m.EncryptionInTransitType, strings.Join(GetEncryptionInTransitTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BootVolumeAttachmentLifecycleStateEnum Enum with underlying type: string +type BootVolumeAttachmentLifecycleStateEnum string + +// Set of constants representing the allowable values for BootVolumeAttachmentLifecycleStateEnum +const ( + BootVolumeAttachmentLifecycleStateAttaching BootVolumeAttachmentLifecycleStateEnum = "ATTACHING" + BootVolumeAttachmentLifecycleStateAttached BootVolumeAttachmentLifecycleStateEnum = "ATTACHED" + BootVolumeAttachmentLifecycleStateDetaching BootVolumeAttachmentLifecycleStateEnum = "DETACHING" + BootVolumeAttachmentLifecycleStateDetached BootVolumeAttachmentLifecycleStateEnum = "DETACHED" +) + +var mappingBootVolumeAttachmentLifecycleStateEnum = map[string]BootVolumeAttachmentLifecycleStateEnum{ + "ATTACHING": BootVolumeAttachmentLifecycleStateAttaching, + "ATTACHED": BootVolumeAttachmentLifecycleStateAttached, + "DETACHING": BootVolumeAttachmentLifecycleStateDetaching, + "DETACHED": BootVolumeAttachmentLifecycleStateDetached, +} + +var mappingBootVolumeAttachmentLifecycleStateEnumLowerCase = map[string]BootVolumeAttachmentLifecycleStateEnum{ + "attaching": BootVolumeAttachmentLifecycleStateAttaching, + "attached": BootVolumeAttachmentLifecycleStateAttached, + "detaching": BootVolumeAttachmentLifecycleStateDetaching, + "detached": BootVolumeAttachmentLifecycleStateDetached, +} + +// GetBootVolumeAttachmentLifecycleStateEnumValues Enumerates the set of values for BootVolumeAttachmentLifecycleStateEnum +func GetBootVolumeAttachmentLifecycleStateEnumValues() []BootVolumeAttachmentLifecycleStateEnum { + values := make([]BootVolumeAttachmentLifecycleStateEnum, 0) + for _, v := range mappingBootVolumeAttachmentLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetBootVolumeAttachmentLifecycleStateEnumStringValues Enumerates the set of values in String for BootVolumeAttachmentLifecycleStateEnum +func GetBootVolumeAttachmentLifecycleStateEnumStringValues() []string { + return []string{ + "ATTACHING", + "ATTACHED", + "DETACHING", + "DETACHED", + } +} + +// GetMappingBootVolumeAttachmentLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBootVolumeAttachmentLifecycleStateEnum(val string) (BootVolumeAttachmentLifecycleStateEnum, bool) { + enum, ok := mappingBootVolumeAttachmentLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_backup.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_backup.go new file mode 100644 index 000000000..accd4d0aa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_backup.go @@ -0,0 +1,270 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BootVolumeBackup A point-in-time copy of a boot volume that can then be used to create +// a new boot volume or recover a boot volume. For more information, see Overview +// of Boot Volume Backups (https://docs.oracle.com/iaas/Content/Block/Concepts/bootvolumebackups.htm) +// To use any of the API operations, you must be authorized in an IAM policy. +// If you're not authorized, talk to an administrator. If you're an administrator +// who needs to write policies to give users access, see Getting Started with +// Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type BootVolumeBackup struct { + + // The OCID of the compartment that contains the boot volume backup. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the boot volume backup. + Id *string `mandatory:"true" json:"id"` + + // The current state of a boot volume backup. + LifecycleState BootVolumeBackupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the boot volume backup was created. This is the time the actual point-in-time image + // of the volume data was taken. Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"false" json:"bootVolumeId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The date and time the volume backup will expire and be automatically deleted. + // Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). This parameter will always be present for backups that + // were created automatically by a scheduled-backup policy. For manually created backups, + // it will be absent, signifying that there is no expiration time and the backup will + // last forever until manually deleted. + ExpirationTime *common.SDKTime `mandatory:"false" json:"expirationTime"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The image OCID used to create the boot volume the backup is taken from. + ImageId *string `mandatory:"false" json:"imageId"` + + // The OCID of the Vault service master encryption assigned to the boot volume backup. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // The size of the boot volume, in GBs. + SizeInGBs *int64 `mandatory:"false" json:"sizeInGBs"` + + // The OCID of the source boot volume backup. + SourceBootVolumeBackupId *string `mandatory:"false" json:"sourceBootVolumeBackupId"` + + // Specifies whether the backup was created manually, or via scheduled backup policy. + SourceType BootVolumeBackupSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` + + // The date and time the request to create the boot volume backup was received. Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeRequestReceived *common.SDKTime `mandatory:"false" json:"timeRequestReceived"` + + // The type of a volume backup. + Type BootVolumeBackupTypeEnum `mandatory:"false" json:"type,omitempty"` + + // The size used by the backup, in GBs. It is typically smaller than sizeInGBs, depending on the space + // consumed on the boot volume and whether the backup is full or incremental. + UniqueSizeInGBs *int64 `mandatory:"false" json:"uniqueSizeInGBs"` +} + +func (m BootVolumeBackup) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BootVolumeBackup) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingBootVolumeBackupLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetBootVolumeBackupLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingBootVolumeBackupSourceTypeEnum(string(m.SourceType)); !ok && m.SourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceType: %s. Supported values are: %s.", m.SourceType, strings.Join(GetBootVolumeBackupSourceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingBootVolumeBackupTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetBootVolumeBackupTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BootVolumeBackupLifecycleStateEnum Enum with underlying type: string +type BootVolumeBackupLifecycleStateEnum string + +// Set of constants representing the allowable values for BootVolumeBackupLifecycleStateEnum +const ( + BootVolumeBackupLifecycleStateCreating BootVolumeBackupLifecycleStateEnum = "CREATING" + BootVolumeBackupLifecycleStateAvailable BootVolumeBackupLifecycleStateEnum = "AVAILABLE" + BootVolumeBackupLifecycleStateTerminating BootVolumeBackupLifecycleStateEnum = "TERMINATING" + BootVolumeBackupLifecycleStateTerminated BootVolumeBackupLifecycleStateEnum = "TERMINATED" + BootVolumeBackupLifecycleStateFaulty BootVolumeBackupLifecycleStateEnum = "FAULTY" + BootVolumeBackupLifecycleStateRequestReceived BootVolumeBackupLifecycleStateEnum = "REQUEST_RECEIVED" +) + +var mappingBootVolumeBackupLifecycleStateEnum = map[string]BootVolumeBackupLifecycleStateEnum{ + "CREATING": BootVolumeBackupLifecycleStateCreating, + "AVAILABLE": BootVolumeBackupLifecycleStateAvailable, + "TERMINATING": BootVolumeBackupLifecycleStateTerminating, + "TERMINATED": BootVolumeBackupLifecycleStateTerminated, + "FAULTY": BootVolumeBackupLifecycleStateFaulty, + "REQUEST_RECEIVED": BootVolumeBackupLifecycleStateRequestReceived, +} + +var mappingBootVolumeBackupLifecycleStateEnumLowerCase = map[string]BootVolumeBackupLifecycleStateEnum{ + "creating": BootVolumeBackupLifecycleStateCreating, + "available": BootVolumeBackupLifecycleStateAvailable, + "terminating": BootVolumeBackupLifecycleStateTerminating, + "terminated": BootVolumeBackupLifecycleStateTerminated, + "faulty": BootVolumeBackupLifecycleStateFaulty, + "request_received": BootVolumeBackupLifecycleStateRequestReceived, +} + +// GetBootVolumeBackupLifecycleStateEnumValues Enumerates the set of values for BootVolumeBackupLifecycleStateEnum +func GetBootVolumeBackupLifecycleStateEnumValues() []BootVolumeBackupLifecycleStateEnum { + values := make([]BootVolumeBackupLifecycleStateEnum, 0) + for _, v := range mappingBootVolumeBackupLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetBootVolumeBackupLifecycleStateEnumStringValues Enumerates the set of values in String for BootVolumeBackupLifecycleStateEnum +func GetBootVolumeBackupLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + "FAULTY", + "REQUEST_RECEIVED", + } +} + +// GetMappingBootVolumeBackupLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBootVolumeBackupLifecycleStateEnum(val string) (BootVolumeBackupLifecycleStateEnum, bool) { + enum, ok := mappingBootVolumeBackupLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// BootVolumeBackupSourceTypeEnum Enum with underlying type: string +type BootVolumeBackupSourceTypeEnum string + +// Set of constants representing the allowable values for BootVolumeBackupSourceTypeEnum +const ( + BootVolumeBackupSourceTypeManual BootVolumeBackupSourceTypeEnum = "MANUAL" + BootVolumeBackupSourceTypeScheduled BootVolumeBackupSourceTypeEnum = "SCHEDULED" +) + +var mappingBootVolumeBackupSourceTypeEnum = map[string]BootVolumeBackupSourceTypeEnum{ + "MANUAL": BootVolumeBackupSourceTypeManual, + "SCHEDULED": BootVolumeBackupSourceTypeScheduled, +} + +var mappingBootVolumeBackupSourceTypeEnumLowerCase = map[string]BootVolumeBackupSourceTypeEnum{ + "manual": BootVolumeBackupSourceTypeManual, + "scheduled": BootVolumeBackupSourceTypeScheduled, +} + +// GetBootVolumeBackupSourceTypeEnumValues Enumerates the set of values for BootVolumeBackupSourceTypeEnum +func GetBootVolumeBackupSourceTypeEnumValues() []BootVolumeBackupSourceTypeEnum { + values := make([]BootVolumeBackupSourceTypeEnum, 0) + for _, v := range mappingBootVolumeBackupSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetBootVolumeBackupSourceTypeEnumStringValues Enumerates the set of values in String for BootVolumeBackupSourceTypeEnum +func GetBootVolumeBackupSourceTypeEnumStringValues() []string { + return []string{ + "MANUAL", + "SCHEDULED", + } +} + +// GetMappingBootVolumeBackupSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBootVolumeBackupSourceTypeEnum(val string) (BootVolumeBackupSourceTypeEnum, bool) { + enum, ok := mappingBootVolumeBackupSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// BootVolumeBackupTypeEnum Enum with underlying type: string +type BootVolumeBackupTypeEnum string + +// Set of constants representing the allowable values for BootVolumeBackupTypeEnum +const ( + BootVolumeBackupTypeFull BootVolumeBackupTypeEnum = "FULL" + BootVolumeBackupTypeIncremental BootVolumeBackupTypeEnum = "INCREMENTAL" +) + +var mappingBootVolumeBackupTypeEnum = map[string]BootVolumeBackupTypeEnum{ + "FULL": BootVolumeBackupTypeFull, + "INCREMENTAL": BootVolumeBackupTypeIncremental, +} + +var mappingBootVolumeBackupTypeEnumLowerCase = map[string]BootVolumeBackupTypeEnum{ + "full": BootVolumeBackupTypeFull, + "incremental": BootVolumeBackupTypeIncremental, +} + +// GetBootVolumeBackupTypeEnumValues Enumerates the set of values for BootVolumeBackupTypeEnum +func GetBootVolumeBackupTypeEnumValues() []BootVolumeBackupTypeEnum { + values := make([]BootVolumeBackupTypeEnum, 0) + for _, v := range mappingBootVolumeBackupTypeEnum { + values = append(values, v) + } + return values +} + +// GetBootVolumeBackupTypeEnumStringValues Enumerates the set of values in String for BootVolumeBackupTypeEnum +func GetBootVolumeBackupTypeEnumStringValues() []string { + return []string{ + "FULL", + "INCREMENTAL", + } +} + +// GetMappingBootVolumeBackupTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBootVolumeBackupTypeEnum(val string) (BootVolumeBackupTypeEnum, bool) { + enum, ok := mappingBootVolumeBackupTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_kms_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_kms_key.go new file mode 100644 index 000000000..d1ababab9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_kms_key.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BootVolumeKmsKey The Vault service master encryption key associated with this volume. +type BootVolumeKmsKey struct { + + // The OCID of the Vault service key assigned to this volume. If the volume is not using Vault service, then the `kmsKeyId` will be a null string. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m BootVolumeKmsKey) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BootVolumeKmsKey) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_replica.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_replica.go new file mode 100644 index 000000000..80b76567f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_replica.go @@ -0,0 +1,166 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BootVolumeReplica An asynchronous replica of a boot volume that can then be used to create +// a new boot volume or recover a boot volume. For more information, see Overview +// of Cross-Region Volume Replication (https://docs.oracle.com/iaas/Content/Block/Concepts/volumereplication.htm) +// To use any of the API operations, you must be authorized in an IAM policy. +// If you're not authorized, talk to an administrator. If you're an administrator +// who needs to write policies to give users access, see Getting Started with +// Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type BootVolumeReplica struct { + + // The availability domain of the boot volume replica. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the boot volume replica. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The boot volume replica's Oracle ID (OCID). + Id *string `mandatory:"true" json:"id"` + + // The current state of a boot volume replica. + LifecycleState BootVolumeReplicaLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The size of the source boot volume, in GBs. + SizeInGBs *int64 `mandatory:"true" json:"sizeInGBs"` + + // The date and time the boot volume replica was created. Format defined + // by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time the boot volume replica was last synced from the source boot volume. + // Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeLastSynced *common.SDKTime `mandatory:"true" json:"timeLastSynced"` + + // The OCID of the source boot volume. + BootVolumeId *string `mandatory:"true" json:"bootVolumeId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The image OCID used to create the boot volume the replica is replicated from. + ImageId *string `mandatory:"false" json:"imageId"` + + // The total size of the data transferred from the source boot volume to the boot volume replica, in GBs. + TotalDataTransferredInGBs *int64 `mandatory:"false" json:"totalDataTransferredInGBs"` + + // The OCID of the volume group replica. + VolumeGroupReplicaId *string `mandatory:"false" json:"volumeGroupReplicaId"` + + // The OCID of the Vault service key to assign as the master encryption key for the boot volume replica, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m BootVolumeReplica) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BootVolumeReplica) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingBootVolumeReplicaLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetBootVolumeReplicaLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BootVolumeReplicaLifecycleStateEnum Enum with underlying type: string +type BootVolumeReplicaLifecycleStateEnum string + +// Set of constants representing the allowable values for BootVolumeReplicaLifecycleStateEnum +const ( + BootVolumeReplicaLifecycleStateProvisioning BootVolumeReplicaLifecycleStateEnum = "PROVISIONING" + BootVolumeReplicaLifecycleStateAvailable BootVolumeReplicaLifecycleStateEnum = "AVAILABLE" + BootVolumeReplicaLifecycleStateActivating BootVolumeReplicaLifecycleStateEnum = "ACTIVATING" + BootVolumeReplicaLifecycleStateTerminating BootVolumeReplicaLifecycleStateEnum = "TERMINATING" + BootVolumeReplicaLifecycleStateTerminated BootVolumeReplicaLifecycleStateEnum = "TERMINATED" + BootVolumeReplicaLifecycleStateFaulty BootVolumeReplicaLifecycleStateEnum = "FAULTY" +) + +var mappingBootVolumeReplicaLifecycleStateEnum = map[string]BootVolumeReplicaLifecycleStateEnum{ + "PROVISIONING": BootVolumeReplicaLifecycleStateProvisioning, + "AVAILABLE": BootVolumeReplicaLifecycleStateAvailable, + "ACTIVATING": BootVolumeReplicaLifecycleStateActivating, + "TERMINATING": BootVolumeReplicaLifecycleStateTerminating, + "TERMINATED": BootVolumeReplicaLifecycleStateTerminated, + "FAULTY": BootVolumeReplicaLifecycleStateFaulty, +} + +var mappingBootVolumeReplicaLifecycleStateEnumLowerCase = map[string]BootVolumeReplicaLifecycleStateEnum{ + "provisioning": BootVolumeReplicaLifecycleStateProvisioning, + "available": BootVolumeReplicaLifecycleStateAvailable, + "activating": BootVolumeReplicaLifecycleStateActivating, + "terminating": BootVolumeReplicaLifecycleStateTerminating, + "terminated": BootVolumeReplicaLifecycleStateTerminated, + "faulty": BootVolumeReplicaLifecycleStateFaulty, +} + +// GetBootVolumeReplicaLifecycleStateEnumValues Enumerates the set of values for BootVolumeReplicaLifecycleStateEnum +func GetBootVolumeReplicaLifecycleStateEnumValues() []BootVolumeReplicaLifecycleStateEnum { + values := make([]BootVolumeReplicaLifecycleStateEnum, 0) + for _, v := range mappingBootVolumeReplicaLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetBootVolumeReplicaLifecycleStateEnumStringValues Enumerates the set of values in String for BootVolumeReplicaLifecycleStateEnum +func GetBootVolumeReplicaLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "ACTIVATING", + "TERMINATING", + "TERMINATED", + "FAULTY", + } +} + +// GetMappingBootVolumeReplicaLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBootVolumeReplicaLifecycleStateEnum(val string) (BootVolumeReplicaLifecycleStateEnum, bool) { + enum, ok := mappingBootVolumeReplicaLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_replica_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_replica_details.go new file mode 100644 index 000000000..5267bf7fe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_replica_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BootVolumeReplicaDetails Contains the details for the boot volume replica +type BootVolumeReplicaDetails struct { + + // The availability domain of the boot volume replica. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID of the Vault service key which is the master encryption key for the cross region boot volume replicas, which will be used in the destination region to encrypt the boot volume replica's encryption keys. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + XrrKmsKeyId *string `mandatory:"false" json:"xrrKmsKeyId"` +} + +func (m BootVolumeReplicaDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BootVolumeReplicaDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_replica_info.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_replica_info.go new file mode 100644 index 000000000..b854ec2a9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_replica_info.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BootVolumeReplicaInfo Information about the boot volume replica in the destination availability domain. +type BootVolumeReplicaInfo struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The boot volume replica's Oracle ID (OCID). + BootVolumeReplicaId *string `mandatory:"true" json:"bootVolumeReplicaId"` + + // The availability domain of the boot volume replica. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m BootVolumeReplicaInfo) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BootVolumeReplicaInfo) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_details.go new file mode 100644 index 000000000..f262f661c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_details.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BootVolumeSourceDetails The representation of BootVolumeSourceDetails +type BootVolumeSourceDetails interface { +} + +type bootvolumesourcedetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *bootvolumesourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerbootvolumesourcedetails bootvolumesourcedetails + s := struct { + Model Unmarshalerbootvolumesourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *bootvolumesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "bootVolumeBackup": + mm := BootVolumeSourceFromBootVolumeBackupDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "bootVolume": + mm := BootVolumeSourceFromBootVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "bootVolumeReplica": + mm := BootVolumeSourceFromBootVolumeReplicaDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "bootVolumeBackupDelta": + mm := BootVolumeSourceFromBootVolumeBackupDeltaDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for BootVolumeSourceDetails: %s.", m.Type) + return *m, nil + } +} + +func (m bootvolumesourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m bootvolumesourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_from_boot_volume_backup_delta_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_from_boot_volume_backup_delta_details.go new file mode 100644 index 000000000..20d7236ca --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_from_boot_volume_backup_delta_details.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BootVolumeSourceFromBootVolumeBackupDeltaDetails Specifies the boot volume backups (first & second) and block size in bytes. +type BootVolumeSourceFromBootVolumeBackupDeltaDetails struct { + + // The OCID of the first boot volume backup. + FirstBackupId *string `mandatory:"true" json:"firstBackupId"` + + // The OCID of the second boot volume backup. + SecondBackupId *string `mandatory:"true" json:"secondBackupId"` + + // Block size in bytes to be considered while performing volume restore. The value must be a power of 2; ranging from 4KB (4096 bytes) to 1MB (1048576 bytes). If omitted, defaults to 4,096 bytes (4 KiB). + ChangeBlockSizeInBytes *int64 `mandatory:"false" json:"changeBlockSizeInBytes"` +} + +func (m BootVolumeSourceFromBootVolumeBackupDeltaDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BootVolumeSourceFromBootVolumeBackupDeltaDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m BootVolumeSourceFromBootVolumeBackupDeltaDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeBootVolumeSourceFromBootVolumeBackupDeltaDetails BootVolumeSourceFromBootVolumeBackupDeltaDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeBootVolumeSourceFromBootVolumeBackupDeltaDetails + }{ + "bootVolumeBackupDelta", + (MarshalTypeBootVolumeSourceFromBootVolumeBackupDeltaDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_from_boot_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_from_boot_volume_backup_details.go new file mode 100644 index 000000000..ef5a6ab5b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_from_boot_volume_backup_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BootVolumeSourceFromBootVolumeBackupDetails Specifies the boot volume backup. +type BootVolumeSourceFromBootVolumeBackupDetails struct { + + // The OCID of the boot volume backup. + Id *string `mandatory:"true" json:"id"` +} + +func (m BootVolumeSourceFromBootVolumeBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BootVolumeSourceFromBootVolumeBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m BootVolumeSourceFromBootVolumeBackupDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeBootVolumeSourceFromBootVolumeBackupDetails BootVolumeSourceFromBootVolumeBackupDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeBootVolumeSourceFromBootVolumeBackupDetails + }{ + "bootVolumeBackup", + (MarshalTypeBootVolumeSourceFromBootVolumeBackupDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_from_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_from_boot_volume_details.go new file mode 100644 index 000000000..ec4ccd3c2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_from_boot_volume_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BootVolumeSourceFromBootVolumeDetails Specifies the source boot volume. +type BootVolumeSourceFromBootVolumeDetails struct { + + // The OCID of the boot volume. + Id *string `mandatory:"true" json:"id"` +} + +func (m BootVolumeSourceFromBootVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BootVolumeSourceFromBootVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m BootVolumeSourceFromBootVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeBootVolumeSourceFromBootVolumeDetails BootVolumeSourceFromBootVolumeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeBootVolumeSourceFromBootVolumeDetails + }{ + "bootVolume", + (MarshalTypeBootVolumeSourceFromBootVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_from_boot_volume_replica_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_from_boot_volume_replica_details.go new file mode 100644 index 000000000..d687a6da0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/boot_volume_source_from_boot_volume_replica_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BootVolumeSourceFromBootVolumeReplicaDetails Specifies the source boot volume replica which the boot volume will be created from. +// The boot volume replica shoulbe be in the same availability domain as the boot volume. +// Only one volume can be created from a replica at the same time. +type BootVolumeSourceFromBootVolumeReplicaDetails struct { + + // The OCID of the boot volume replica. + Id *string `mandatory:"true" json:"id"` +} + +func (m BootVolumeSourceFromBootVolumeReplicaDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BootVolumeSourceFromBootVolumeReplicaDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m BootVolumeSourceFromBootVolumeReplicaDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeBootVolumeSourceFromBootVolumeReplicaDetails BootVolumeSourceFromBootVolumeReplicaDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeBootVolumeSourceFromBootVolumeReplicaDetails + }{ + "bootVolumeReplica", + (MarshalTypeBootVolumeSourceFromBootVolumeReplicaDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_add_virtual_circuit_public_prefixes_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_add_virtual_circuit_public_prefixes_details.go new file mode 100644 index 000000000..a0c98ff1f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_add_virtual_circuit_public_prefixes_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkAddVirtualCircuitPublicPrefixesDetails The representation of BulkAddVirtualCircuitPublicPrefixesDetails +type BulkAddVirtualCircuitPublicPrefixesDetails struct { + + // The public IP prefixes (CIDRs) to add to the public virtual circuit. + PublicPrefixes []CreateVirtualCircuitPublicPrefixDetails `mandatory:"true" json:"publicPrefixes"` +} + +func (m BulkAddVirtualCircuitPublicPrefixesDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkAddVirtualCircuitPublicPrefixesDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_add_virtual_circuit_public_prefixes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_add_virtual_circuit_public_prefixes_request_response.go new file mode 100644 index 000000000..8a81041e5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_add_virtual_circuit_public_prefixes_request_response.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// BulkAddVirtualCircuitPublicPrefixesRequest wrapper for the BulkAddVirtualCircuitPublicPrefixes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkAddVirtualCircuitPublicPrefixes.go.html to see an example of how to use BulkAddVirtualCircuitPublicPrefixesRequest. +type BulkAddVirtualCircuitPublicPrefixesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit. + VirtualCircuitId *string `mandatory:"true" contributesTo:"path" name:"virtualCircuitId"` + + // Request with publix prefixes to be added to the virtual circuit + BulkAddVirtualCircuitPublicPrefixesDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request BulkAddVirtualCircuitPublicPrefixesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request BulkAddVirtualCircuitPublicPrefixesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request BulkAddVirtualCircuitPublicPrefixesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request BulkAddVirtualCircuitPublicPrefixesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request BulkAddVirtualCircuitPublicPrefixesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BulkAddVirtualCircuitPublicPrefixesResponse wrapper for the BulkAddVirtualCircuitPublicPrefixes operation +type BulkAddVirtualCircuitPublicPrefixesResponse struct { + + // The underlying http response + RawResponse *http.Response +} + +func (response BulkAddVirtualCircuitPublicPrefixesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response BulkAddVirtualCircuitPublicPrefixesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_ipv6s_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_ipv6s_details.go new file mode 100644 index 000000000..f809ee990 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_ipv6s_details.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkCreateIpv6sDetails Details needed to create secondary IPv6 addresses with a bulk operation. +type BulkCreateIpv6sDetails struct { + + // A secondary IPv6 address to assign. + BulkCreateIpv6sItem []BulkCreateIpv6sItem `mandatory:"true" json:"bulkCreateIpv6sItem"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC to assign the IPv6s to. The + // IPv6s will be in the VNIC's subnet. + VnicId *string `mandatory:"false" json:"vnicId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet from which the IPv6s are to be drawn. The IP addresses, + // *if supplied*, must be valid for the given subnet, only valid for reserved IPs currently. + SubnetId *string `mandatory:"false" json:"subnetId"` +} + +func (m BulkCreateIpv6sDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkCreateIpv6sDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_ipv6s_item.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_ipv6s_item.go new file mode 100644 index 000000000..29e85accb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_ipv6s_item.go @@ -0,0 +1,127 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkCreateIpv6sItem Secondary IPv6 object to use as part of bulk IPv6 object creation. +type BulkCreateIpv6sItem struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // An IPv6 address of your choice. Must be an available IP address within + // the subnet's CIDR. If you don't specify a value, Oracle automatically + // assigns an IPv6 address from the subnet. The subnet is the one that + // contains the VNIC you specify in `vnicId`. + // Example: `2001:DB8::` + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // Lifetime of the IP address. + // There are two types of IPs: + // - Ephemeral + // - Reserved + Lifetime BulkCreateIpv6sItemLifetimeEnum `mandatory:"false" json:"lifetime,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see + // Per-resource Routing (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing). + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // The IPv6 prefix allocated to the subnet. This is required if more than one IPv6 prefix exists on the subnet. + Ipv6SubnetCidr *string `mandatory:"false" json:"ipv6SubnetCidr"` + + // The hostname associated with the IPv6 address. Only the hostname label, not the FQDN. + Hostname *string `mandatory:"false" json:"hostname"` + + // Length of the CIDR range. Optional field to specify a flexible CIDR. + CidrPrefixLength *int `mandatory:"false" json:"cidrPrefixLength"` +} + +func (m BulkCreateIpv6sItem) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkCreateIpv6sItem) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingBulkCreateIpv6sItemLifetimeEnum(string(m.Lifetime)); !ok && m.Lifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Lifetime: %s. Supported values are: %s.", m.Lifetime, strings.Join(GetBulkCreateIpv6sItemLifetimeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BulkCreateIpv6sItemLifetimeEnum Enum with underlying type: string +type BulkCreateIpv6sItemLifetimeEnum string + +// Set of constants representing the allowable values for BulkCreateIpv6sItemLifetimeEnum +const ( + BulkCreateIpv6sItemLifetimeEphemeral BulkCreateIpv6sItemLifetimeEnum = "EPHEMERAL" + BulkCreateIpv6sItemLifetimeReserved BulkCreateIpv6sItemLifetimeEnum = "RESERVED" +) + +var mappingBulkCreateIpv6sItemLifetimeEnum = map[string]BulkCreateIpv6sItemLifetimeEnum{ + "EPHEMERAL": BulkCreateIpv6sItemLifetimeEphemeral, + "RESERVED": BulkCreateIpv6sItemLifetimeReserved, +} + +var mappingBulkCreateIpv6sItemLifetimeEnumLowerCase = map[string]BulkCreateIpv6sItemLifetimeEnum{ + "ephemeral": BulkCreateIpv6sItemLifetimeEphemeral, + "reserved": BulkCreateIpv6sItemLifetimeReserved, +} + +// GetBulkCreateIpv6sItemLifetimeEnumValues Enumerates the set of values for BulkCreateIpv6sItemLifetimeEnum +func GetBulkCreateIpv6sItemLifetimeEnumValues() []BulkCreateIpv6sItemLifetimeEnum { + values := make([]BulkCreateIpv6sItemLifetimeEnum, 0) + for _, v := range mappingBulkCreateIpv6sItemLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetBulkCreateIpv6sItemLifetimeEnumStringValues Enumerates the set of values in String for BulkCreateIpv6sItemLifetimeEnum +func GetBulkCreateIpv6sItemLifetimeEnumStringValues() []string { + return []string{ + "EPHEMERAL", + "RESERVED", + } +} + +// GetMappingBulkCreateIpv6sItemLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBulkCreateIpv6sItemLifetimeEnum(val string) (BulkCreateIpv6sItemLifetimeEnum, bool) { + enum, ok := mappingBulkCreateIpv6sItemLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_ipv6s_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_ipv6s_request_response.go new file mode 100644 index 000000000..1a9236dd2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_ipv6s_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// BulkCreateIpv6sRequest wrapper for the BulkCreateIpv6s operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkCreateIpv6s.go.html to see an example of how to use BulkCreateIpv6sRequest. +type BulkCreateIpv6sRequest struct { + + // Create Ipv6s in bulk. + BulkCreateIpv6sDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request BulkCreateIpv6sRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request BulkCreateIpv6sRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request BulkCreateIpv6sRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request BulkCreateIpv6sRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request BulkCreateIpv6sRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BulkCreateIpv6sResponse wrapper for the BulkCreateIpv6s operation +type BulkCreateIpv6sResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response BulkCreateIpv6sResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response BulkCreateIpv6sResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_private_ip_item.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_private_ip_item.go new file mode 100644 index 000000000..a295dd4ac --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_private_ip_item.go @@ -0,0 +1,139 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkCreatePrivateIpItem An object used to create secondary private IPv4 addresses in a bulk operation. +type BulkCreatePrivateIpItem struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The hostname for the private IP. Used for DNS. The value + // is the hostname portion of the private IP's fully qualified domain name (FQDN) + // (for example, `bminstance1` in FQDN `bminstance1.subnet123.vcn1.oraclevcn.com`). + // Must be unique across all VNICs in the subnet and comply with + // RFC 952 (https://tools.ietf.org/html/rfc952) and + // RFC 1123 (https://tools.ietf.org/html/rfc1123). + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + // Example: `bminstance1` + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // A private IP address of your choice. Must be an available IP address within + // the subnet's CIDR. If you don't specify a value, Oracle automatically + // assigns a private IP address from the subnet. + // Example: `10.0.3.3` + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // Lifetime of the IP address. + // There are two types of IPs: + // - Ephemeral + // - Reserved + Lifetime BulkCreatePrivateIpItemLifetimeEnum `mandatory:"false" json:"lifetime,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see + // Per-resource Routing (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing). + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // An optional field that when combined with the ipAddress field, will be used to allocate secondary IPv4 CIDRs. + // The CIDR range created by this combination must be within the subnet's CIDR + // and the CIDR range should not collide with any existing IPv4 address allocation. + // The VNIC ID specified in the request object should not already been assigned more than the max IPv4 addresses. + // If you don't specify a value, this option will be ignored. + // Example: 18 + CidrPrefixLength *int `mandatory:"false" json:"cidrPrefixLength"` + + // Any one of the IPv4 CIDRs allocated to the subnet. + Ipv4SubnetCidrAtCreation *string `mandatory:"false" json:"ipv4SubnetCidrAtCreation"` +} + +func (m BulkCreatePrivateIpItem) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkCreatePrivateIpItem) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingBulkCreatePrivateIpItemLifetimeEnum(string(m.Lifetime)); !ok && m.Lifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Lifetime: %s. Supported values are: %s.", m.Lifetime, strings.Join(GetBulkCreatePrivateIpItemLifetimeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BulkCreatePrivateIpItemLifetimeEnum Enum with underlying type: string +type BulkCreatePrivateIpItemLifetimeEnum string + +// Set of constants representing the allowable values for BulkCreatePrivateIpItemLifetimeEnum +const ( + BulkCreatePrivateIpItemLifetimeEphemeral BulkCreatePrivateIpItemLifetimeEnum = "EPHEMERAL" + BulkCreatePrivateIpItemLifetimeReserved BulkCreatePrivateIpItemLifetimeEnum = "RESERVED" +) + +var mappingBulkCreatePrivateIpItemLifetimeEnum = map[string]BulkCreatePrivateIpItemLifetimeEnum{ + "EPHEMERAL": BulkCreatePrivateIpItemLifetimeEphemeral, + "RESERVED": BulkCreatePrivateIpItemLifetimeReserved, +} + +var mappingBulkCreatePrivateIpItemLifetimeEnumLowerCase = map[string]BulkCreatePrivateIpItemLifetimeEnum{ + "ephemeral": BulkCreatePrivateIpItemLifetimeEphemeral, + "reserved": BulkCreatePrivateIpItemLifetimeReserved, +} + +// GetBulkCreatePrivateIpItemLifetimeEnumValues Enumerates the set of values for BulkCreatePrivateIpItemLifetimeEnum +func GetBulkCreatePrivateIpItemLifetimeEnumValues() []BulkCreatePrivateIpItemLifetimeEnum { + values := make([]BulkCreatePrivateIpItemLifetimeEnum, 0) + for _, v := range mappingBulkCreatePrivateIpItemLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetBulkCreatePrivateIpItemLifetimeEnumStringValues Enumerates the set of values in String for BulkCreatePrivateIpItemLifetimeEnum +func GetBulkCreatePrivateIpItemLifetimeEnumStringValues() []string { + return []string{ + "EPHEMERAL", + "RESERVED", + } +} + +// GetMappingBulkCreatePrivateIpItemLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBulkCreatePrivateIpItemLifetimeEnum(val string) (BulkCreatePrivateIpItemLifetimeEnum, bool) { + enum, ok := mappingBulkCreatePrivateIpItemLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_private_ips_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_private_ips_details.go new file mode 100644 index 000000000..8405f9c18 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_private_ips_details.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkCreatePrivateIpsDetails Details used to create secondary private IPv4 addresses in a bulk operation. +type BulkCreatePrivateIpsDetails struct { + + // A secondary IPv4 address to assign. + BulkCreatePrivateIpItem []BulkCreatePrivateIpItem `mandatory:"true" json:"bulkCreatePrivateIpItem"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC to assign the private IPs to. The VNIC and private IPs must be in the same subnet. + VnicId *string `mandatory:"false" json:"vnicId"` + + // Use this attribute only with the Oracle Cloud VMware Solution. The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VLAN from which the private IPs is to be drawn. The IP addresses, *if supplied*, must be valid for the given VLAN. See Vlan. + VlanId *string `mandatory:"false" json:"vlanId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet from which the private IPs is to be drawn. The IP addresses, + // *if supplied*, must be valid for the given subnet. + SubnetId *string `mandatory:"false" json:"subnetId"` +} + +func (m BulkCreatePrivateIpsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkCreatePrivateIpsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_private_ips_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_private_ips_request_response.go new file mode 100644 index 000000000..eff2b08c8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_create_private_ips_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// BulkCreatePrivateIpsRequest wrapper for the BulkCreatePrivateIps operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkCreatePrivateIps.go.html to see an example of how to use BulkCreatePrivateIpsRequest. +type BulkCreatePrivateIpsRequest struct { + + // Details used to create secondary private IPs. + BulkCreatePrivateIpsDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request BulkCreatePrivateIpsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request BulkCreatePrivateIpsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request BulkCreatePrivateIpsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request BulkCreatePrivateIpsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request BulkCreatePrivateIpsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BulkCreatePrivateIpsResponse wrapper for the BulkCreatePrivateIps operation +type BulkCreatePrivateIpsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response BulkCreatePrivateIpsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response BulkCreatePrivateIpsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_ipv6s_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_ipv6s_details.go new file mode 100644 index 000000000..ec9df30c8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_ipv6s_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkDeleteIpv6sDetails A secondary IPv6 address bulk deletion object. +type BulkDeleteIpv6sDetails struct { + + // An IPv6 address to delete. + BulkDeleteIpv6sItem []BulkDeleteIpv6sItem `mandatory:"true" json:"bulkDeleteIpv6sItem"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC to assign the IPv6s to. The + // IPv6 will be in the VNIC's subnet. + VnicId *string `mandatory:"false" json:"vnicId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet from which the IPv6s addresses are deleted. + SubnetId *string `mandatory:"false" json:"subnetId"` +} + +func (m BulkDeleteIpv6sDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkDeleteIpv6sDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_ipv6s_item.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_ipv6s_item.go new file mode 100644 index 000000000..00f870a5a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_ipv6s_item.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkDeleteIpv6sItem A secondary IPv6 object to delete as part of a bulk deletion. +type BulkDeleteIpv6sItem struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPv6 to delete. + Ipv6Id *string `mandatory:"true" json:"ipv6Id"` +} + +func (m BulkDeleteIpv6sItem) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkDeleteIpv6sItem) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_ipv6s_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_ipv6s_request_response.go new file mode 100644 index 000000000..ce4c71886 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_ipv6s_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// BulkDeleteIpv6sRequest wrapper for the BulkDeleteIpv6s operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkDeleteIpv6s.go.html to see an example of how to use BulkDeleteIpv6sRequest. +type BulkDeleteIpv6sRequest struct { + + // Details of the IPv6s to delete. + BulkDeleteIpv6sDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request BulkDeleteIpv6sRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request BulkDeleteIpv6sRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request BulkDeleteIpv6sRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request BulkDeleteIpv6sRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request BulkDeleteIpv6sRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BulkDeleteIpv6sResponse wrapper for the BulkDeleteIpv6s operation +type BulkDeleteIpv6sResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response BulkDeleteIpv6sResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response BulkDeleteIpv6sResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_private_ip_item.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_private_ip_item.go new file mode 100644 index 000000000..ddaf561a9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_private_ip_item.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkDeletePrivateIpItem Secondary private IPv4 address object to delete as part of a bulk operation. +type BulkDeletePrivateIpItem struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the secondary Private IP. + PrivateIpId *string `mandatory:"true" json:"privateIpId"` +} + +func (m BulkDeletePrivateIpItem) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkDeletePrivateIpItem) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_private_ips_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_private_ips_details.go new file mode 100644 index 000000000..67a66f13e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_private_ips_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkDeletePrivateIpsDetails Details used tp delete Secondary IPv4 objects in a bulk operation. +type BulkDeletePrivateIpsDetails struct { + + // A secondary IPv4 address to delete. + BulkDeletePrivateIpItem []BulkDeletePrivateIpItem `mandatory:"true" json:"bulkDeletePrivateIpItem"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC of which + // private IPs should be deleted. The VNIC and private IPs must be in the same subnet. + VnicId *string `mandatory:"false" json:"vnicId"` + + // Use this attribute only with the Oracle Cloud VMware Solution. + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VLAN from which the private IP is to be deleted. + VlanId *string `mandatory:"false" json:"vlanId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet from which the private IPs is to be deleted. + SubnetId *string `mandatory:"false" json:"subnetId"` +} + +func (m BulkDeletePrivateIpsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkDeletePrivateIpsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_private_ips_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_private_ips_request_response.go new file mode 100644 index 000000000..6cbc9d65c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_private_ips_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// BulkDeletePrivateIpsRequest wrapper for the BulkDeletePrivateIps operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkDeletePrivateIps.go.html to see an example of how to use BulkDeletePrivateIpsRequest. +type BulkDeletePrivateIpsRequest struct { + + // Details of the secondary IPv4 addresses to delete. + BulkDeletePrivateIpsDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request BulkDeletePrivateIpsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request BulkDeletePrivateIpsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request BulkDeletePrivateIpsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request BulkDeletePrivateIpsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request BulkDeletePrivateIpsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BulkDeletePrivateIpsResponse wrapper for the BulkDeletePrivateIps operation +type BulkDeletePrivateIpsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response BulkDeletePrivateIpsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response BulkDeletePrivateIpsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_virtual_circuit_public_prefixes_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_virtual_circuit_public_prefixes_details.go new file mode 100644 index 000000000..5c44ae67f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_virtual_circuit_public_prefixes_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkDeleteVirtualCircuitPublicPrefixesDetails The representation of BulkDeleteVirtualCircuitPublicPrefixesDetails +type BulkDeleteVirtualCircuitPublicPrefixesDetails struct { + + // The public IP prefixes (CIDRs) to remove from the public virtual circuit. + PublicPrefixes []DeleteVirtualCircuitPublicPrefixDetails `mandatory:"true" json:"publicPrefixes"` +} + +func (m BulkDeleteVirtualCircuitPublicPrefixesDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkDeleteVirtualCircuitPublicPrefixesDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_virtual_circuit_public_prefixes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_virtual_circuit_public_prefixes_request_response.go new file mode 100644 index 000000000..92c7951c3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_delete_virtual_circuit_public_prefixes_request_response.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// BulkDeleteVirtualCircuitPublicPrefixesRequest wrapper for the BulkDeleteVirtualCircuitPublicPrefixes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkDeleteVirtualCircuitPublicPrefixes.go.html to see an example of how to use BulkDeleteVirtualCircuitPublicPrefixesRequest. +type BulkDeleteVirtualCircuitPublicPrefixesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit. + VirtualCircuitId *string `mandatory:"true" contributesTo:"path" name:"virtualCircuitId"` + + // Request with public prefixes to be deleted from the virtual circuit. + BulkDeleteVirtualCircuitPublicPrefixesDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request BulkDeleteVirtualCircuitPublicPrefixesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request BulkDeleteVirtualCircuitPublicPrefixesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request BulkDeleteVirtualCircuitPublicPrefixesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request BulkDeleteVirtualCircuitPublicPrefixesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request BulkDeleteVirtualCircuitPublicPrefixesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BulkDeleteVirtualCircuitPublicPrefixesResponse wrapper for the BulkDeleteVirtualCircuitPublicPrefixes operation +type BulkDeleteVirtualCircuitPublicPrefixesResponse struct { + + // The underlying http response + RawResponse *http.Response +} + +func (response BulkDeleteVirtualCircuitPublicPrefixesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response BulkDeleteVirtualCircuitPublicPrefixesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_ipv6s_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_ipv6s_details.go new file mode 100644 index 000000000..5c7856100 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_ipv6s_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkDetachIpv6sDetails Details needed to bulk detach secondary IPv6 addresses. +type BulkDetachIpv6sDetails struct { + + // A secondary IPv6 address to detach. + BulkDetachIpv6sItem []BulkDetachIpv6sItem `mandatory:"true" json:"bulkDetachIpv6sItem"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC from which multiple IPv6s should be detached. The VNIC and IPv6s must be in the same subnet. + VnicId *string `mandatory:"false" json:"vnicId"` +} + +func (m BulkDetachIpv6sDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkDetachIpv6sDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_ipv6s_item.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_ipv6s_item.go new file mode 100644 index 000000000..88b158125 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_ipv6s_item.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkDetachIpv6sItem A secondary IPv6 object to detach as part of a bulk detach operation. +type BulkDetachIpv6sItem struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the secondary IPv6. + Ipv6Id *string `mandatory:"true" json:"ipv6Id"` +} + +func (m BulkDetachIpv6sItem) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkDetachIpv6sItem) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_ipv6s_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_ipv6s_request_response.go new file mode 100644 index 000000000..37db6e28a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_ipv6s_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// BulkDetachIpv6sRequest wrapper for the BulkDetachIpv6s operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkDetachIpv6s.go.html to see an example of how to use BulkDetachIpv6sRequest. +type BulkDetachIpv6sRequest struct { + + // Details needed to detach IPv6s in bulk. + BulkDetachIpv6sDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request BulkDetachIpv6sRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request BulkDetachIpv6sRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request BulkDetachIpv6sRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request BulkDetachIpv6sRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request BulkDetachIpv6sRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BulkDetachIpv6sResponse wrapper for the BulkDetachIpv6s operation +type BulkDetachIpv6sResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response BulkDetachIpv6sResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response BulkDetachIpv6sResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_private_ip_item.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_private_ip_item.go new file mode 100644 index 000000000..9049a9a5a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_private_ip_item.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkDetachPrivateIpItem An object used to detatch secondary private IPv4 addresses with a bulk operation. +type BulkDetachPrivateIpItem struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the secondary Private IP. + PrivateIpId *string `mandatory:"true" json:"privateIpId"` +} + +func (m BulkDetachPrivateIpItem) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkDetachPrivateIpItem) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_private_ips_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_private_ips_details.go new file mode 100644 index 000000000..390eb2fff --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_private_ips_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkDetachPrivateIpsDetails An object used to detatch Secondary IPv4 addresses with a bulk operation. +type BulkDetachPrivateIpsDetails struct { + + // Secondary IPv4 addresses to detach. + BulkDetachPrivateIpItem []BulkDetachPrivateIpItem `mandatory:"true" json:"bulkDetachPrivateIpItem"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC of which private IPs should be detached. The VNIC and private IPs must be in the same subnet. + VnicId *string `mandatory:"false" json:"vnicId"` +} + +func (m BulkDetachPrivateIpsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkDetachPrivateIpsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_private_ips_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_private_ips_request_response.go new file mode 100644 index 000000000..bdc136322 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_detach_private_ips_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// BulkDetachPrivateIpsRequest wrapper for the BulkDetachPrivateIps operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkDetachPrivateIps.go.html to see an example of how to use BulkDetachPrivateIpsRequest. +type BulkDetachPrivateIpsRequest struct { + + // The secondary IPv4 addresses to detach. + BulkDetachPrivateIpsDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request BulkDetachPrivateIpsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request BulkDetachPrivateIpsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request BulkDetachPrivateIpsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request BulkDetachPrivateIpsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request BulkDetachPrivateIpsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BulkDetachPrivateIpsResponse wrapper for the BulkDetachPrivateIps operation +type BulkDetachPrivateIpsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response BulkDetachPrivateIpsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response BulkDetachPrivateIpsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_ipv6s_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_ipv6s_details.go new file mode 100644 index 000000000..a99a1be3c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_ipv6s_details.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkUpdateIpv6sDetails Address details to update for a Secondary IPv6 object. +type BulkUpdateIpv6sDetails struct { + + // A secondary IPv6 address to update. + BulkUpdateIpv6sItem []BulkUpdateIpv6sItem `mandatory:"true" json:"bulkUpdateIpv6sItem"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC to move the IPv6s to. + // The VNIC and IPv6s must be in the same subnet. + VnicId *string `mandatory:"false" json:"vnicId"` +} + +func (m BulkUpdateIpv6sDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkUpdateIpv6sDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_ipv6s_item.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_ipv6s_item.go new file mode 100644 index 000000000..46782a74b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_ipv6s_item.go @@ -0,0 +1,117 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkUpdateIpv6sItem A secondary IPv6 object to update as part of a bulk update. +type BulkUpdateIpv6sItem struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPv6 object. + Ipv6Id *string `mandatory:"true" json:"ipv6Id"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Lifetime of the IP address. + // There are two types of IPs: + // - Ephemeral + // - Reserved + Lifetime BulkUpdateIpv6sItemLifetimeEnum `mandatory:"false" json:"lifetime,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see + // Per-resource Routing (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing). + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // The hostname associated with the IPv6 address. Only the hostname label, not the FQDN. + Hostname *string `mandatory:"false" json:"hostname"` +} + +func (m BulkUpdateIpv6sItem) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkUpdateIpv6sItem) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingBulkUpdateIpv6sItemLifetimeEnum(string(m.Lifetime)); !ok && m.Lifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Lifetime: %s. Supported values are: %s.", m.Lifetime, strings.Join(GetBulkUpdateIpv6sItemLifetimeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BulkUpdateIpv6sItemLifetimeEnum Enum with underlying type: string +type BulkUpdateIpv6sItemLifetimeEnum string + +// Set of constants representing the allowable values for BulkUpdateIpv6sItemLifetimeEnum +const ( + BulkUpdateIpv6sItemLifetimeEphemeral BulkUpdateIpv6sItemLifetimeEnum = "EPHEMERAL" + BulkUpdateIpv6sItemLifetimeReserved BulkUpdateIpv6sItemLifetimeEnum = "RESERVED" +) + +var mappingBulkUpdateIpv6sItemLifetimeEnum = map[string]BulkUpdateIpv6sItemLifetimeEnum{ + "EPHEMERAL": BulkUpdateIpv6sItemLifetimeEphemeral, + "RESERVED": BulkUpdateIpv6sItemLifetimeReserved, +} + +var mappingBulkUpdateIpv6sItemLifetimeEnumLowerCase = map[string]BulkUpdateIpv6sItemLifetimeEnum{ + "ephemeral": BulkUpdateIpv6sItemLifetimeEphemeral, + "reserved": BulkUpdateIpv6sItemLifetimeReserved, +} + +// GetBulkUpdateIpv6sItemLifetimeEnumValues Enumerates the set of values for BulkUpdateIpv6sItemLifetimeEnum +func GetBulkUpdateIpv6sItemLifetimeEnumValues() []BulkUpdateIpv6sItemLifetimeEnum { + values := make([]BulkUpdateIpv6sItemLifetimeEnum, 0) + for _, v := range mappingBulkUpdateIpv6sItemLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetBulkUpdateIpv6sItemLifetimeEnumStringValues Enumerates the set of values in String for BulkUpdateIpv6sItemLifetimeEnum +func GetBulkUpdateIpv6sItemLifetimeEnumStringValues() []string { + return []string{ + "EPHEMERAL", + "RESERVED", + } +} + +// GetMappingBulkUpdateIpv6sItemLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBulkUpdateIpv6sItemLifetimeEnum(val string) (BulkUpdateIpv6sItemLifetimeEnum, bool) { + enum, ok := mappingBulkUpdateIpv6sItemLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_ipv6s_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_ipv6s_request_response.go new file mode 100644 index 000000000..09d748568 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_ipv6s_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// BulkUpdateIpv6sRequest wrapper for the BulkUpdateIpv6s operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkUpdateIpv6s.go.html to see an example of how to use BulkUpdateIpv6sRequest. +type BulkUpdateIpv6sRequest struct { + + // Details of the IPv6s to update. + BulkUpdateIpv6sDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request BulkUpdateIpv6sRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request BulkUpdateIpv6sRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request BulkUpdateIpv6sRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request BulkUpdateIpv6sRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request BulkUpdateIpv6sRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BulkUpdateIpv6sResponse wrapper for the BulkUpdateIpv6s operation +type BulkUpdateIpv6sResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response BulkUpdateIpv6sResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response BulkUpdateIpv6sResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_private_ip_item.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_private_ip_item.go new file mode 100644 index 000000000..d6d43ed31 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_private_ip_item.go @@ -0,0 +1,125 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkUpdatePrivateIpItem A secondary private IPv4 address object to update as part of a bulk operation. +type BulkUpdatePrivateIpItem struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the secondary Private IP. + PrivateIpId *string `mandatory:"true" json:"privateIpId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The hostname for the private IP. Used for DNS. The value + // is the hostname portion of the private IP's fully qualified domain name (FQDN) + // (for example, `bminstance1` in FQDN `bminstance1.subnet123.vcn1.oraclevcn.com`). + // Must be unique across all VNICs in the subnet and comply with + // RFC 952 (https://tools.ietf.org/html/rfc952) and + // RFC 1123 (https://tools.ietf.org/html/rfc1123). + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + // Example: `bminstance1` + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // Lifetime of the IP address. + // There are two types of IPs: + // - Ephemeral + // - Reserved + Lifetime BulkUpdatePrivateIpItemLifetimeEnum `mandatory:"false" json:"lifetime,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see + // Per-resource Routing (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing). + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m BulkUpdatePrivateIpItem) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkUpdatePrivateIpItem) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingBulkUpdatePrivateIpItemLifetimeEnum(string(m.Lifetime)); !ok && m.Lifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Lifetime: %s. Supported values are: %s.", m.Lifetime, strings.Join(GetBulkUpdatePrivateIpItemLifetimeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BulkUpdatePrivateIpItemLifetimeEnum Enum with underlying type: string +type BulkUpdatePrivateIpItemLifetimeEnum string + +// Set of constants representing the allowable values for BulkUpdatePrivateIpItemLifetimeEnum +const ( + BulkUpdatePrivateIpItemLifetimeEphemeral BulkUpdatePrivateIpItemLifetimeEnum = "EPHEMERAL" + BulkUpdatePrivateIpItemLifetimeReserved BulkUpdatePrivateIpItemLifetimeEnum = "RESERVED" +) + +var mappingBulkUpdatePrivateIpItemLifetimeEnum = map[string]BulkUpdatePrivateIpItemLifetimeEnum{ + "EPHEMERAL": BulkUpdatePrivateIpItemLifetimeEphemeral, + "RESERVED": BulkUpdatePrivateIpItemLifetimeReserved, +} + +var mappingBulkUpdatePrivateIpItemLifetimeEnumLowerCase = map[string]BulkUpdatePrivateIpItemLifetimeEnum{ + "ephemeral": BulkUpdatePrivateIpItemLifetimeEphemeral, + "reserved": BulkUpdatePrivateIpItemLifetimeReserved, +} + +// GetBulkUpdatePrivateIpItemLifetimeEnumValues Enumerates the set of values for BulkUpdatePrivateIpItemLifetimeEnum +func GetBulkUpdatePrivateIpItemLifetimeEnumValues() []BulkUpdatePrivateIpItemLifetimeEnum { + values := make([]BulkUpdatePrivateIpItemLifetimeEnum, 0) + for _, v := range mappingBulkUpdatePrivateIpItemLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetBulkUpdatePrivateIpItemLifetimeEnumStringValues Enumerates the set of values in String for BulkUpdatePrivateIpItemLifetimeEnum +func GetBulkUpdatePrivateIpItemLifetimeEnumStringValues() []string { + return []string{ + "EPHEMERAL", + "RESERVED", + } +} + +// GetMappingBulkUpdatePrivateIpItemLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBulkUpdatePrivateIpItemLifetimeEnum(val string) (BulkUpdatePrivateIpItemLifetimeEnum, bool) { + enum, ok := mappingBulkUpdatePrivateIpItemLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_private_ips_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_private_ips_details.go new file mode 100644 index 000000000..7c8766343 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_private_ips_details.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BulkUpdatePrivateIpsDetails Details used for a secondary IPv4 address bulk update. +type BulkUpdatePrivateIpsDetails struct { + + // A secondary IPv4 address to update. + BulkUpdatePrivateIpItem []BulkUpdatePrivateIpItem `mandatory:"true" json:"bulkUpdatePrivateIpItem"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC to reassign + // the private IPs to. The VNIC and private IPs must be in the same subnet. + VnicId *string `mandatory:"false" json:"vnicId"` +} + +func (m BulkUpdatePrivateIpsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BulkUpdatePrivateIpsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_private_ips_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_private_ips_request_response.go new file mode 100644 index 000000000..52592b172 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/bulk_update_private_ips_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// BulkUpdatePrivateIpsRequest wrapper for the BulkUpdatePrivateIps operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkUpdatePrivateIps.go.html to see an example of how to use BulkUpdatePrivateIpsRequest. +type BulkUpdatePrivateIpsRequest struct { + + // Details of the secondary IPv4 addresses to update. + BulkUpdatePrivateIpsDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request BulkUpdatePrivateIpsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request BulkUpdatePrivateIpsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request BulkUpdatePrivateIpsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request BulkUpdatePrivateIpsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request BulkUpdatePrivateIpsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BulkUpdatePrivateIpsResponse wrapper for the BulkUpdatePrivateIps operation +type BulkUpdatePrivateIpsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response BulkUpdatePrivateIpsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response BulkUpdatePrivateIpsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoasn.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoasn.go new file mode 100644 index 000000000..6aa8a5897 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoasn.go @@ -0,0 +1,143 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Byoasn Oracle offers the ability to Bring Your Own Autonomous System Number (BYOASN), importing AS Numbers you currently own to Oracle Cloud Infrastructure. A `Byoasn` resource is a record of the imported AS Number and also some associated metadata. The process used to Bring Your Own ASN (https://docs.oracle.com/iaas/Content/Network/Concepts/BYOASN.htm) is explained in the documentation. +type Byoasn struct { + + // The `Byoasn` resource's current state. + LifecycleState ByoasnLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `Byoasn` resource. + Id *string `mandatory:"true" json:"id"` + + // The Autonomous System Number (ASN) you are importing to the Oracle cloud. + Asn *int64 `mandatory:"true" json:"asn"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the `Byoasn` resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The validation token is an internally-generated ASCII string used in the validation process. See Importing a Byoasn (https://docs.oracle.com/iaas/Content/Network/Concepts/BYOASN.htm) for details. + ValidationToken *string `mandatory:"true" json:"validationToken"` + + // The date and time the `Byoasn` resource was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The date and time the `Byoasn` resource was validated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeValidated *common.SDKTime `mandatory:"false" json:"timeValidated"` + + // The date and time the `Byoasn` resource was last updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // The BYOIP Ranges that has the `Byoasn` as origin. + ByoipRanges []ByoasnByoipRange `mandatory:"false" json:"byoipRanges"` +} + +func (m Byoasn) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Byoasn) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingByoasnLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetByoasnLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ByoasnLifecycleStateEnum Enum with underlying type: string +type ByoasnLifecycleStateEnum string + +// Set of constants representing the allowable values for ByoasnLifecycleStateEnum +const ( + ByoasnLifecycleStateUpdating ByoasnLifecycleStateEnum = "UPDATING" + ByoasnLifecycleStateActive ByoasnLifecycleStateEnum = "ACTIVE" + ByoasnLifecycleStateDeleted ByoasnLifecycleStateEnum = "DELETED" + ByoasnLifecycleStateFailed ByoasnLifecycleStateEnum = "FAILED" + ByoasnLifecycleStateCreating ByoasnLifecycleStateEnum = "CREATING" +) + +var mappingByoasnLifecycleStateEnum = map[string]ByoasnLifecycleStateEnum{ + "UPDATING": ByoasnLifecycleStateUpdating, + "ACTIVE": ByoasnLifecycleStateActive, + "DELETED": ByoasnLifecycleStateDeleted, + "FAILED": ByoasnLifecycleStateFailed, + "CREATING": ByoasnLifecycleStateCreating, +} + +var mappingByoasnLifecycleStateEnumLowerCase = map[string]ByoasnLifecycleStateEnum{ + "updating": ByoasnLifecycleStateUpdating, + "active": ByoasnLifecycleStateActive, + "deleted": ByoasnLifecycleStateDeleted, + "failed": ByoasnLifecycleStateFailed, + "creating": ByoasnLifecycleStateCreating, +} + +// GetByoasnLifecycleStateEnumValues Enumerates the set of values for ByoasnLifecycleStateEnum +func GetByoasnLifecycleStateEnumValues() []ByoasnLifecycleStateEnum { + values := make([]ByoasnLifecycleStateEnum, 0) + for _, v := range mappingByoasnLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetByoasnLifecycleStateEnumStringValues Enumerates the set of values in String for ByoasnLifecycleStateEnum +func GetByoasnLifecycleStateEnumStringValues() []string { + return []string{ + "UPDATING", + "ACTIVE", + "DELETED", + "FAILED", + "CREATING", + } +} + +// GetMappingByoasnLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingByoasnLifecycleStateEnum(val string) (ByoasnLifecycleStateEnum, bool) { + enum, ok := mappingByoasnLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoasn_byoip_range.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoasn_byoip_range.go new file mode 100644 index 000000000..5f38d63f3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoasn_byoip_range.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ByoasnByoipRange Information about 'ByoipRange' that has `byoasn` as origin. +type ByoasnByoipRange struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource to which the CIDR block belongs. + ByoipRangeId *string `mandatory:"true" json:"byoipRangeId"` + + // The BYOIP CIDR block range or subrange allocated to an IP pool. This could be all or part of a BYOIP CIDR block. + CidrBlock *string `mandatory:"false" json:"cidrBlock"` + + // The IPv6 prefix being imported to the Oracle cloud. This prefix must be /48 or larger, and can be subdivided into sub-ranges used + // across multiple VCNs. A BYOIPv6 prefix can be assigned across multiple VCNs, and each VCN must be /64 or larger. You may specify + // a ULA or private IPv6 prefix of /64 or larger to use in the VCN. IPv6-enabled subnets will remain a fixed /64 in size. + Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` + + // The as path prepend length. + AsPathPrependLength *int `mandatory:"false" json:"asPathPrependLength"` +} + +func (m ByoasnByoipRange) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ByoasnByoipRange) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoasn_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoasn_collection.go new file mode 100644 index 000000000..177bd5177 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoasn_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ByoasnCollection The results returned by a `ListByoasn` operation. +type ByoasnCollection struct { + + // A list of `Byoasn` resource summaries. + Items []ByoasnSummary `mandatory:"true" json:"items"` +} + +func (m ByoasnCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ByoasnCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoasn_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoasn_summary.go new file mode 100644 index 000000000..503ae8e2b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoasn_summary.go @@ -0,0 +1,79 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ByoasnSummary Information about a `Byoasn` resource. +type ByoasnSummary struct { + + // The Autonomous System Number (ASN) you are importing to the Oracle cloud. + Asn *int64 `mandatory:"true" json:"asn"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the `Byoasn` resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `Byoasn` resource. + Id *string `mandatory:"true" json:"id"` + + // The `Byoasn` resource's current state. + LifecycleState ByoasnLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The date and time the `Byoasn` resource was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m ByoasnSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ByoasnSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingByoasnLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetByoasnLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_allocated_range_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_allocated_range_collection.go new file mode 100644 index 000000000..fd189d68a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_allocated_range_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ByoipAllocatedRangeCollection Results of a `ListByoipAllocatedRanges` operation. +type ByoipAllocatedRangeCollection struct { + + // A list of subranges of a BYOIP CIDR block allocated to an IP pool. + Items []ByoipAllocatedRangeSummary `mandatory:"true" json:"items"` +} + +func (m ByoipAllocatedRangeCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ByoipAllocatedRangeCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_allocated_range_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_allocated_range_summary.go new file mode 100644 index 000000000..a9de21e0f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_allocated_range_summary.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ByoipAllocatedRangeSummary A summary of CIDR block subranges that are currently allocated to an IP pool. +type ByoipAllocatedRangeSummary struct { + + // The BYOIP CIDR block range or subrange allocated to an IP pool. This could be all or part of a BYOIP CIDR block. + CidrBlock *string `mandatory:"false" json:"cidrBlock"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IP pool containing the CIDR block. + PublicIpPoolId *string `mandatory:"false" json:"publicIpPoolId"` +} + +func (m ByoipAllocatedRangeSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ByoipAllocatedRangeSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range.go new file mode 100644 index 000000000..f3712d01b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range.go @@ -0,0 +1,231 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ByoipRange Oracle offers the ability to Bring Your Own IP (BYOIP), importing public IP addresses or IPv6 addresses that you currently own to Oracle Cloud Infrastructure. A `ByoipRange` resource is a record of the imported address block (a BYOIP CIDR block) and also some associated metadata. +// The process used to Bring Your Own IP (https://docs.oracle.com/iaas/Content/Network/Concepts/BYOIP.htm) is explained in the documentation. +type ByoipRange struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the BYOIP CIDR block. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource. + Id *string `mandatory:"true" json:"id"` + + // The `ByoipRange` resource's current state. + LifecycleState ByoipRangeLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the `ByoipRange` resource was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The validation token is an internally-generated ASCII string used in the validation process. See Importing a CIDR block (https://docs.oracle.com/iaas/Content/Network/Concepts/BYOIP.htm#import_cidr) for details. + ValidationToken *string `mandatory:"true" json:"validationToken"` + + // A list of `ByoipRangeVcnIpv6AllocationSummary` objects. + ByoipRangeVcnIpv6Allocations []ByoipRangeVcnIpv6AllocationSummary `mandatory:"false" json:"byoipRangeVcnIpv6Allocations"` + + // The public IPv4 CIDR block being imported from on-premises to the Oracle cloud. + CidrBlock *string `mandatory:"false" json:"cidrBlock"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + OriginAsn *ByoipRangeOriginAsn `mandatory:"false" json:"originAsn"` + + // The IPv6 prefix being imported to the Oracle cloud. This prefix must be /48 or larger, and can be subdivided into sub-ranges used + // across multiple VCNs. A BYOIPv6 prefix can be also assigned across multiple VCNs, and each VCN must be /64 or larger. You may specify + // a ULA or private IPv6 prefix of /64 or larger to use in the VCN. IPv6-enabled subnets will remain a fixed /64 in size. + Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` + + // The `ByoipRange` resource's current status. + LifecycleDetails ByoipRangeLifecycleDetailsEnum `mandatory:"false" json:"lifecycleDetails,omitempty"` + + // The date and time the `ByoipRange` resource was validated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeValidated *common.SDKTime `mandatory:"false" json:"timeValidated"` + + // The date and time the `ByoipRange` resource was advertised to the internet by BGP, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeAdvertised *common.SDKTime `mandatory:"false" json:"timeAdvertised"` + + // The date and time the `ByoipRange` resource was withdrawn from advertisement by BGP to the internet, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeWithdrawn *common.SDKTime `mandatory:"false" json:"timeWithdrawn"` +} + +func (m ByoipRange) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ByoipRange) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingByoipRangeLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetByoipRangeLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingByoipRangeLifecycleDetailsEnum(string(m.LifecycleDetails)); !ok && m.LifecycleDetails != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleDetails: %s. Supported values are: %s.", m.LifecycleDetails, strings.Join(GetByoipRangeLifecycleDetailsEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ByoipRangeLifecycleDetailsEnum Enum with underlying type: string +type ByoipRangeLifecycleDetailsEnum string + +// Set of constants representing the allowable values for ByoipRangeLifecycleDetailsEnum +const ( + ByoipRangeLifecycleDetailsCreating ByoipRangeLifecycleDetailsEnum = "CREATING" + ByoipRangeLifecycleDetailsValidating ByoipRangeLifecycleDetailsEnum = "VALIDATING" + ByoipRangeLifecycleDetailsProvisioned ByoipRangeLifecycleDetailsEnum = "PROVISIONED" + ByoipRangeLifecycleDetailsActive ByoipRangeLifecycleDetailsEnum = "ACTIVE" + ByoipRangeLifecycleDetailsFailed ByoipRangeLifecycleDetailsEnum = "FAILED" + ByoipRangeLifecycleDetailsDeleting ByoipRangeLifecycleDetailsEnum = "DELETING" + ByoipRangeLifecycleDetailsDeleted ByoipRangeLifecycleDetailsEnum = "DELETED" + ByoipRangeLifecycleDetailsAdvertising ByoipRangeLifecycleDetailsEnum = "ADVERTISING" + ByoipRangeLifecycleDetailsWithdrawing ByoipRangeLifecycleDetailsEnum = "WITHDRAWING" +) + +var mappingByoipRangeLifecycleDetailsEnum = map[string]ByoipRangeLifecycleDetailsEnum{ + "CREATING": ByoipRangeLifecycleDetailsCreating, + "VALIDATING": ByoipRangeLifecycleDetailsValidating, + "PROVISIONED": ByoipRangeLifecycleDetailsProvisioned, + "ACTIVE": ByoipRangeLifecycleDetailsActive, + "FAILED": ByoipRangeLifecycleDetailsFailed, + "DELETING": ByoipRangeLifecycleDetailsDeleting, + "DELETED": ByoipRangeLifecycleDetailsDeleted, + "ADVERTISING": ByoipRangeLifecycleDetailsAdvertising, + "WITHDRAWING": ByoipRangeLifecycleDetailsWithdrawing, +} + +var mappingByoipRangeLifecycleDetailsEnumLowerCase = map[string]ByoipRangeLifecycleDetailsEnum{ + "creating": ByoipRangeLifecycleDetailsCreating, + "validating": ByoipRangeLifecycleDetailsValidating, + "provisioned": ByoipRangeLifecycleDetailsProvisioned, + "active": ByoipRangeLifecycleDetailsActive, + "failed": ByoipRangeLifecycleDetailsFailed, + "deleting": ByoipRangeLifecycleDetailsDeleting, + "deleted": ByoipRangeLifecycleDetailsDeleted, + "advertising": ByoipRangeLifecycleDetailsAdvertising, + "withdrawing": ByoipRangeLifecycleDetailsWithdrawing, +} + +// GetByoipRangeLifecycleDetailsEnumValues Enumerates the set of values for ByoipRangeLifecycleDetailsEnum +func GetByoipRangeLifecycleDetailsEnumValues() []ByoipRangeLifecycleDetailsEnum { + values := make([]ByoipRangeLifecycleDetailsEnum, 0) + for _, v := range mappingByoipRangeLifecycleDetailsEnum { + values = append(values, v) + } + return values +} + +// GetByoipRangeLifecycleDetailsEnumStringValues Enumerates the set of values in String for ByoipRangeLifecycleDetailsEnum +func GetByoipRangeLifecycleDetailsEnumStringValues() []string { + return []string{ + "CREATING", + "VALIDATING", + "PROVISIONED", + "ACTIVE", + "FAILED", + "DELETING", + "DELETED", + "ADVERTISING", + "WITHDRAWING", + } +} + +// GetMappingByoipRangeLifecycleDetailsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingByoipRangeLifecycleDetailsEnum(val string) (ByoipRangeLifecycleDetailsEnum, bool) { + enum, ok := mappingByoipRangeLifecycleDetailsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ByoipRangeLifecycleStateEnum Enum with underlying type: string +type ByoipRangeLifecycleStateEnum string + +// Set of constants representing the allowable values for ByoipRangeLifecycleStateEnum +const ( + ByoipRangeLifecycleStateInactive ByoipRangeLifecycleStateEnum = "INACTIVE" + ByoipRangeLifecycleStateUpdating ByoipRangeLifecycleStateEnum = "UPDATING" + ByoipRangeLifecycleStateActive ByoipRangeLifecycleStateEnum = "ACTIVE" + ByoipRangeLifecycleStateDeleting ByoipRangeLifecycleStateEnum = "DELETING" + ByoipRangeLifecycleStateDeleted ByoipRangeLifecycleStateEnum = "DELETED" +) + +var mappingByoipRangeLifecycleStateEnum = map[string]ByoipRangeLifecycleStateEnum{ + "INACTIVE": ByoipRangeLifecycleStateInactive, + "UPDATING": ByoipRangeLifecycleStateUpdating, + "ACTIVE": ByoipRangeLifecycleStateActive, + "DELETING": ByoipRangeLifecycleStateDeleting, + "DELETED": ByoipRangeLifecycleStateDeleted, +} + +var mappingByoipRangeLifecycleStateEnumLowerCase = map[string]ByoipRangeLifecycleStateEnum{ + "inactive": ByoipRangeLifecycleStateInactive, + "updating": ByoipRangeLifecycleStateUpdating, + "active": ByoipRangeLifecycleStateActive, + "deleting": ByoipRangeLifecycleStateDeleting, + "deleted": ByoipRangeLifecycleStateDeleted, +} + +// GetByoipRangeLifecycleStateEnumValues Enumerates the set of values for ByoipRangeLifecycleStateEnum +func GetByoipRangeLifecycleStateEnumValues() []ByoipRangeLifecycleStateEnum { + values := make([]ByoipRangeLifecycleStateEnum, 0) + for _, v := range mappingByoipRangeLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetByoipRangeLifecycleStateEnumStringValues Enumerates the set of values in String for ByoipRangeLifecycleStateEnum +func GetByoipRangeLifecycleStateEnumStringValues() []string { + return []string{ + "INACTIVE", + "UPDATING", + "ACTIVE", + "DELETING", + "DELETED", + } +} + +// GetMappingByoipRangeLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingByoipRangeLifecycleStateEnum(val string) (ByoipRangeLifecycleStateEnum, bool) { + enum, ok := mappingByoipRangeLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_collection.go new file mode 100644 index 000000000..14b19450d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ByoipRangeCollection The results returned by a `ListByoipRange` operation. +type ByoipRangeCollection struct { + + // A list of `ByoipRange` resource summaries. + Items []ByoipRangeSummary `mandatory:"true" json:"items"` +} + +func (m ByoipRangeCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ByoipRangeCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_origin_asn.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_origin_asn.go new file mode 100644 index 000000000..f31fd6def --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_origin_asn.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ByoipRangeOriginAsn Information about the origin asn. +type ByoipRangeOriginAsn struct { + + // The Autonomous System Number (ASN) you are importing to the Oracle cloud. + Asn *int64 `mandatory:"true" json:"asn"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `Byoasn` resource. + ByoasnId *string `mandatory:"false" json:"byoasnId"` + + // The as path prepend length. + AsPathPrependLength *int `mandatory:"false" json:"asPathPrependLength"` +} + +func (m ByoipRangeOriginAsn) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ByoipRangeOriginAsn) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_summary.go new file mode 100644 index 000000000..cee4b30cc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_summary.go @@ -0,0 +1,89 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ByoipRangeSummary Information about a `ByoipRange` resource. +type ByoipRangeSummary struct { + + // A list of `ByoipRangeVcnIpv6AllocationSummary` objects. + ByoipRangeVcnIpv6Allocations []ByoipRangeVcnIpv6AllocationSummary `mandatory:"false" json:"byoipRangeVcnIpv6Allocations"` + + // The public IPv4 address range you are importing to the Oracle cloud. + CidrBlock *string `mandatory:"false" json:"cidrBlock"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the `ByoipRange` resource. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource. + Id *string `mandatory:"false" json:"id"` + + // The IPv6 prefix being imported to the Oracle cloud. This prefix must be /48 or larger, and can be subdivided into sub-ranges used + // across multiple VCNs. A BYOIPv6 prefix can be assigned across multiple VCNs, and each VCN must be /64 or larger. You may specify + // a ULA or private IPv6 prefix of /64 or larger to use in the VCN. IPv6-enabled subnets will remain a fixed /64 in size. + Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` + + // The `ByoipRange` resource's current state. + LifecycleState ByoipRangeLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The Byoip Range's current lifeCycle substate. + LifecycleDetails ByoipRangeLifecycleDetailsEnum `mandatory:"false" json:"lifecycleDetails,omitempty"` + + // The date and time the `ByoipRange` resource was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m ByoipRangeSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ByoipRangeSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingByoipRangeLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetByoipRangeLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingByoipRangeLifecycleDetailsEnum(string(m.LifecycleDetails)); !ok && m.LifecycleDetails != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleDetails: %s. Supported values are: %s.", m.LifecycleDetails, strings.Join(GetByoipRangeLifecycleDetailsEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_vcn_ipv6_allocation_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_vcn_ipv6_allocation_summary.go new file mode 100644 index 000000000..e174fe81c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoip_range_vcn_ipv6_allocation_summary.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ByoipRangeVcnIpv6AllocationSummary A summary of IPv6 prefix subranges currently allocated to a VCN. +type ByoipRangeVcnIpv6AllocationSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource to which the CIDR block belongs. + ByoipRangeId *string `mandatory:"false" json:"byoipRangeId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the `ByoipRange`. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The BYOIPv6 prefix range or subrange allocated to a VCN. This could be all or part of a BYOIPv6 prefix. + // Each VCN allocation must be /64 or larger. + Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `Vcn` resource to which the ByoipRange belongs. + VcnId *string `mandatory:"false" json:"vcnId"` +} + +func (m ByoipRangeVcnIpv6AllocationSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ByoipRangeVcnIpv6AllocationSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/byoipv6_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoipv6_cidr_details.go new file mode 100644 index 000000000..3b3f410fc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/byoipv6_cidr_details.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Byoipv6CidrDetails The list of one or more BYOIPv6 prefixes for the VCN that meets the following criteria: +// - The prefix must be from a BYOIPv6 range. +// - The IPv6 prefixes must be valid. +// - Multiple prefix must not overlap each other or the on-premises network prefix. +// - The number of prefixes must not exceed the limit of IPv6 prefixes allowed to a VCN. +type Byoipv6CidrDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource to which the CIDR block belongs. + Byoipv6RangeId *string `mandatory:"true" json:"byoipv6RangeId"` + + // An IPv6 prefix required to create a VCN with a BYOIP prefix. It could be the whole prefix identified in `byoipv6RangeId`, or a subrange. + // Example: `2001:0db8:0123::/48` + Ipv6CidrBlock *string `mandatory:"true" json:"ipv6CidrBlock"` +} + +func (m Byoipv6CidrDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Byoipv6CidrDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_bin.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_bin.go new file mode 100644 index 000000000..bc28e0d42 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_bin.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CapacityBin Total and remaining CPU and memory capacity for each capacity bucket. +type CapacityBin struct { + + // Zero-based index for the corresponding capacity bucket. + CapacityIndex *int `mandatory:"true" json:"capacityIndex"` + + // The total OCPUs of the capacity bucket. + TotalOcpus *float32 `mandatory:"true" json:"totalOcpus"` + + // The available OCPUs of the capacity bucket. + RemainingOcpus *float32 `mandatory:"true" json:"remainingOcpus"` + + // The total memory of the capacity bucket, in GBs. + TotalMemoryInGBs *float32 `mandatory:"true" json:"totalMemoryInGBs"` + + // The remaining memory of the capacity bucket, in GBs. + RemainingMemoryInGBs *float32 `mandatory:"true" json:"remainingMemoryInGBs"` + + // List of VMI shapes supported on each capacity bucket. + SupportedShapes []string `mandatory:"true" json:"supportedShapes"` + + // The total local volume of the capacity bucket, in GBs. + TotalLocalVolumeInGBs *float32 `mandatory:"false" json:"totalLocalVolumeInGBs"` + + // The remaining local volume of the capacity bucket, in GBs. + RemainingLocalVolumeInGBs *float32 `mandatory:"false" json:"remainingLocalVolumeInGBs"` +} + +func (m CapacityBin) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CapacityBin) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_bin_preview.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_bin_preview.go new file mode 100644 index 000000000..881317a0b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_bin_preview.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CapacityBinPreview Total CPU and memory capacity for each capacity bucket. +type CapacityBinPreview struct { + + // Zero-based index for the corresponding capacity bucket. + CapacityIndex *int `mandatory:"true" json:"capacityIndex"` + + // The total OCPUs of the capacity bucket. + TotalOcpus *float32 `mandatory:"true" json:"totalOcpus"` + + // The total memory of the capacity bucket, in GBs. + TotalMemoryInGBs *float32 `mandatory:"true" json:"totalMemoryInGBs"` + + // List of VMI shapes supported on each capacity bucket. + SupportedShapes []string `mandatory:"true" json:"supportedShapes"` + + // The total local volume of the capacity bucket, in GBs. + TotalLocalVolumeInGBs *float32 `mandatory:"false" json:"totalLocalVolumeInGBs"` +} + +func (m CapacityBinPreview) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CapacityBinPreview) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_config.go new file mode 100644 index 000000000..8f7bf1874 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_config.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CapacityConfig Specifies the capacity configs that the Dedicated Virtual Machine Host (DVMH) Shape could support. +type CapacityConfig struct { + + // The name of each capacity config. + CapacityConfigName *string `mandatory:"false" json:"capacityConfigName"` + + SupportedCapabilities *SupportedCapabilities `mandatory:"false" json:"supportedCapabilities"` + + // Whether this capacity config is the default config. + IsDefault *bool `mandatory:"false" json:"isDefault"` + + // A list of total CPU and memory per capacity bucket. + CapacityBins []CapacityBinPreview `mandatory:"false" json:"capacityBins"` +} + +func (m CapacityConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CapacityConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_report_instance_shape_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_report_instance_shape_config.go new file mode 100644 index 000000000..c851d6654 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_report_instance_shape_config.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CapacityReportInstanceShapeConfig The shape configuration for a shape in a capacity report. +type CapacityReportInstanceShapeConfig struct { + + // The total number of OCPUs available to the instance. + Ocpus *float32 `mandatory:"false" json:"ocpus"` + + // The total amount of memory available to the instance, in gigabytes. + MemoryInGBs *float32 `mandatory:"false" json:"memoryInGBs"` + + // The number of NVMe drives to be used for storage. + Nvmes *int `mandatory:"false" json:"nvmes"` + + // The baseline OCPU utilization for a subcore burstable VM instance. Leave this attribute blank for a + // non-burstable instance, or explicitly specify non-burstable with `BASELINE_1_1`. + // The following values are supported: + // - `BASELINE_1_8` - baseline usage is 1/8 of an OCPU. + // - `BASELINE_1_2` - baseline usage is 1/2 of an OCPU. + // - `BASELINE_1_1` - baseline usage is an entire OCPU. This represents a non-burstable instance. + BaselineOcpuUtilization CapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum `mandatory:"false" json:"baselineOcpuUtilization,omitempty"` +} + +func (m CapacityReportInstanceShapeConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CapacityReportInstanceShapeConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum(string(m.BaselineOcpuUtilization)); !ok && m.BaselineOcpuUtilization != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BaselineOcpuUtilization: %s. Supported values are: %s.", m.BaselineOcpuUtilization, strings.Join(GetCapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum Enum with underlying type: string +type CapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum string + +// Set of constants representing the allowable values for CapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum +const ( + CapacityReportInstanceShapeConfigBaselineOcpuUtilization8 CapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum = "BASELINE_1_8" + CapacityReportInstanceShapeConfigBaselineOcpuUtilization2 CapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum = "BASELINE_1_2" + CapacityReportInstanceShapeConfigBaselineOcpuUtilization1 CapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum = "BASELINE_1_1" +) + +var mappingCapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum = map[string]CapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum{ + "BASELINE_1_8": CapacityReportInstanceShapeConfigBaselineOcpuUtilization8, + "BASELINE_1_2": CapacityReportInstanceShapeConfigBaselineOcpuUtilization2, + "BASELINE_1_1": CapacityReportInstanceShapeConfigBaselineOcpuUtilization1, +} + +var mappingCapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnumLowerCase = map[string]CapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum{ + "baseline_1_8": CapacityReportInstanceShapeConfigBaselineOcpuUtilization8, + "baseline_1_2": CapacityReportInstanceShapeConfigBaselineOcpuUtilization2, + "baseline_1_1": CapacityReportInstanceShapeConfigBaselineOcpuUtilization1, +} + +// GetCapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnumValues Enumerates the set of values for CapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum +func GetCapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnumValues() []CapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum { + values := make([]CapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum, 0) + for _, v := range mappingCapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum { + values = append(values, v) + } + return values +} + +// GetCapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnumStringValues Enumerates the set of values in String for CapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum +func GetCapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnumStringValues() []string { + return []string{ + "BASELINE_1_8", + "BASELINE_1_2", + "BASELINE_1_1", + } +} + +// GetMappingCapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum(val string) (CapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnum, bool) { + enum, ok := mappingCapacityReportInstanceShapeConfigBaselineOcpuUtilizationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_report_shape_availability.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_report_shape_availability.go new file mode 100644 index 000000000..8f08ccf56 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_report_shape_availability.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CapacityReportShapeAvailability Information about the available capacity for a shape. +type CapacityReportShapeAvailability struct { + + // The fault domain for the capacity report. + // If you do not specify the fault domain, the capacity report includes information about all fault domains. + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + // The shape that the capacity report was requested for. + InstanceShape *string `mandatory:"false" json:"instanceShape"` + + InstanceShapeConfig *CapacityReportInstanceShapeConfig `mandatory:"false" json:"instanceShapeConfig"` + + // The total number of new instances that can be created with the specified shape configuration. + AvailableCount *int64 `mandatory:"false" json:"availableCount"` + + // A flag denoting whether capacity is available. + AvailabilityStatus CapacityReportShapeAvailabilityAvailabilityStatusEnum `mandatory:"false" json:"availabilityStatus,omitempty"` +} + +func (m CapacityReportShapeAvailability) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CapacityReportShapeAvailability) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCapacityReportShapeAvailabilityAvailabilityStatusEnum(string(m.AvailabilityStatus)); !ok && m.AvailabilityStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AvailabilityStatus: %s. Supported values are: %s.", m.AvailabilityStatus, strings.Join(GetCapacityReportShapeAvailabilityAvailabilityStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CapacityReportShapeAvailabilityAvailabilityStatusEnum Enum with underlying type: string +type CapacityReportShapeAvailabilityAvailabilityStatusEnum string + +// Set of constants representing the allowable values for CapacityReportShapeAvailabilityAvailabilityStatusEnum +const ( + CapacityReportShapeAvailabilityAvailabilityStatusOutOfHostCapacity CapacityReportShapeAvailabilityAvailabilityStatusEnum = "OUT_OF_HOST_CAPACITY" + CapacityReportShapeAvailabilityAvailabilityStatusHardwareNotSupported CapacityReportShapeAvailabilityAvailabilityStatusEnum = "HARDWARE_NOT_SUPPORTED" + CapacityReportShapeAvailabilityAvailabilityStatusAvailable CapacityReportShapeAvailabilityAvailabilityStatusEnum = "AVAILABLE" +) + +var mappingCapacityReportShapeAvailabilityAvailabilityStatusEnum = map[string]CapacityReportShapeAvailabilityAvailabilityStatusEnum{ + "OUT_OF_HOST_CAPACITY": CapacityReportShapeAvailabilityAvailabilityStatusOutOfHostCapacity, + "HARDWARE_NOT_SUPPORTED": CapacityReportShapeAvailabilityAvailabilityStatusHardwareNotSupported, + "AVAILABLE": CapacityReportShapeAvailabilityAvailabilityStatusAvailable, +} + +var mappingCapacityReportShapeAvailabilityAvailabilityStatusEnumLowerCase = map[string]CapacityReportShapeAvailabilityAvailabilityStatusEnum{ + "out_of_host_capacity": CapacityReportShapeAvailabilityAvailabilityStatusOutOfHostCapacity, + "hardware_not_supported": CapacityReportShapeAvailabilityAvailabilityStatusHardwareNotSupported, + "available": CapacityReportShapeAvailabilityAvailabilityStatusAvailable, +} + +// GetCapacityReportShapeAvailabilityAvailabilityStatusEnumValues Enumerates the set of values for CapacityReportShapeAvailabilityAvailabilityStatusEnum +func GetCapacityReportShapeAvailabilityAvailabilityStatusEnumValues() []CapacityReportShapeAvailabilityAvailabilityStatusEnum { + values := make([]CapacityReportShapeAvailabilityAvailabilityStatusEnum, 0) + for _, v := range mappingCapacityReportShapeAvailabilityAvailabilityStatusEnum { + values = append(values, v) + } + return values +} + +// GetCapacityReportShapeAvailabilityAvailabilityStatusEnumStringValues Enumerates the set of values in String for CapacityReportShapeAvailabilityAvailabilityStatusEnum +func GetCapacityReportShapeAvailabilityAvailabilityStatusEnumStringValues() []string { + return []string{ + "OUT_OF_HOST_CAPACITY", + "HARDWARE_NOT_SUPPORTED", + "AVAILABLE", + } +} + +// GetMappingCapacityReportShapeAvailabilityAvailabilityStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCapacityReportShapeAvailabilityAvailabilityStatusEnum(val string) (CapacityReportShapeAvailabilityAvailabilityStatusEnum, bool) { + enum, ok := mappingCapacityReportShapeAvailabilityAvailabilityStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_reservation_instance_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_reservation_instance_summary.go new file mode 100644 index 000000000..27e89cdbe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_reservation_instance_summary.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CapacityReservationInstanceSummary Condensed instance data when listing instances in a compute capacity reservation. +type CapacityReservationInstanceSummary struct { + + // The OCID of the instance. + Id *string `mandatory:"true" json:"id"` + + // The availability domain the instance is running in. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the instance. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The shape of the instance. The shape determines the number of CPUs, amount of memory, + // and other resources allocated to the instance. + // You can enumerate all available shapes by calling ListComputeCapacityReservationInstanceShapes. + Shape *string `mandatory:"true" json:"shape"` + + // The fault domain the instance is running in. + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + // The OCID of the cluster placement group of the instance. + ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` + + ShapeConfig *InstanceReservationShapeConfigDetails `mandatory:"false" json:"shapeConfig"` +} + +func (m CapacityReservationInstanceSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CapacityReservationInstanceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_source.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_source.go new file mode 100644 index 000000000..7911e7403 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/capacity_source.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CapacitySource A capacity source of bare metal hosts. +type CapacitySource interface { +} + +type capacitysource struct { + JsonData []byte + CapacityType string `json:"capacityType"` +} + +// UnmarshalJSON unmarshals json +func (m *capacitysource) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercapacitysource capacitysource + s := struct { + Model Unmarshalercapacitysource + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CapacityType = s.Model.CapacityType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *capacitysource) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.CapacityType { + case "DEDICATED": + mm := DedicatedCapacitySource{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for CapacitySource: %s.", m.CapacityType) + return *m, nil + } +} + +func (m capacitysource) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m capacitysource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CapacitySourceCapacityTypeEnum Enum with underlying type: string +type CapacitySourceCapacityTypeEnum string + +// Set of constants representing the allowable values for CapacitySourceCapacityTypeEnum +const ( + CapacitySourceCapacityTypeDedicated CapacitySourceCapacityTypeEnum = "DEDICATED" +) + +var mappingCapacitySourceCapacityTypeEnum = map[string]CapacitySourceCapacityTypeEnum{ + "DEDICATED": CapacitySourceCapacityTypeDedicated, +} + +var mappingCapacitySourceCapacityTypeEnumLowerCase = map[string]CapacitySourceCapacityTypeEnum{ + "dedicated": CapacitySourceCapacityTypeDedicated, +} + +// GetCapacitySourceCapacityTypeEnumValues Enumerates the set of values for CapacitySourceCapacityTypeEnum +func GetCapacitySourceCapacityTypeEnumValues() []CapacitySourceCapacityTypeEnum { + values := make([]CapacitySourceCapacityTypeEnum, 0) + for _, v := range mappingCapacitySourceCapacityTypeEnum { + values = append(values, v) + } + return values +} + +// GetCapacitySourceCapacityTypeEnumStringValues Enumerates the set of values in String for CapacitySourceCapacityTypeEnum +func GetCapacitySourceCapacityTypeEnumStringValues() []string { + return []string{ + "DEDICATED", + } +} + +// GetMappingCapacitySourceCapacityTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCapacitySourceCapacityTypeEnum(val string) (CapacitySourceCapacityTypeEnum, bool) { + enum, ok := mappingCapacitySourceCapacityTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/capture_console_history_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/capture_console_history_details.go new file mode 100644 index 000000000..aa31956c4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/capture_console_history_details.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CaptureConsoleHistoryDetails The representation of CaptureConsoleHistoryDetails +type CaptureConsoleHistoryDetails struct { + + // The OCID of the instance to get the console history from. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CaptureConsoleHistoryDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CaptureConsoleHistoryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/capture_console_history_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/capture_console_history_request_response.go new file mode 100644 index 000000000..872108e1b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/capture_console_history_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CaptureConsoleHistoryRequest wrapper for the CaptureConsoleHistory operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CaptureConsoleHistory.go.html to see an example of how to use CaptureConsoleHistoryRequest. +type CaptureConsoleHistoryRequest struct { + + // Console history details + CaptureConsoleHistoryDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CaptureConsoleHistoryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CaptureConsoleHistoryRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CaptureConsoleHistoryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CaptureConsoleHistoryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CaptureConsoleHistoryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CaptureConsoleHistoryResponse wrapper for the CaptureConsoleHistory operation +type CaptureConsoleHistoryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ConsoleHistory instance + ConsoleHistory `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CaptureConsoleHistoryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CaptureConsoleHistoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/capture_filter.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/capture_filter.go new file mode 100644 index 000000000..906dc381d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/capture_filter.go @@ -0,0 +1,182 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CaptureFilter A capture filter contains a set of *CaptureFilterRuleDetails* governing what traffic is +// mirrored for a *Vtap* or captured for a *VCN Flow Log (https://docs.oracle.com/iaas/Content/Network/Concepts/vcn-flow-logs.htm)*. +// The capture filter is created with no rules defined, and it must have at least one rule to mirror traffic for the VTAP or collect VCN flow logs. +type CaptureFilter struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the capture filter. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The capture filter's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // The capture filter's current administrative state. + LifecycleState CaptureFilterLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Indicates which service will use this capture filter + FilterType CaptureFilterFilterTypeEnum `mandatory:"false" json:"filterType,omitempty"` + + // The date and time the capture filter was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2021-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The set of rules governing what traffic a VTAP mirrors. + VtapCaptureFilterRules []VtapCaptureFilterRuleDetails `mandatory:"false" json:"vtapCaptureFilterRules"` + + // The set of rules governing what traffic the VCN flow log collects. + FlowLogCaptureFilterRules []FlowLogCaptureFilterRuleDetails `mandatory:"false" json:"flowLogCaptureFilterRules"` +} + +func (m CaptureFilter) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CaptureFilter) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCaptureFilterLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetCaptureFilterLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingCaptureFilterFilterTypeEnum(string(m.FilterType)); !ok && m.FilterType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FilterType: %s. Supported values are: %s.", m.FilterType, strings.Join(GetCaptureFilterFilterTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CaptureFilterLifecycleStateEnum Enum with underlying type: string +type CaptureFilterLifecycleStateEnum string + +// Set of constants representing the allowable values for CaptureFilterLifecycleStateEnum +const ( + CaptureFilterLifecycleStateProvisioning CaptureFilterLifecycleStateEnum = "PROVISIONING" + CaptureFilterLifecycleStateAvailable CaptureFilterLifecycleStateEnum = "AVAILABLE" + CaptureFilterLifecycleStateUpdating CaptureFilterLifecycleStateEnum = "UPDATING" + CaptureFilterLifecycleStateTerminating CaptureFilterLifecycleStateEnum = "TERMINATING" + CaptureFilterLifecycleStateTerminated CaptureFilterLifecycleStateEnum = "TERMINATED" +) + +var mappingCaptureFilterLifecycleStateEnum = map[string]CaptureFilterLifecycleStateEnum{ + "PROVISIONING": CaptureFilterLifecycleStateProvisioning, + "AVAILABLE": CaptureFilterLifecycleStateAvailable, + "UPDATING": CaptureFilterLifecycleStateUpdating, + "TERMINATING": CaptureFilterLifecycleStateTerminating, + "TERMINATED": CaptureFilterLifecycleStateTerminated, +} + +var mappingCaptureFilterLifecycleStateEnumLowerCase = map[string]CaptureFilterLifecycleStateEnum{ + "provisioning": CaptureFilterLifecycleStateProvisioning, + "available": CaptureFilterLifecycleStateAvailable, + "updating": CaptureFilterLifecycleStateUpdating, + "terminating": CaptureFilterLifecycleStateTerminating, + "terminated": CaptureFilterLifecycleStateTerminated, +} + +// GetCaptureFilterLifecycleStateEnumValues Enumerates the set of values for CaptureFilterLifecycleStateEnum +func GetCaptureFilterLifecycleStateEnumValues() []CaptureFilterLifecycleStateEnum { + values := make([]CaptureFilterLifecycleStateEnum, 0) + for _, v := range mappingCaptureFilterLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetCaptureFilterLifecycleStateEnumStringValues Enumerates the set of values in String for CaptureFilterLifecycleStateEnum +func GetCaptureFilterLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "UPDATING", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingCaptureFilterLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCaptureFilterLifecycleStateEnum(val string) (CaptureFilterLifecycleStateEnum, bool) { + enum, ok := mappingCaptureFilterLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CaptureFilterFilterTypeEnum Enum with underlying type: string +type CaptureFilterFilterTypeEnum string + +// Set of constants representing the allowable values for CaptureFilterFilterTypeEnum +const ( + CaptureFilterFilterTypeVtap CaptureFilterFilterTypeEnum = "VTAP" + CaptureFilterFilterTypeFlowlog CaptureFilterFilterTypeEnum = "FLOWLOG" +) + +var mappingCaptureFilterFilterTypeEnum = map[string]CaptureFilterFilterTypeEnum{ + "VTAP": CaptureFilterFilterTypeVtap, + "FLOWLOG": CaptureFilterFilterTypeFlowlog, +} + +var mappingCaptureFilterFilterTypeEnumLowerCase = map[string]CaptureFilterFilterTypeEnum{ + "vtap": CaptureFilterFilterTypeVtap, + "flowlog": CaptureFilterFilterTypeFlowlog, +} + +// GetCaptureFilterFilterTypeEnumValues Enumerates the set of values for CaptureFilterFilterTypeEnum +func GetCaptureFilterFilterTypeEnumValues() []CaptureFilterFilterTypeEnum { + values := make([]CaptureFilterFilterTypeEnum, 0) + for _, v := range mappingCaptureFilterFilterTypeEnum { + values = append(values, v) + } + return values +} + +// GetCaptureFilterFilterTypeEnumStringValues Enumerates the set of values in String for CaptureFilterFilterTypeEnum +func GetCaptureFilterFilterTypeEnumStringValues() []string { + return []string{ + "VTAP", + "FLOWLOG", + } +} + +// GetMappingCaptureFilterFilterTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCaptureFilterFilterTypeEnum(val string) (CaptureFilterFilterTypeEnum, bool) { + enum, ok := mappingCaptureFilterFilterTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_boot_volume_backup_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_boot_volume_backup_compartment_details.go new file mode 100644 index 000000000..6faac9d3c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_boot_volume_backup_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeBootVolumeBackupCompartmentDetails Contains the details for the compartment to move the boot volume backup to. +type ChangeBootVolumeBackupCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the boot volume backup to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeBootVolumeBackupCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeBootVolumeBackupCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_boot_volume_backup_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_boot_volume_backup_compartment_request_response.go new file mode 100644 index 000000000..bbda4c93f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_boot_volume_backup_compartment_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeBootVolumeBackupCompartmentRequest wrapper for the ChangeBootVolumeBackupCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeBootVolumeBackupCompartment.go.html to see an example of how to use ChangeBootVolumeBackupCompartmentRequest. +type ChangeBootVolumeBackupCompartmentRequest struct { + + // The OCID of the boot volume backup. + BootVolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeBackupId"` + + // Request to change the compartment of given boot volume backup. + ChangeBootVolumeBackupCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeBootVolumeBackupCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeBootVolumeBackupCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeBootVolumeBackupCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeBootVolumeBackupCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeBootVolumeBackupCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeBootVolumeBackupCompartmentResponse wrapper for the ChangeBootVolumeBackupCompartment operation +type ChangeBootVolumeBackupCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeBootVolumeBackupCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeBootVolumeBackupCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_boot_volume_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_boot_volume_compartment_details.go new file mode 100644 index 000000000..50352f053 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_boot_volume_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeBootVolumeCompartmentDetails Contains the details for the compartment to move the boot volume to. +type ChangeBootVolumeCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the boot volume to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeBootVolumeCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeBootVolumeCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_boot_volume_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_boot_volume_compartment_request_response.go new file mode 100644 index 000000000..caab15659 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_boot_volume_compartment_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeBootVolumeCompartmentRequest wrapper for the ChangeBootVolumeCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeBootVolumeCompartment.go.html to see an example of how to use ChangeBootVolumeCompartmentRequest. +type ChangeBootVolumeCompartmentRequest struct { + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeId"` + + // Request to change the compartment of given boot volume. + ChangeBootVolumeCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeBootVolumeCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeBootVolumeCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeBootVolumeCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeBootVolumeCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeBootVolumeCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeBootVolumeCompartmentResponse wrapper for the ChangeBootVolumeCompartment operation +type ChangeBootVolumeCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeBootVolumeCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeBootVolumeCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_byoasn_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_byoasn_compartment_details.go new file mode 100644 index 000000000..4f8068d1b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_byoasn_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeByoasnCompartmentDetails The configuration details for the move operation. +type ChangeByoasnCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the destination compartment for the BYOASN resource move. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeByoasnCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeByoasnCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_byoasn_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_byoasn_compartment_request_response.go new file mode 100644 index 000000000..476099143 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_byoasn_compartment_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeByoasnCompartmentRequest wrapper for the ChangeByoasnCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeByoasnCompartment.go.html to see an example of how to use ChangeByoasnCompartmentRequest. +type ChangeByoasnCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `Byoasn` resource. + ByoasnId *string `mandatory:"true" contributesTo:"path" name:"byoasnId"` + + // Request to change the compartment of a BYOIP CIDR block. + ChangeByoasnCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeByoasnCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeByoasnCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeByoasnCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeByoasnCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeByoasnCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeByoasnCompartmentResponse wrapper for the ChangeByoasnCompartment operation +type ChangeByoasnCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeByoasnCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeByoasnCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_byoip_range_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_byoip_range_compartment_details.go new file mode 100644 index 000000000..24fe115fb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_byoip_range_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeByoipRangeCompartmentDetails The configuration details for the move operation. +type ChangeByoipRangeCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the destination compartment for the BYOIP CIDR block move. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeByoipRangeCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeByoipRangeCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_byoip_range_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_byoip_range_compartment_request_response.go new file mode 100644 index 000000000..1e62f7e0c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_byoip_range_compartment_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeByoipRangeCompartmentRequest wrapper for the ChangeByoipRangeCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeByoipRangeCompartment.go.html to see an example of how to use ChangeByoipRangeCompartmentRequest. +type ChangeByoipRangeCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource containing the BYOIP CIDR block. + ByoipRangeId *string `mandatory:"true" contributesTo:"path" name:"byoipRangeId"` + + // Request to change the compartment of a BYOIP CIDR block. + ChangeByoipRangeCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeByoipRangeCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeByoipRangeCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeByoipRangeCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeByoipRangeCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeByoipRangeCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeByoipRangeCompartmentResponse wrapper for the ChangeByoipRangeCompartment operation +type ChangeByoipRangeCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeByoipRangeCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeByoipRangeCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_capture_filter_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_capture_filter_compartment_details.go new file mode 100644 index 000000000..c06165763 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_capture_filter_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeCaptureFilterCompartmentDetails These configuration details are used in the move operation when changing the compartment containing a capture filter. +type ChangeCaptureFilterCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the destination compartment for the VTAP + // capture filter move. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeCaptureFilterCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeCaptureFilterCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_capture_filter_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_capture_filter_compartment_request_response.go new file mode 100644 index 000000000..681214c2f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_capture_filter_compartment_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeCaptureFilterCompartmentRequest wrapper for the ChangeCaptureFilterCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeCaptureFilterCompartment.go.html to see an example of how to use ChangeCaptureFilterCompartmentRequest. +type ChangeCaptureFilterCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the capture filter. + CaptureFilterId *string `mandatory:"true" contributesTo:"path" name:"captureFilterId"` + + // Request to change the compartment of a VTAP. + ChangeCaptureFilterCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeCaptureFilterCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeCaptureFilterCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeCaptureFilterCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeCaptureFilterCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeCaptureFilterCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeCaptureFilterCompartmentResponse wrapper for the ChangeCaptureFilterCompartment operation +type ChangeCaptureFilterCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ChangeCaptureFilterCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeCaptureFilterCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cluster_network_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cluster_network_compartment_details.go new file mode 100644 index 000000000..85e5b4fd8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cluster_network_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeClusterNetworkCompartmentDetails The configuration details for the move operation. +type ChangeClusterNetworkCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + // into which the resource should be moved. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeClusterNetworkCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeClusterNetworkCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cluster_network_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cluster_network_compartment_request_response.go new file mode 100644 index 000000000..3d619f4a1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cluster_network_compartment_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeClusterNetworkCompartmentRequest wrapper for the ChangeClusterNetworkCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeClusterNetworkCompartment.go.html to see an example of how to use ChangeClusterNetworkCompartmentRequest. +type ChangeClusterNetworkCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster network. + ClusterNetworkId *string `mandatory:"true" contributesTo:"path" name:"clusterNetworkId"` + + // Request to change the compartment of given cluster network. + ChangeClusterNetworkCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeClusterNetworkCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeClusterNetworkCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeClusterNetworkCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeClusterNetworkCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeClusterNetworkCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeClusterNetworkCompartmentResponse wrapper for the ChangeClusterNetworkCompartment operation +type ChangeClusterNetworkCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeClusterNetworkCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeClusterNetworkCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_capacity_reservation_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_capacity_reservation_compartment_details.go new file mode 100644 index 000000000..21640925a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_capacity_reservation_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeComputeCapacityReservationCompartmentDetails Specifies the compartment to move the compute capacity reservation to. +type ChangeComputeCapacityReservationCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + // to move the compute capacity reservation to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeComputeCapacityReservationCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeComputeCapacityReservationCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_capacity_reservation_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_capacity_reservation_compartment_request_response.go new file mode 100644 index 000000000..62413c96d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_capacity_reservation_compartment_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeComputeCapacityReservationCompartmentRequest wrapper for the ChangeComputeCapacityReservationCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeCapacityReservationCompartment.go.html to see an example of how to use ChangeComputeCapacityReservationCompartmentRequest. +type ChangeComputeCapacityReservationCompartmentRequest struct { + + // The OCID of the compute capacity reservation. + CapacityReservationId *string `mandatory:"true" contributesTo:"path" name:"capacityReservationId"` + + // The configuration details for the move operation. + ChangeComputeCapacityReservationCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeComputeCapacityReservationCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeComputeCapacityReservationCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeComputeCapacityReservationCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeComputeCapacityReservationCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeComputeCapacityReservationCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeComputeCapacityReservationCompartmentResponse wrapper for the ChangeComputeCapacityReservationCompartment operation +type ChangeComputeCapacityReservationCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ChangeComputeCapacityReservationCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeComputeCapacityReservationCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_capacity_topology_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_capacity_topology_compartment_details.go new file mode 100644 index 000000000..fdaac43c1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_capacity_topology_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeComputeCapacityTopologyCompartmentDetails Specifies the compartment to move the compute capacity topology to. +type ChangeComputeCapacityTopologyCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + // to move the compute capacity topology to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeComputeCapacityTopologyCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeComputeCapacityTopologyCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_capacity_topology_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_capacity_topology_compartment_request_response.go new file mode 100644 index 000000000..786a71817 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_capacity_topology_compartment_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeComputeCapacityTopologyCompartmentRequest wrapper for the ChangeComputeCapacityTopologyCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeCapacityTopologyCompartment.go.html to see an example of how to use ChangeComputeCapacityTopologyCompartmentRequest. +type ChangeComputeCapacityTopologyCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" contributesTo:"path" name:"computeCapacityTopologyId"` + + // The configuration details for the move operation. + ChangeComputeCapacityTopologyCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeComputeCapacityTopologyCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeComputeCapacityTopologyCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeComputeCapacityTopologyCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeComputeCapacityTopologyCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeComputeCapacityTopologyCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeComputeCapacityTopologyCompartmentResponse wrapper for the ChangeComputeCapacityTopologyCompartment operation +type ChangeComputeCapacityTopologyCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ChangeComputeCapacityTopologyCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeComputeCapacityTopologyCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_cluster_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_cluster_compartment_details.go new file mode 100644 index 000000000..8887d94f9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_cluster_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeComputeClusterCompartmentDetails The configuration details for the move operation. +type ChangeComputeClusterCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the compute cluster to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeComputeClusterCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeComputeClusterCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_cluster_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_cluster_compartment_request_response.go new file mode 100644 index 000000000..089223da0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_cluster_compartment_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeComputeClusterCompartmentRequest wrapper for the ChangeComputeClusterCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeClusterCompartment.go.html to see an example of how to use ChangeComputeClusterCompartmentRequest. +type ChangeComputeClusterCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + // A compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + // access (RDMA) network group. + ComputeClusterId *string `mandatory:"true" contributesTo:"path" name:"computeClusterId"` + + // The request to move the compute cluster to a different compartment. + ChangeComputeClusterCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeComputeClusterCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeComputeClusterCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeComputeClusterCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeComputeClusterCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeComputeClusterCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeComputeClusterCompartmentResponse wrapper for the ChangeComputeClusterCompartment operation +type ChangeComputeClusterCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeComputeClusterCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeComputeClusterCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_gpu_memory_cluster_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_gpu_memory_cluster_compartment_details.go new file mode 100644 index 000000000..f273b204f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_gpu_memory_cluster_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeComputeGpuMemoryClusterCompartmentDetails Specifies the compartment to move the compute GPU Memory Cluster to. +type ChangeComputeGpuMemoryClusterCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the compute GPU + // memory cluster to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeComputeGpuMemoryClusterCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeComputeGpuMemoryClusterCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_gpu_memory_cluster_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_gpu_memory_cluster_compartment_request_response.go new file mode 100644 index 000000000..e53df2ae2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_gpu_memory_cluster_compartment_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeComputeGpuMemoryClusterCompartmentRequest wrapper for the ChangeComputeGpuMemoryClusterCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeGpuMemoryClusterCompartment.go.html to see an example of how to use ChangeComputeGpuMemoryClusterCompartmentRequest. +type ChangeComputeGpuMemoryClusterCompartmentRequest struct { + + // The OCID of the compute GPU memory cluster. + ComputeGpuMemoryClusterId *string `mandatory:"true" contributesTo:"path" name:"computeGpuMemoryClusterId"` + + // The configuration details for the move operation. + ChangeComputeGpuMemoryClusterCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeComputeGpuMemoryClusterCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeComputeGpuMemoryClusterCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeComputeGpuMemoryClusterCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeComputeGpuMemoryClusterCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeComputeGpuMemoryClusterCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeComputeGpuMemoryClusterCompartmentResponse wrapper for the ChangeComputeGpuMemoryClusterCompartment operation +type ChangeComputeGpuMemoryClusterCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeComputeGpuMemoryClusterCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeComputeGpuMemoryClusterCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_gpu_memory_fabric_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_gpu_memory_fabric_compartment_details.go new file mode 100644 index 000000000..afa9b41c1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_gpu_memory_fabric_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeComputeGpuMemoryFabricCompartmentDetails Specifies the compartment to move the compute GPU memory fabric to. +type ChangeComputeGpuMemoryFabricCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the compute GPU + // memory fabric to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeComputeGpuMemoryFabricCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeComputeGpuMemoryFabricCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_gpu_memory_fabric_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_gpu_memory_fabric_compartment_request_response.go new file mode 100644 index 000000000..d53e61c55 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_gpu_memory_fabric_compartment_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeComputeGpuMemoryFabricCompartmentRequest wrapper for the ChangeComputeGpuMemoryFabricCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeGpuMemoryFabricCompartment.go.html to see an example of how to use ChangeComputeGpuMemoryFabricCompartmentRequest. +type ChangeComputeGpuMemoryFabricCompartmentRequest struct { + + // The OCID of the compute GPU memory fabric. + ComputeGpuMemoryFabricId *string `mandatory:"true" contributesTo:"path" name:"computeGpuMemoryFabricId"` + + // The configuration details for the move operation. + ChangeComputeGpuMemoryFabricCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeComputeGpuMemoryFabricCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeComputeGpuMemoryFabricCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeComputeGpuMemoryFabricCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeComputeGpuMemoryFabricCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeComputeGpuMemoryFabricCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeComputeGpuMemoryFabricCompartmentResponse wrapper for the ChangeComputeGpuMemoryFabricCompartment operation +type ChangeComputeGpuMemoryFabricCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeComputeGpuMemoryFabricCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeComputeGpuMemoryFabricCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_host_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_host_compartment_details.go new file mode 100644 index 000000000..0eb750c75 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_host_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeComputeHostCompartmentDetails Specifies the compartment to move the compute host to. +type ChangeComputeHostCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + // to move the compute host to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeComputeHostCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeComputeHostCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_host_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_host_compartment_request_response.go new file mode 100644 index 000000000..5ff7bcce2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_host_compartment_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeComputeHostCompartmentRequest wrapper for the ChangeComputeHostCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeHostCompartment.go.html to see an example of how to use ChangeComputeHostCompartmentRequest. +type ChangeComputeHostCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + ComputeHostId *string `mandatory:"true" contributesTo:"path" name:"computeHostId"` + + // The configuration details for the move operation. + ChangeComputeHostCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeComputeHostCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeComputeHostCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeComputeHostCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeComputeHostCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeComputeHostCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeComputeHostCompartmentResponse wrapper for the ChangeComputeHostCompartment operation +type ChangeComputeHostCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ChangeComputeHostCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeComputeHostCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_host_group_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_host_group_compartment_details.go new file mode 100644 index 000000000..d69551f39 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_host_group_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeComputeHostGroupCompartmentDetails Specifies the compartment to move the compute host group to. +type ChangeComputeHostGroupCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + // to move the compute host group to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeComputeHostGroupCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeComputeHostGroupCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_host_group_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_host_group_compartment_request_response.go new file mode 100644 index 000000000..b735f53ea --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_host_group_compartment_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeComputeHostGroupCompartmentRequest wrapper for the ChangeComputeHostGroupCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeHostGroupCompartment.go.html to see an example of how to use ChangeComputeHostGroupCompartmentRequest. +type ChangeComputeHostGroupCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host group. + ComputeHostGroupId *string `mandatory:"true" contributesTo:"path" name:"computeHostGroupId"` + + // The configuration details for the move operation. + ChangeComputeHostGroupCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeComputeHostGroupCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeComputeHostGroupCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeComputeHostGroupCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeComputeHostGroupCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeComputeHostGroupCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeComputeHostGroupCompartmentResponse wrapper for the ChangeComputeHostGroupCompartment operation +type ChangeComputeHostGroupCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ChangeComputeHostGroupCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeComputeHostGroupCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_image_capability_schema_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_image_capability_schema_compartment_details.go new file mode 100644 index 000000000..351ed800b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_image_capability_schema_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeComputeImageCapabilitySchemaCompartmentDetails The configuration details for the move operation. +type ChangeComputeImageCapabilitySchemaCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to + // move the instance configuration to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeComputeImageCapabilitySchemaCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeComputeImageCapabilitySchemaCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_image_capability_schema_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_image_capability_schema_compartment_request_response.go new file mode 100644 index 000000000..808420c40 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_compute_image_capability_schema_compartment_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeComputeImageCapabilitySchemaCompartmentRequest wrapper for the ChangeComputeImageCapabilitySchemaCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeImageCapabilitySchemaCompartment.go.html to see an example of how to use ChangeComputeImageCapabilitySchemaCompartmentRequest. +type ChangeComputeImageCapabilitySchemaCompartmentRequest struct { + + // The id of the compute image capability schema or the image ocid + ComputeImageCapabilitySchemaId *string `mandatory:"true" contributesTo:"path" name:"computeImageCapabilitySchemaId"` + + // Compute Image Capability Schema change compartment details + ChangeComputeImageCapabilitySchemaCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeComputeImageCapabilitySchemaCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeComputeImageCapabilitySchemaCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeComputeImageCapabilitySchemaCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeComputeImageCapabilitySchemaCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeComputeImageCapabilitySchemaCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeComputeImageCapabilitySchemaCompartmentResponse wrapper for the ChangeComputeImageCapabilitySchemaCompartment operation +type ChangeComputeImageCapabilitySchemaCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeComputeImageCapabilitySchemaCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeComputeImageCapabilitySchemaCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cpe_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cpe_compartment_details.go new file mode 100644 index 000000000..f2e6846a8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cpe_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeCpeCompartmentDetails The configuration details for the move operation. +type ChangeCpeCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // CPE object to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeCpeCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeCpeCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cpe_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cpe_compartment_request_response.go new file mode 100644 index 000000000..a3bdf1a27 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cpe_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeCpeCompartmentRequest wrapper for the ChangeCpeCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeCpeCompartment.go.html to see an example of how to use ChangeCpeCompartmentRequest. +type ChangeCpeCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the CPE. + CpeId *string `mandatory:"true" contributesTo:"path" name:"cpeId"` + + // Request to change the compartment of a CPE. + ChangeCpeCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeCpeCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeCpeCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeCpeCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeCpeCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeCpeCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeCpeCompartmentResponse wrapper for the ChangeCpeCompartment operation +type ChangeCpeCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeCpeCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeCpeCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cross_connect_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cross_connect_compartment_details.go new file mode 100644 index 000000000..18c243abb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cross_connect_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeCrossConnectCompartmentDetails The configuration details for the move operation. +type ChangeCrossConnectCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // cross-connect to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeCrossConnectCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeCrossConnectCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cross_connect_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cross_connect_compartment_request_response.go new file mode 100644 index 000000000..bff5247f6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cross_connect_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeCrossConnectCompartmentRequest wrapper for the ChangeCrossConnectCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeCrossConnectCompartment.go.html to see an example of how to use ChangeCrossConnectCompartmentRequest. +type ChangeCrossConnectCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect. + CrossConnectId *string `mandatory:"true" contributesTo:"path" name:"crossConnectId"` + + // Request to change the compartment of a Cross Connect. + ChangeCrossConnectCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeCrossConnectCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeCrossConnectCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeCrossConnectCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeCrossConnectCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeCrossConnectCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeCrossConnectCompartmentResponse wrapper for the ChangeCrossConnectCompartment operation +type ChangeCrossConnectCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeCrossConnectCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeCrossConnectCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cross_connect_group_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cross_connect_group_compartment_details.go new file mode 100644 index 000000000..5d8e45040 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cross_connect_group_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeCrossConnectGroupCompartmentDetails The configuration details for the move operation. +type ChangeCrossConnectGroupCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // cross-connect group to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeCrossConnectGroupCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeCrossConnectGroupCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cross_connect_group_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cross_connect_group_compartment_request_response.go new file mode 100644 index 000000000..869e13d9c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_cross_connect_group_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeCrossConnectGroupCompartmentRequest wrapper for the ChangeCrossConnectGroupCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeCrossConnectGroupCompartment.go.html to see an example of how to use ChangeCrossConnectGroupCompartmentRequest. +type ChangeCrossConnectGroupCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect group. + CrossConnectGroupId *string `mandatory:"true" contributesTo:"path" name:"crossConnectGroupId"` + + // Request to change the compartment of a Cross Connect Group. + ChangeCrossConnectGroupCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeCrossConnectGroupCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeCrossConnectGroupCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeCrossConnectGroupCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeCrossConnectGroupCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeCrossConnectGroupCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeCrossConnectGroupCompartmentResponse wrapper for the ChangeCrossConnectGroupCompartment operation +type ChangeCrossConnectGroupCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeCrossConnectGroupCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeCrossConnectGroupCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_dedicated_vm_host_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_dedicated_vm_host_compartment_details.go new file mode 100644 index 000000000..c7a0cc85e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_dedicated_vm_host_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeDedicatedVmHostCompartmentDetails Specifies the compartment to move the dedicated virtual machine host to. +type ChangeDedicatedVmHostCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + // to move the dedicated virtual machine host to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeDedicatedVmHostCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeDedicatedVmHostCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_dedicated_vm_host_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_dedicated_vm_host_compartment_request_response.go new file mode 100644 index 000000000..c2609a309 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_dedicated_vm_host_compartment_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeDedicatedVmHostCompartmentRequest wrapper for the ChangeDedicatedVmHostCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeDedicatedVmHostCompartment.go.html to see an example of how to use ChangeDedicatedVmHostCompartmentRequest. +type ChangeDedicatedVmHostCompartmentRequest struct { + + // The OCID of the dedicated VM host. + DedicatedVmHostId *string `mandatory:"true" contributesTo:"path" name:"dedicatedVmHostId"` + + // The request to move the dedicated virtual machine host to a different compartment. + ChangeDedicatedVmHostCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeDedicatedVmHostCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeDedicatedVmHostCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeDedicatedVmHostCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeDedicatedVmHostCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeDedicatedVmHostCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeDedicatedVmHostCompartmentResponse wrapper for the ChangeDedicatedVmHostCompartment operation +type ChangeDedicatedVmHostCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ChangeDedicatedVmHostCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeDedicatedVmHostCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_dhcp_options_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_dhcp_options_compartment_details.go new file mode 100644 index 000000000..abe91a494 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_dhcp_options_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeDhcpOptionsCompartmentDetails The configuration details for the move operation. +type ChangeDhcpOptionsCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // set of DHCP options to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeDhcpOptionsCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeDhcpOptionsCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_dhcp_options_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_dhcp_options_compartment_request_response.go new file mode 100644 index 000000000..0c601cf17 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_dhcp_options_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeDhcpOptionsCompartmentRequest wrapper for the ChangeDhcpOptionsCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeDhcpOptionsCompartment.go.html to see an example of how to use ChangeDhcpOptionsCompartmentRequest. +type ChangeDhcpOptionsCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the set of DHCP options. + DhcpId *string `mandatory:"true" contributesTo:"path" name:"dhcpId"` + + // Request to change the compartment of a set of DHCP Options. + ChangeDhcpOptionsCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeDhcpOptionsCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeDhcpOptionsCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeDhcpOptionsCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeDhcpOptionsCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeDhcpOptionsCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeDhcpOptionsCompartmentResponse wrapper for the ChangeDhcpOptionsCompartment operation +type ChangeDhcpOptionsCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeDhcpOptionsCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeDhcpOptionsCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_drg_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_drg_compartment_details.go new file mode 100644 index 000000000..e9ed5d7a5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_drg_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeDrgCompartmentDetails The configuration details for the move operation. +type ChangeDrgCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // DRG to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeDrgCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeDrgCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_drg_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_drg_compartment_request_response.go new file mode 100644 index 000000000..ffcfc0108 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_drg_compartment_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeDrgCompartmentRequest wrapper for the ChangeDrgCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeDrgCompartment.go.html to see an example of how to use ChangeDrgCompartmentRequest. +type ChangeDrgCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"true" contributesTo:"path" name:"drgId"` + + // Request to change the compartment of a DRG. + ChangeDrgCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeDrgCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeDrgCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeDrgCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeDrgCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeDrgCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeDrgCompartmentResponse wrapper for the ChangeDrgCompartment operation +type ChangeDrgCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ChangeDrgCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeDrgCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_i_p_sec_connection_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_i_p_sec_connection_compartment_request_response.go new file mode 100644 index 000000000..22419435b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_i_p_sec_connection_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeIPSecConnectionCompartmentRequest wrapper for the ChangeIPSecConnectionCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeIPSecConnectionCompartment.go.html to see an example of how to use ChangeIPSecConnectionCompartmentRequest. +type ChangeIPSecConnectionCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // Request to change the compartment of a IPSec connection. + ChangeIpSecConnectionCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeIPSecConnectionCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeIPSecConnectionCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeIPSecConnectionCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeIPSecConnectionCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeIPSecConnectionCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeIPSecConnectionCompartmentResponse wrapper for the ChangeIPSecConnectionCompartment operation +type ChangeIPSecConnectionCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeIPSecConnectionCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeIPSecConnectionCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_image_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_image_compartment_details.go new file mode 100644 index 000000000..1cef5b696 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_image_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeImageCompartmentDetails The configuration details for the move operation. +type ChangeImageCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the image to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeImageCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeImageCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_image_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_image_compartment_request_response.go new file mode 100644 index 000000000..a647dc88e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_image_compartment_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeImageCompartmentRequest wrapper for the ChangeImageCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeImageCompartment.go.html to see an example of how to use ChangeImageCompartmentRequest. +type ChangeImageCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. + ImageId *string `mandatory:"true" contributesTo:"path" name:"imageId"` + + // Request to change the compartment of a given image. + ChangeImageCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeImageCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeImageCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeImageCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeImageCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeImageCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeImageCompartmentResponse wrapper for the ChangeImageCompartment operation +type ChangeImageCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeImageCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeImageCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_compartment_details.go new file mode 100644 index 000000000..fc98ffb47 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeInstanceCompartmentDetails The configuration details for the move operation. +type ChangeInstanceCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the instance to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeInstanceCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeInstanceCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_compartment_request_response.go new file mode 100644 index 000000000..83986d376 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_compartment_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeInstanceCompartmentRequest wrapper for the ChangeInstanceCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeInstanceCompartment.go.html to see an example of how to use ChangeInstanceCompartmentRequest. +type ChangeInstanceCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` + + // Request to change the compartment of a given instance. + ChangeInstanceCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeInstanceCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeInstanceCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeInstanceCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeInstanceCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeInstanceCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeInstanceCompartmentResponse wrapper for the ChangeInstanceCompartment operation +type ChangeInstanceCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ChangeInstanceCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeInstanceCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_configuration_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_configuration_compartment_details.go new file mode 100644 index 000000000..e812967fd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_configuration_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeInstanceConfigurationCompartmentDetails The configuration details for the move operation. +type ChangeInstanceConfigurationCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to + // move the instance configuration to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeInstanceConfigurationCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeInstanceConfigurationCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_configuration_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_configuration_compartment_request_response.go new file mode 100644 index 000000000..58f90d7ce --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_configuration_compartment_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeInstanceConfigurationCompartmentRequest wrapper for the ChangeInstanceConfigurationCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeInstanceConfigurationCompartment.go.html to see an example of how to use ChangeInstanceConfigurationCompartmentRequest. +type ChangeInstanceConfigurationCompartmentRequest struct { + + // The OCID of the instance configuration. + InstanceConfigurationId *string `mandatory:"true" contributesTo:"path" name:"instanceConfigurationId"` + + // Request to change the compartment of given instance configuration. + ChangeInstanceConfigurationCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeInstanceConfigurationCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeInstanceConfigurationCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeInstanceConfigurationCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeInstanceConfigurationCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeInstanceConfigurationCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeInstanceConfigurationCompartmentResponse wrapper for the ChangeInstanceConfigurationCompartment operation +type ChangeInstanceConfigurationCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeInstanceConfigurationCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeInstanceConfigurationCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_pool_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_pool_compartment_details.go new file mode 100644 index 000000000..6ba5f7e06 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_pool_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeInstancePoolCompartmentDetails The configuration details for the move operation. +type ChangeInstancePoolCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to + // move the instance pool to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeInstancePoolCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeInstancePoolCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_pool_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_pool_compartment_request_response.go new file mode 100644 index 000000000..1c50e6d43 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_instance_pool_compartment_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeInstancePoolCompartmentRequest wrapper for the ChangeInstancePoolCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeInstancePoolCompartment.go.html to see an example of how to use ChangeInstancePoolCompartmentRequest. +type ChangeInstancePoolCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // Request to change the compartment of given instance pool. + ChangeInstancePoolCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeInstancePoolCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeInstancePoolCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeInstancePoolCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeInstancePoolCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeInstancePoolCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeInstancePoolCompartmentResponse wrapper for the ChangeInstancePoolCompartment operation +type ChangeInstancePoolCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeInstancePoolCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeInstancePoolCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_internet_gateway_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_internet_gateway_compartment_details.go new file mode 100644 index 000000000..2c36d6c35 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_internet_gateway_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeInternetGatewayCompartmentDetails The configuration details for the move operation. +type ChangeInternetGatewayCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // internet gateway to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeInternetGatewayCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeInternetGatewayCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_internet_gateway_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_internet_gateway_compartment_request_response.go new file mode 100644 index 000000000..e8ad1d026 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_internet_gateway_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeInternetGatewayCompartmentRequest wrapper for the ChangeInternetGatewayCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeInternetGatewayCompartment.go.html to see an example of how to use ChangeInternetGatewayCompartmentRequest. +type ChangeInternetGatewayCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the internet gateway. + IgId *string `mandatory:"true" contributesTo:"path" name:"igId"` + + // Request to change the compartment of an internet gateway. + ChangeInternetGatewayCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeInternetGatewayCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeInternetGatewayCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeInternetGatewayCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeInternetGatewayCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeInternetGatewayCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeInternetGatewayCompartmentResponse wrapper for the ChangeInternetGatewayCompartment operation +type ChangeInternetGatewayCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeInternetGatewayCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeInternetGatewayCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_ip_sec_connection_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_ip_sec_connection_compartment_details.go new file mode 100644 index 000000000..ad50c6540 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_ip_sec_connection_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeIpSecConnectionCompartmentDetails The configuration details for the move operation. +type ChangeIpSecConnectionCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // IPSec connection to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeIpSecConnectionCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeIpSecConnectionCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_local_peering_gateway_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_local_peering_gateway_compartment_details.go new file mode 100644 index 000000000..36d278557 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_local_peering_gateway_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeLocalPeeringGatewayCompartmentDetails The configuration details for the move operation. +type ChangeLocalPeeringGatewayCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // local peering gateway to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeLocalPeeringGatewayCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeLocalPeeringGatewayCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_local_peering_gateway_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_local_peering_gateway_compartment_request_response.go new file mode 100644 index 000000000..dd99248e5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_local_peering_gateway_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeLocalPeeringGatewayCompartmentRequest wrapper for the ChangeLocalPeeringGatewayCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeLocalPeeringGatewayCompartment.go.html to see an example of how to use ChangeLocalPeeringGatewayCompartmentRequest. +type ChangeLocalPeeringGatewayCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the local peering gateway. + LocalPeeringGatewayId *string `mandatory:"true" contributesTo:"path" name:"localPeeringGatewayId"` + + // Request to change the compartment of a given local peering gateway. + ChangeLocalPeeringGatewayCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeLocalPeeringGatewayCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeLocalPeeringGatewayCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeLocalPeeringGatewayCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeLocalPeeringGatewayCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeLocalPeeringGatewayCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeLocalPeeringGatewayCompartmentResponse wrapper for the ChangeLocalPeeringGatewayCompartment operation +type ChangeLocalPeeringGatewayCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeLocalPeeringGatewayCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeLocalPeeringGatewayCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_nat_gateway_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_nat_gateway_compartment_details.go new file mode 100644 index 000000000..858d16dc5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_nat_gateway_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeNatGatewayCompartmentDetails The configuration details for the move operation. +type ChangeNatGatewayCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the NAT gateway to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeNatGatewayCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeNatGatewayCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_nat_gateway_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_nat_gateway_compartment_request_response.go new file mode 100644 index 000000000..a4aba7f73 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_nat_gateway_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeNatGatewayCompartmentRequest wrapper for the ChangeNatGatewayCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeNatGatewayCompartment.go.html to see an example of how to use ChangeNatGatewayCompartmentRequest. +type ChangeNatGatewayCompartmentRequest struct { + + // The NAT gateway's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + NatGatewayId *string `mandatory:"true" contributesTo:"path" name:"natGatewayId"` + + // Request to change the compartment of a given NAT Gateway. + ChangeNatGatewayCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeNatGatewayCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeNatGatewayCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeNatGatewayCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeNatGatewayCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeNatGatewayCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeNatGatewayCompartmentResponse wrapper for the ChangeNatGatewayCompartment operation +type ChangeNatGatewayCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeNatGatewayCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeNatGatewayCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_network_security_group_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_network_security_group_compartment_details.go new file mode 100644 index 000000000..b9040c9e2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_network_security_group_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeNetworkSecurityGroupCompartmentDetails The representation of ChangeNetworkSecurityGroupCompartmentDetails +type ChangeNetworkSecurityGroupCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the network + // security group to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeNetworkSecurityGroupCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeNetworkSecurityGroupCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_network_security_group_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_network_security_group_compartment_request_response.go new file mode 100644 index 000000000..1a74bf785 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_network_security_group_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeNetworkSecurityGroupCompartmentRequest wrapper for the ChangeNetworkSecurityGroupCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeNetworkSecurityGroupCompartment.go.html to see an example of how to use ChangeNetworkSecurityGroupCompartmentRequest. +type ChangeNetworkSecurityGroupCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security group. + NetworkSecurityGroupId *string `mandatory:"true" contributesTo:"path" name:"networkSecurityGroupId"` + + // Request to change the compartment of a network security group. + ChangeNetworkSecurityGroupCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeNetworkSecurityGroupCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeNetworkSecurityGroupCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeNetworkSecurityGroupCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeNetworkSecurityGroupCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeNetworkSecurityGroupCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeNetworkSecurityGroupCompartmentResponse wrapper for the ChangeNetworkSecurityGroupCompartment operation +type ChangeNetworkSecurityGroupCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeNetworkSecurityGroupCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeNetworkSecurityGroupCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_public_ip_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_public_ip_compartment_details.go new file mode 100644 index 000000000..0e4b5099c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_public_ip_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangePublicIpCompartmentDetails The configuration details for the move operation. +type ChangePublicIpCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // public IP to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangePublicIpCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangePublicIpCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_public_ip_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_public_ip_compartment_request_response.go new file mode 100644 index 000000000..edda00ecf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_public_ip_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangePublicIpCompartmentRequest wrapper for the ChangePublicIpCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangePublicIpCompartment.go.html to see an example of how to use ChangePublicIpCompartmentRequest. +type ChangePublicIpCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP. + PublicIpId *string `mandatory:"true" contributesTo:"path" name:"publicIpId"` + + // Request to change the compartment of a Public IP. + ChangePublicIpCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangePublicIpCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangePublicIpCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangePublicIpCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangePublicIpCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangePublicIpCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangePublicIpCompartmentResponse wrapper for the ChangePublicIpCompartment operation +type ChangePublicIpCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangePublicIpCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangePublicIpCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_public_ip_pool_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_public_ip_pool_compartment_details.go new file mode 100644 index 000000000..37ec702cf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_public_ip_pool_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangePublicIpPoolCompartmentDetails The configuration details for the move operation. +type ChangePublicIpPoolCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the destination compartment for the public IP pool move. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangePublicIpPoolCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangePublicIpPoolCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_public_ip_pool_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_public_ip_pool_compartment_request_response.go new file mode 100644 index 000000000..9c8c9ba94 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_public_ip_pool_compartment_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangePublicIpPoolCompartmentRequest wrapper for the ChangePublicIpPoolCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangePublicIpPoolCompartment.go.html to see an example of how to use ChangePublicIpPoolCompartmentRequest. +type ChangePublicIpPoolCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP pool. + PublicIpPoolId *string `mandatory:"true" contributesTo:"path" name:"publicIpPoolId"` + + // Request to change the compartment of a public IP pool. + ChangePublicIpPoolCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangePublicIpPoolCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangePublicIpPoolCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangePublicIpPoolCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangePublicIpPoolCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangePublicIpPoolCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangePublicIpPoolCompartmentResponse wrapper for the ChangePublicIpPoolCompartment operation +type ChangePublicIpPoolCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangePublicIpPoolCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangePublicIpPoolCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_remote_peering_connection_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_remote_peering_connection_compartment_details.go new file mode 100644 index 000000000..95d3e4102 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_remote_peering_connection_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeRemotePeeringConnectionCompartmentDetails The configuration details for the move operation. +type ChangeRemotePeeringConnectionCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // remote peering connection to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeRemotePeeringConnectionCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeRemotePeeringConnectionCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_remote_peering_connection_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_remote_peering_connection_compartment_request_response.go new file mode 100644 index 000000000..33f737d52 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_remote_peering_connection_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeRemotePeeringConnectionCompartmentRequest wrapper for the ChangeRemotePeeringConnectionCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeRemotePeeringConnectionCompartment.go.html to see an example of how to use ChangeRemotePeeringConnectionCompartmentRequest. +type ChangeRemotePeeringConnectionCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the remote peering connection (RPC). + RemotePeeringConnectionId *string `mandatory:"true" contributesTo:"path" name:"remotePeeringConnectionId"` + + // Request to change the compartment of a remote peering connection. + ChangeRemotePeeringConnectionCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeRemotePeeringConnectionCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeRemotePeeringConnectionCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeRemotePeeringConnectionCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeRemotePeeringConnectionCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeRemotePeeringConnectionCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeRemotePeeringConnectionCompartmentResponse wrapper for the ChangeRemotePeeringConnectionCompartment operation +type ChangeRemotePeeringConnectionCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeRemotePeeringConnectionCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeRemotePeeringConnectionCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_route_table_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_route_table_compartment_details.go new file mode 100644 index 000000000..3b1814652 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_route_table_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeRouteTableCompartmentDetails The configuration details for the move operation. +type ChangeRouteTableCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // route table to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeRouteTableCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeRouteTableCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_route_table_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_route_table_compartment_request_response.go new file mode 100644 index 000000000..9f9352971 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_route_table_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeRouteTableCompartmentRequest wrapper for the ChangeRouteTableCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeRouteTableCompartment.go.html to see an example of how to use ChangeRouteTableCompartmentRequest. +type ChangeRouteTableCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table. + RtId *string `mandatory:"true" contributesTo:"path" name:"rtId"` + + // Request to change the compartment of a given route table. + ChangeRouteTableCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeRouteTableCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeRouteTableCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeRouteTableCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeRouteTableCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeRouteTableCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeRouteTableCompartmentResponse wrapper for the ChangeRouteTableCompartment operation +type ChangeRouteTableCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeRouteTableCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeRouteTableCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_security_list_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_security_list_compartment_details.go new file mode 100644 index 000000000..60de6ae66 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_security_list_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeSecurityListCompartmentDetails The configuration details for the move operation. +type ChangeSecurityListCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // security list to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeSecurityListCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeSecurityListCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_security_list_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_security_list_compartment_request_response.go new file mode 100644 index 000000000..ae9fb1a4d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_security_list_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeSecurityListCompartmentRequest wrapper for the ChangeSecurityListCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeSecurityListCompartment.go.html to see an example of how to use ChangeSecurityListCompartmentRequest. +type ChangeSecurityListCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the security list. + SecurityListId *string `mandatory:"true" contributesTo:"path" name:"securityListId"` + + // Request to change the compartment of a given security list. + ChangeSecurityListCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeSecurityListCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeSecurityListCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeSecurityListCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeSecurityListCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeSecurityListCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeSecurityListCompartmentResponse wrapper for the ChangeSecurityListCompartment operation +type ChangeSecurityListCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeSecurityListCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeSecurityListCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_service_gateway_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_service_gateway_compartment_details.go new file mode 100644 index 000000000..aa8d1e6dc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_service_gateway_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeServiceGatewayCompartmentDetails The configuration details for the move operation. +type ChangeServiceGatewayCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // service gateway to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeServiceGatewayCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeServiceGatewayCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_service_gateway_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_service_gateway_compartment_request_response.go new file mode 100644 index 000000000..bc665b7f7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_service_gateway_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeServiceGatewayCompartmentRequest wrapper for the ChangeServiceGatewayCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeServiceGatewayCompartment.go.html to see an example of how to use ChangeServiceGatewayCompartmentRequest. +type ChangeServiceGatewayCompartmentRequest struct { + + // The service gateway's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + ServiceGatewayId *string `mandatory:"true" contributesTo:"path" name:"serviceGatewayId"` + + // Request to change the compartment of a given Service Gateway. + ChangeServiceGatewayCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeServiceGatewayCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeServiceGatewayCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeServiceGatewayCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeServiceGatewayCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeServiceGatewayCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeServiceGatewayCompartmentResponse wrapper for the ChangeServiceGatewayCompartment operation +type ChangeServiceGatewayCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeServiceGatewayCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeServiceGatewayCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_subnet_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_subnet_compartment_details.go new file mode 100644 index 000000000..a046c79c7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_subnet_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeSubnetCompartmentDetails The configuration details for the move operation. +type ChangeSubnetCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // subnet to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeSubnetCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeSubnetCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_subnet_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_subnet_compartment_request_response.go new file mode 100644 index 000000000..61c7502a8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_subnet_compartment_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeSubnetCompartmentRequest wrapper for the ChangeSubnetCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeSubnetCompartment.go.html to see an example of how to use ChangeSubnetCompartmentRequest. +type ChangeSubnetCompartmentRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // Request to change the compartment of a given subnet. + ChangeSubnetCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeSubnetCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeSubnetCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeSubnetCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeSubnetCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeSubnetCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeSubnetCompartmentResponse wrapper for the ChangeSubnetCompartment operation +type ChangeSubnetCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ChangeSubnetCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeSubnetCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vcn_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vcn_compartment_details.go new file mode 100644 index 000000000..3b8ff14cd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vcn_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeVcnCompartmentDetails The configuration details for the move operation. +type ChangeVcnCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // VCN to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeVcnCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeVcnCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vcn_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vcn_compartment_request_response.go new file mode 100644 index 000000000..63952c362 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vcn_compartment_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeVcnCompartmentRequest wrapper for the ChangeVcnCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVcnCompartment.go.html to see an example of how to use ChangeVcnCompartmentRequest. +type ChangeVcnCompartmentRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` + + // Request to change the compartment of a given VCN. + ChangeVcnCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeVcnCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeVcnCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeVcnCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeVcnCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeVcnCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeVcnCompartmentResponse wrapper for the ChangeVcnCompartment operation +type ChangeVcnCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ChangeVcnCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeVcnCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_virtual_circuit_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_virtual_circuit_compartment_details.go new file mode 100644 index 000000000..71d105fa0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_virtual_circuit_compartment_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeVirtualCircuitCompartmentDetails The configuration details for the move operation. +type ChangeVirtualCircuitCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the + // virtual circuit to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeVirtualCircuitCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeVirtualCircuitCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_virtual_circuit_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_virtual_circuit_compartment_request_response.go new file mode 100644 index 000000000..12cc73887 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_virtual_circuit_compartment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeVirtualCircuitCompartmentRequest wrapper for the ChangeVirtualCircuitCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVirtualCircuitCompartment.go.html to see an example of how to use ChangeVirtualCircuitCompartmentRequest. +type ChangeVirtualCircuitCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit. + VirtualCircuitId *string `mandatory:"true" contributesTo:"path" name:"virtualCircuitId"` + + // Request to change the compartment of a virtual circuit. + ChangeVirtualCircuitCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeVirtualCircuitCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeVirtualCircuitCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeVirtualCircuitCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeVirtualCircuitCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeVirtualCircuitCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeVirtualCircuitCompartmentResponse wrapper for the ChangeVirtualCircuitCompartment operation +type ChangeVirtualCircuitCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeVirtualCircuitCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeVirtualCircuitCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vlan_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vlan_compartment_details.go new file mode 100644 index 000000000..3a611c4ab --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vlan_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeVlanCompartmentDetails The configuration details for the move operation. +type ChangeVlanCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the VLAN to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeVlanCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeVlanCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vlan_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vlan_compartment_request_response.go new file mode 100644 index 000000000..ec44e3f7b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vlan_compartment_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeVlanCompartmentRequest wrapper for the ChangeVlanCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVlanCompartment.go.html to see an example of how to use ChangeVlanCompartmentRequest. +type ChangeVlanCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VLAN. + VlanId *string `mandatory:"true" contributesTo:"path" name:"vlanId"` + + // Request to change the compartment of a given VLAN. + ChangeVlanCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeVlanCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeVlanCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeVlanCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeVlanCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeVlanCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeVlanCompartmentResponse wrapper for the ChangeVlanCompartment operation +type ChangeVlanCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ChangeVlanCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeVlanCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_backup_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_backup_compartment_details.go new file mode 100644 index 000000000..66feeaa4e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_backup_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeVolumeBackupCompartmentDetails Contains the details for the compartment to move the volume backup to. +type ChangeVolumeBackupCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the volume backup to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeVolumeBackupCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeVolumeBackupCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_backup_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_backup_compartment_request_response.go new file mode 100644 index 000000000..3523227f2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_backup_compartment_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeVolumeBackupCompartmentRequest wrapper for the ChangeVolumeBackupCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVolumeBackupCompartment.go.html to see an example of how to use ChangeVolumeBackupCompartmentRequest. +type ChangeVolumeBackupCompartmentRequest struct { + + // The OCID of the volume backup. + VolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeBackupId"` + + // Request to change the compartment of given volume backup. + ChangeVolumeBackupCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeVolumeBackupCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeVolumeBackupCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeVolumeBackupCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeVolumeBackupCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeVolumeBackupCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeVolumeBackupCompartmentResponse wrapper for the ChangeVolumeBackupCompartment operation +type ChangeVolumeBackupCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeVolumeBackupCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeVolumeBackupCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_compartment_details.go new file mode 100644 index 000000000..f2f812273 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeVolumeCompartmentDetails Contains the details for the compartment to move the volume to. +type ChangeVolumeCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the volume to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeVolumeCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeVolumeCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_compartment_request_response.go new file mode 100644 index 000000000..ec79a072d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_compartment_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeVolumeCompartmentRequest wrapper for the ChangeVolumeCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVolumeCompartment.go.html to see an example of how to use ChangeVolumeCompartmentRequest. +type ChangeVolumeCompartmentRequest struct { + + // The OCID of the volume. + VolumeId *string `mandatory:"true" contributesTo:"path" name:"volumeId"` + + // Request to change the compartment of given volume. + ChangeVolumeCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeVolumeCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeVolumeCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeVolumeCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeVolumeCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeVolumeCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeVolumeCompartmentResponse wrapper for the ChangeVolumeCompartment operation +type ChangeVolumeCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeVolumeCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeVolumeCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_group_backup_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_group_backup_compartment_details.go new file mode 100644 index 000000000..bae202fe4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_group_backup_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeVolumeGroupBackupCompartmentDetails Contains the details for the compartment to move the volume group backup to. +type ChangeVolumeGroupBackupCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the volume group backup to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeVolumeGroupBackupCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeVolumeGroupBackupCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_group_backup_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_group_backup_compartment_request_response.go new file mode 100644 index 000000000..1dd0411d1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_group_backup_compartment_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeVolumeGroupBackupCompartmentRequest wrapper for the ChangeVolumeGroupBackupCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVolumeGroupBackupCompartment.go.html to see an example of how to use ChangeVolumeGroupBackupCompartmentRequest. +type ChangeVolumeGroupBackupCompartmentRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup. + VolumeGroupBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupBackupId"` + + // Request to change the compartment of given volume group backup. + ChangeVolumeGroupBackupCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeVolumeGroupBackupCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeVolumeGroupBackupCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeVolumeGroupBackupCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeVolumeGroupBackupCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeVolumeGroupBackupCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeVolumeGroupBackupCompartmentResponse wrapper for the ChangeVolumeGroupBackupCompartment operation +type ChangeVolumeGroupBackupCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeVolumeGroupBackupCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeVolumeGroupBackupCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_group_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_group_compartment_details.go new file mode 100644 index 000000000..f37cc313f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_group_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeVolumeGroupCompartmentDetails Contains the details for the compartment to move the volume group to. +type ChangeVolumeGroupCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the volume group to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeVolumeGroupCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeVolumeGroupCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_group_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_group_compartment_request_response.go new file mode 100644 index 000000000..a025e4219 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_volume_group_compartment_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeVolumeGroupCompartmentRequest wrapper for the ChangeVolumeGroupCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVolumeGroupCompartment.go.html to see an example of how to use ChangeVolumeGroupCompartmentRequest. +type ChangeVolumeGroupCompartmentRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group. + VolumeGroupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupId"` + + // Request to change the compartment of given volume group. + ChangeVolumeGroupCompartmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeVolumeGroupCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeVolumeGroupCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeVolumeGroupCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeVolumeGroupCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeVolumeGroupCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeVolumeGroupCompartmentResponse wrapper for the ChangeVolumeGroupCompartment operation +type ChangeVolumeGroupCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeVolumeGroupCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeVolumeGroupCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vtap_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vtap_compartment_details.go new file mode 100644 index 000000000..36f6e5957 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vtap_compartment_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeVtapCompartmentDetails These configuration details are used in the move operation when changing the compartment containing a virtual test access point (VTAP). +type ChangeVtapCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the destination compartment for the VTAP move. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeVtapCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeVtapCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vtap_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vtap_compartment_request_response.go new file mode 100644 index 000000000..ff4b9170f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/change_vtap_compartment_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeVtapCompartmentRequest wrapper for the ChangeVtapCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVtapCompartment.go.html to see an example of how to use ChangeVtapCompartmentRequest. +type ChangeVtapCompartmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VTAP. + VtapId *string `mandatory:"true" contributesTo:"path" name:"vtapId"` + + // Request to change the compartment that contains a VTAP. + ChangeVtapCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeVtapCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeVtapCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeVtapCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeVtapCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeVtapCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeVtapCompartmentResponse wrapper for the ChangeVtapCompartment operation +type ChangeVtapCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ChangeVtapCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeVtapCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/check_host_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/check_host_configuration_request_response.go new file mode 100644 index 000000000..3d2ffcf8c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/check_host_configuration_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CheckHostConfigurationRequest wrapper for the CheckHostConfiguration operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CheckHostConfiguration.go.html to see an example of how to use CheckHostConfigurationRequest. +type CheckHostConfigurationRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + ComputeHostId *string `mandatory:"true" contributesTo:"path" name:"computeHostId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CheckHostConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CheckHostConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CheckHostConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CheckHostConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CheckHostConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CheckHostConfigurationResponse wrapper for the CheckHostConfiguration operation +type CheckHostConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeHost instance + ComputeHost `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Location of the resource. + Location *string `presentIn:"header" name:"location"` +} + +func (response CheckHostConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CheckHostConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_config_details.go new file mode 100644 index 000000000..f72bcc038 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_config_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterConfigDetails The HPC cluster configuration requested when launching instances in a compute capacity reservation. +// If the parameter is provided, the reservation is created with the HPC island and a list of HPC blocks that you +// specify. If a list of HPC blocks are missing or not provided, the reservation is created with any HPC blocks in +// the HPC island that you specify. If the values of HPC island or HPC block that you provide are not valid, an error +// is returned. +type ClusterConfigDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HPC island. + HpcIslandId *string `mandatory:"true" json:"hpcIslandId"` + + // The list of OCIDs of the network blocks. + NetworkBlockIds []string `mandatory:"false" json:"networkBlockIds"` +} + +func (m ClusterConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClusterConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_configuration_details.go new file mode 100644 index 000000000..b1878bdda --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_configuration_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterConfigurationDetails The HPC cluster configuration requested when launching instances of a cluster network. +// If the parameter is provided, instances will only be placed within the HPC island and list of network blocks +// that you specify. If a list of network blocks are missing or not provided, the instances will be placed in any +// HPC blocks in the HPC island that you specify. If the values of HPC island or network block that you provide are +// not valid, an error is returned. +type ClusterConfigurationDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HPC island. + HpcIslandId *string `mandatory:"true" json:"hpcIslandId"` + + // The list of network block OCIDs. + NetworkBlockIds []string `mandatory:"false" json:"networkBlockIds"` +} + +func (m ClusterConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClusterConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network.go new file mode 100644 index 000000000..f52867e28 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network.go @@ -0,0 +1,161 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterNetwork A cluster network is a group of high performance computing (HPC), GPU, or optimized bare metal +// instances that are connected with an ultra low-latency remote direct memory access (RDMA) +// network. Cluster networks with instance pools (https://docs.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm) +// use instance pools to manage groups of identical instances. +// Use cluster networks with instance pools when you want predictable capacity for a specific number of identical +// instances that are managed as a group. +// If you want to manage instances in the RDMA network independently of each other or use different types of instances +// in the network group, use compute clusters instead. For details, see ComputeCluster. +type ClusterNetwork struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster network. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the cluster network. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The current state of the cluster network. + LifecycleState ClusterNetworkLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the resource was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time the resource was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HPC island used by the cluster network. + HpcIslandId *string `mandatory:"false" json:"hpcIslandId"` + + // The list of network block OCIDs of the HPC island. + NetworkBlockIds []string `mandatory:"false" json:"networkBlockIds"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The instance pools in the cluster network. + // Each cluster network can have one instance pool. + InstancePools []InstancePool `mandatory:"false" json:"instancePools"` + + PlacementConfiguration *ClusterNetworkPlacementConfigurationDetails `mandatory:"false" json:"placementConfiguration"` +} + +func (m ClusterNetwork) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClusterNetwork) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingClusterNetworkLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetClusterNetworkLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ClusterNetworkLifecycleStateEnum Enum with underlying type: string +type ClusterNetworkLifecycleStateEnum string + +// Set of constants representing the allowable values for ClusterNetworkLifecycleStateEnum +const ( + ClusterNetworkLifecycleStateProvisioning ClusterNetworkLifecycleStateEnum = "PROVISIONING" + ClusterNetworkLifecycleStateScaling ClusterNetworkLifecycleStateEnum = "SCALING" + ClusterNetworkLifecycleStateStarting ClusterNetworkLifecycleStateEnum = "STARTING" + ClusterNetworkLifecycleStateStopping ClusterNetworkLifecycleStateEnum = "STOPPING" + ClusterNetworkLifecycleStateTerminating ClusterNetworkLifecycleStateEnum = "TERMINATING" + ClusterNetworkLifecycleStateStopped ClusterNetworkLifecycleStateEnum = "STOPPED" + ClusterNetworkLifecycleStateTerminated ClusterNetworkLifecycleStateEnum = "TERMINATED" + ClusterNetworkLifecycleStateRunning ClusterNetworkLifecycleStateEnum = "RUNNING" +) + +var mappingClusterNetworkLifecycleStateEnum = map[string]ClusterNetworkLifecycleStateEnum{ + "PROVISIONING": ClusterNetworkLifecycleStateProvisioning, + "SCALING": ClusterNetworkLifecycleStateScaling, + "STARTING": ClusterNetworkLifecycleStateStarting, + "STOPPING": ClusterNetworkLifecycleStateStopping, + "TERMINATING": ClusterNetworkLifecycleStateTerminating, + "STOPPED": ClusterNetworkLifecycleStateStopped, + "TERMINATED": ClusterNetworkLifecycleStateTerminated, + "RUNNING": ClusterNetworkLifecycleStateRunning, +} + +var mappingClusterNetworkLifecycleStateEnumLowerCase = map[string]ClusterNetworkLifecycleStateEnum{ + "provisioning": ClusterNetworkLifecycleStateProvisioning, + "scaling": ClusterNetworkLifecycleStateScaling, + "starting": ClusterNetworkLifecycleStateStarting, + "stopping": ClusterNetworkLifecycleStateStopping, + "terminating": ClusterNetworkLifecycleStateTerminating, + "stopped": ClusterNetworkLifecycleStateStopped, + "terminated": ClusterNetworkLifecycleStateTerminated, + "running": ClusterNetworkLifecycleStateRunning, +} + +// GetClusterNetworkLifecycleStateEnumValues Enumerates the set of values for ClusterNetworkLifecycleStateEnum +func GetClusterNetworkLifecycleStateEnumValues() []ClusterNetworkLifecycleStateEnum { + values := make([]ClusterNetworkLifecycleStateEnum, 0) + for _, v := range mappingClusterNetworkLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetClusterNetworkLifecycleStateEnumStringValues Enumerates the set of values in String for ClusterNetworkLifecycleStateEnum +func GetClusterNetworkLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "SCALING", + "STARTING", + "STOPPING", + "TERMINATING", + "STOPPED", + "TERMINATED", + "RUNNING", + } +} + +// GetMappingClusterNetworkLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingClusterNetworkLifecycleStateEnum(val string) (ClusterNetworkLifecycleStateEnum, bool) { + enum, ok := mappingClusterNetworkLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network_placement_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network_placement_configuration_details.go new file mode 100644 index 000000000..f24ea0b89 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network_placement_configuration_details.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterNetworkPlacementConfigurationDetails The location for where the instance pools in a cluster network will place instances. +type ClusterNetworkPlacementConfigurationDetails struct { + + // The availability domain to place instances. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The placement constraint when reserving hosts. + PlacementConstraint ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum `mandatory:"false" json:"placementConstraint,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place instances. This field is deprecated. + // Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. + PrimarySubnetId *string `mandatory:"false" json:"primarySubnetId"` + + PrimaryVnicSubnets *InstancePoolPlacementPrimarySubnet `mandatory:"false" json:"primaryVnicSubnets"` + + // The set of secondary VNIC data for instances in the pool. + SecondaryVnicSubnets []InstancePoolPlacementSecondaryVnicSubnet `mandatory:"false" json:"secondaryVnicSubnets"` +} + +func (m ClusterNetworkPlacementConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClusterNetworkPlacementConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum(string(m.PlacementConstraint)); !ok && m.PlacementConstraint != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PlacementConstraint: %s. Supported values are: %s.", m.PlacementConstraint, strings.Join(GetClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum Enum with underlying type: string +type ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum string + +// Set of constants representing the allowable values for ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum +const ( + ClusterNetworkPlacementConfigurationDetailsPlacementConstraintSingleTier ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum = "SINGLE_TIER" + ClusterNetworkPlacementConfigurationDetailsPlacementConstraintSingleBlock ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum = "SINGLE_BLOCK" + ClusterNetworkPlacementConfigurationDetailsPlacementConstraintPackedDistributionMultiBlock ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum = "PACKED_DISTRIBUTION_MULTI_BLOCK" +) + +var mappingClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum = map[string]ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum{ + "SINGLE_TIER": ClusterNetworkPlacementConfigurationDetailsPlacementConstraintSingleTier, + "SINGLE_BLOCK": ClusterNetworkPlacementConfigurationDetailsPlacementConstraintSingleBlock, + "PACKED_DISTRIBUTION_MULTI_BLOCK": ClusterNetworkPlacementConfigurationDetailsPlacementConstraintPackedDistributionMultiBlock, +} + +var mappingClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnumLowerCase = map[string]ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum{ + "single_tier": ClusterNetworkPlacementConfigurationDetailsPlacementConstraintSingleTier, + "single_block": ClusterNetworkPlacementConfigurationDetailsPlacementConstraintSingleBlock, + "packed_distribution_multi_block": ClusterNetworkPlacementConfigurationDetailsPlacementConstraintPackedDistributionMultiBlock, +} + +// GetClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnumValues Enumerates the set of values for ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum +func GetClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnumValues() []ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum { + values := make([]ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum, 0) + for _, v := range mappingClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum { + values = append(values, v) + } + return values +} + +// GetClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnumStringValues Enumerates the set of values in String for ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum +func GetClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnumStringValues() []string { + return []string{ + "SINGLE_TIER", + "SINGLE_BLOCK", + "PACKED_DISTRIBUTION_MULTI_BLOCK", + } +} + +// GetMappingClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum(val string) (ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum, bool) { + enum, ok := mappingClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network_summary.go new file mode 100644 index 000000000..dbc98322e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cluster_network_summary.go @@ -0,0 +1,146 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterNetworkSummary Summary information for a cluster network with instance pools (https://docs.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). +type ClusterNetworkSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster network. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the + // cluster netowrk. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The current state of the cluster network. + LifecycleState ClusterNetworkSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the resource was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time the resource was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The instance pools in the cluster network. + InstancePools []InstancePoolSummary `mandatory:"false" json:"instancePools"` +} + +func (m ClusterNetworkSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClusterNetworkSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingClusterNetworkSummaryLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetClusterNetworkSummaryLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ClusterNetworkSummaryLifecycleStateEnum Enum with underlying type: string +type ClusterNetworkSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for ClusterNetworkSummaryLifecycleStateEnum +const ( + ClusterNetworkSummaryLifecycleStateProvisioning ClusterNetworkSummaryLifecycleStateEnum = "PROVISIONING" + ClusterNetworkSummaryLifecycleStateScaling ClusterNetworkSummaryLifecycleStateEnum = "SCALING" + ClusterNetworkSummaryLifecycleStateStarting ClusterNetworkSummaryLifecycleStateEnum = "STARTING" + ClusterNetworkSummaryLifecycleStateStopping ClusterNetworkSummaryLifecycleStateEnum = "STOPPING" + ClusterNetworkSummaryLifecycleStateTerminating ClusterNetworkSummaryLifecycleStateEnum = "TERMINATING" + ClusterNetworkSummaryLifecycleStateStopped ClusterNetworkSummaryLifecycleStateEnum = "STOPPED" + ClusterNetworkSummaryLifecycleStateTerminated ClusterNetworkSummaryLifecycleStateEnum = "TERMINATED" + ClusterNetworkSummaryLifecycleStateRunning ClusterNetworkSummaryLifecycleStateEnum = "RUNNING" +) + +var mappingClusterNetworkSummaryLifecycleStateEnum = map[string]ClusterNetworkSummaryLifecycleStateEnum{ + "PROVISIONING": ClusterNetworkSummaryLifecycleStateProvisioning, + "SCALING": ClusterNetworkSummaryLifecycleStateScaling, + "STARTING": ClusterNetworkSummaryLifecycleStateStarting, + "STOPPING": ClusterNetworkSummaryLifecycleStateStopping, + "TERMINATING": ClusterNetworkSummaryLifecycleStateTerminating, + "STOPPED": ClusterNetworkSummaryLifecycleStateStopped, + "TERMINATED": ClusterNetworkSummaryLifecycleStateTerminated, + "RUNNING": ClusterNetworkSummaryLifecycleStateRunning, +} + +var mappingClusterNetworkSummaryLifecycleStateEnumLowerCase = map[string]ClusterNetworkSummaryLifecycleStateEnum{ + "provisioning": ClusterNetworkSummaryLifecycleStateProvisioning, + "scaling": ClusterNetworkSummaryLifecycleStateScaling, + "starting": ClusterNetworkSummaryLifecycleStateStarting, + "stopping": ClusterNetworkSummaryLifecycleStateStopping, + "terminating": ClusterNetworkSummaryLifecycleStateTerminating, + "stopped": ClusterNetworkSummaryLifecycleStateStopped, + "terminated": ClusterNetworkSummaryLifecycleStateTerminated, + "running": ClusterNetworkSummaryLifecycleStateRunning, +} + +// GetClusterNetworkSummaryLifecycleStateEnumValues Enumerates the set of values for ClusterNetworkSummaryLifecycleStateEnum +func GetClusterNetworkSummaryLifecycleStateEnumValues() []ClusterNetworkSummaryLifecycleStateEnum { + values := make([]ClusterNetworkSummaryLifecycleStateEnum, 0) + for _, v := range mappingClusterNetworkSummaryLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetClusterNetworkSummaryLifecycleStateEnumStringValues Enumerates the set of values in String for ClusterNetworkSummaryLifecycleStateEnum +func GetClusterNetworkSummaryLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "SCALING", + "STARTING", + "STOPPING", + "TERMINATING", + "STOPPED", + "TERMINATED", + "RUNNING", + } +} + +// GetMappingClusterNetworkSummaryLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingClusterNetworkSummaryLifecycleStateEnum(val string) (ClusterNetworkSummaryLifecycleStateEnum, bool) { + enum, ok := mappingClusterNetworkSummaryLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compartment_internal.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compartment_internal.go new file mode 100644 index 000000000..f2b9a6727 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compartment_internal.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CompartmentInternal Helper definition required to perform authZ using SPLAT expressions on a Compartment +type CompartmentInternal struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + Id *string `mandatory:"false" json:"id"` +} + +func (m CompartmentInternal) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CompartmentInternal) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/component_version.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/component_version.go new file mode 100644 index 000000000..467fc7f7e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/component_version.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComponentVersion Represents a specific component type and its associated firmware versions. +type ComponentVersion struct { + + // The type of component. + ComponentType *string `mandatory:"true" json:"componentType"` + + // A list of firmware versions associated with this component type. + Version []string `mandatory:"true" json:"version"` +} + +func (m ComponentVersion) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComponentVersion) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_bare_metal_host.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_bare_metal_host.go new file mode 100644 index 000000000..fa831b706 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_bare_metal_host.go @@ -0,0 +1,171 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeBareMetalHost A compute bare metal host. +type ComputeBareMetalHost struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" json:"computeCapacityTopologyId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute bare metal host. + Id *string `mandatory:"true" json:"id"` + + // The shape of the compute instance that runs on the compute bare metal host. + InstanceShape *string `mandatory:"true" json:"instanceShape"` + + // The current state of the compute bare metal host. + LifecycleState ComputeBareMetalHostLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute bare metal host was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute bare metal host was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + ComputeHpcIslandId *string `mandatory:"false" json:"computeHpcIslandId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute local block. + ComputeLocalBlockId *string `mandatory:"false" json:"computeLocalBlockId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + ComputeNetworkBlockId *string `mandatory:"false" json:"computeNetworkBlockId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute instance that runs on the compute bare metal host. + InstanceId *string `mandatory:"false" json:"instanceId"` + + // The lifecycle state details of the compute bare metal host. + LifecycleDetails ComputeBareMetalHostLifecycleDetailsEnum `mandatory:"false" json:"lifecycleDetails,omitempty"` +} + +func (m ComputeBareMetalHost) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeBareMetalHost) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeBareMetalHostLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeBareMetalHostLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingComputeBareMetalHostLifecycleDetailsEnum(string(m.LifecycleDetails)); !ok && m.LifecycleDetails != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleDetails: %s. Supported values are: %s.", m.LifecycleDetails, strings.Join(GetComputeBareMetalHostLifecycleDetailsEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeBareMetalHostLifecycleDetailsEnum Enum with underlying type: string +type ComputeBareMetalHostLifecycleDetailsEnum string + +// Set of constants representing the allowable values for ComputeBareMetalHostLifecycleDetailsEnum +const ( + ComputeBareMetalHostLifecycleDetailsAvailable ComputeBareMetalHostLifecycleDetailsEnum = "AVAILABLE" + ComputeBareMetalHostLifecycleDetailsDegraded ComputeBareMetalHostLifecycleDetailsEnum = "DEGRADED" + ComputeBareMetalHostLifecycleDetailsUnavailable ComputeBareMetalHostLifecycleDetailsEnum = "UNAVAILABLE" +) + +var mappingComputeBareMetalHostLifecycleDetailsEnum = map[string]ComputeBareMetalHostLifecycleDetailsEnum{ + "AVAILABLE": ComputeBareMetalHostLifecycleDetailsAvailable, + "DEGRADED": ComputeBareMetalHostLifecycleDetailsDegraded, + "UNAVAILABLE": ComputeBareMetalHostLifecycleDetailsUnavailable, +} + +var mappingComputeBareMetalHostLifecycleDetailsEnumLowerCase = map[string]ComputeBareMetalHostLifecycleDetailsEnum{ + "available": ComputeBareMetalHostLifecycleDetailsAvailable, + "degraded": ComputeBareMetalHostLifecycleDetailsDegraded, + "unavailable": ComputeBareMetalHostLifecycleDetailsUnavailable, +} + +// GetComputeBareMetalHostLifecycleDetailsEnumValues Enumerates the set of values for ComputeBareMetalHostLifecycleDetailsEnum +func GetComputeBareMetalHostLifecycleDetailsEnumValues() []ComputeBareMetalHostLifecycleDetailsEnum { + values := make([]ComputeBareMetalHostLifecycleDetailsEnum, 0) + for _, v := range mappingComputeBareMetalHostLifecycleDetailsEnum { + values = append(values, v) + } + return values +} + +// GetComputeBareMetalHostLifecycleDetailsEnumStringValues Enumerates the set of values in String for ComputeBareMetalHostLifecycleDetailsEnum +func GetComputeBareMetalHostLifecycleDetailsEnumStringValues() []string { + return []string{ + "AVAILABLE", + "DEGRADED", + "UNAVAILABLE", + } +} + +// GetMappingComputeBareMetalHostLifecycleDetailsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeBareMetalHostLifecycleDetailsEnum(val string) (ComputeBareMetalHostLifecycleDetailsEnum, bool) { + enum, ok := mappingComputeBareMetalHostLifecycleDetailsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ComputeBareMetalHostLifecycleStateEnum Enum with underlying type: string +type ComputeBareMetalHostLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeBareMetalHostLifecycleStateEnum +const ( + ComputeBareMetalHostLifecycleStateActive ComputeBareMetalHostLifecycleStateEnum = "ACTIVE" + ComputeBareMetalHostLifecycleStateInactive ComputeBareMetalHostLifecycleStateEnum = "INACTIVE" +) + +var mappingComputeBareMetalHostLifecycleStateEnum = map[string]ComputeBareMetalHostLifecycleStateEnum{ + "ACTIVE": ComputeBareMetalHostLifecycleStateActive, + "INACTIVE": ComputeBareMetalHostLifecycleStateInactive, +} + +var mappingComputeBareMetalHostLifecycleStateEnumLowerCase = map[string]ComputeBareMetalHostLifecycleStateEnum{ + "active": ComputeBareMetalHostLifecycleStateActive, + "inactive": ComputeBareMetalHostLifecycleStateInactive, +} + +// GetComputeBareMetalHostLifecycleStateEnumValues Enumerates the set of values for ComputeBareMetalHostLifecycleStateEnum +func GetComputeBareMetalHostLifecycleStateEnumValues() []ComputeBareMetalHostLifecycleStateEnum { + values := make([]ComputeBareMetalHostLifecycleStateEnum, 0) + for _, v := range mappingComputeBareMetalHostLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeBareMetalHostLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeBareMetalHostLifecycleStateEnum +func GetComputeBareMetalHostLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + } +} + +// GetMappingComputeBareMetalHostLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeBareMetalHostLifecycleStateEnum(val string) (ComputeBareMetalHostLifecycleStateEnum, bool) { + enum, ok := mappingComputeBareMetalHostLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_bare_metal_host_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_bare_metal_host_collection.go new file mode 100644 index 000000000..67bad770d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_bare_metal_host_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeBareMetalHostCollection A list of compute bare metal hosts. +type ComputeBareMetalHostCollection struct { + + // The list of compute bare metal hosts. + Items []ComputeBareMetalHostSummary `mandatory:"true" json:"items"` +} + +func (m ComputeBareMetalHostCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeBareMetalHostCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_bare_metal_host_placement_constraint_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_bare_metal_host_placement_constraint_details.go new file mode 100644 index 000000000..d8de71a53 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_bare_metal_host_placement_constraint_details.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeBareMetalHostPlacementConstraintDetails The details for providing placement constraints using the compute bare metal host OCID. +// This placement constraint is only applicable during the launch operation. +type ComputeBareMetalHostPlacementConstraintDetails struct { + + // The OCID of the compute bare metal host. This is only available for dedicated capacity customers. + ComputeBareMetalHostId *string `mandatory:"true" json:"computeBareMetalHostId"` +} + +func (m ComputeBareMetalHostPlacementConstraintDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeBareMetalHostPlacementConstraintDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ComputeBareMetalHostPlacementConstraintDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeComputeBareMetalHostPlacementConstraintDetails ComputeBareMetalHostPlacementConstraintDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeComputeBareMetalHostPlacementConstraintDetails + }{ + "COMPUTE_BARE_METAL_HOST", + (MarshalTypeComputeBareMetalHostPlacementConstraintDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_bare_metal_host_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_bare_metal_host_summary.go new file mode 100644 index 000000000..224d260f4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_bare_metal_host_summary.go @@ -0,0 +1,83 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeBareMetalHostSummary Summary information for a compute bare metal host. +type ComputeBareMetalHostSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" json:"computeCapacityTopologyId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute bare metal host. + Id *string `mandatory:"true" json:"id"` + + // The shape of the compute instance that runs on the compute bare metal host. + InstanceShape *string `mandatory:"true" json:"instanceShape"` + + // The current state of the compute bare metal host. + LifecycleState ComputeBareMetalHostLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute bare metal host was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute bare metal host was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + ComputeHpcIslandId *string `mandatory:"false" json:"computeHpcIslandId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + ComputeLocalBlockId *string `mandatory:"false" json:"computeLocalBlockId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute local block. + ComputeNetworkBlockId *string `mandatory:"false" json:"computeNetworkBlockId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute instance that runs on the compute bare metal host. + InstanceId *string `mandatory:"false" json:"instanceId"` + + // The lifecycle state details of the compute bare metal host. + LifecycleDetails ComputeBareMetalHostLifecycleDetailsEnum `mandatory:"false" json:"lifecycleDetails,omitempty"` +} + +func (m ComputeBareMetalHostSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeBareMetalHostSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeBareMetalHostLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeBareMetalHostLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingComputeBareMetalHostLifecycleDetailsEnum(string(m.LifecycleDetails)); !ok && m.LifecycleDetails != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleDetails: %s. Supported values are: %s.", m.LifecycleDetails, strings.Join(GetComputeBareMetalHostLifecycleDetailsEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_report.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_report.go new file mode 100644 index 000000000..76aaf3ae1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_report.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeCapacityReport A report of the host capacity within an availability domain that is available for you +// to create compute instances. Host capacity is the physical infrastructure that resources such as compute +// instances run on. +// Use the capacity report to determine whether sufficient capacity is available for a shape before +// you create an instance or change the shape of an instance. +type ComputeCapacityReport struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root + // compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The availability domain for the capacity report. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // Information about the available capacity for each shape in a capacity report. + ShapeAvailabilities []CapacityReportShapeAvailability `mandatory:"true" json:"shapeAvailabilities"` + + // The date and time the capacity report was created, in the format defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` +} + +func (m ComputeCapacityReport) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeCapacityReport) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_reservation.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_reservation.go new file mode 100644 index 000000000..581076d38 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_reservation.go @@ -0,0 +1,160 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeCapacityReservation A template that defines the settings to use when creating compute capacity reservations. +type ComputeCapacityReservation struct { + + // The availability domain of the compute capacity reservation. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + // containing the compute capacity reservation. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity reservation. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute capacity reservation. + LifecycleState ComputeCapacityReservationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the compute capacity reservation was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Whether this capacity reservation is the default. + // For more information, see Capacity Reservations (https://docs.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm#default). + IsDefaultReservation *bool `mandatory:"false" json:"isDefaultReservation"` + + // The capacity configurations for the capacity reservation. + // To use the reservation for the desired shape, specify the shape, count, and + // optionally the fault domain where you want this configuration. + InstanceReservationConfigs []InstanceReservationConfig `mandatory:"false" json:"instanceReservationConfigs"` + + // The number of instances for which capacity will be held with this + // compute capacity reservation. This number is the sum of the values of the `reservedCount` fields + // for all of the instance capacity configurations under this reservation. + // The purpose of this field is to calculate the percentage usage of the reservation. + ReservedInstanceCount *int64 `mandatory:"false" json:"reservedInstanceCount"` + + // The date and time the compute capacity reservation was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // The total number of instances currently consuming space in + // this compute capacity reservation. This number is the sum of the values of the `usedCount` fields + // for all of the instance capacity configurations under this reservation. + // The purpose of this field is to calculate the percentage usage of the reservation. + UsedInstanceCount *int64 `mandatory:"false" json:"usedInstanceCount"` +} + +func (m ComputeCapacityReservation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeCapacityReservation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeCapacityReservationLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeCapacityReservationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeCapacityReservationLifecycleStateEnum Enum with underlying type: string +type ComputeCapacityReservationLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeCapacityReservationLifecycleStateEnum +const ( + ComputeCapacityReservationLifecycleStateActive ComputeCapacityReservationLifecycleStateEnum = "ACTIVE" + ComputeCapacityReservationLifecycleStateCreating ComputeCapacityReservationLifecycleStateEnum = "CREATING" + ComputeCapacityReservationLifecycleStateUpdating ComputeCapacityReservationLifecycleStateEnum = "UPDATING" + ComputeCapacityReservationLifecycleStateMoving ComputeCapacityReservationLifecycleStateEnum = "MOVING" + ComputeCapacityReservationLifecycleStateDeleted ComputeCapacityReservationLifecycleStateEnum = "DELETED" + ComputeCapacityReservationLifecycleStateDeleting ComputeCapacityReservationLifecycleStateEnum = "DELETING" +) + +var mappingComputeCapacityReservationLifecycleStateEnum = map[string]ComputeCapacityReservationLifecycleStateEnum{ + "ACTIVE": ComputeCapacityReservationLifecycleStateActive, + "CREATING": ComputeCapacityReservationLifecycleStateCreating, + "UPDATING": ComputeCapacityReservationLifecycleStateUpdating, + "MOVING": ComputeCapacityReservationLifecycleStateMoving, + "DELETED": ComputeCapacityReservationLifecycleStateDeleted, + "DELETING": ComputeCapacityReservationLifecycleStateDeleting, +} + +var mappingComputeCapacityReservationLifecycleStateEnumLowerCase = map[string]ComputeCapacityReservationLifecycleStateEnum{ + "active": ComputeCapacityReservationLifecycleStateActive, + "creating": ComputeCapacityReservationLifecycleStateCreating, + "updating": ComputeCapacityReservationLifecycleStateUpdating, + "moving": ComputeCapacityReservationLifecycleStateMoving, + "deleted": ComputeCapacityReservationLifecycleStateDeleted, + "deleting": ComputeCapacityReservationLifecycleStateDeleting, +} + +// GetComputeCapacityReservationLifecycleStateEnumValues Enumerates the set of values for ComputeCapacityReservationLifecycleStateEnum +func GetComputeCapacityReservationLifecycleStateEnumValues() []ComputeCapacityReservationLifecycleStateEnum { + values := make([]ComputeCapacityReservationLifecycleStateEnum, 0) + for _, v := range mappingComputeCapacityReservationLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeCapacityReservationLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeCapacityReservationLifecycleStateEnum +func GetComputeCapacityReservationLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "CREATING", + "UPDATING", + "MOVING", + "DELETED", + "DELETING", + } +} + +// GetMappingComputeCapacityReservationLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeCapacityReservationLifecycleStateEnum(val string) (ComputeCapacityReservationLifecycleStateEnum, bool) { + enum, ok := mappingComputeCapacityReservationLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_reservation_instance_shape_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_reservation_instance_shape_summary.go new file mode 100644 index 000000000..29aac554a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_reservation_instance_shape_summary.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeCapacityReservationInstanceShapeSummary An available shape used to launch instances in a compute capacity reservation. +type ComputeCapacityReservationInstanceShapeSummary struct { + + // The shape's availability domain. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The name of the available shape used to launch instances in a compute capacity reservation. + InstanceShape *string `mandatory:"true" json:"instanceShape"` +} + +func (m ComputeCapacityReservationInstanceShapeSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeCapacityReservationInstanceShapeSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_reservation_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_reservation_summary.go new file mode 100644 index 000000000..b6725f8c0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_reservation_summary.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeCapacityReservationSummary Summary information for a compute capacity reservation. +type ComputeCapacityReservationSummary struct { + + // The OCID of the instance reservation configuration. + Id *string `mandatory:"true" json:"id"` + + // The availability domain of the capacity reservation. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The date and time the capacity reservation was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The current state of the capacity reservation. + LifecycleState ComputeCapacityReservationLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The number of instances for which capacity will be held in this + // compute capacity reservation. This number is the sum of the values of the `reservedCount` fields + // for all of the instance capacity configurations under this reservation. + // The purpose of this field is to calculate the percentage usage of the reservation. + ReservedInstanceCount *int64 `mandatory:"false" json:"reservedInstanceCount"` + + // The total number of instances currently consuming space in + // this compute capacity reservation. This number is the sum of the values of the `usedCount` fields + // for all of the instance capacity configurations under this reservation. + // The purpose of this field is to calculate the percentage usage of the reservation. + UsedInstanceCount *int64 `mandatory:"false" json:"usedInstanceCount"` + + // Whether this capacity reservation is the default. + // For more information, see Capacity Reservations (https://docs.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm#default). + IsDefaultReservation *bool `mandatory:"false" json:"isDefaultReservation"` +} + +func (m ComputeCapacityReservationSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeCapacityReservationSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingComputeCapacityReservationLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeCapacityReservationLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_topology.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_topology.go new file mode 100644 index 000000000..1ea72fa7f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_topology.go @@ -0,0 +1,188 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeCapacityTopology A compute capacity topology that allows you to query your bare metal hosts and their RDMA network topology. +type ComputeCapacityTopology struct { + + // The availability domain of the compute capacity topology. + // Example: `Uocm:US-CHICAGO-1-AD-2` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + CapacitySource CapacitySource `mandatory:"true" json:"capacitySource"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the compute capacity topology. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute capacity topology. + LifecycleState ComputeCapacityTopologyLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute capacity topology was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute capacity topology was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m ComputeCapacityTopology) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeCapacityTopology) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeCapacityTopologyLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeCapacityTopologyLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *ComputeCapacityTopology) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + AvailabilityDomain *string `json:"availabilityDomain"` + CapacitySource capacitysource `json:"capacitySource"` + CompartmentId *string `json:"compartmentId"` + Id *string `json:"id"` + LifecycleState ComputeCapacityTopologyLifecycleStateEnum `json:"lifecycleState"` + TimeCreated *common.SDKTime `json:"timeCreated"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.AvailabilityDomain = model.AvailabilityDomain + + nn, e = model.CapacitySource.UnmarshalPolymorphicJSON(model.CapacitySource.JsonData) + if e != nil { + return + } + if nn != nil { + m.CapacitySource = nn.(CapacitySource) + } else { + m.CapacitySource = nil + } + + m.CompartmentId = model.CompartmentId + + m.Id = model.Id + + m.LifecycleState = model.LifecycleState + + m.TimeCreated = model.TimeCreated + + m.TimeUpdated = model.TimeUpdated + + return +} + +// ComputeCapacityTopologyLifecycleStateEnum Enum with underlying type: string +type ComputeCapacityTopologyLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeCapacityTopologyLifecycleStateEnum +const ( + ComputeCapacityTopologyLifecycleStateActive ComputeCapacityTopologyLifecycleStateEnum = "ACTIVE" + ComputeCapacityTopologyLifecycleStateCreating ComputeCapacityTopologyLifecycleStateEnum = "CREATING" + ComputeCapacityTopologyLifecycleStateUpdating ComputeCapacityTopologyLifecycleStateEnum = "UPDATING" + ComputeCapacityTopologyLifecycleStateDeleted ComputeCapacityTopologyLifecycleStateEnum = "DELETED" + ComputeCapacityTopologyLifecycleStateDeleting ComputeCapacityTopologyLifecycleStateEnum = "DELETING" +) + +var mappingComputeCapacityTopologyLifecycleStateEnum = map[string]ComputeCapacityTopologyLifecycleStateEnum{ + "ACTIVE": ComputeCapacityTopologyLifecycleStateActive, + "CREATING": ComputeCapacityTopologyLifecycleStateCreating, + "UPDATING": ComputeCapacityTopologyLifecycleStateUpdating, + "DELETED": ComputeCapacityTopologyLifecycleStateDeleted, + "DELETING": ComputeCapacityTopologyLifecycleStateDeleting, +} + +var mappingComputeCapacityTopologyLifecycleStateEnumLowerCase = map[string]ComputeCapacityTopologyLifecycleStateEnum{ + "active": ComputeCapacityTopologyLifecycleStateActive, + "creating": ComputeCapacityTopologyLifecycleStateCreating, + "updating": ComputeCapacityTopologyLifecycleStateUpdating, + "deleted": ComputeCapacityTopologyLifecycleStateDeleted, + "deleting": ComputeCapacityTopologyLifecycleStateDeleting, +} + +// GetComputeCapacityTopologyLifecycleStateEnumValues Enumerates the set of values for ComputeCapacityTopologyLifecycleStateEnum +func GetComputeCapacityTopologyLifecycleStateEnumValues() []ComputeCapacityTopologyLifecycleStateEnum { + values := make([]ComputeCapacityTopologyLifecycleStateEnum, 0) + for _, v := range mappingComputeCapacityTopologyLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeCapacityTopologyLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeCapacityTopologyLifecycleStateEnum +func GetComputeCapacityTopologyLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "CREATING", + "UPDATING", + "DELETED", + "DELETING", + } +} + +// GetMappingComputeCapacityTopologyLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeCapacityTopologyLifecycleStateEnum(val string) (ComputeCapacityTopologyLifecycleStateEnum, bool) { + enum, ok := mappingComputeCapacityTopologyLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_topology_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_topology_collection.go new file mode 100644 index 000000000..261029255 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_topology_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeCapacityTopologyCollection A list of compute capacity topologies. +type ComputeCapacityTopologyCollection struct { + + // The list of compute capacity topologies. + Items []ComputeCapacityTopologySummary `mandatory:"true" json:"items"` +} + +func (m ComputeCapacityTopologyCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeCapacityTopologyCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_topology_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_topology_summary.go new file mode 100644 index 000000000..620dfc678 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_capacity_topology_summary.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeCapacityTopologySummary Summary information for a compute capacity topology. +type ComputeCapacityTopologySummary struct { + + // The availability domain of the compute capacity topology. + // Example: `Uocm:US-CHICAGO-1-AD-2` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the compute capacity topology. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute capacity topology. + LifecycleState ComputeCapacityTopologyLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute capacity topology was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute capacity topology was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m ComputeCapacityTopologySummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeCapacityTopologySummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeCapacityTopologyLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeCapacityTopologyLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster.go new file mode 100644 index 000000000..f6c940607 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster.go @@ -0,0 +1,126 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeCluster The data for creating a compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). A compute cluster +// is an empty remote direct memory access (RDMA) network group +// After the compute cluster is created, you can use the compute cluster's OCID with the +// LaunchInstance operation to create instances in the compute cluster. +// The instances must be created in the same compartment and availability domain as the cluster. +// Use compute clusters when you want to manage instances in the cluster individually in the RDMA network group. +// For details about creating a cluster network that uses instance pools to manage groups of identical instances, +// see CreateClusterNetworkDetails. +type ComputeCluster struct { + + // The availability domain the compute cluster is running in. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the compute cluster. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute cluster. + LifecycleState ComputeClusterLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the compute cluster was created, + // in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m ComputeCluster) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeCluster) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeClusterLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeClusterLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeClusterLifecycleStateEnum Enum with underlying type: string +type ComputeClusterLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeClusterLifecycleStateEnum +const ( + ComputeClusterLifecycleStateActive ComputeClusterLifecycleStateEnum = "ACTIVE" + ComputeClusterLifecycleStateDeleted ComputeClusterLifecycleStateEnum = "DELETED" +) + +var mappingComputeClusterLifecycleStateEnum = map[string]ComputeClusterLifecycleStateEnum{ + "ACTIVE": ComputeClusterLifecycleStateActive, + "DELETED": ComputeClusterLifecycleStateDeleted, +} + +var mappingComputeClusterLifecycleStateEnumLowerCase = map[string]ComputeClusterLifecycleStateEnum{ + "active": ComputeClusterLifecycleStateActive, + "deleted": ComputeClusterLifecycleStateDeleted, +} + +// GetComputeClusterLifecycleStateEnumValues Enumerates the set of values for ComputeClusterLifecycleStateEnum +func GetComputeClusterLifecycleStateEnumValues() []ComputeClusterLifecycleStateEnum { + values := make([]ComputeClusterLifecycleStateEnum, 0) + for _, v := range mappingComputeClusterLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeClusterLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeClusterLifecycleStateEnum +func GetComputeClusterLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETED", + } +} + +// GetMappingComputeClusterLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeClusterLifecycleStateEnum(val string) (ComputeClusterLifecycleStateEnum, bool) { + enum, ok := mappingComputeClusterLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster_collection.go new file mode 100644 index 000000000..25a482488 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster_collection.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeClusterCollection A list of compute clusters that match filter criteria, if any. A compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) +// is a remote direct memory access (RDMA) network group. +type ComputeClusterCollection struct { + + // The list of compute clusters. + Items []ComputeClusterSummary `mandatory:"true" json:"items"` +} + +func (m ComputeClusterCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeClusterCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster_summary.go new file mode 100644 index 000000000..b73b19213 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_cluster_summary.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeClusterSummary Summary information for a compute cluster. A compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) +// is a remote direct memory access (RDMA) network group. +type ComputeClusterSummary struct { + + // The availability domain the compute cluster is running in. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the compute cluster. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute cluster. + LifecycleState ComputeClusterLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the compute cluster was created, + // in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m ComputeClusterSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeClusterSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeClusterLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeClusterLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_global_image_capability_schema.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_global_image_capability_schema.go new file mode 100644 index 000000000..83bbac2fd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_global_image_capability_schema.go @@ -0,0 +1,70 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeGlobalImageCapabilitySchema Compute Global Image Capability Schema is a container for a set of compute global image capability schema versions +type ComputeGlobalImageCapabilitySchema struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute global image capability schema + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The date and time the compute global image capability schema was created, in the format defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the compartment that contains the resource. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The name of the global capabilities version resource that is considered the current version. + CurrentVersionName *string `mandatory:"false" json:"currentVersionName"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m ComputeGlobalImageCapabilitySchema) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeGlobalImageCapabilitySchema) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_global_image_capability_schema_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_global_image_capability_schema_summary.go new file mode 100644 index 000000000..dc9dc85f7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_global_image_capability_schema_summary.go @@ -0,0 +1,70 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeGlobalImageCapabilitySchemaSummary Summary information for a compute global image capability schema +type ComputeGlobalImageCapabilitySchemaSummary struct { + + // The compute global image capability schema OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The date and time the compute global image capability schema was created, in the format defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the compartment containing the compute global image capability schema + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The name of the global capabilities version resource that is considered the current version. + CurrentVersionName *string `mandatory:"false" json:"currentVersionName"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m ComputeGlobalImageCapabilitySchemaSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeGlobalImageCapabilitySchemaSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_global_image_capability_schema_version.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_global_image_capability_schema_version.go new file mode 100644 index 000000000..1d105523a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_global_image_capability_schema_version.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeGlobalImageCapabilitySchemaVersion Compute Global Image Capability Schema Version is a set of all possible capabilities for a collection of images. +type ComputeGlobalImageCapabilitySchemaVersion struct { + + // The name of the compute global image capability schema version + Name *string `mandatory:"true" json:"name"` + + // The ocid of the compute global image capability schema + ComputeGlobalImageCapabilitySchemaId *string `mandatory:"true" json:"computeGlobalImageCapabilitySchemaId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The map of each capability name to its ImageCapabilityDescriptor. + SchemaData map[string]ImageCapabilitySchemaDescriptor `mandatory:"true" json:"schemaData"` + + // The date and time the compute global image capability schema version was created, in the format defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` +} + +func (m ComputeGlobalImageCapabilitySchemaVersion) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeGlobalImageCapabilitySchemaVersion) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *ComputeGlobalImageCapabilitySchemaVersion) UnmarshalJSON(data []byte) (e error) { + model := struct { + Name *string `json:"name"` + ComputeGlobalImageCapabilitySchemaId *string `json:"computeGlobalImageCapabilitySchemaId"` + DisplayName *string `json:"displayName"` + SchemaData map[string]imagecapabilityschemadescriptor `json:"schemaData"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Name = model.Name + + m.ComputeGlobalImageCapabilitySchemaId = model.ComputeGlobalImageCapabilitySchemaId + + m.DisplayName = model.DisplayName + + m.SchemaData = make(map[string]ImageCapabilitySchemaDescriptor) + for k, v := range model.SchemaData { + nn, e = v.UnmarshalPolymorphicJSON(v.JsonData) + if e != nil { + return e + } + if nn != nil { + m.SchemaData[k] = nn.(ImageCapabilitySchemaDescriptor) + } else { + m.SchemaData[k] = nil + } + } + + m.TimeCreated = model.TimeCreated + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_global_image_capability_schema_version_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_global_image_capability_schema_version_summary.go new file mode 100644 index 000000000..9c590ba63 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_global_image_capability_schema_version_summary.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeGlobalImageCapabilitySchemaVersionSummary Summary information for a compute global image capability schema +type ComputeGlobalImageCapabilitySchemaVersionSummary struct { + + // The compute global image capability schema version name + Name *string `mandatory:"true" json:"name"` + + // The OCID of the compute global image capability schema + ComputeGlobalImageCapabilitySchemaId *string `mandatory:"true" json:"computeGlobalImageCapabilitySchemaId"` + + // The date and time the compute global image capability schema version was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m ComputeGlobalImageCapabilitySchemaVersionSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeGlobalImageCapabilitySchemaVersionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster.go new file mode 100644 index 000000000..8d407907b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster.go @@ -0,0 +1,151 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeGpuMemoryCluster The customer facing object includes GPU Memory Cluster details. +type ComputeGpuMemoryCluster struct { + + // The availability domain of the GPU Memory Cluster. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU Memory Cluster + Id *string `mandatory:"true" json:"id"` + + // The OCID of the Instance Configuration used to source launch details for this instance. + InstanceConfigurationId *string `mandatory:"true" json:"instanceConfigurationId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the compute GPU + // memory cluster. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The lifecycle state of the GPU Memory Cluster + LifecycleState ComputeGpuMemoryClusterLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + ComputeClusterId *string `mandatory:"true" json:"computeClusterId"` + + // The size represents the total number of instances in the GPU Memory Cluster, including both running instances and those still in the process of launching. + Size *int64 `mandatory:"true" json:"size"` + + // The date and time the GPU Memory Cluster was created. + // Example: `2016-09-15T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the GPU memory fabric. + GpuMemoryFabricId *string `mandatory:"false" json:"gpuMemoryFabricId"` + + GpuMemoryClusterScaleConfig *ComputeGpuMemoryClusterScaleConfig `mandatory:"false" json:"gpuMemoryClusterScaleConfig"` + + // Unique list of OCIDs for private IPs (IPv4/IPv6) associated with the GPU Memory Cluster + PrivateIpIds []string `mandatory:"false" json:"privateIpIds"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{ "orcl-cloud": { "free-tier-retained": "true" } }` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m ComputeGpuMemoryCluster) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeGpuMemoryCluster) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeGpuMemoryClusterLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeGpuMemoryClusterLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeGpuMemoryClusterLifecycleStateEnum Enum with underlying type: string +type ComputeGpuMemoryClusterLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeGpuMemoryClusterLifecycleStateEnum +const ( + ComputeGpuMemoryClusterLifecycleStateCreating ComputeGpuMemoryClusterLifecycleStateEnum = "CREATING" + ComputeGpuMemoryClusterLifecycleStateActive ComputeGpuMemoryClusterLifecycleStateEnum = "ACTIVE" + ComputeGpuMemoryClusterLifecycleStateUpdating ComputeGpuMemoryClusterLifecycleStateEnum = "UPDATING" + ComputeGpuMemoryClusterLifecycleStateDeleting ComputeGpuMemoryClusterLifecycleStateEnum = "DELETING" + ComputeGpuMemoryClusterLifecycleStateDeleted ComputeGpuMemoryClusterLifecycleStateEnum = "DELETED" +) + +var mappingComputeGpuMemoryClusterLifecycleStateEnum = map[string]ComputeGpuMemoryClusterLifecycleStateEnum{ + "CREATING": ComputeGpuMemoryClusterLifecycleStateCreating, + "ACTIVE": ComputeGpuMemoryClusterLifecycleStateActive, + "UPDATING": ComputeGpuMemoryClusterLifecycleStateUpdating, + "DELETING": ComputeGpuMemoryClusterLifecycleStateDeleting, + "DELETED": ComputeGpuMemoryClusterLifecycleStateDeleted, +} + +var mappingComputeGpuMemoryClusterLifecycleStateEnumLowerCase = map[string]ComputeGpuMemoryClusterLifecycleStateEnum{ + "creating": ComputeGpuMemoryClusterLifecycleStateCreating, + "active": ComputeGpuMemoryClusterLifecycleStateActive, + "updating": ComputeGpuMemoryClusterLifecycleStateUpdating, + "deleting": ComputeGpuMemoryClusterLifecycleStateDeleting, + "deleted": ComputeGpuMemoryClusterLifecycleStateDeleted, +} + +// GetComputeGpuMemoryClusterLifecycleStateEnumValues Enumerates the set of values for ComputeGpuMemoryClusterLifecycleStateEnum +func GetComputeGpuMemoryClusterLifecycleStateEnumValues() []ComputeGpuMemoryClusterLifecycleStateEnum { + values := make([]ComputeGpuMemoryClusterLifecycleStateEnum, 0) + for _, v := range mappingComputeGpuMemoryClusterLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeGpuMemoryClusterLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeGpuMemoryClusterLifecycleStateEnum +func GetComputeGpuMemoryClusterLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING", + "DELETED", + } +} + +// GetMappingComputeGpuMemoryClusterLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeGpuMemoryClusterLifecycleStateEnum(val string) (ComputeGpuMemoryClusterLifecycleStateEnum, bool) { + enum, ok := mappingComputeGpuMemoryClusterLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_collection.go new file mode 100644 index 000000000..a5ad6c128 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeGpuMemoryClusterCollection A list of compute GPU Memory Clusters. +type ComputeGpuMemoryClusterCollection struct { + + // The list of compute GPU Memory Clusters. + Items []ComputeGpuMemoryClusterSummary `mandatory:"true" json:"items"` +} + +func (m ComputeGpuMemoryClusterCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeGpuMemoryClusterCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_instance_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_instance_collection.go new file mode 100644 index 000000000..3df6ee1f2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_instance_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeGpuMemoryClusterInstanceCollection A list of compute GPU Memory Cluster instances. +type ComputeGpuMemoryClusterInstanceCollection struct { + + // The list of compute GPU Memory Cluster instances. + Items []ComputeGpuMemoryClusterInstanceSummary `mandatory:"true" json:"items"` +} + +func (m ComputeGpuMemoryClusterInstanceCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeGpuMemoryClusterInstanceCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_instance_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_instance_summary.go new file mode 100644 index 000000000..dab69c8e6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_instance_summary.go @@ -0,0 +1,159 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeGpuMemoryClusterInstanceSummary The customer facing GPU Memory Cluster instance object details. +type ComputeGpuMemoryClusterInstanceSummary struct { + + // The availability domain of the GPU Memory Cluster instance. + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU Memory Cluster instance + Id *string `mandatory:"false" json:"id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment + // compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The fault domain the GPU Memory Cluster instance is running in. + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + // Configuration to be used for this GPU Memory Cluster instance. + InstanceConfigurationId *string `mandatory:"false" json:"instanceConfigurationId"` + + // The region that contains the availability domain the instance is running in. + Region *string `mandatory:"false" json:"region"` + + // The shape of an instance. The shape determines the number of CPUs, amount of memory, + // and other resources allocated to the instance. The shape determines the number of CPUs, + // the amount of memory, and other resources allocated to the instance. + // You can list all available shapes by calling ListShapes. + InstanceShape *string `mandatory:"false" json:"instanceShape"` + + // The lifecycle state of the GPU Memory Cluster instance + LifecycleState ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The date and time the GPU Memory Cluster instance was created. + // Example: `2016-09-15T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m ComputeGpuMemoryClusterInstanceSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeGpuMemoryClusterInstanceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum Enum with underlying type: string +type ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum +const ( + ComputeGpuMemoryClusterInstanceSummaryLifecycleStateMoving ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum = "MOVING" + ComputeGpuMemoryClusterInstanceSummaryLifecycleStateProvisioning ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum = "PROVISIONING" + ComputeGpuMemoryClusterInstanceSummaryLifecycleStateRunning ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum = "RUNNING" + ComputeGpuMemoryClusterInstanceSummaryLifecycleStateStarting ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum = "STARTING" + ComputeGpuMemoryClusterInstanceSummaryLifecycleStateStopping ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum = "STOPPING" + ComputeGpuMemoryClusterInstanceSummaryLifecycleStateStopped ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum = "STOPPED" + ComputeGpuMemoryClusterInstanceSummaryLifecycleStateSuspending ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum = "SUSPENDING" + ComputeGpuMemoryClusterInstanceSummaryLifecycleStateSuspended ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum = "SUSPENDED" + ComputeGpuMemoryClusterInstanceSummaryLifecycleStateCreatingImage ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum = "CREATING_IMAGE" + ComputeGpuMemoryClusterInstanceSummaryLifecycleStateTerminating ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum = "TERMINATING" + ComputeGpuMemoryClusterInstanceSummaryLifecycleStateTerminated ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum = "TERMINATED" +) + +var mappingComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum = map[string]ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum{ + "MOVING": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateMoving, + "PROVISIONING": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateProvisioning, + "RUNNING": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateRunning, + "STARTING": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateStarting, + "STOPPING": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateStopping, + "STOPPED": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateStopped, + "SUSPENDING": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateSuspending, + "SUSPENDED": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateSuspended, + "CREATING_IMAGE": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateCreatingImage, + "TERMINATING": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateTerminating, + "TERMINATED": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateTerminated, +} + +var mappingComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnumLowerCase = map[string]ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum{ + "moving": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateMoving, + "provisioning": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateProvisioning, + "running": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateRunning, + "starting": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateStarting, + "stopping": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateStopping, + "stopped": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateStopped, + "suspending": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateSuspending, + "suspended": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateSuspended, + "creating_image": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateCreatingImage, + "terminating": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateTerminating, + "terminated": ComputeGpuMemoryClusterInstanceSummaryLifecycleStateTerminated, +} + +// GetComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnumValues Enumerates the set of values for ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum +func GetComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnumValues() []ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum { + values := make([]ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum, 0) + for _, v := range mappingComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum +func GetComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnumStringValues() []string { + return []string{ + "MOVING", + "PROVISIONING", + "RUNNING", + "STARTING", + "STOPPING", + "STOPPED", + "SUSPENDING", + "SUSPENDED", + "CREATING_IMAGE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum(val string) (ComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnum, bool) { + enum, ok := mappingComputeGpuMemoryClusterInstanceSummaryLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_scale_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_scale_config.go new file mode 100644 index 000000000..13505b742 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_scale_config.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeGpuMemoryClusterScaleConfig Configuration settings for GPU Memory Cluster scaling. +type ComputeGpuMemoryClusterScaleConfig struct { + + // Whether upsizing is enabled. + IsUpsizeEnabled *bool `mandatory:"false" json:"isUpsizeEnabled"` + + // Whether downsizing is enabled. + IsDownsizeEnabled *bool `mandatory:"false" json:"isDownsizeEnabled"` + + // The configured target size for the GPU Memory Cluster. + TargetSize *int64 `mandatory:"false" json:"targetSize"` +} + +func (m ComputeGpuMemoryClusterScaleConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeGpuMemoryClusterScaleConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_summary.go new file mode 100644 index 000000000..1fc0e3f24 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_cluster_summary.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeGpuMemoryClusterSummary Summary model for listing Compute GPU Memory Clusters. +type ComputeGpuMemoryClusterSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU Memory Cluster + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the compute GPU Memory Cluster. + // compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The availability domain of GPU Memory Cluster. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The current state of the compute GPU Memory Cluster. + LifecycleState ComputeGpuMemoryClusterLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the boot volume was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the GPU memory fabric. + GpuMemoryFabricId *string `mandatory:"false" json:"gpuMemoryFabricId"` + + // The size represents the total number of instances in the GPU Memory Cluster, including both running instances and those still in the process of launching. + Size *int64 `mandatory:"false" json:"size"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{ "orcl-cloud": { "free-tier-retained": "true" } }` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m ComputeGpuMemoryClusterSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeGpuMemoryClusterSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeGpuMemoryClusterLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeGpuMemoryClusterLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_fabric.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_fabric.go new file mode 100644 index 000000000..a38c74a83 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_fabric.go @@ -0,0 +1,273 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeGpuMemoryFabric The customer facing object includes GPU memory fabric details. +type ComputeGpuMemoryFabric struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory fabric + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root + // compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + ComputeHpcIslandId *string `mandatory:"true" json:"computeHpcIslandId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + ComputeNetworkBlockId *string `mandatory:"true" json:"computeNetworkBlockId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + ComputeLocalBlockId *string `mandatory:"true" json:"computeLocalBlockId"` + + // The lifecycle state of the GPU memory fabric + LifecycleState ComputeGpuMemoryFabricLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The health state of the GPU memory fabric + FabricHealth ComputeGpuMemoryFabricFabricHealthEnum `mandatory:"true" json:"fabricHealth"` + + // The total number of healthy bare metal hosts located in this compute GPU memory fabric. + HealthyHostCount *int64 `mandatory:"true" json:"healthyHostCount"` + + // The total number of bare metal hosts located in this compute GPU memory fabric. + TotalHostCount *int64 `mandatory:"true" json:"totalHostCount"` + + // The date and time that the compute GPU memory fabric record was created, in the format defined by RFC3339 + // (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // List of GPU memory clusters within this GPU memory fabric. + ComputeGpuMemoryClusters []string `mandatory:"false" json:"computeGpuMemoryClusters"` + + // Additional data that can be exposed to the customer. Right now it will include the switch tray ids. + AdditionalData map[string]interface{} `mandatory:"false" json:"additionalData"` + + // The total number of available bare metal hosts located in this compute GPU memory fabric. + AvailableHostCount *int64 `mandatory:"false" json:"availableHostCount"` + + // The host platform identifier used for bundle queries + HostPlatformName *string `mandatory:"false" json:"hostPlatformName"` + + // The switch platform identifier used for bundle queries + SwitchPlatformName *string `mandatory:"false" json:"switchPlatformName"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for current firmware bundle + CurrentFirmwareBundleId *string `mandatory:"false" json:"currentFirmwareBundleId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for targeted firmware bundle + TargetFirmwareBundleId *string `mandatory:"false" json:"targetFirmwareBundleId"` + + // The state of Memory Fabric Firmware update + FirmwareUpdateState ComputeGpuMemoryFabricFirmwareUpdateStateEnum `mandatory:"false" json:"firmwareUpdateState,omitempty"` + + // The reason for updating firmware bundle version of the GPU memory fabric. + FirmwareUpdateReason *string `mandatory:"false" json:"firmwareUpdateReason"` + + MemoryFabricPreferences *MemoryFabricPreferencesDescriptor `mandatory:"false" json:"memoryFabricPreferences"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{ "orcl-cloud": { "free-tier-retained": "true" } }` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m ComputeGpuMemoryFabric) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeGpuMemoryFabric) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeGpuMemoryFabricLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeGpuMemoryFabricLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingComputeGpuMemoryFabricFabricHealthEnum(string(m.FabricHealth)); !ok && m.FabricHealth != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FabricHealth: %s. Supported values are: %s.", m.FabricHealth, strings.Join(GetComputeGpuMemoryFabricFabricHealthEnumStringValues(), ","))) + } + + if _, ok := GetMappingComputeGpuMemoryFabricFirmwareUpdateStateEnum(string(m.FirmwareUpdateState)); !ok && m.FirmwareUpdateState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FirmwareUpdateState: %s. Supported values are: %s.", m.FirmwareUpdateState, strings.Join(GetComputeGpuMemoryFabricFirmwareUpdateStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeGpuMemoryFabricLifecycleStateEnum Enum with underlying type: string +type ComputeGpuMemoryFabricLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeGpuMemoryFabricLifecycleStateEnum +const ( + ComputeGpuMemoryFabricLifecycleStateAvailable ComputeGpuMemoryFabricLifecycleStateEnum = "AVAILABLE" + ComputeGpuMemoryFabricLifecycleStateOccupied ComputeGpuMemoryFabricLifecycleStateEnum = "OCCUPIED" + ComputeGpuMemoryFabricLifecycleStateProvisioning ComputeGpuMemoryFabricLifecycleStateEnum = "PROVISIONING" + ComputeGpuMemoryFabricLifecycleStateDegraded ComputeGpuMemoryFabricLifecycleStateEnum = "DEGRADED" + ComputeGpuMemoryFabricLifecycleStateUnavailable ComputeGpuMemoryFabricLifecycleStateEnum = "UNAVAILABLE" +) + +var mappingComputeGpuMemoryFabricLifecycleStateEnum = map[string]ComputeGpuMemoryFabricLifecycleStateEnum{ + "AVAILABLE": ComputeGpuMemoryFabricLifecycleStateAvailable, + "OCCUPIED": ComputeGpuMemoryFabricLifecycleStateOccupied, + "PROVISIONING": ComputeGpuMemoryFabricLifecycleStateProvisioning, + "DEGRADED": ComputeGpuMemoryFabricLifecycleStateDegraded, + "UNAVAILABLE": ComputeGpuMemoryFabricLifecycleStateUnavailable, +} + +var mappingComputeGpuMemoryFabricLifecycleStateEnumLowerCase = map[string]ComputeGpuMemoryFabricLifecycleStateEnum{ + "available": ComputeGpuMemoryFabricLifecycleStateAvailable, + "occupied": ComputeGpuMemoryFabricLifecycleStateOccupied, + "provisioning": ComputeGpuMemoryFabricLifecycleStateProvisioning, + "degraded": ComputeGpuMemoryFabricLifecycleStateDegraded, + "unavailable": ComputeGpuMemoryFabricLifecycleStateUnavailable, +} + +// GetComputeGpuMemoryFabricLifecycleStateEnumValues Enumerates the set of values for ComputeGpuMemoryFabricLifecycleStateEnum +func GetComputeGpuMemoryFabricLifecycleStateEnumValues() []ComputeGpuMemoryFabricLifecycleStateEnum { + values := make([]ComputeGpuMemoryFabricLifecycleStateEnum, 0) + for _, v := range mappingComputeGpuMemoryFabricLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeGpuMemoryFabricLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeGpuMemoryFabricLifecycleStateEnum +func GetComputeGpuMemoryFabricLifecycleStateEnumStringValues() []string { + return []string{ + "AVAILABLE", + "OCCUPIED", + "PROVISIONING", + "DEGRADED", + "UNAVAILABLE", + } +} + +// GetMappingComputeGpuMemoryFabricLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeGpuMemoryFabricLifecycleStateEnum(val string) (ComputeGpuMemoryFabricLifecycleStateEnum, bool) { + enum, ok := mappingComputeGpuMemoryFabricLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ComputeGpuMemoryFabricFabricHealthEnum Enum with underlying type: string +type ComputeGpuMemoryFabricFabricHealthEnum string + +// Set of constants representing the allowable values for ComputeGpuMemoryFabricFabricHealthEnum +const ( + ComputeGpuMemoryFabricFabricHealthHealthy ComputeGpuMemoryFabricFabricHealthEnum = "HEALTHY" + ComputeGpuMemoryFabricFabricHealthUnhealthy ComputeGpuMemoryFabricFabricHealthEnum = "UNHEALTHY" +) + +var mappingComputeGpuMemoryFabricFabricHealthEnum = map[string]ComputeGpuMemoryFabricFabricHealthEnum{ + "HEALTHY": ComputeGpuMemoryFabricFabricHealthHealthy, + "UNHEALTHY": ComputeGpuMemoryFabricFabricHealthUnhealthy, +} + +var mappingComputeGpuMemoryFabricFabricHealthEnumLowerCase = map[string]ComputeGpuMemoryFabricFabricHealthEnum{ + "healthy": ComputeGpuMemoryFabricFabricHealthHealthy, + "unhealthy": ComputeGpuMemoryFabricFabricHealthUnhealthy, +} + +// GetComputeGpuMemoryFabricFabricHealthEnumValues Enumerates the set of values for ComputeGpuMemoryFabricFabricHealthEnum +func GetComputeGpuMemoryFabricFabricHealthEnumValues() []ComputeGpuMemoryFabricFabricHealthEnum { + values := make([]ComputeGpuMemoryFabricFabricHealthEnum, 0) + for _, v := range mappingComputeGpuMemoryFabricFabricHealthEnum { + values = append(values, v) + } + return values +} + +// GetComputeGpuMemoryFabricFabricHealthEnumStringValues Enumerates the set of values in String for ComputeGpuMemoryFabricFabricHealthEnum +func GetComputeGpuMemoryFabricFabricHealthEnumStringValues() []string { + return []string{ + "HEALTHY", + "UNHEALTHY", + } +} + +// GetMappingComputeGpuMemoryFabricFabricHealthEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeGpuMemoryFabricFabricHealthEnum(val string) (ComputeGpuMemoryFabricFabricHealthEnum, bool) { + enum, ok := mappingComputeGpuMemoryFabricFabricHealthEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ComputeGpuMemoryFabricFirmwareUpdateStateEnum Enum with underlying type: string +type ComputeGpuMemoryFabricFirmwareUpdateStateEnum string + +// Set of constants representing the allowable values for ComputeGpuMemoryFabricFirmwareUpdateStateEnum +const ( + ComputeGpuMemoryFabricFirmwareUpdateStateWillUpdate ComputeGpuMemoryFabricFirmwareUpdateStateEnum = "WILL_UPDATE" + ComputeGpuMemoryFabricFirmwareUpdateStateNoUpdate ComputeGpuMemoryFabricFirmwareUpdateStateEnum = "NO_UPDATE" + ComputeGpuMemoryFabricFirmwareUpdateStateSkipRecycleEnabled ComputeGpuMemoryFabricFirmwareUpdateStateEnum = "SKIP_RECYCLE_ENABLED" +) + +var mappingComputeGpuMemoryFabricFirmwareUpdateStateEnum = map[string]ComputeGpuMemoryFabricFirmwareUpdateStateEnum{ + "WILL_UPDATE": ComputeGpuMemoryFabricFirmwareUpdateStateWillUpdate, + "NO_UPDATE": ComputeGpuMemoryFabricFirmwareUpdateStateNoUpdate, + "SKIP_RECYCLE_ENABLED": ComputeGpuMemoryFabricFirmwareUpdateStateSkipRecycleEnabled, +} + +var mappingComputeGpuMemoryFabricFirmwareUpdateStateEnumLowerCase = map[string]ComputeGpuMemoryFabricFirmwareUpdateStateEnum{ + "will_update": ComputeGpuMemoryFabricFirmwareUpdateStateWillUpdate, + "no_update": ComputeGpuMemoryFabricFirmwareUpdateStateNoUpdate, + "skip_recycle_enabled": ComputeGpuMemoryFabricFirmwareUpdateStateSkipRecycleEnabled, +} + +// GetComputeGpuMemoryFabricFirmwareUpdateStateEnumValues Enumerates the set of values for ComputeGpuMemoryFabricFirmwareUpdateStateEnum +func GetComputeGpuMemoryFabricFirmwareUpdateStateEnumValues() []ComputeGpuMemoryFabricFirmwareUpdateStateEnum { + values := make([]ComputeGpuMemoryFabricFirmwareUpdateStateEnum, 0) + for _, v := range mappingComputeGpuMemoryFabricFirmwareUpdateStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeGpuMemoryFabricFirmwareUpdateStateEnumStringValues Enumerates the set of values in String for ComputeGpuMemoryFabricFirmwareUpdateStateEnum +func GetComputeGpuMemoryFabricFirmwareUpdateStateEnumStringValues() []string { + return []string{ + "WILL_UPDATE", + "NO_UPDATE", + "SKIP_RECYCLE_ENABLED", + } +} + +// GetMappingComputeGpuMemoryFabricFirmwareUpdateStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeGpuMemoryFabricFirmwareUpdateStateEnum(val string) (ComputeGpuMemoryFabricFirmwareUpdateStateEnum, bool) { + enum, ok := mappingComputeGpuMemoryFabricFirmwareUpdateStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_fabric_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_fabric_collection.go new file mode 100644 index 000000000..1b961cb00 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_fabric_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeGpuMemoryFabricCollection A list of compute GPU memory fabrics. +type ComputeGpuMemoryFabricCollection struct { + + // The list of compute GPU memory fabrics. + Items []ComputeGpuMemoryFabricSummary `mandatory:"true" json:"items"` +} + +func (m ComputeGpuMemoryFabricCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeGpuMemoryFabricCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_fabric_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_fabric_summary.go new file mode 100644 index 000000000..15444a413 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_gpu_memory_fabric_summary.go @@ -0,0 +1,168 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeGpuMemoryFabricSummary Summary information for a compute GPU memory fabric. +type ComputeGpuMemoryFabricSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique GPU memory fabric + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the + // root compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + ComputeHpcIslandId *string `mandatory:"true" json:"computeHpcIslandId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + ComputeNetworkBlockId *string `mandatory:"true" json:"computeNetworkBlockId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + ComputeLocalBlockId *string `mandatory:"true" json:"computeLocalBlockId"` + + // The lifecycle state of the GPU memory fabric + LifecycleState ComputeGpuMemoryFabricLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The health state of the GPU memory fabric + FabricHealth ComputeGpuMemoryFabricFabricHealthEnum `mandatory:"true" json:"fabricHealth"` + + // The total number of bare metal hosts located in this compute GPU memory fabric. + TotalHostCount *int64 `mandatory:"true" json:"totalHostCount"` + + // The date and time that the compute GPU memory fabric record was created, in the format defined by RFC3339 + // (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The total number of available bare metal hosts located in this compute GPU memory fabric. + AvailableHostCount *int64 `mandatory:"false" json:"availableHostCount"` + + // The total number of healthy bare metal hosts located in this compute GPU memory fabric. + HealthyHostCount *int64 `mandatory:"false" json:"healthyHostCount"` + + // The host platform identifier used for bundle queries + HostPlatformName *string `mandatory:"false" json:"hostPlatformName"` + + // The switch platform identifier used for bundle queries + SwitchPlatformName *string `mandatory:"false" json:"switchPlatformName"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for current firmware bundle + CurrentFirmwareBundleId *string `mandatory:"false" json:"currentFirmwareBundleId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for targeted firmware bundle + TargetFirmwareBundleId *string `mandatory:"false" json:"targetFirmwareBundleId"` + + // The state of Memory Fabric Firmware update + FirmwareUpdateState ComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum `mandatory:"false" json:"firmwareUpdateState,omitempty"` + + MemoryFabricPreferences *MemoryFabricPreferencesDescriptor `mandatory:"false" json:"memoryFabricPreferences"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{ "orcl-cloud": { "free-tier-retained": "true" } }` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m ComputeGpuMemoryFabricSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeGpuMemoryFabricSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeGpuMemoryFabricLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeGpuMemoryFabricLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingComputeGpuMemoryFabricFabricHealthEnum(string(m.FabricHealth)); !ok && m.FabricHealth != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FabricHealth: %s. Supported values are: %s.", m.FabricHealth, strings.Join(GetComputeGpuMemoryFabricFabricHealthEnumStringValues(), ","))) + } + + if _, ok := GetMappingComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum(string(m.FirmwareUpdateState)); !ok && m.FirmwareUpdateState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FirmwareUpdateState: %s. Supported values are: %s.", m.FirmwareUpdateState, strings.Join(GetComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum Enum with underlying type: string +type ComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum string + +// Set of constants representing the allowable values for ComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum +const ( + ComputeGpuMemoryFabricSummaryFirmwareUpdateStateWillUpdate ComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum = "WILL_UPDATE" + ComputeGpuMemoryFabricSummaryFirmwareUpdateStateNoUpdate ComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum = "NO_UPDATE" + ComputeGpuMemoryFabricSummaryFirmwareUpdateStateSkipRecycleEnabled ComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum = "SKIP_RECYCLE_ENABLED" +) + +var mappingComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum = map[string]ComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum{ + "WILL_UPDATE": ComputeGpuMemoryFabricSummaryFirmwareUpdateStateWillUpdate, + "NO_UPDATE": ComputeGpuMemoryFabricSummaryFirmwareUpdateStateNoUpdate, + "SKIP_RECYCLE_ENABLED": ComputeGpuMemoryFabricSummaryFirmwareUpdateStateSkipRecycleEnabled, +} + +var mappingComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnumLowerCase = map[string]ComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum{ + "will_update": ComputeGpuMemoryFabricSummaryFirmwareUpdateStateWillUpdate, + "no_update": ComputeGpuMemoryFabricSummaryFirmwareUpdateStateNoUpdate, + "skip_recycle_enabled": ComputeGpuMemoryFabricSummaryFirmwareUpdateStateSkipRecycleEnabled, +} + +// GetComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnumValues Enumerates the set of values for ComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum +func GetComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnumValues() []ComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum { + values := make([]ComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum, 0) + for _, v := range mappingComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnumStringValues Enumerates the set of values in String for ComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum +func GetComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnumStringValues() []string { + return []string{ + "WILL_UPDATE", + "NO_UPDATE", + "SKIP_RECYCLE_ENABLED", + } +} + +// GetMappingComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum(val string) (ComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnum, bool) { + enum, ok := mappingComputeGpuMemoryFabricSummaryFirmwareUpdateStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host.go new file mode 100644 index 000000000..e38a3475b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host.go @@ -0,0 +1,249 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeHost The customer facing object includes host details. +type ComputeHost struct { + + // The availability domain of the compute host. + // Example: `Uocm:US-CHICAGO-1-AD-2` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root + // compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host + Id *string `mandatory:"true" json:"id"` + + // A fault domain is a grouping of hardware and infrastructure within an availability domain. + // Each availability domain contains three fault domains. Fault domains let you distribute your + // instances so that they are not on the same physical hardware within a single availability domain. + // A hardware failure or Compute hardware maintenance that affects one fault domain does not affect + // instances in other fault domains. + // This field is the Fault domain of the host + FaultDomain *string `mandatory:"true" json:"faultDomain"` + + // The shape of host + Shape *string `mandatory:"true" json:"shape"` + + // The heathy state of the host + Health ComputeHostHealthEnum `mandatory:"true" json:"health"` + + // The lifecycle state of the host + LifecycleState ComputeHostLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute host record was created, in the format defined by RFC3339 (https://tools + // .ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute host record was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + HpcIslandId *string `mandatory:"false" json:"hpcIslandId"` + + // The ID that remains consistent when a host moves between capacity pools within the same tenancy. + HostCorrelationId *string `mandatory:"false" json:"hostCorrelationId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host group associated with the Compute Bare Metal Host. + ComputeHostGroupId *string `mandatory:"false" json:"computeHostGroupId"` + + // Configuration state of the Compute Bare Metal Host. + ConfigurationState ConfigurationStateEnum `mandatory:"false" json:"configurationState,omitempty"` + + // The date and time that the compute bare metal host configuration check was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeConfigurationCheck *common.SDKTime `mandatory:"false" json:"timeConfigurationCheck"` + + ConfigurationData *ComputeHostConfigurationData `mandatory:"false" json:"configurationData"` + + RecycleDetails *RecycleDetails `mandatory:"false" json:"recycleDetails"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique firmware bundle associated with the Host. + FirmwareBundleId *string `mandatory:"false" json:"firmwareBundleId"` + + // The platform of the host + Platform *string `mandatory:"false" json:"platform"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + NetworkBlockId *string `mandatory:"false" json:"networkBlockId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + LocalBlockId *string `mandatory:"false" json:"localBlockId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique GPU Memory Fabric + GpuMemoryFabricId *string `mandatory:"false" json:"gpuMemoryFabricId"` + + // The public OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Virtual Machine or Bare Metal instance + InstanceId *string `mandatory:"false" json:"instanceId"` + + // Additional data that can be exposed to the customer. Will include raw fault codes for strategic customers + AdditionalData map[string]interface{} `mandatory:"false" json:"additionalData"` + + // A free-form description detailing why the host is in its current state. + LifecycleDetails map[string]interface{} `mandatory:"false" json:"lifecycleDetails"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Capacity Reserver that is currently on host + CapacityReservationId *string `mandatory:"false" json:"capacityReservationId"` + + // A list that contains impacted components related to an unhealthy host. An impacted component will be a + // free-form structure of key values pairs that will provide more or less details based on data tiering + ImpactedComponentDetails map[string]interface{} `mandatory:"false" json:"impactedComponentDetails"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m ComputeHost) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeHost) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeHostHealthEnum(string(m.Health)); !ok && m.Health != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Health: %s. Supported values are: %s.", m.Health, strings.Join(GetComputeHostHealthEnumStringValues(), ","))) + } + if _, ok := GetMappingComputeHostLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeHostLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingConfigurationStateEnum(string(m.ConfigurationState)); !ok && m.ConfigurationState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ConfigurationState: %s. Supported values are: %s.", m.ConfigurationState, strings.Join(GetConfigurationStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeHostHealthEnum Enum with underlying type: string +type ComputeHostHealthEnum string + +// Set of constants representing the allowable values for ComputeHostHealthEnum +const ( + ComputeHostHealthHealthy ComputeHostHealthEnum = "HEALTHY" + ComputeHostHealthUnhealthy ComputeHostHealthEnum = "UNHEALTHY" +) + +var mappingComputeHostHealthEnum = map[string]ComputeHostHealthEnum{ + "HEALTHY": ComputeHostHealthHealthy, + "UNHEALTHY": ComputeHostHealthUnhealthy, +} + +var mappingComputeHostHealthEnumLowerCase = map[string]ComputeHostHealthEnum{ + "healthy": ComputeHostHealthHealthy, + "unhealthy": ComputeHostHealthUnhealthy, +} + +// GetComputeHostHealthEnumValues Enumerates the set of values for ComputeHostHealthEnum +func GetComputeHostHealthEnumValues() []ComputeHostHealthEnum { + values := make([]ComputeHostHealthEnum, 0) + for _, v := range mappingComputeHostHealthEnum { + values = append(values, v) + } + return values +} + +// GetComputeHostHealthEnumStringValues Enumerates the set of values in String for ComputeHostHealthEnum +func GetComputeHostHealthEnumStringValues() []string { + return []string{ + "HEALTHY", + "UNHEALTHY", + } +} + +// GetMappingComputeHostHealthEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeHostHealthEnum(val string) (ComputeHostHealthEnum, bool) { + enum, ok := mappingComputeHostHealthEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ComputeHostLifecycleStateEnum Enum with underlying type: string +type ComputeHostLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeHostLifecycleStateEnum +const ( + ComputeHostLifecycleStateAvailable ComputeHostLifecycleStateEnum = "AVAILABLE" + ComputeHostLifecycleStateOccupied ComputeHostLifecycleStateEnum = "OCCUPIED" + ComputeHostLifecycleStateProvisioning ComputeHostLifecycleStateEnum = "PROVISIONING" + ComputeHostLifecycleStateRepair ComputeHostLifecycleStateEnum = "REPAIR" + ComputeHostLifecycleStateUnavailable ComputeHostLifecycleStateEnum = "UNAVAILABLE" +) + +var mappingComputeHostLifecycleStateEnum = map[string]ComputeHostLifecycleStateEnum{ + "AVAILABLE": ComputeHostLifecycleStateAvailable, + "OCCUPIED": ComputeHostLifecycleStateOccupied, + "PROVISIONING": ComputeHostLifecycleStateProvisioning, + "REPAIR": ComputeHostLifecycleStateRepair, + "UNAVAILABLE": ComputeHostLifecycleStateUnavailable, +} + +var mappingComputeHostLifecycleStateEnumLowerCase = map[string]ComputeHostLifecycleStateEnum{ + "available": ComputeHostLifecycleStateAvailable, + "occupied": ComputeHostLifecycleStateOccupied, + "provisioning": ComputeHostLifecycleStateProvisioning, + "repair": ComputeHostLifecycleStateRepair, + "unavailable": ComputeHostLifecycleStateUnavailable, +} + +// GetComputeHostLifecycleStateEnumValues Enumerates the set of values for ComputeHostLifecycleStateEnum +func GetComputeHostLifecycleStateEnumValues() []ComputeHostLifecycleStateEnum { + values := make([]ComputeHostLifecycleStateEnum, 0) + for _, v := range mappingComputeHostLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeHostLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeHostLifecycleStateEnum +func GetComputeHostLifecycleStateEnumStringValues() []string { + return []string{ + "AVAILABLE", + "OCCUPIED", + "PROVISIONING", + "REPAIR", + "UNAVAILABLE", + } +} + +// GetMappingComputeHostLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeHostLifecycleStateEnum(val string) (ComputeHostLifecycleStateEnum, bool) { + enum, ok := mappingComputeHostLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_collection.go new file mode 100644 index 000000000..42d1e70c4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeHostCollection A list of compute hosts. +type ComputeHostCollection struct { + + // The list of compute hosts. + Items []ComputeHostSummary `mandatory:"true" json:"items"` +} + +func (m ComputeHostCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeHostCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_configuration_check_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_configuration_check_details.go new file mode 100644 index 000000000..6a6d1d155 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_configuration_check_details.go @@ -0,0 +1,153 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeHostConfigurationCheckDetails Compute Host Group Configuration Details Check +type ComputeHostConfigurationCheckDetails struct { + + // The type of configuration + Type ComputeHostConfigurationCheckDetailsTypeEnum `mandatory:"false" json:"type,omitempty"` + + // The current state of the host configuration. The Host is either | + // CONFORMANT - current state matches the desired configuration + // NON_CONFORMANT - current state does not match the desired configuration + // PRE_APPLYING, APPLYING, CHECKING- transitional states + // UNKNOWN - current state is unknown + ConfigurationState ConfigurationStateEnum `mandatory:"false" json:"configurationState,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique firmware bundle associated with the Host Configuration. + FirmwareBundleId *string `mandatory:"false" json:"firmwareBundleId"` + + // Preferred recycle level for hosts associated with the reservation config. + // * `SKIP_RECYCLE` - Skips host wipe. + // * `FULL_RECYCLE` - Does not skip host wipe. This is the default behavior. + RecycleLevel ComputeHostConfigurationCheckDetailsRecycleLevelEnum `mandatory:"false" json:"recycleLevel,omitempty"` +} + +func (m ComputeHostConfigurationCheckDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeHostConfigurationCheckDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingComputeHostConfigurationCheckDetailsTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetComputeHostConfigurationCheckDetailsTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingConfigurationStateEnum(string(m.ConfigurationState)); !ok && m.ConfigurationState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ConfigurationState: %s. Supported values are: %s.", m.ConfigurationState, strings.Join(GetConfigurationStateEnumStringValues(), ","))) + } + if _, ok := GetMappingComputeHostConfigurationCheckDetailsRecycleLevelEnum(string(m.RecycleLevel)); !ok && m.RecycleLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RecycleLevel: %s. Supported values are: %s.", m.RecycleLevel, strings.Join(GetComputeHostConfigurationCheckDetailsRecycleLevelEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeHostConfigurationCheckDetailsTypeEnum Enum with underlying type: string +type ComputeHostConfigurationCheckDetailsTypeEnum string + +// Set of constants representing the allowable values for ComputeHostConfigurationCheckDetailsTypeEnum +const ( + ComputeHostConfigurationCheckDetailsTypeFirmware ComputeHostConfigurationCheckDetailsTypeEnum = "FIRMWARE" + ComputeHostConfigurationCheckDetailsTypeRecycle ComputeHostConfigurationCheckDetailsTypeEnum = "RECYCLE" +) + +var mappingComputeHostConfigurationCheckDetailsTypeEnum = map[string]ComputeHostConfigurationCheckDetailsTypeEnum{ + "FIRMWARE": ComputeHostConfigurationCheckDetailsTypeFirmware, + "RECYCLE": ComputeHostConfigurationCheckDetailsTypeRecycle, +} + +var mappingComputeHostConfigurationCheckDetailsTypeEnumLowerCase = map[string]ComputeHostConfigurationCheckDetailsTypeEnum{ + "firmware": ComputeHostConfigurationCheckDetailsTypeFirmware, + "recycle": ComputeHostConfigurationCheckDetailsTypeRecycle, +} + +// GetComputeHostConfigurationCheckDetailsTypeEnumValues Enumerates the set of values for ComputeHostConfigurationCheckDetailsTypeEnum +func GetComputeHostConfigurationCheckDetailsTypeEnumValues() []ComputeHostConfigurationCheckDetailsTypeEnum { + values := make([]ComputeHostConfigurationCheckDetailsTypeEnum, 0) + for _, v := range mappingComputeHostConfigurationCheckDetailsTypeEnum { + values = append(values, v) + } + return values +} + +// GetComputeHostConfigurationCheckDetailsTypeEnumStringValues Enumerates the set of values in String for ComputeHostConfigurationCheckDetailsTypeEnum +func GetComputeHostConfigurationCheckDetailsTypeEnumStringValues() []string { + return []string{ + "FIRMWARE", + "RECYCLE", + } +} + +// GetMappingComputeHostConfigurationCheckDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeHostConfigurationCheckDetailsTypeEnum(val string) (ComputeHostConfigurationCheckDetailsTypeEnum, bool) { + enum, ok := mappingComputeHostConfigurationCheckDetailsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ComputeHostConfigurationCheckDetailsRecycleLevelEnum Enum with underlying type: string +type ComputeHostConfigurationCheckDetailsRecycleLevelEnum string + +// Set of constants representing the allowable values for ComputeHostConfigurationCheckDetailsRecycleLevelEnum +const ( + ComputeHostConfigurationCheckDetailsRecycleLevelSkipRecycle ComputeHostConfigurationCheckDetailsRecycleLevelEnum = "SKIP_RECYCLE" + ComputeHostConfigurationCheckDetailsRecycleLevelFullRecycle ComputeHostConfigurationCheckDetailsRecycleLevelEnum = "FULL_RECYCLE" +) + +var mappingComputeHostConfigurationCheckDetailsRecycleLevelEnum = map[string]ComputeHostConfigurationCheckDetailsRecycleLevelEnum{ + "SKIP_RECYCLE": ComputeHostConfigurationCheckDetailsRecycleLevelSkipRecycle, + "FULL_RECYCLE": ComputeHostConfigurationCheckDetailsRecycleLevelFullRecycle, +} + +var mappingComputeHostConfigurationCheckDetailsRecycleLevelEnumLowerCase = map[string]ComputeHostConfigurationCheckDetailsRecycleLevelEnum{ + "skip_recycle": ComputeHostConfigurationCheckDetailsRecycleLevelSkipRecycle, + "full_recycle": ComputeHostConfigurationCheckDetailsRecycleLevelFullRecycle, +} + +// GetComputeHostConfigurationCheckDetailsRecycleLevelEnumValues Enumerates the set of values for ComputeHostConfigurationCheckDetailsRecycleLevelEnum +func GetComputeHostConfigurationCheckDetailsRecycleLevelEnumValues() []ComputeHostConfigurationCheckDetailsRecycleLevelEnum { + values := make([]ComputeHostConfigurationCheckDetailsRecycleLevelEnum, 0) + for _, v := range mappingComputeHostConfigurationCheckDetailsRecycleLevelEnum { + values = append(values, v) + } + return values +} + +// GetComputeHostConfigurationCheckDetailsRecycleLevelEnumStringValues Enumerates the set of values in String for ComputeHostConfigurationCheckDetailsRecycleLevelEnum +func GetComputeHostConfigurationCheckDetailsRecycleLevelEnumStringValues() []string { + return []string{ + "SKIP_RECYCLE", + "FULL_RECYCLE", + } +} + +// GetMappingComputeHostConfigurationCheckDetailsRecycleLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeHostConfigurationCheckDetailsRecycleLevelEnum(val string) (ComputeHostConfigurationCheckDetailsRecycleLevelEnum, bool) { + enum, ok := mappingComputeHostConfigurationCheckDetailsRecycleLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_configuration_data.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_configuration_data.go new file mode 100644 index 000000000..2703d1561 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_configuration_data.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeHostConfigurationData Compute Host Configuration Data +type ComputeHostConfigurationData struct { + + // The time that was last applied. + TimeLastApply *common.SDKTime `mandatory:"false" json:"timeLastApply"` + + CheckDetails *ComputeHostConfigurationCheckDetails `mandatory:"false" json:"checkDetails"` +} + +func (m ComputeHostConfigurationData) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeHostConfigurationData) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_group.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_group.go new file mode 100644 index 000000000..58c9a625e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_group.go @@ -0,0 +1,133 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeHostGroup Detail information for a compute host group. +type ComputeHostGroup struct { + + // The availability domain of a host group. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the compartment that contains host group. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The date and time the host group was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The lifecycle state of the host group + LifecycleState ComputeHostGroupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host group + Id *string `mandatory:"false" json:"id"` + + // A list of HostGroupConfiguration objects + Configurations []HostGroupConfiguration `mandatory:"false" json:"configurations"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The date and time the host group was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // A flag that allows customers to restrict placement for hosts attached to the group. If true, the only way to place on hosts is to target the specific host group. + IsTargetedPlacementRequired *bool `mandatory:"false" json:"isTargetedPlacementRequired"` +} + +func (m ComputeHostGroup) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeHostGroup) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeHostGroupLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeHostGroupLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeHostGroupLifecycleStateEnum Enum with underlying type: string +type ComputeHostGroupLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeHostGroupLifecycleStateEnum +const ( + ComputeHostGroupLifecycleStateActive ComputeHostGroupLifecycleStateEnum = "ACTIVE" + ComputeHostGroupLifecycleStateDeleted ComputeHostGroupLifecycleStateEnum = "DELETED" +) + +var mappingComputeHostGroupLifecycleStateEnum = map[string]ComputeHostGroupLifecycleStateEnum{ + "ACTIVE": ComputeHostGroupLifecycleStateActive, + "DELETED": ComputeHostGroupLifecycleStateDeleted, +} + +var mappingComputeHostGroupLifecycleStateEnumLowerCase = map[string]ComputeHostGroupLifecycleStateEnum{ + "active": ComputeHostGroupLifecycleStateActive, + "deleted": ComputeHostGroupLifecycleStateDeleted, +} + +// GetComputeHostGroupLifecycleStateEnumValues Enumerates the set of values for ComputeHostGroupLifecycleStateEnum +func GetComputeHostGroupLifecycleStateEnumValues() []ComputeHostGroupLifecycleStateEnum { + values := make([]ComputeHostGroupLifecycleStateEnum, 0) + for _, v := range mappingComputeHostGroupLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeHostGroupLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeHostGroupLifecycleStateEnum +func GetComputeHostGroupLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETED", + } +} + +// GetMappingComputeHostGroupLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeHostGroupLifecycleStateEnum(val string) (ComputeHostGroupLifecycleStateEnum, bool) { + enum, ok := mappingComputeHostGroupLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_group_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_group_collection.go new file mode 100644 index 000000000..78cb1962f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_group_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeHostGroupCollection A list of compute host groups. +type ComputeHostGroupCollection struct { + + // The list of compute host groups. + Items []ComputeHostGroupSummary `mandatory:"true" json:"items"` +} + +func (m ComputeHostGroupCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeHostGroupCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_group_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_group_summary.go new file mode 100644 index 000000000..bd1cbc34a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_group_summary.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeHostGroupSummary Summary information for a compute host group. +type ComputeHostGroupSummary struct { + + // The availability domain of a host group. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host group + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the compartment that contains host group. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The date and time the host group was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the compute host group + LifecycleState ComputeHostGroupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // A flag that allows customers to restrict placement for hosts attached to the group. If true, the only way to place on hosts is to target the specific host group. + IsTargetedPlacementRequired *bool `mandatory:"true" json:"isTargetedPlacementRequired"` + + // The date and time the host group was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m ComputeHostGroupSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeHostGroupSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeHostGroupLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeHostGroupLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_summary.go new file mode 100644 index 000000000..cd444d905 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_host_summary.go @@ -0,0 +1,133 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeHostSummary Summary information for a compute host. +type ComputeHostSummary struct { + + // The availability domain of the compute host. + // Example: `Uocm:US-CHICAGO-1-AD-2` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root + // compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host + Id *string `mandatory:"true" json:"id"` + + // A fault domain is a grouping of hardware and infrastructure within an availability domain. + // Each availability domain contains three fault domains. Fault domains let you distribute your + // instances so that they are not on the same physical hardware within a single availability domain. + // A hardware failure or Compute hardware maintenance that affects one fault domain does not affect + // instances in other fault domains. + // This field is the Fault domain of the host + FaultDomain *string `mandatory:"true" json:"faultDomain"` + + // The shape of host + Shape *string `mandatory:"true" json:"shape"` + + // The heathy state of the host + Health ComputeHostHealthEnum `mandatory:"true" json:"health"` + + // The lifecycle state of the host + LifecycleState ComputeHostLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // While listing a host the user will know if they have an impacted component or not. + // The user will have to issue a get host to see details. + HasImpactedComponents *bool `mandatory:"true" json:"hasImpactedComponents"` + + // The date and time that the compute host record was created, in the format defined by RFC3339 (https://tools + // .ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute host record was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique HPC Island + HpcIslandId *string `mandatory:"false" json:"hpcIslandId"` + + // The ID that remains consistent when a host moves between capacity pools within the same tenancy. + HostCorrelationId *string `mandatory:"false" json:"hostCorrelationId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Customer-unique host group + ComputeHostGroupId *string `mandatory:"false" json:"computeHostGroupId"` + + RecycleDetails *RecycleDetails `mandatory:"false" json:"recycleDetails"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Network Block + NetworkBlockId *string `mandatory:"false" json:"networkBlockId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique Local Block + LocalBlockId *string `mandatory:"false" json:"localBlockId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for Customer-unique GPU Memory Fabric + GpuMemoryFabricId *string `mandatory:"false" json:"gpuMemoryFabricId"` + + // The public OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Virtual Machine or Bare Metal instance + InstanceId *string `mandatory:"false" json:"instanceId"` + + // The platform of the host + Platform *string `mandatory:"false" json:"platform"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the Capacity Reserver that is currently on host + CapacityReservationId *string `mandatory:"false" json:"capacityReservationId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m ComputeHostSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeHostSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeHostHealthEnum(string(m.Health)); !ok && m.Health != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Health: %s. Supported values are: %s.", m.Health, strings.Join(GetComputeHostHealthEnumStringValues(), ","))) + } + if _, ok := GetMappingComputeHostLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeHostLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_hpc_island.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_hpc_island.go new file mode 100644 index 000000000..aecf25cb0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_hpc_island.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeHpcIsland A compute HPC island. +type ComputeHpcIsland struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" json:"computeCapacityTopologyId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute HPC island. + LifecycleState ComputeHpcIslandLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute HPC island was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute HPC island was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The total number of compute bare metal hosts located in this compute HPC island. + TotalComputeBareMetalHostCount *int64 `mandatory:"true" json:"totalComputeBareMetalHostCount"` +} + +func (m ComputeHpcIsland) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeHpcIsland) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeHpcIslandLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeHpcIslandLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeHpcIslandLifecycleStateEnum Enum with underlying type: string +type ComputeHpcIslandLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeHpcIslandLifecycleStateEnum +const ( + ComputeHpcIslandLifecycleStateActive ComputeHpcIslandLifecycleStateEnum = "ACTIVE" + ComputeHpcIslandLifecycleStateInactive ComputeHpcIslandLifecycleStateEnum = "INACTIVE" +) + +var mappingComputeHpcIslandLifecycleStateEnum = map[string]ComputeHpcIslandLifecycleStateEnum{ + "ACTIVE": ComputeHpcIslandLifecycleStateActive, + "INACTIVE": ComputeHpcIslandLifecycleStateInactive, +} + +var mappingComputeHpcIslandLifecycleStateEnumLowerCase = map[string]ComputeHpcIslandLifecycleStateEnum{ + "active": ComputeHpcIslandLifecycleStateActive, + "inactive": ComputeHpcIslandLifecycleStateInactive, +} + +// GetComputeHpcIslandLifecycleStateEnumValues Enumerates the set of values for ComputeHpcIslandLifecycleStateEnum +func GetComputeHpcIslandLifecycleStateEnumValues() []ComputeHpcIslandLifecycleStateEnum { + values := make([]ComputeHpcIslandLifecycleStateEnum, 0) + for _, v := range mappingComputeHpcIslandLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeHpcIslandLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeHpcIslandLifecycleStateEnum +func GetComputeHpcIslandLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + } +} + +// GetMappingComputeHpcIslandLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeHpcIslandLifecycleStateEnum(val string) (ComputeHpcIslandLifecycleStateEnum, bool) { + enum, ok := mappingComputeHpcIslandLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_hpc_island_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_hpc_island_collection.go new file mode 100644 index 000000000..74a7957a4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_hpc_island_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeHpcIslandCollection A list of compute HPC islands. +type ComputeHpcIslandCollection struct { + + // The list of compute HPC islands. + Items []ComputeHpcIslandSummary `mandatory:"true" json:"items"` +} + +func (m ComputeHpcIslandCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeHpcIslandCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_hpc_island_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_hpc_island_summary.go new file mode 100644 index 000000000..5c4c78e9e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_hpc_island_summary.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeHpcIslandSummary Summary information for a compute HPC island. +type ComputeHpcIslandSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" json:"computeCapacityTopologyId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute HPC island. + LifecycleState ComputeHpcIslandLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute HPC island was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute HPC island was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The total number of compute bare metal hosts located in this compute HPC island. + TotalComputeBareMetalHostCount *int64 `mandatory:"true" json:"totalComputeBareMetalHostCount"` +} + +func (m ComputeHpcIslandSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeHpcIslandSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeHpcIslandLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeHpcIslandLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_image_capability_schema.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_image_capability_schema.go new file mode 100644 index 000000000..042db37fe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_image_capability_schema.go @@ -0,0 +1,190 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeImageCapabilitySchema Compute Image Capability Schema is a set of capabilities that filter the compute global capability schema +// version for an image. +type ComputeImageCapabilitySchema struct { + + // The id of the compute global image capability schema version + Id *string `mandatory:"true" json:"id"` + + // The ocid of the compute global image capability schema + ComputeGlobalImageCapabilitySchemaId *string `mandatory:"true" json:"computeGlobalImageCapabilitySchemaId"` + + // The name of the compute global image capability schema version + ComputeGlobalImageCapabilitySchemaVersionName *string `mandatory:"true" json:"computeGlobalImageCapabilitySchemaVersionName"` + + // The OCID of the image associated with this compute image capability schema + ImageId *string `mandatory:"true" json:"imageId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The map of each capability name to its ImageCapabilityDescriptor. + SchemaData map[string]ImageCapabilitySchemaDescriptor `mandatory:"true" json:"schemaData"` + + // The date and time the compute image capability schema was created, in the format defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the compartment that contains the resource. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The ComputeImageCapabilitySchema current lifecycle state. + LifecycleState ComputeImageCapabilitySchemaLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m ComputeImageCapabilitySchema) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeImageCapabilitySchema) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingComputeImageCapabilitySchemaLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeImageCapabilitySchemaLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *ComputeImageCapabilitySchema) UnmarshalJSON(data []byte) (e error) { + model := struct { + CompartmentId *string `json:"compartmentId"` + LifecycleState ComputeImageCapabilitySchemaLifecycleStateEnum `json:"lifecycleState"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + FreeformTags map[string]string `json:"freeformTags"` + Id *string `json:"id"` + ComputeGlobalImageCapabilitySchemaId *string `json:"computeGlobalImageCapabilitySchemaId"` + ComputeGlobalImageCapabilitySchemaVersionName *string `json:"computeGlobalImageCapabilitySchemaVersionName"` + ImageId *string `json:"imageId"` + DisplayName *string `json:"displayName"` + SchemaData map[string]imagecapabilityschemadescriptor `json:"schemaData"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.CompartmentId = model.CompartmentId + + m.LifecycleState = model.LifecycleState + + m.DefinedTags = model.DefinedTags + + m.FreeformTags = model.FreeformTags + + m.Id = model.Id + + m.ComputeGlobalImageCapabilitySchemaId = model.ComputeGlobalImageCapabilitySchemaId + + m.ComputeGlobalImageCapabilitySchemaVersionName = model.ComputeGlobalImageCapabilitySchemaVersionName + + m.ImageId = model.ImageId + + m.DisplayName = model.DisplayName + + m.SchemaData = make(map[string]ImageCapabilitySchemaDescriptor) + for k, v := range model.SchemaData { + nn, e = v.UnmarshalPolymorphicJSON(v.JsonData) + if e != nil { + return e + } + if nn != nil { + m.SchemaData[k] = nn.(ImageCapabilitySchemaDescriptor) + } else { + m.SchemaData[k] = nil + } + } + + m.TimeCreated = model.TimeCreated + + return +} + +// ComputeImageCapabilitySchemaLifecycleStateEnum Enum with underlying type: string +type ComputeImageCapabilitySchemaLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeImageCapabilitySchemaLifecycleStateEnum +const ( + ComputeImageCapabilitySchemaLifecycleStateCreating ComputeImageCapabilitySchemaLifecycleStateEnum = "CREATING" + ComputeImageCapabilitySchemaLifecycleStateActive ComputeImageCapabilitySchemaLifecycleStateEnum = "ACTIVE" + ComputeImageCapabilitySchemaLifecycleStateDeleted ComputeImageCapabilitySchemaLifecycleStateEnum = "DELETED" +) + +var mappingComputeImageCapabilitySchemaLifecycleStateEnum = map[string]ComputeImageCapabilitySchemaLifecycleStateEnum{ + "CREATING": ComputeImageCapabilitySchemaLifecycleStateCreating, + "ACTIVE": ComputeImageCapabilitySchemaLifecycleStateActive, + "DELETED": ComputeImageCapabilitySchemaLifecycleStateDeleted, +} + +var mappingComputeImageCapabilitySchemaLifecycleStateEnumLowerCase = map[string]ComputeImageCapabilitySchemaLifecycleStateEnum{ + "creating": ComputeImageCapabilitySchemaLifecycleStateCreating, + "active": ComputeImageCapabilitySchemaLifecycleStateActive, + "deleted": ComputeImageCapabilitySchemaLifecycleStateDeleted, +} + +// GetComputeImageCapabilitySchemaLifecycleStateEnumValues Enumerates the set of values for ComputeImageCapabilitySchemaLifecycleStateEnum +func GetComputeImageCapabilitySchemaLifecycleStateEnumValues() []ComputeImageCapabilitySchemaLifecycleStateEnum { + values := make([]ComputeImageCapabilitySchemaLifecycleStateEnum, 0) + for _, v := range mappingComputeImageCapabilitySchemaLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeImageCapabilitySchemaLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeImageCapabilitySchemaLifecycleStateEnum +func GetComputeImageCapabilitySchemaLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "DELETED", + } +} + +// GetMappingComputeImageCapabilitySchemaLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeImageCapabilitySchemaLifecycleStateEnum(val string) (ComputeImageCapabilitySchemaLifecycleStateEnum, bool) { + enum, ok := mappingComputeImageCapabilitySchemaLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_image_capability_schema_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_image_capability_schema_summary.go new file mode 100644 index 000000000..94e340933 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_image_capability_schema_summary.go @@ -0,0 +1,127 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeImageCapabilitySchemaSummary Summary information for a compute image capability schema +type ComputeImageCapabilitySchemaSummary struct { + + // The compute image capability schema OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id *string `mandatory:"true" json:"id"` + + // The name of the compute global image capability schema version + ComputeGlobalImageCapabilitySchemaVersionName *string `mandatory:"true" json:"computeGlobalImageCapabilitySchemaVersionName"` + + // The OCID of the image associated with this compute image capability schema + ImageId *string `mandatory:"true" json:"imageId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The date and time the compute image capability schema was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the compartment containing the compute global image capability schema + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // A mapping of each capability name to its ImageCapabilityDescriptor. + SchemaData map[string]ImageCapabilitySchemaDescriptor `mandatory:"false" json:"schemaData"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m ComputeImageCapabilitySchemaSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeImageCapabilitySchemaSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *ComputeImageCapabilitySchemaSummary) UnmarshalJSON(data []byte) (e error) { + model := struct { + CompartmentId *string `json:"compartmentId"` + SchemaData map[string]imagecapabilityschemadescriptor `json:"schemaData"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + FreeformTags map[string]string `json:"freeformTags"` + Id *string `json:"id"` + ComputeGlobalImageCapabilitySchemaVersionName *string `json:"computeGlobalImageCapabilitySchemaVersionName"` + ImageId *string `json:"imageId"` + DisplayName *string `json:"displayName"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.CompartmentId = model.CompartmentId + + m.SchemaData = make(map[string]ImageCapabilitySchemaDescriptor) + for k, v := range model.SchemaData { + nn, e = v.UnmarshalPolymorphicJSON(v.JsonData) + if e != nil { + return e + } + if nn != nil { + m.SchemaData[k] = nn.(ImageCapabilitySchemaDescriptor) + } else { + m.SchemaData[k] = nil + } + } + + m.DefinedTags = model.DefinedTags + + m.FreeformTags = model.FreeformTags + + m.Id = model.Id + + m.ComputeGlobalImageCapabilitySchemaVersionName = model.ComputeGlobalImageCapabilitySchemaVersionName + + m.ImageId = model.ImageId + + m.DisplayName = model.DisplayName + + m.TimeCreated = model.TimeCreated + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_instance_details.go new file mode 100644 index 000000000..1577b01ce --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_instance_details.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeInstanceDetails Compute Instance Configuration instance details. +type ComputeInstanceDetails struct { + + // Block volume parameters. + BlockVolumes []InstanceConfigurationBlockVolumeDetails `mandatory:"false" json:"blockVolumes"` + + LaunchDetails *InstanceConfigurationLaunchInstanceDetails `mandatory:"false" json:"launchDetails"` + + // Secondary VNIC parameters. + SecondaryVnics []InstanceConfigurationAttachVnicDetails `mandatory:"false" json:"secondaryVnics"` +} + +func (m ComputeInstanceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeInstanceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ComputeInstanceDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeComputeInstanceDetails ComputeInstanceDetails + s := struct { + DiscriminatorParam string `json:"instanceType"` + MarshalTypeComputeInstanceDetails + }{ + "compute", + (MarshalTypeComputeInstanceDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_instance_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_instance_options.go new file mode 100644 index 000000000..c2997992f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_instance_options.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeInstanceOptions Multiple Compute Instance Configuration instance details. +type ComputeInstanceOptions struct { + + // The Compute Instance Configuration parameters. + Options []ComputeInstanceDetails `mandatory:"false" json:"options"` +} + +func (m ComputeInstanceOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeInstanceOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ComputeInstanceOptions) MarshalJSON() (buff []byte, e error) { + type MarshalTypeComputeInstanceOptions ComputeInstanceOptions + s := struct { + DiscriminatorParam string `json:"instanceType"` + MarshalTypeComputeInstanceOptions + }{ + "instance_options", + (MarshalTypeComputeInstanceOptions)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_network_block.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_network_block.go new file mode 100644 index 000000000..1500f9f75 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_network_block.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeNetworkBlock A compute network block. +type ComputeNetworkBlock struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" json:"computeCapacityTopologyId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + ComputeHpcIslandId *string `mandatory:"true" json:"computeHpcIslandId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute network block. + LifecycleState ComputeNetworkBlockLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute network block was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute network block was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The total number of compute bare metal hosts located in this compute network block. + TotalComputeBareMetalHostCount *int64 `mandatory:"true" json:"totalComputeBareMetalHostCount"` +} + +func (m ComputeNetworkBlock) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeNetworkBlock) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeNetworkBlockLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeNetworkBlockLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeNetworkBlockLifecycleStateEnum Enum with underlying type: string +type ComputeNetworkBlockLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeNetworkBlockLifecycleStateEnum +const ( + ComputeNetworkBlockLifecycleStateActive ComputeNetworkBlockLifecycleStateEnum = "ACTIVE" + ComputeNetworkBlockLifecycleStateInactive ComputeNetworkBlockLifecycleStateEnum = "INACTIVE" +) + +var mappingComputeNetworkBlockLifecycleStateEnum = map[string]ComputeNetworkBlockLifecycleStateEnum{ + "ACTIVE": ComputeNetworkBlockLifecycleStateActive, + "INACTIVE": ComputeNetworkBlockLifecycleStateInactive, +} + +var mappingComputeNetworkBlockLifecycleStateEnumLowerCase = map[string]ComputeNetworkBlockLifecycleStateEnum{ + "active": ComputeNetworkBlockLifecycleStateActive, + "inactive": ComputeNetworkBlockLifecycleStateInactive, +} + +// GetComputeNetworkBlockLifecycleStateEnumValues Enumerates the set of values for ComputeNetworkBlockLifecycleStateEnum +func GetComputeNetworkBlockLifecycleStateEnumValues() []ComputeNetworkBlockLifecycleStateEnum { + values := make([]ComputeNetworkBlockLifecycleStateEnum, 0) + for _, v := range mappingComputeNetworkBlockLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeNetworkBlockLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeNetworkBlockLifecycleStateEnum +func GetComputeNetworkBlockLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + } +} + +// GetMappingComputeNetworkBlockLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeNetworkBlockLifecycleStateEnum(val string) (ComputeNetworkBlockLifecycleStateEnum, bool) { + enum, ok := mappingComputeNetworkBlockLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_network_block_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_network_block_collection.go new file mode 100644 index 000000000..8d681c501 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_network_block_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeNetworkBlockCollection A list of compute network blocks. +type ComputeNetworkBlockCollection struct { + + // The list of compute network blocks. + Items []ComputeNetworkBlockSummary `mandatory:"true" json:"items"` +} + +func (m ComputeNetworkBlockCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeNetworkBlockCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_network_block_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_network_block_summary.go new file mode 100644 index 000000000..7ae506c14 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/compute_network_block_summary.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeNetworkBlockSummary Summary information for a compute network block. +type ComputeNetworkBlockSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" json:"computeCapacityTopologyId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + ComputeHpcIslandId *string `mandatory:"true" json:"computeHpcIslandId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute network block. + LifecycleState ComputeNetworkBlockLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute network block was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute network block was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The total number of compute bare metal hosts located in the compute network block. + TotalComputeBareMetalHostCount *int64 `mandatory:"true" json:"totalComputeBareMetalHostCount"` +} + +func (m ComputeNetworkBlockSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeNetworkBlockSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeNetworkBlockLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeNetworkBlockLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/configuration_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/configuration_state.go new file mode 100644 index 000000000..a502feba6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/configuration_state.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "strings" +) + +// ConfigurationStateEnum Enum with underlying type: string +type ConfigurationStateEnum string + +// Set of constants representing the allowable values for ConfigurationStateEnum +const ( + ConfigurationStateConformant ConfigurationStateEnum = "CONFORMANT" + ConfigurationStateNonConformant ConfigurationStateEnum = "NON_CONFORMANT" + ConfigurationStateChecking ConfigurationStateEnum = "CHECKING" + ConfigurationStatePreApplying ConfigurationStateEnum = "PRE_APPLYING" + ConfigurationStateApplying ConfigurationStateEnum = "APPLYING" + ConfigurationStateUnknown ConfigurationStateEnum = "UNKNOWN" +) + +var mappingConfigurationStateEnum = map[string]ConfigurationStateEnum{ + "CONFORMANT": ConfigurationStateConformant, + "NON_CONFORMANT": ConfigurationStateNonConformant, + "CHECKING": ConfigurationStateChecking, + "PRE_APPLYING": ConfigurationStatePreApplying, + "APPLYING": ConfigurationStateApplying, + "UNKNOWN": ConfigurationStateUnknown, +} + +var mappingConfigurationStateEnumLowerCase = map[string]ConfigurationStateEnum{ + "conformant": ConfigurationStateConformant, + "non_conformant": ConfigurationStateNonConformant, + "checking": ConfigurationStateChecking, + "pre_applying": ConfigurationStatePreApplying, + "applying": ConfigurationStateApplying, + "unknown": ConfigurationStateUnknown, +} + +// GetConfigurationStateEnumValues Enumerates the set of values for ConfigurationStateEnum +func GetConfigurationStateEnumValues() []ConfigurationStateEnum { + values := make([]ConfigurationStateEnum, 0) + for _, v := range mappingConfigurationStateEnum { + values = append(values, v) + } + return values +} + +// GetConfigurationStateEnumStringValues Enumerates the set of values in String for ConfigurationStateEnum +func GetConfigurationStateEnumStringValues() []string { + return []string{ + "CONFORMANT", + "NON_CONFORMANT", + "CHECKING", + "PRE_APPLYING", + "APPLYING", + "UNKNOWN", + } +} + +// GetMappingConfigurationStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingConfigurationStateEnum(val string) (ConfigurationStateEnum, bool) { + enum, ok := mappingConfigurationStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/connect_local_peering_gateways_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/connect_local_peering_gateways_details.go new file mode 100644 index 000000000..659f21229 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/connect_local_peering_gateways_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectLocalPeeringGatewaysDetails Information about the other local peering gateway (LPG). +type ConnectLocalPeeringGatewaysDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the LPG you want to peer with. + PeerId *string `mandatory:"true" json:"peerId"` +} + +func (m ConnectLocalPeeringGatewaysDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectLocalPeeringGatewaysDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/connect_local_peering_gateways_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/connect_local_peering_gateways_request_response.go new file mode 100644 index 000000000..50b866663 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/connect_local_peering_gateways_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ConnectLocalPeeringGatewaysRequest wrapper for the ConnectLocalPeeringGateways operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ConnectLocalPeeringGateways.go.html to see an example of how to use ConnectLocalPeeringGatewaysRequest. +type ConnectLocalPeeringGatewaysRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the local peering gateway. + LocalPeeringGatewayId *string `mandatory:"true" contributesTo:"path" name:"localPeeringGatewayId"` + + // Details regarding the local peering gateway to connect. + ConnectLocalPeeringGatewaysDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ConnectLocalPeeringGatewaysRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ConnectLocalPeeringGatewaysRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ConnectLocalPeeringGatewaysRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ConnectLocalPeeringGatewaysRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ConnectLocalPeeringGatewaysRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ConnectLocalPeeringGatewaysResponse wrapper for the ConnectLocalPeeringGateways operation +type ConnectLocalPeeringGatewaysResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ConnectLocalPeeringGatewaysResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ConnectLocalPeeringGatewaysResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/connect_remote_peering_connections_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/connect_remote_peering_connections_details.go new file mode 100644 index 000000000..e6a1a2455 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/connect_remote_peering_connections_details.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectRemotePeeringConnectionsDetails Information about the other remote peering connection (RPC). +type ConnectRemotePeeringConnectionsDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the RPC you want to peer with. + PeerId *string `mandatory:"true" json:"peerId"` + + // The name of the region that contains the RPC you want to peer with. + // Example: `us-ashburn-1` + PeerRegionName *string `mandatory:"true" json:"peerRegionName"` +} + +func (m ConnectRemotePeeringConnectionsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectRemotePeeringConnectionsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/connect_remote_peering_connections_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/connect_remote_peering_connections_request_response.go new file mode 100644 index 000000000..f5738be58 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/connect_remote_peering_connections_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ConnectRemotePeeringConnectionsRequest wrapper for the ConnectRemotePeeringConnections operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ConnectRemotePeeringConnections.go.html to see an example of how to use ConnectRemotePeeringConnectionsRequest. +type ConnectRemotePeeringConnectionsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the remote peering connection (RPC). + RemotePeeringConnectionId *string `mandatory:"true" contributesTo:"path" name:"remotePeeringConnectionId"` + + // Details to connect peering connection with peering connection from remote region + ConnectRemotePeeringConnectionsDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ConnectRemotePeeringConnectionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ConnectRemotePeeringConnectionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ConnectRemotePeeringConnectionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ConnectRemotePeeringConnectionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ConnectRemotePeeringConnectionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ConnectRemotePeeringConnectionsResponse wrapper for the ConnectRemotePeeringConnections operation +type ConnectRemotePeeringConnectionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ConnectRemotePeeringConnectionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ConnectRemotePeeringConnectionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/console_history.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/console_history.go new file mode 100644 index 000000000..8481f7e28 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/console_history.go @@ -0,0 +1,133 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConsoleHistory An instance's serial console data. It includes configuration messages that occur when the +// instance boots, such as kernel and BIOS messages, and is useful for checking the status of +// the instance or diagnosing problems. The console data is minimally formatted ASCII text. +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type ConsoleHistory struct { + + // The availability domain of an instance. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the console history metadata object. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the instance this console history was fetched from. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The current state of the console history. + LifecycleState ConsoleHistoryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the history was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m ConsoleHistory) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConsoleHistory) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingConsoleHistoryLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetConsoleHistoryLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ConsoleHistoryLifecycleStateEnum Enum with underlying type: string +type ConsoleHistoryLifecycleStateEnum string + +// Set of constants representing the allowable values for ConsoleHistoryLifecycleStateEnum +const ( + ConsoleHistoryLifecycleStateRequested ConsoleHistoryLifecycleStateEnum = "REQUESTED" + ConsoleHistoryLifecycleStateGettingHistory ConsoleHistoryLifecycleStateEnum = "GETTING-HISTORY" + ConsoleHistoryLifecycleStateSucceeded ConsoleHistoryLifecycleStateEnum = "SUCCEEDED" + ConsoleHistoryLifecycleStateFailed ConsoleHistoryLifecycleStateEnum = "FAILED" +) + +var mappingConsoleHistoryLifecycleStateEnum = map[string]ConsoleHistoryLifecycleStateEnum{ + "REQUESTED": ConsoleHistoryLifecycleStateRequested, + "GETTING-HISTORY": ConsoleHistoryLifecycleStateGettingHistory, + "SUCCEEDED": ConsoleHistoryLifecycleStateSucceeded, + "FAILED": ConsoleHistoryLifecycleStateFailed, +} + +var mappingConsoleHistoryLifecycleStateEnumLowerCase = map[string]ConsoleHistoryLifecycleStateEnum{ + "requested": ConsoleHistoryLifecycleStateRequested, + "getting-history": ConsoleHistoryLifecycleStateGettingHistory, + "succeeded": ConsoleHistoryLifecycleStateSucceeded, + "failed": ConsoleHistoryLifecycleStateFailed, +} + +// GetConsoleHistoryLifecycleStateEnumValues Enumerates the set of values for ConsoleHistoryLifecycleStateEnum +func GetConsoleHistoryLifecycleStateEnumValues() []ConsoleHistoryLifecycleStateEnum { + values := make([]ConsoleHistoryLifecycleStateEnum, 0) + for _, v := range mappingConsoleHistoryLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetConsoleHistoryLifecycleStateEnumStringValues Enumerates the set of values in String for ConsoleHistoryLifecycleStateEnum +func GetConsoleHistoryLifecycleStateEnumStringValues() []string { + return []string{ + "REQUESTED", + "GETTING-HISTORY", + "SUCCEEDED", + "FAILED", + } +} + +// GetMappingConsoleHistoryLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingConsoleHistoryLifecycleStateEnum(val string) (ConsoleHistoryLifecycleStateEnum, bool) { + enum, ok := mappingConsoleHistoryLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_boot_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_boot_volume_backup_details.go new file mode 100644 index 000000000..eaca1db62 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_boot_volume_backup_details.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CopyBootVolumeBackupDetails The representation of CopyBootVolumeBackupDetails +type CopyBootVolumeBackupDetails struct { + + // The name of the destination region. + // Example: `us-ashburn-1` + DestinationRegion *string `mandatory:"true" json:"destinationRegion"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID of the Vault service key in the destination region which will be the master encryption key + // for the copied boot volume backup. If you do not specify this attribute the boot volume backup + // will be encrypted with the Oracle-provided encryption key when it is copied to the destination region. + // + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m CopyBootVolumeBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CopyBootVolumeBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_boot_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_boot_volume_backup_request_response.go new file mode 100644 index 000000000..84010e9e3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_boot_volume_backup_request_response.go @@ -0,0 +1,115 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CopyBootVolumeBackupRequest wrapper for the CopyBootVolumeBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CopyBootVolumeBackup.go.html to see an example of how to use CopyBootVolumeBackupRequest. +type CopyBootVolumeBackupRequest struct { + + // The OCID of the boot volume backup. + BootVolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeBackupId"` + + // Request to create a cross-region copy of given boot volume backup. + CopyBootVolumeBackupDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CopyBootVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CopyBootVolumeBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CopyBootVolumeBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CopyBootVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CopyBootVolumeBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CopyBootVolumeBackupResponse wrapper for the CopyBootVolumeBackup operation +type CopyBootVolumeBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolumeBackup instance + BootVolumeBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Location of the resource. + Location *string `presentIn:"header" name:"location"` + + // Location of the resource. + ContentLocation *string `presentIn:"header" name:"content-location"` +} + +func (response CopyBootVolumeBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CopyBootVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_volume_backup_details.go new file mode 100644 index 000000000..928baf108 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_volume_backup_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CopyVolumeBackupDetails The representation of CopyVolumeBackupDetails +type CopyVolumeBackupDetails struct { + + // The name of the destination region. + // Example: `us-ashburn-1` + DestinationRegion *string `mandatory:"true" json:"destinationRegion"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID of the Vault service key in the destination region which will be the master encryption key + // for the copied volume backup. + // If you do not specify this attribute the volume backup will be encrypted with the Oracle-provided encryption + // key when it is copied to the destination region. + // + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m CopyVolumeBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CopyVolumeBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_volume_backup_request_response.go new file mode 100644 index 000000000..2c0f17481 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_volume_backup_request_response.go @@ -0,0 +1,115 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CopyVolumeBackupRequest wrapper for the CopyVolumeBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CopyVolumeBackup.go.html to see an example of how to use CopyVolumeBackupRequest. +type CopyVolumeBackupRequest struct { + + // The OCID of the volume backup. + VolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeBackupId"` + + // Request to create a cross-region copy of given backup. + CopyVolumeBackupDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CopyVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CopyVolumeBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CopyVolumeBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CopyVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CopyVolumeBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CopyVolumeBackupResponse wrapper for the CopyVolumeBackup operation +type CopyVolumeBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeBackup instance + VolumeBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Location of the resource. + Location *string `presentIn:"header" name:"location"` + + // Location of the resource. + ContentLocation *string `presentIn:"header" name:"content-location"` +} + +func (response CopyVolumeBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CopyVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_volume_group_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_volume_group_backup_details.go new file mode 100644 index 000000000..fa6388235 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_volume_group_backup_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CopyVolumeGroupBackupDetails The representation of CopyVolumeGroupBackupDetails +type CopyVolumeGroupBackupDetails struct { + + // The name of the destination region. + // Example: `us-ashburn-1` + DestinationRegion *string `mandatory:"true" json:"destinationRegion"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID of the Vault service key in the destination region which will be the master encryption key + // for the copied volume group backup. + // If you do not specify this attribute the volume group backup will be encrypted with the Oracle-provided encryption + // key when it is copied to the destination region. + // + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m CopyVolumeGroupBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CopyVolumeGroupBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_volume_group_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_volume_group_backup_request_response.go new file mode 100644 index 000000000..ea4a23134 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/copy_volume_group_backup_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CopyVolumeGroupBackupRequest wrapper for the CopyVolumeGroupBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CopyVolumeGroupBackup.go.html to see an example of how to use CopyVolumeGroupBackupRequest. +type CopyVolumeGroupBackupRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup. + VolumeGroupBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupBackupId"` + + // Request to create a cross-region copy of given volume group backup. + CopyVolumeGroupBackupDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CopyVolumeGroupBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CopyVolumeGroupBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CopyVolumeGroupBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CopyVolumeGroupBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CopyVolumeGroupBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CopyVolumeGroupBackupResponse wrapper for the CopyVolumeGroupBackup operation +type CopyVolumeGroupBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeGroupBackup instance + VolumeGroupBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CopyVolumeGroupBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CopyVolumeGroupBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/core_blockstorage_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_blockstorage_client.go new file mode 100644 index 000000000..cd44d4ef6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_blockstorage_client.go @@ -0,0 +1,4061 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// BlockstorageClient a client for Blockstorage +type BlockstorageClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewBlockstorageClientWithConfigurationProvider Creates a new default Blockstorage client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewBlockstorageClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client BlockstorageClient, err error) { + if enabled := common.CheckForEnabledServices("core"); !enabled { + return client, fmt.Errorf("the Developer Tool configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local developer-tool-configuration.json file configured the service you're targeting or contact the cloud provider on the availability of this service") + } + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newBlockstorageClientFromBaseClient(baseClient, provider) +} + +// NewBlockstorageClientWithOboToken Creates a new default Blockstorage client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// +// as well as reading the region +func NewBlockstorageClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client BlockstorageClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newBlockstorageClientFromBaseClient(baseClient, configProvider) +} + +func newBlockstorageClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client BlockstorageClient, err error) { + // Blockstorage service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("Blockstorage")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = BlockstorageClient{BaseClient: baseClient} + client.BasePath = "20160918" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *BlockstorageClient) SetRegion(region string) { + client.Host, _ = common.StringToRegion(region).EndpointForTemplateDottedRegion("iaas", "https://iaas.{region}.{dualStack?ds.oci.:}{secondLevelDomain}", "iaas") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *BlockstorageClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *BlockstorageClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// EnableDualStackEndpoints Determines whether dual stack endpoint should be used or not. +// Default value is false +func (client *BlockstorageClient) EnableDualStackEndpoints(enableDualStack bool) { + client.BaseClient.EnableDualStackEndpoints(enableDualStack) +} + +// ChangeBootVolumeBackupCompartment Moves a boot volume backup into a different compartment within the same tenancy. +// For information about moving resources between compartments, +// see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeBootVolumeBackupCompartment.go.html to see an example of how to use ChangeBootVolumeBackupCompartment API. +func (client BlockstorageClient) ChangeBootVolumeBackupCompartment(ctx context.Context, request ChangeBootVolumeBackupCompartmentRequest) (response ChangeBootVolumeBackupCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.changeBootVolumeBackupCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeBootVolumeBackupCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeBootVolumeBackupCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeBootVolumeBackupCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeBootVolumeBackupCompartmentResponse") + } + return +} + +// changeBootVolumeBackupCompartment implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) changeBootVolumeBackupCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bootVolumeBackups/{bootVolumeBackupId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeBootVolumeBackupCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ChangeBootVolumeBackupCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolumeBackup/ChangeBootVolumeBackupCompartment" + err = common.PostProcessServiceError(err, "Blockstorage", "ChangeBootVolumeBackupCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeBootVolumeCompartment Moves a boot volume into a different compartment within the same tenancy. +// For information about moving resources between compartments, +// see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeBootVolumeCompartment.go.html to see an example of how to use ChangeBootVolumeCompartment API. +func (client BlockstorageClient) ChangeBootVolumeCompartment(ctx context.Context, request ChangeBootVolumeCompartmentRequest) (response ChangeBootVolumeCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.changeBootVolumeCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeBootVolumeCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeBootVolumeCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeBootVolumeCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeBootVolumeCompartmentResponse") + } + return +} + +// changeBootVolumeCompartment implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) changeBootVolumeCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bootVolumes/{bootVolumeId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeBootVolumeCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ChangeBootVolumeCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolume/ChangeBootVolumeCompartment" + err = common.PostProcessServiceError(err, "Blockstorage", "ChangeBootVolumeCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeVolumeBackupCompartment Moves a volume backup into a different compartment within the same tenancy. +// For information about moving resources between compartments, +// see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVolumeBackupCompartment.go.html to see an example of how to use ChangeVolumeBackupCompartment API. +func (client BlockstorageClient) ChangeVolumeBackupCompartment(ctx context.Context, request ChangeVolumeBackupCompartmentRequest) (response ChangeVolumeBackupCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.changeVolumeBackupCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeVolumeBackupCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeVolumeBackupCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeVolumeBackupCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeVolumeBackupCompartmentResponse") + } + return +} + +// changeVolumeBackupCompartment implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) changeVolumeBackupCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeBackups/{volumeBackupId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeVolumeBackupCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ChangeVolumeBackupCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeBackup/ChangeVolumeBackupCompartment" + err = common.PostProcessServiceError(err, "Blockstorage", "ChangeVolumeBackupCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeVolumeCompartment Moves a volume into a different compartment within the same tenancy. +// For information about moving resources between compartments, +// see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVolumeCompartment.go.html to see an example of how to use ChangeVolumeCompartment API. +func (client BlockstorageClient) ChangeVolumeCompartment(ctx context.Context, request ChangeVolumeCompartmentRequest) (response ChangeVolumeCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.changeVolumeCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeVolumeCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeVolumeCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeVolumeCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeVolumeCompartmentResponse") + } + return +} + +// changeVolumeCompartment implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) changeVolumeCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumes/{volumeId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeVolumeCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ChangeVolumeCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Volume/ChangeVolumeCompartment" + err = common.PostProcessServiceError(err, "Blockstorage", "ChangeVolumeCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeVolumeGroupBackupCompartment Moves a volume group backup into a different compartment within the same tenancy. +// For information about moving resources between compartments, +// see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVolumeGroupBackupCompartment.go.html to see an example of how to use ChangeVolumeGroupBackupCompartment API. +func (client BlockstorageClient) ChangeVolumeGroupBackupCompartment(ctx context.Context, request ChangeVolumeGroupBackupCompartmentRequest) (response ChangeVolumeGroupBackupCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.changeVolumeGroupBackupCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeVolumeGroupBackupCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeVolumeGroupBackupCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeVolumeGroupBackupCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeVolumeGroupBackupCompartmentResponse") + } + return +} + +// changeVolumeGroupBackupCompartment implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) changeVolumeGroupBackupCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeGroupBackups/{volumeGroupBackupId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeVolumeGroupBackupCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ChangeVolumeGroupBackupCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeGroupBackup/ChangeVolumeGroupBackupCompartment" + err = common.PostProcessServiceError(err, "Blockstorage", "ChangeVolumeGroupBackupCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeVolumeGroupCompartment Moves a volume group into a different compartment within the same tenancy. +// For information about moving resources between compartments, +// see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVolumeGroupCompartment.go.html to see an example of how to use ChangeVolumeGroupCompartment API. +func (client BlockstorageClient) ChangeVolumeGroupCompartment(ctx context.Context, request ChangeVolumeGroupCompartmentRequest) (response ChangeVolumeGroupCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.changeVolumeGroupCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeVolumeGroupCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeVolumeGroupCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeVolumeGroupCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeVolumeGroupCompartmentResponse") + } + return +} + +// changeVolumeGroupCompartment implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) changeVolumeGroupCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeGroups/{volumeGroupId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeVolumeGroupCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ChangeVolumeGroupCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeGroup/ChangeVolumeGroupCompartment" + err = common.PostProcessServiceError(err, "Blockstorage", "ChangeVolumeGroupCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CopyBootVolumeBackup Creates a boot volume backup copy in specified region. For general information about volume backups, +// see Overview of Boot Volume Backups (https://docs.oracle.com/iaas/Content/Block/Concepts/bootvolumebackups.htm) +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CopyBootVolumeBackup.go.html to see an example of how to use CopyBootVolumeBackup API. +func (client BlockstorageClient) CopyBootVolumeBackup(ctx context.Context, request CopyBootVolumeBackupRequest) (response CopyBootVolumeBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.copyBootVolumeBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CopyBootVolumeBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CopyBootVolumeBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CopyBootVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CopyBootVolumeBackupResponse") + } + return +} + +// copyBootVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) copyBootVolumeBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bootVolumeBackups/{bootVolumeBackupId}/actions/copy", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CopyBootVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "CopyBootVolumeBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolumeBackup/CopyBootVolumeBackup" + err = common.PostProcessServiceError(err, "Blockstorage", "CopyBootVolumeBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CopyVolumeBackup Creates a volume backup copy in specified region. For general information about volume backups, +// see Overview of Block Volume Service Backups (https://docs.oracle.com/iaas/Content/Block/Concepts/blockvolumebackups.htm) +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CopyVolumeBackup.go.html to see an example of how to use CopyVolumeBackup API. +func (client BlockstorageClient) CopyVolumeBackup(ctx context.Context, request CopyVolumeBackupRequest) (response CopyVolumeBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.copyVolumeBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CopyVolumeBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CopyVolumeBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CopyVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CopyVolumeBackupResponse") + } + return +} + +// copyVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) copyVolumeBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeBackups/{volumeBackupId}/actions/copy", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CopyVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "CopyVolumeBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeBackup/CopyVolumeBackup" + err = common.PostProcessServiceError(err, "Blockstorage", "CopyVolumeBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CopyVolumeGroupBackup Creates a volume group backup copy in specified region. For general information about volume group backups, +// see Overview of Block Volume Backups (https://docs.oracle.com/iaas/Content/Block/Concepts/blockvolumebackups.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CopyVolumeGroupBackup.go.html to see an example of how to use CopyVolumeGroupBackup API. +func (client BlockstorageClient) CopyVolumeGroupBackup(ctx context.Context, request CopyVolumeGroupBackupRequest) (response CopyVolumeGroupBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.copyVolumeGroupBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CopyVolumeGroupBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CopyVolumeGroupBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CopyVolumeGroupBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CopyVolumeGroupBackupResponse") + } + return +} + +// copyVolumeGroupBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) copyVolumeGroupBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeGroupBackups/{volumeGroupBackupId}/actions/copy", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CopyVolumeGroupBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "CopyVolumeGroupBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeGroupBackup/CopyVolumeGroupBackup" + err = common.PostProcessServiceError(err, "Blockstorage", "CopyVolumeGroupBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateBootVolume Creates a new boot volume in the specified compartment from an existing boot volume or a boot volume backup. +// For general information about boot volumes, see Boot Volumes (https://docs.oracle.com/iaas/Content/Block/Concepts/bootvolumes.htm). +// You may optionally specify a *display name* for the volume, which is simply a friendly name or +// description. It does not have to be unique, and you can change it. Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateBootVolume.go.html to see an example of how to use CreateBootVolume API. +func (client BlockstorageClient) CreateBootVolume(ctx context.Context, request CreateBootVolumeRequest) (response CreateBootVolumeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createBootVolume, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateBootVolumeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateBootVolumeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateBootVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateBootVolumeResponse") + } + return +} + +// createBootVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createBootVolume(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bootVolumes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateBootVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "CreateBootVolume") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolume/CreateBootVolume" + err = common.PostProcessServiceError(err, "Blockstorage", "CreateBootVolume", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateBootVolumeBackup Creates a new boot volume backup of the specified boot volume. For general information about boot volume backups, +// see Overview of Boot Volume Backups (https://docs.oracle.com/iaas/Content/Block/Concepts/bootvolumebackups.htm) +// When the request is received, the backup object is in a REQUEST_RECEIVED state. +// When the data is imaged, it goes into a CREATING state. +// After the backup is fully uploaded to the cloud, it goes into an AVAILABLE state. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateBootVolumeBackup.go.html to see an example of how to use CreateBootVolumeBackup API. +func (client BlockstorageClient) CreateBootVolumeBackup(ctx context.Context, request CreateBootVolumeBackupRequest) (response CreateBootVolumeBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createBootVolumeBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateBootVolumeBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateBootVolumeBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateBootVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateBootVolumeBackupResponse") + } + return +} + +// createBootVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createBootVolumeBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bootVolumeBackups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateBootVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "CreateBootVolumeBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolumeBackup/CreateBootVolumeBackup" + err = common.PostProcessServiceError(err, "Blockstorage", "CreateBootVolumeBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateVolume Creates a new volume in the specified compartment. Volumes can be created in sizes ranging from +// 50 GB (51200 MB) to 32 TB (33554432 MB), in 1 GB (1024 MB) increments. By default, volumes are 1 TB (1048576 MB). +// For general information about block volumes, see +// Overview of Block Volume Service (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm). +// A volume and instance can be in separate compartments but must be in the same availability domain. +// For information about access control and compartments, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about +// availability domains, see Regions and Availability Domains (https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). +// To get a list of availability domains, use the `ListAvailabilityDomains` operation +// in the Identity and Access Management Service API. +// You may optionally specify a *display name* for the volume, which is simply a friendly name or +// description. It does not have to be unique, and you can change it. Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolume.go.html to see an example of how to use CreateVolume API. +func (client BlockstorageClient) CreateVolume(ctx context.Context, request CreateVolumeRequest) (response CreateVolumeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createVolume, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateVolumeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateVolumeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVolumeResponse") + } + return +} + +// createVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createVolume(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "CreateVolume") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Volume/CreateVolume" + err = common.PostProcessServiceError(err, "Blockstorage", "CreateVolume", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateVolumeBackup Creates a new backup of the specified volume. For general information about volume backups, +// see Overview of Block Volume Service Backups (https://docs.oracle.com/iaas/Content/Block/Concepts/blockvolumebackups.htm) +// When the request is received, the backup object is in a REQUEST_RECEIVED state. +// When the data is imaged, it goes into a CREATING state. +// After the backup is fully uploaded to the cloud, it goes into an AVAILABLE state. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeBackup.go.html to see an example of how to use CreateVolumeBackup API. +func (client BlockstorageClient) CreateVolumeBackup(ctx context.Context, request CreateVolumeBackupRequest) (response CreateVolumeBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createVolumeBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateVolumeBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateVolumeBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVolumeBackupResponse") + } + return +} + +// createVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createVolumeBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeBackups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "CreateVolumeBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeBackup/CreateVolumeBackup" + err = common.PostProcessServiceError(err, "Blockstorage", "CreateVolumeBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateVolumeBackupPolicy Creates a new user defined backup policy. +// For more information about Oracle defined backup policies and user defined backup policies, +// see Policy-Based Backups (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeBackupPolicy.go.html to see an example of how to use CreateVolumeBackupPolicy API. +func (client BlockstorageClient) CreateVolumeBackupPolicy(ctx context.Context, request CreateVolumeBackupPolicyRequest) (response CreateVolumeBackupPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createVolumeBackupPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateVolumeBackupPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateVolumeBackupPolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateVolumeBackupPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVolumeBackupPolicyResponse") + } + return +} + +// createVolumeBackupPolicy implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createVolumeBackupPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeBackupPolicies", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateVolumeBackupPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "CreateVolumeBackupPolicy") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeBackupPolicy/CreateVolumeBackupPolicy" + err = common.PostProcessServiceError(err, "Blockstorage", "CreateVolumeBackupPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateVolumeBackupPolicyAssignment Assigns a volume backup policy to the specified volume. Note that a given volume can +// only have one backup policy assigned to it. If this operation is used for a volume that already +// has a different backup policy assigned, the prior backup policy will be silently unassigned. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeBackupPolicyAssignment.go.html to see an example of how to use CreateVolumeBackupPolicyAssignment API. +func (client BlockstorageClient) CreateVolumeBackupPolicyAssignment(ctx context.Context, request CreateVolumeBackupPolicyAssignmentRequest) (response CreateVolumeBackupPolicyAssignmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createVolumeBackupPolicyAssignment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateVolumeBackupPolicyAssignmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateVolumeBackupPolicyAssignmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateVolumeBackupPolicyAssignmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVolumeBackupPolicyAssignmentResponse") + } + return +} + +// createVolumeBackupPolicyAssignment implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createVolumeBackupPolicyAssignment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeBackupPolicyAssignments", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateVolumeBackupPolicyAssignmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "CreateVolumeBackupPolicyAssignment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeBackupPolicyAssignment/CreateVolumeBackupPolicyAssignment" + err = common.PostProcessServiceError(err, "Blockstorage", "CreateVolumeBackupPolicyAssignment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateVolumeGroup Creates a new volume group in the specified compartment. +// A volume group is a collection of volumes and may be created from a list of volumes, cloning an existing +// volume group, or by restoring a volume group backup. +// You may optionally specify a *display name* for the volume group, which is simply a friendly name or +// description. It does not have to be unique, and you can change it. Avoid entering confidential information. +// For more information, see Volume Groups (https://docs.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeGroup.go.html to see an example of how to use CreateVolumeGroup API. +func (client BlockstorageClient) CreateVolumeGroup(ctx context.Context, request CreateVolumeGroupRequest) (response CreateVolumeGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createVolumeGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateVolumeGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateVolumeGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateVolumeGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVolumeGroupResponse") + } + return +} + +// createVolumeGroup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createVolumeGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeGroups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateVolumeGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "CreateVolumeGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeGroup/CreateVolumeGroup" + err = common.PostProcessServiceError(err, "Blockstorage", "CreateVolumeGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateVolumeGroupBackup Creates a new backup volume group of the specified volume group. +// For more information, see Volume Groups (https://docs.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeGroupBackup.go.html to see an example of how to use CreateVolumeGroupBackup API. +func (client BlockstorageClient) CreateVolumeGroupBackup(ctx context.Context, request CreateVolumeGroupBackupRequest) (response CreateVolumeGroupBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createVolumeGroupBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateVolumeGroupBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateVolumeGroupBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateVolumeGroupBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVolumeGroupBackupResponse") + } + return +} + +// createVolumeGroupBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) createVolumeGroupBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeGroupBackups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateVolumeGroupBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "CreateVolumeGroupBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeGroupBackup/CreateVolumeGroupBackup" + err = common.PostProcessServiceError(err, "Blockstorage", "CreateVolumeGroupBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteBootVolume Deletes the specified boot volume. The volume cannot have an active connection to an instance. +// To disconnect the boot volume from a connected instance, see +// Disconnecting From a Boot Volume (https://docs.oracle.com/iaas/Content/Block/Tasks/deletingbootvolume.htm). +// **Warning:** All data on the boot volume will be permanently lost when the boot volume is deleted. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteBootVolume.go.html to see an example of how to use DeleteBootVolume API. +func (client BlockstorageClient) DeleteBootVolume(ctx context.Context, request DeleteBootVolumeRequest) (response DeleteBootVolumeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteBootVolume, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteBootVolumeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteBootVolumeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteBootVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteBootVolumeResponse") + } + return +} + +// deleteBootVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteBootVolume(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/bootVolumes/{bootVolumeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteBootVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "DeleteBootVolume") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Blockstorage", "DeleteBootVolume", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteBootVolumeBackup Deletes a boot volume backup. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteBootVolumeBackup.go.html to see an example of how to use DeleteBootVolumeBackup API. +func (client BlockstorageClient) DeleteBootVolumeBackup(ctx context.Context, request DeleteBootVolumeBackupRequest) (response DeleteBootVolumeBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteBootVolumeBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteBootVolumeBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteBootVolumeBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteBootVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteBootVolumeBackupResponse") + } + return +} + +// deleteBootVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteBootVolumeBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/bootVolumeBackups/{bootVolumeBackupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteBootVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "DeleteBootVolumeBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Blockstorage", "DeleteBootVolumeBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteBootVolumeKmsKey Removes the specified boot volume's assigned Vault Service encryption key. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteBootVolumeKmsKey.go.html to see an example of how to use DeleteBootVolumeKmsKey API. +func (client BlockstorageClient) DeleteBootVolumeKmsKey(ctx context.Context, request DeleteBootVolumeKmsKeyRequest) (response DeleteBootVolumeKmsKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteBootVolumeKmsKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteBootVolumeKmsKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteBootVolumeKmsKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteBootVolumeKmsKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteBootVolumeKmsKeyResponse") + } + return +} + +// deleteBootVolumeKmsKey implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteBootVolumeKmsKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/bootVolumes/{bootVolumeId}/kmsKey", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteBootVolumeKmsKeyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "DeleteBootVolumeKmsKey") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Blockstorage", "DeleteBootVolumeKmsKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVolume Deletes the specified volume. The volume cannot have an active connection to an instance. +// To disconnect the volume from a connected instance, see +// Disconnecting From a Volume (https://docs.oracle.com/iaas/Content/Block/Tasks/disconnectingfromavolume.htm). +// **Warning:** All data on the volume will be permanently lost when the volume is deleted. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolume.go.html to see an example of how to use DeleteVolume API. +func (client BlockstorageClient) DeleteVolume(ctx context.Context, request DeleteVolumeRequest) (response DeleteVolumeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVolume, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteVolumeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteVolumeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVolumeResponse") + } + return +} + +// deleteVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteVolume(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/volumes/{volumeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "DeleteVolume") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Blockstorage", "DeleteVolume", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVolumeBackup Deletes a volume backup. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeBackup.go.html to see an example of how to use DeleteVolumeBackup API. +func (client BlockstorageClient) DeleteVolumeBackup(ctx context.Context, request DeleteVolumeBackupRequest) (response DeleteVolumeBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVolumeBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteVolumeBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteVolumeBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVolumeBackupResponse") + } + return +} + +// deleteVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteVolumeBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/volumeBackups/{volumeBackupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "DeleteVolumeBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Blockstorage", "DeleteVolumeBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVolumeBackupPolicy Deletes a user defined backup policy. +// +// For more information about user defined backup policies, +// see Policy-Based Backups (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#UserDefinedBackupPolicies). +// Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeBackupPolicy.go.html to see an example of how to use DeleteVolumeBackupPolicy API. +func (client BlockstorageClient) DeleteVolumeBackupPolicy(ctx context.Context, request DeleteVolumeBackupPolicyRequest) (response DeleteVolumeBackupPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVolumeBackupPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteVolumeBackupPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteVolumeBackupPolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteVolumeBackupPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVolumeBackupPolicyResponse") + } + return +} + +// deleteVolumeBackupPolicy implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteVolumeBackupPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/volumeBackupPolicies/{policyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteVolumeBackupPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "DeleteVolumeBackupPolicy") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Blockstorage", "DeleteVolumeBackupPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVolumeBackupPolicyAssignment Deletes a volume backup policy assignment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeBackupPolicyAssignment.go.html to see an example of how to use DeleteVolumeBackupPolicyAssignment API. +func (client BlockstorageClient) DeleteVolumeBackupPolicyAssignment(ctx context.Context, request DeleteVolumeBackupPolicyAssignmentRequest) (response DeleteVolumeBackupPolicyAssignmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVolumeBackupPolicyAssignment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteVolumeBackupPolicyAssignmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteVolumeBackupPolicyAssignmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteVolumeBackupPolicyAssignmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVolumeBackupPolicyAssignmentResponse") + } + return +} + +// deleteVolumeBackupPolicyAssignment implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteVolumeBackupPolicyAssignment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/volumeBackupPolicyAssignments/{policyAssignmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteVolumeBackupPolicyAssignmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "DeleteVolumeBackupPolicyAssignment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Blockstorage", "DeleteVolumeBackupPolicyAssignment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVolumeGroup Deletes the specified volume group. Individual volumes are not deleted, only the volume group is deleted. +// For more information, see Volume Groups (https://docs.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeGroup.go.html to see an example of how to use DeleteVolumeGroup API. +func (client BlockstorageClient) DeleteVolumeGroup(ctx context.Context, request DeleteVolumeGroupRequest) (response DeleteVolumeGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVolumeGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteVolumeGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteVolumeGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteVolumeGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVolumeGroupResponse") + } + return +} + +// deleteVolumeGroup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteVolumeGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/volumeGroups/{volumeGroupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteVolumeGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "DeleteVolumeGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Blockstorage", "DeleteVolumeGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVolumeGroupBackup Deletes a volume group backup. This operation deletes all the backups in +// the volume group. For more information, see Volume Groups (https://docs.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeGroupBackup.go.html to see an example of how to use DeleteVolumeGroupBackup API. +func (client BlockstorageClient) DeleteVolumeGroupBackup(ctx context.Context, request DeleteVolumeGroupBackupRequest) (response DeleteVolumeGroupBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVolumeGroupBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteVolumeGroupBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteVolumeGroupBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteVolumeGroupBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVolumeGroupBackupResponse") + } + return +} + +// deleteVolumeGroupBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteVolumeGroupBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/volumeGroupBackups/{volumeGroupBackupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteVolumeGroupBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "DeleteVolumeGroupBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Blockstorage", "DeleteVolumeGroupBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVolumeKmsKey Removes the specified volume's assigned Vault service encryption key. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeKmsKey.go.html to see an example of how to use DeleteVolumeKmsKey API. +func (client BlockstorageClient) DeleteVolumeKmsKey(ctx context.Context, request DeleteVolumeKmsKeyRequest) (response DeleteVolumeKmsKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVolumeKmsKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteVolumeKmsKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteVolumeKmsKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteVolumeKmsKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVolumeKmsKeyResponse") + } + return +} + +// deleteVolumeKmsKey implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) deleteVolumeKmsKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/volumes/{volumeId}/kmsKey", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteVolumeKmsKeyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "DeleteVolumeKmsKey") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Blockstorage", "DeleteVolumeKmsKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetBlockVolumeReplica Gets information for the specified block volume replica. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBlockVolumeReplica.go.html to see an example of how to use GetBlockVolumeReplica API. +func (client BlockstorageClient) GetBlockVolumeReplica(ctx context.Context, request GetBlockVolumeReplicaRequest) (response GetBlockVolumeReplicaResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBlockVolumeReplica, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetBlockVolumeReplicaResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetBlockVolumeReplicaResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetBlockVolumeReplicaResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBlockVolumeReplicaResponse") + } + return +} + +// getBlockVolumeReplica implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getBlockVolumeReplica(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/blockVolumeReplicas/{blockVolumeReplicaId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetBlockVolumeReplicaResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "GetBlockVolumeReplica") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BlockVolumeReplica/GetBlockVolumeReplica" + err = common.PostProcessServiceError(err, "Blockstorage", "GetBlockVolumeReplica", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetBootVolume Gets information for the specified boot volume. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolume.go.html to see an example of how to use GetBootVolume API. +func (client BlockstorageClient) GetBootVolume(ctx context.Context, request GetBootVolumeRequest) (response GetBootVolumeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBootVolume, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetBootVolumeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetBootVolumeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetBootVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBootVolumeResponse") + } + return +} + +// getBootVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getBootVolume(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumes/{bootVolumeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetBootVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "GetBootVolume") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolume/GetBootVolume" + err = common.PostProcessServiceError(err, "Blockstorage", "GetBootVolume", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetBootVolumeBackup Gets information for the specified boot volume backup. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolumeBackup.go.html to see an example of how to use GetBootVolumeBackup API. +func (client BlockstorageClient) GetBootVolumeBackup(ctx context.Context, request GetBootVolumeBackupRequest) (response GetBootVolumeBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBootVolumeBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetBootVolumeBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetBootVolumeBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetBootVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBootVolumeBackupResponse") + } + return +} + +// getBootVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getBootVolumeBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumeBackups/{bootVolumeBackupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetBootVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "GetBootVolumeBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolumeBackup/GetBootVolumeBackup" + err = common.PostProcessServiceError(err, "Blockstorage", "GetBootVolumeBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetBootVolumeKmsKey Gets the Vault service encryption key assigned to the specified boot volume. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolumeKmsKey.go.html to see an example of how to use GetBootVolumeKmsKey API. +func (client BlockstorageClient) GetBootVolumeKmsKey(ctx context.Context, request GetBootVolumeKmsKeyRequest) (response GetBootVolumeKmsKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBootVolumeKmsKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetBootVolumeKmsKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetBootVolumeKmsKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetBootVolumeKmsKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBootVolumeKmsKeyResponse") + } + return +} + +// getBootVolumeKmsKey implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getBootVolumeKmsKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumes/{bootVolumeId}/kmsKey", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetBootVolumeKmsKeyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "GetBootVolumeKmsKey") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolumeKmsKey/GetBootVolumeKmsKey" + err = common.PostProcessServiceError(err, "Blockstorage", "GetBootVolumeKmsKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetBootVolumeReplica Gets information for the specified boot volume replica. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolumeReplica.go.html to see an example of how to use GetBootVolumeReplica API. +func (client BlockstorageClient) GetBootVolumeReplica(ctx context.Context, request GetBootVolumeReplicaRequest) (response GetBootVolumeReplicaResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBootVolumeReplica, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetBootVolumeReplicaResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetBootVolumeReplicaResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetBootVolumeReplicaResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBootVolumeReplicaResponse") + } + return +} + +// getBootVolumeReplica implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getBootVolumeReplica(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumeReplicas/{bootVolumeReplicaId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetBootVolumeReplicaResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "GetBootVolumeReplica") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolumeReplica/GetBootVolumeReplica" + err = common.PostProcessServiceError(err, "Blockstorage", "GetBootVolumeReplica", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolume Gets information for the specified volume. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolume.go.html to see an example of how to use GetVolume API. +func (client BlockstorageClient) GetVolume(ctx context.Context, request GetVolumeRequest) (response GetVolumeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolume, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVolumeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVolumeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeResponse") + } + return +} + +// getVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolume(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumes/{volumeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "GetVolume") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Volume/GetVolume" + err = common.PostProcessServiceError(err, "Blockstorage", "GetVolume", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolumeBackup Gets information for the specified volume backup. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeBackup.go.html to see an example of how to use GetVolumeBackup API. +func (client BlockstorageClient) GetVolumeBackup(ctx context.Context, request GetVolumeBackupRequest) (response GetVolumeBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVolumeBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVolumeBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeBackupResponse") + } + return +} + +// getVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolumeBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeBackups/{volumeBackupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "GetVolumeBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeBackup/GetVolumeBackup" + err = common.PostProcessServiceError(err, "Blockstorage", "GetVolumeBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolumeBackupPolicy Gets information for the specified volume backup policy. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeBackupPolicy.go.html to see an example of how to use GetVolumeBackupPolicy API. +func (client BlockstorageClient) GetVolumeBackupPolicy(ctx context.Context, request GetVolumeBackupPolicyRequest) (response GetVolumeBackupPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeBackupPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVolumeBackupPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVolumeBackupPolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVolumeBackupPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeBackupPolicyResponse") + } + return +} + +// getVolumeBackupPolicy implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolumeBackupPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeBackupPolicies/{policyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVolumeBackupPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "GetVolumeBackupPolicy") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeBackupPolicy/GetVolumeBackupPolicy" + err = common.PostProcessServiceError(err, "Blockstorage", "GetVolumeBackupPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolumeBackupPolicyAssetAssignment Gets the volume backup policy assignment for the specified volume. The +// `assetId` query parameter is required, and the returned list will contain at most +// one item, since volume can only have one volume backup policy assigned at a time. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeBackupPolicyAssetAssignment.go.html to see an example of how to use GetVolumeBackupPolicyAssetAssignment API. +func (client BlockstorageClient) GetVolumeBackupPolicyAssetAssignment(ctx context.Context, request GetVolumeBackupPolicyAssetAssignmentRequest) (response GetVolumeBackupPolicyAssetAssignmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeBackupPolicyAssetAssignment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVolumeBackupPolicyAssetAssignmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVolumeBackupPolicyAssetAssignmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVolumeBackupPolicyAssetAssignmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeBackupPolicyAssetAssignmentResponse") + } + return +} + +// getVolumeBackupPolicyAssetAssignment implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolumeBackupPolicyAssetAssignment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeBackupPolicyAssignments", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVolumeBackupPolicyAssetAssignmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "GetVolumeBackupPolicyAssetAssignment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeBackupPolicyAssignment/GetVolumeBackupPolicyAssetAssignment" + err = common.PostProcessServiceError(err, "Blockstorage", "GetVolumeBackupPolicyAssetAssignment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolumeBackupPolicyAssignment Gets information for the specified volume backup policy assignment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeBackupPolicyAssignment.go.html to see an example of how to use GetVolumeBackupPolicyAssignment API. +func (client BlockstorageClient) GetVolumeBackupPolicyAssignment(ctx context.Context, request GetVolumeBackupPolicyAssignmentRequest) (response GetVolumeBackupPolicyAssignmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeBackupPolicyAssignment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVolumeBackupPolicyAssignmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVolumeBackupPolicyAssignmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVolumeBackupPolicyAssignmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeBackupPolicyAssignmentResponse") + } + return +} + +// getVolumeBackupPolicyAssignment implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolumeBackupPolicyAssignment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeBackupPolicyAssignments/{policyAssignmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVolumeBackupPolicyAssignmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "GetVolumeBackupPolicyAssignment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeBackupPolicyAssignment/GetVolumeBackupPolicyAssignment" + err = common.PostProcessServiceError(err, "Blockstorage", "GetVolumeBackupPolicyAssignment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolumeGroup Gets information for the specified volume group. For more information, see Volume Groups (https://docs.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeGroup.go.html to see an example of how to use GetVolumeGroup API. +func (client BlockstorageClient) GetVolumeGroup(ctx context.Context, request GetVolumeGroupRequest) (response GetVolumeGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVolumeGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVolumeGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVolumeGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeGroupResponse") + } + return +} + +// getVolumeGroup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolumeGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeGroups/{volumeGroupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVolumeGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "GetVolumeGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeGroup/GetVolumeGroup" + err = common.PostProcessServiceError(err, "Blockstorage", "GetVolumeGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolumeGroupBackup Gets information for the specified volume group backup. For more information, see Volume Groups (https://docs.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeGroupBackup.go.html to see an example of how to use GetVolumeGroupBackup API. +func (client BlockstorageClient) GetVolumeGroupBackup(ctx context.Context, request GetVolumeGroupBackupRequest) (response GetVolumeGroupBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeGroupBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVolumeGroupBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVolumeGroupBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVolumeGroupBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeGroupBackupResponse") + } + return +} + +// getVolumeGroupBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolumeGroupBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeGroupBackups/{volumeGroupBackupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVolumeGroupBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "GetVolumeGroupBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeGroupBackup/GetVolumeGroupBackup" + err = common.PostProcessServiceError(err, "Blockstorage", "GetVolumeGroupBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolumeGroupReplica Gets information for the specified volume group replica. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeGroupReplica.go.html to see an example of how to use GetVolumeGroupReplica API. +func (client BlockstorageClient) GetVolumeGroupReplica(ctx context.Context, request GetVolumeGroupReplicaRequest) (response GetVolumeGroupReplicaResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeGroupReplica, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVolumeGroupReplicaResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVolumeGroupReplicaResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVolumeGroupReplicaResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeGroupReplicaResponse") + } + return +} + +// getVolumeGroupReplica implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolumeGroupReplica(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeGroupReplicas/{volumeGroupReplicaId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVolumeGroupReplicaResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "GetVolumeGroupReplica") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeGroupReplica/GetVolumeGroupReplica" + err = common.PostProcessServiceError(err, "Blockstorage", "GetVolumeGroupReplica", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolumeKmsKey Gets the Vault service encryption key assigned to the specified volume. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeKmsKey.go.html to see an example of how to use GetVolumeKmsKey API. +func (client BlockstorageClient) GetVolumeKmsKey(ctx context.Context, request GetVolumeKmsKeyRequest) (response GetVolumeKmsKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeKmsKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVolumeKmsKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVolumeKmsKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVolumeKmsKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeKmsKeyResponse") + } + return +} + +// getVolumeKmsKey implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) getVolumeKmsKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumes/{volumeId}/kmsKey", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVolumeKmsKeyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "GetVolumeKmsKey") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeKmsKey/GetVolumeKmsKey" + err = common.PostProcessServiceError(err, "Blockstorage", "GetVolumeKmsKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListBlockVolumeReplicas Lists the block volume replicas in the specified compartment and availability domain. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBlockVolumeReplicas.go.html to see an example of how to use ListBlockVolumeReplicas API. +func (client BlockstorageClient) ListBlockVolumeReplicas(ctx context.Context, request ListBlockVolumeReplicasRequest) (response ListBlockVolumeReplicasResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listBlockVolumeReplicas, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListBlockVolumeReplicasResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListBlockVolumeReplicasResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListBlockVolumeReplicasResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBlockVolumeReplicasResponse") + } + return +} + +// listBlockVolumeReplicas implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listBlockVolumeReplicas(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/blockVolumeReplicas", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListBlockVolumeReplicasResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ListBlockVolumeReplicas") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BlockVolumeReplica/ListBlockVolumeReplicas" + err = common.PostProcessServiceError(err, "Blockstorage", "ListBlockVolumeReplicas", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListBootVolumeBackups Lists the boot volume backups in the specified compartment. You can filter the results by boot volume. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBootVolumeBackups.go.html to see an example of how to use ListBootVolumeBackups API. +func (client BlockstorageClient) ListBootVolumeBackups(ctx context.Context, request ListBootVolumeBackupsRequest) (response ListBootVolumeBackupsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listBootVolumeBackups, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListBootVolumeBackupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListBootVolumeBackupsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListBootVolumeBackupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBootVolumeBackupsResponse") + } + return +} + +// listBootVolumeBackups implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listBootVolumeBackups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumeBackups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListBootVolumeBackupsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ListBootVolumeBackups") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolumeBackup/ListBootVolumeBackups" + err = common.PostProcessServiceError(err, "Blockstorage", "ListBootVolumeBackups", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListBootVolumeReplicas Lists the boot volume replicas in the specified compartment and availability domain. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBootVolumeReplicas.go.html to see an example of how to use ListBootVolumeReplicas API. +func (client BlockstorageClient) ListBootVolumeReplicas(ctx context.Context, request ListBootVolumeReplicasRequest) (response ListBootVolumeReplicasResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listBootVolumeReplicas, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListBootVolumeReplicasResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListBootVolumeReplicasResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListBootVolumeReplicasResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBootVolumeReplicasResponse") + } + return +} + +// listBootVolumeReplicas implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listBootVolumeReplicas(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumeReplicas", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListBootVolumeReplicasResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ListBootVolumeReplicas") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolumeReplica/ListBootVolumeReplicas" + err = common.PostProcessServiceError(err, "Blockstorage", "ListBootVolumeReplicas", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListBootVolumes Lists the boot volumes in the specified compartment and availability domain. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBootVolumes.go.html to see an example of how to use ListBootVolumes API. +func (client BlockstorageClient) ListBootVolumes(ctx context.Context, request ListBootVolumesRequest) (response ListBootVolumesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listBootVolumes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListBootVolumesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListBootVolumesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListBootVolumesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBootVolumesResponse") + } + return +} + +// listBootVolumes implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listBootVolumes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListBootVolumesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ListBootVolumes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolume/ListBootVolumes" + err = common.PostProcessServiceError(err, "Blockstorage", "ListBootVolumes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVolumeBackupPolicies Lists all the volume backup policies available in the specified compartment. +// For more information about Oracle defined backup policies and user defined backup policies, +// see Policy-Based Backups (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeBackupPolicies.go.html to see an example of how to use ListVolumeBackupPolicies API. +func (client BlockstorageClient) ListVolumeBackupPolicies(ctx context.Context, request ListVolumeBackupPoliciesRequest) (response ListVolumeBackupPoliciesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVolumeBackupPolicies, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVolumeBackupPoliciesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVolumeBackupPoliciesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVolumeBackupPoliciesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVolumeBackupPoliciesResponse") + } + return +} + +// listVolumeBackupPolicies implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listVolumeBackupPolicies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeBackupPolicies", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVolumeBackupPoliciesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ListVolumeBackupPolicies") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeBackupPolicy/ListVolumeBackupPolicies" + err = common.PostProcessServiceError(err, "Blockstorage", "ListVolumeBackupPolicies", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVolumeBackups Lists the volume backups in the specified compartment. You can filter the results by volume. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeBackups.go.html to see an example of how to use ListVolumeBackups API. +func (client BlockstorageClient) ListVolumeBackups(ctx context.Context, request ListVolumeBackupsRequest) (response ListVolumeBackupsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVolumeBackups, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVolumeBackupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVolumeBackupsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVolumeBackupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVolumeBackupsResponse") + } + return +} + +// listVolumeBackups implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listVolumeBackups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeBackups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVolumeBackupsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ListVolumeBackups") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeBackup/ListVolumeBackups" + err = common.PostProcessServiceError(err, "Blockstorage", "ListVolumeBackups", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVolumeGroupBackups Lists the volume group backups in the specified compartment. You can filter the results by volume group. +// For more information, see Volume Groups (https://docs.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeGroupBackups.go.html to see an example of how to use ListVolumeGroupBackups API. +func (client BlockstorageClient) ListVolumeGroupBackups(ctx context.Context, request ListVolumeGroupBackupsRequest) (response ListVolumeGroupBackupsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVolumeGroupBackups, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVolumeGroupBackupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVolumeGroupBackupsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVolumeGroupBackupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVolumeGroupBackupsResponse") + } + return +} + +// listVolumeGroupBackups implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listVolumeGroupBackups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeGroupBackups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVolumeGroupBackupsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ListVolumeGroupBackups") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeGroupBackup/ListVolumeGroupBackups" + err = common.PostProcessServiceError(err, "Blockstorage", "ListVolumeGroupBackups", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVolumeGroupReplicas Lists the volume group replicas in the specified compartment. You can filter the results by volume group. +// For more information, see Volume Group Replication (https://docs.oracle.com/iaas/Content/Block/Concepts/volumegroupreplication.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeGroupReplicas.go.html to see an example of how to use ListVolumeGroupReplicas API. +func (client BlockstorageClient) ListVolumeGroupReplicas(ctx context.Context, request ListVolumeGroupReplicasRequest) (response ListVolumeGroupReplicasResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVolumeGroupReplicas, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVolumeGroupReplicasResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVolumeGroupReplicasResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVolumeGroupReplicasResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVolumeGroupReplicasResponse") + } + return +} + +// listVolumeGroupReplicas implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listVolumeGroupReplicas(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeGroupReplicas", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVolumeGroupReplicasResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ListVolumeGroupReplicas") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeGroupReplica/ListVolumeGroupReplicas" + err = common.PostProcessServiceError(err, "Blockstorage", "ListVolumeGroupReplicas", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVolumeGroups Lists the volume groups in the specified compartment and availability domain. +// For more information, see Volume Groups (https://docs.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeGroups.go.html to see an example of how to use ListVolumeGroups API. +func (client BlockstorageClient) ListVolumeGroups(ctx context.Context, request ListVolumeGroupsRequest) (response ListVolumeGroupsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVolumeGroups, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVolumeGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVolumeGroupsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVolumeGroupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVolumeGroupsResponse") + } + return +} + +// listVolumeGroups implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listVolumeGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeGroups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVolumeGroupsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ListVolumeGroups") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeGroup/ListVolumeGroups" + err = common.PostProcessServiceError(err, "Blockstorage", "ListVolumeGroups", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVolumes Lists the volumes in the specified compartment and availability domain. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumes.go.html to see an example of how to use ListVolumes API. +func (client BlockstorageClient) ListVolumes(ctx context.Context, request ListVolumesRequest) (response ListVolumesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVolumes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVolumesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVolumesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVolumesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVolumesResponse") + } + return +} + +// listVolumes implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) listVolumes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVolumesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "ListVolumes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Volume/ListVolumes" + err = common.PostProcessServiceError(err, "Blockstorage", "ListVolumes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateBootVolume Updates the specified boot volume's display name, defined tags, and free-form tags. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateBootVolume.go.html to see an example of how to use UpdateBootVolume API. +func (client BlockstorageClient) UpdateBootVolume(ctx context.Context, request UpdateBootVolumeRequest) (response UpdateBootVolumeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateBootVolume, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateBootVolumeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateBootVolumeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateBootVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateBootVolumeResponse") + } + return +} + +// updateBootVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateBootVolume(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/bootVolumes/{bootVolumeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateBootVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "UpdateBootVolume") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolume/UpdateBootVolume" + err = common.PostProcessServiceError(err, "Blockstorage", "UpdateBootVolume", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateBootVolumeBackup Updates the display name for the specified boot volume backup. +// Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateBootVolumeBackup.go.html to see an example of how to use UpdateBootVolumeBackup API. +func (client BlockstorageClient) UpdateBootVolumeBackup(ctx context.Context, request UpdateBootVolumeBackupRequest) (response UpdateBootVolumeBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateBootVolumeBackup, policy) + if err != nil { + if ociResponse != nil { + response = UpdateBootVolumeBackupResponse{RawResponse: ociResponse.HTTPResponse()} + } + return + } + if convertedResponse, ok := ociResponse.(UpdateBootVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateBootVolumeBackupResponse") + } + return +} + +// updateBootVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateBootVolumeBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/bootVolumeBackups/{bootVolumeBackupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateBootVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "UpdateBootVolumeBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolumeBackup/UpdateBootVolumeBackup" + err = common.PostProcessServiceError(err, "Blockstorage", "UpdateBootVolumeBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateBootVolumeKmsKey Updates the specified volume with a new Vault service master encryption key. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateBootVolumeKmsKey.go.html to see an example of how to use UpdateBootVolumeKmsKey API. +func (client BlockstorageClient) UpdateBootVolumeKmsKey(ctx context.Context, request UpdateBootVolumeKmsKeyRequest) (response UpdateBootVolumeKmsKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateBootVolumeKmsKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateBootVolumeKmsKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateBootVolumeKmsKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateBootVolumeKmsKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateBootVolumeKmsKeyResponse") + } + return +} + +// updateBootVolumeKmsKey implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateBootVolumeKmsKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/bootVolumes/{bootVolumeId}/kmsKey", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateBootVolumeKmsKeyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "UpdateBootVolumeKmsKey") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolumeKmsKey/UpdateBootVolumeKmsKey" + err = common.PostProcessServiceError(err, "Blockstorage", "UpdateBootVolumeKmsKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVolume Updates the specified volume's display name. +// Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolume.go.html to see an example of how to use UpdateVolume API. +func (client BlockstorageClient) UpdateVolume(ctx context.Context, request UpdateVolumeRequest) (response UpdateVolumeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVolume, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateVolumeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateVolumeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVolumeResponse") + } + return +} + +// updateVolume implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateVolume(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/volumes/{volumeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "UpdateVolume") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Volume/UpdateVolume" + err = common.PostProcessServiceError(err, "Blockstorage", "UpdateVolume", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVolumeBackup Updates the display name for the specified volume backup. +// Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeBackup.go.html to see an example of how to use UpdateVolumeBackup API. +func (client BlockstorageClient) UpdateVolumeBackup(ctx context.Context, request UpdateVolumeBackupRequest) (response UpdateVolumeBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVolumeBackup, policy) + if err != nil { + if ociResponse != nil { + response = UpdateVolumeBackupResponse{RawResponse: ociResponse.HTTPResponse()} + } + return + } + if convertedResponse, ok := ociResponse.(UpdateVolumeBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVolumeBackupResponse") + } + return +} + +// updateVolumeBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateVolumeBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/volumeBackups/{volumeBackupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateVolumeBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "UpdateVolumeBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeBackup/UpdateVolumeBackup" + err = common.PostProcessServiceError(err, "Blockstorage", "UpdateVolumeBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVolumeBackupPolicy Updates a user defined backup policy. +// +// For more information about user defined backup policies, +// see Policy-Based Backups (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#UserDefinedBackupPolicies). +// Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeBackupPolicy.go.html to see an example of how to use UpdateVolumeBackupPolicy API. +func (client BlockstorageClient) UpdateVolumeBackupPolicy(ctx context.Context, request UpdateVolumeBackupPolicyRequest) (response UpdateVolumeBackupPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateVolumeBackupPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateVolumeBackupPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateVolumeBackupPolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateVolumeBackupPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVolumeBackupPolicyResponse") + } + return +} + +// updateVolumeBackupPolicy implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateVolumeBackupPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/volumeBackupPolicies/{policyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateVolumeBackupPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "UpdateVolumeBackupPolicy") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeBackupPolicy/UpdateVolumeBackupPolicy" + err = common.PostProcessServiceError(err, "Blockstorage", "UpdateVolumeBackupPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVolumeGroup Updates the set of volumes in a volume group along with the display name. Use this operation +// to add or remove volumes in a volume group. Specify the full list of volume IDs to include in the +// volume group. If the volume ID is not specified in the call, it will be removed from the volume group. +// Avoid entering confidential information. +// For more information, see Volume Groups (https://docs.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeGroup.go.html to see an example of how to use UpdateVolumeGroup API. +func (client BlockstorageClient) UpdateVolumeGroup(ctx context.Context, request UpdateVolumeGroupRequest) (response UpdateVolumeGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVolumeGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateVolumeGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateVolumeGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateVolumeGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVolumeGroupResponse") + } + return +} + +// updateVolumeGroup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateVolumeGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/volumeGroups/{volumeGroupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateVolumeGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "UpdateVolumeGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeGroup/UpdateVolumeGroup" + err = common.PostProcessServiceError(err, "Blockstorage", "UpdateVolumeGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVolumeGroupBackup Updates the display name for the specified volume group backup. For more information, see Volume Groups (https://docs.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeGroupBackup.go.html to see an example of how to use UpdateVolumeGroupBackup API. +func (client BlockstorageClient) UpdateVolumeGroupBackup(ctx context.Context, request UpdateVolumeGroupBackupRequest) (response UpdateVolumeGroupBackupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVolumeGroupBackup, policy) + if err != nil { + if ociResponse != nil { + response = UpdateVolumeGroupBackupResponse{RawResponse: ociResponse.HTTPResponse()} + } + return + } + if convertedResponse, ok := ociResponse.(UpdateVolumeGroupBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVolumeGroupBackupResponse") + } + return +} + +// updateVolumeGroupBackup implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateVolumeGroupBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/volumeGroupBackups/{volumeGroupBackupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateVolumeGroupBackupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "UpdateVolumeGroupBackup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeGroupBackup/UpdateVolumeGroupBackup" + err = common.PostProcessServiceError(err, "Blockstorage", "UpdateVolumeGroupBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVolumeKmsKey Updates the specified volume with a new Key Management master encryption key. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeKmsKey.go.html to see an example of how to use UpdateVolumeKmsKey API. +func (client BlockstorageClient) UpdateVolumeKmsKey(ctx context.Context, request UpdateVolumeKmsKeyRequest) (response UpdateVolumeKmsKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVolumeKmsKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateVolumeKmsKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateVolumeKmsKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateVolumeKmsKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVolumeKmsKeyResponse") + } + return +} + +// updateVolumeKmsKey implements the OCIOperation interface (enables retrying operations) +func (client BlockstorageClient) updateVolumeKmsKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/volumes/{volumeId}/kmsKey", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateVolumeKmsKeyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "blockstorage", "UpdateVolumeKmsKey") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeKmsKey/UpdateVolumeKmsKey" + err = common.PostProcessServiceError(err, "Blockstorage", "UpdateVolumeKmsKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/core_compute_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_compute_client.go new file mode 100644 index 000000000..1e758129f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_compute_client.go @@ -0,0 +1,8871 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// ComputeClient a client for Compute +type ComputeClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewComputeClientWithConfigurationProvider Creates a new default Compute client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewComputeClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ComputeClient, err error) { + if enabled := common.CheckForEnabledServices("core"); !enabled { + return client, fmt.Errorf("the Developer Tool configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local developer-tool-configuration.json file configured the service you're targeting or contact the cloud provider on the availability of this service") + } + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newComputeClientFromBaseClient(baseClient, provider) +} + +// NewComputeClientWithOboToken Creates a new default Compute client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// +// as well as reading the region +func NewComputeClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client ComputeClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newComputeClientFromBaseClient(baseClient, configProvider) +} + +func newComputeClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client ComputeClient, err error) { + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = ComputeClient{BaseClient: baseClient} + client.BasePath = "20160918" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *ComputeClient) SetRegion(region string) { + client.Host, _ = common.StringToRegion(region).EndpointForTemplateDottedRegion("iaas", "https://iaas.{region}.{dualStack?ds.oci.:}{secondLevelDomain}", "iaas") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *ComputeClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *ComputeClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// EnableDualStackEndpoints Determines whether dual stack endpoint should be used or not. +// Default value is false +func (client *ComputeClient) EnableDualStackEndpoints(enableDualStack bool) { + client.BaseClient.EnableDualStackEndpoints(enableDualStack) +} + +// AcceptShieldedIntegrityPolicy Accept the changes to the PCR values in the measured boot report. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AcceptShieldedIntegrityPolicy.go.html to see an example of how to use AcceptShieldedIntegrityPolicy API. +func (client ComputeClient) AcceptShieldedIntegrityPolicy(ctx context.Context, request AcceptShieldedIntegrityPolicyRequest) (response AcceptShieldedIntegrityPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.acceptShieldedIntegrityPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AcceptShieldedIntegrityPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AcceptShieldedIntegrityPolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AcceptShieldedIntegrityPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AcceptShieldedIntegrityPolicyResponse") + } + return +} + +// acceptShieldedIntegrityPolicy implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) acceptShieldedIntegrityPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instances/{instanceId}/actions/acceptShieldedIntegrityPolicy", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AcceptShieldedIntegrityPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "AcceptShieldedIntegrityPolicy") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/MeasuredBootReport/AcceptShieldedIntegrityPolicy" + err = common.PostProcessServiceError(err, "Compute", "AcceptShieldedIntegrityPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AddImageShapeCompatibilityEntry Adds a shape to the compatible shapes list for the image. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddImageShapeCompatibilityEntry.go.html to see an example of how to use AddImageShapeCompatibilityEntry API. +func (client ComputeClient) AddImageShapeCompatibilityEntry(ctx context.Context, request AddImageShapeCompatibilityEntryRequest) (response AddImageShapeCompatibilityEntryResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.addImageShapeCompatibilityEntry, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AddImageShapeCompatibilityEntryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AddImageShapeCompatibilityEntryResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AddImageShapeCompatibilityEntryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AddImageShapeCompatibilityEntryResponse") + } + return +} + +// addImageShapeCompatibilityEntry implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) addImageShapeCompatibilityEntry(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/images/{imageId}/shapes/{shapeName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AddImageShapeCompatibilityEntryResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "AddImageShapeCompatibilityEntry") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ImageShapeCompatibilityEntry/AddImageShapeCompatibilityEntry" + err = common.PostProcessServiceError(err, "Compute", "AddImageShapeCompatibilityEntry", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ApplyHostConfiguration Triggers the asynchronous process that applies the host's target configuration +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ApplyHostConfiguration.go.html to see an example of how to use ApplyHostConfiguration API. +// A default retry strategy applies to this operation ApplyHostConfiguration() +func (client ComputeClient) ApplyHostConfiguration(ctx context.Context, request ApplyHostConfigurationRequest) (response ApplyHostConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.applyHostConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ApplyHostConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ApplyHostConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ApplyHostConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ApplyHostConfigurationResponse") + } + return +} + +// applyHostConfiguration implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) applyHostConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeHosts/{computeHostId}/actions/applyConfiguration", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ApplyHostConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ApplyHostConfiguration") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/ApplyHostConfiguration" + err = common.PostProcessServiceError(err, "Compute", "ApplyHostConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AttachBootVolume Attaches the specified boot volume to the specified instance. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachBootVolume.go.html to see an example of how to use AttachBootVolume API. +func (client ComputeClient) AttachBootVolume(ctx context.Context, request AttachBootVolumeRequest) (response AttachBootVolumeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.attachBootVolume, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AttachBootVolumeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AttachBootVolumeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AttachBootVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AttachBootVolumeResponse") + } + return +} + +// attachBootVolume implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) attachBootVolume(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bootVolumeAttachments", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AttachBootVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "AttachBootVolume") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolumeAttachment/AttachBootVolume" + err = common.PostProcessServiceError(err, "Compute", "AttachBootVolume", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AttachComputeHostGroupHost Attaches the Compute BM Host to a Host group +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachComputeHostGroupHost.go.html to see an example of how to use AttachComputeHostGroupHost API. +// A default retry strategy applies to this operation AttachComputeHostGroupHost() +func (client ComputeClient) AttachComputeHostGroupHost(ctx context.Context, request AttachComputeHostGroupHostRequest) (response AttachComputeHostGroupHostResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.attachComputeHostGroupHost, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AttachComputeHostGroupHostResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AttachComputeHostGroupHostResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AttachComputeHostGroupHostResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AttachComputeHostGroupHostResponse") + } + return +} + +// attachComputeHostGroupHost implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) attachComputeHostGroupHost(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeHosts/{computeHostId}/actions/attachToHostGroup", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AttachComputeHostGroupHostResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "AttachComputeHostGroupHost") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/AttachComputeHostGroupHost" + err = common.PostProcessServiceError(err, "Compute", "AttachComputeHostGroupHost", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AttachVnic Creates a secondary VNIC and attaches it to the specified instance. +// For more information about secondary VNICs, see +// Virtual Network Interface Cards (VNICs) (https://docs.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachVnic.go.html to see an example of how to use AttachVnic API. +func (client ComputeClient) AttachVnic(ctx context.Context, request AttachVnicRequest) (response AttachVnicResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.attachVnic, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AttachVnicResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AttachVnicResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AttachVnicResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AttachVnicResponse") + } + return +} + +// attachVnic implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) attachVnic(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/vnicAttachments", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AttachVnicResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "AttachVnic") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VnicAttachment/AttachVnic" + err = common.PostProcessServiceError(err, "Compute", "AttachVnic", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AttachVolume Attaches the specified storage volume to the specified instance. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachVolume.go.html to see an example of how to use AttachVolume API. +func (client ComputeClient) AttachVolume(ctx context.Context, request AttachVolumeRequest) (response AttachVolumeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.attachVolume, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AttachVolumeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AttachVolumeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AttachVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AttachVolumeResponse") + } + return +} + +// attachVolume implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) attachVolume(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/volumeAttachments", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AttachVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "AttachVolume") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeAttachment/AttachVolume" + err = common.PostProcessServiceError(err, "Compute", "AttachVolume", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &volumeattachment{}) + return response, err +} + +// CaptureConsoleHistory Captures the most recent serial console data (up to a megabyte) for the +// specified instance. +// The `CaptureConsoleHistory` operation works with the other console history operations +// as described below. +// 1. Use `CaptureConsoleHistory` to request the capture of up to a megabyte of the +// most recent console history. This call returns a `ConsoleHistory` +// object. The object will have a state of REQUESTED. +// 2. Wait for the capture operation to succeed by polling `GetConsoleHistory` with +// the identifier of the console history metadata. The state of the +// `ConsoleHistory` object will go from REQUESTED to GETTING-HISTORY and +// then SUCCEEDED (or FAILED). +// 3. Use `GetConsoleHistoryContent` to get the actual console history data (not the +// metadata). +// 4. Optionally, use `DeleteConsoleHistory` to delete the console history metadata +// and the console history data. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CaptureConsoleHistory.go.html to see an example of how to use CaptureConsoleHistory API. +func (client ComputeClient) CaptureConsoleHistory(ctx context.Context, request CaptureConsoleHistoryRequest) (response CaptureConsoleHistoryResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.captureConsoleHistory, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CaptureConsoleHistoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CaptureConsoleHistoryResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CaptureConsoleHistoryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CaptureConsoleHistoryResponse") + } + return +} + +// captureConsoleHistory implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) captureConsoleHistory(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instanceConsoleHistories", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CaptureConsoleHistoryResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "CaptureConsoleHistory") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ConsoleHistory/CaptureConsoleHistory" + err = common.PostProcessServiceError(err, "Compute", "CaptureConsoleHistory", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeComputeCapacityReservationCompartment Moves a compute capacity reservation into a different compartment. For information about +// moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeCapacityReservationCompartment.go.html to see an example of how to use ChangeComputeCapacityReservationCompartment API. +func (client ComputeClient) ChangeComputeCapacityReservationCompartment(ctx context.Context, request ChangeComputeCapacityReservationCompartmentRequest) (response ChangeComputeCapacityReservationCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeComputeCapacityReservationCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeComputeCapacityReservationCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeComputeCapacityReservationCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeComputeCapacityReservationCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeComputeCapacityReservationCompartmentResponse") + } + return +} + +// changeComputeCapacityReservationCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) changeComputeCapacityReservationCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeCapacityReservations/{capacityReservationId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeComputeCapacityReservationCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ChangeComputeCapacityReservationCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCapacityReservation/ChangeComputeCapacityReservationCompartment" + err = common.PostProcessServiceError(err, "Compute", "ChangeComputeCapacityReservationCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeComputeCapacityTopologyCompartment Moves a compute capacity topology into a different compartment. For information about moving resources between +// compartments, see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeCapacityTopologyCompartment.go.html to see an example of how to use ChangeComputeCapacityTopologyCompartment API. +// A default retry strategy applies to this operation ChangeComputeCapacityTopologyCompartment() +func (client ComputeClient) ChangeComputeCapacityTopologyCompartment(ctx context.Context, request ChangeComputeCapacityTopologyCompartmentRequest) (response ChangeComputeCapacityTopologyCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeComputeCapacityTopologyCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeComputeCapacityTopologyCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeComputeCapacityTopologyCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeComputeCapacityTopologyCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeComputeCapacityTopologyCompartmentResponse") + } + return +} + +// changeComputeCapacityTopologyCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) changeComputeCapacityTopologyCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeCapacityTopologies/{computeCapacityTopologyId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeComputeCapacityTopologyCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ChangeComputeCapacityTopologyCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCapacityTopology/ChangeComputeCapacityTopologyCompartment" + err = common.PostProcessServiceError(err, "Compute", "ChangeComputeCapacityTopologyCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeComputeClusterCompartment Moves a compute cluster into a different compartment within the same tenancy. +// A compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory access (RDMA) network group. +// For information about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeClusterCompartment.go.html to see an example of how to use ChangeComputeClusterCompartment API. +func (client ComputeClient) ChangeComputeClusterCompartment(ctx context.Context, request ChangeComputeClusterCompartmentRequest) (response ChangeComputeClusterCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeComputeClusterCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeComputeClusterCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeComputeClusterCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeComputeClusterCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeComputeClusterCompartmentResponse") + } + return +} + +// changeComputeClusterCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) changeComputeClusterCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeClusters/{computeClusterId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeComputeClusterCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ChangeComputeClusterCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCluster/ChangeComputeClusterCompartment" + err = common.PostProcessServiceError(err, "Compute", "ChangeComputeClusterCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeComputeGpuMemoryClusterCompartment Moves a compute GPU memory cluster into a different compartment. For information about moving resources between +// compartments, see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeGpuMemoryClusterCompartment.go.html to see an example of how to use ChangeComputeGpuMemoryClusterCompartment API. +// A default retry strategy applies to this operation ChangeComputeGpuMemoryClusterCompartment() +func (client ComputeClient) ChangeComputeGpuMemoryClusterCompartment(ctx context.Context, request ChangeComputeGpuMemoryClusterCompartmentRequest) (response ChangeComputeGpuMemoryClusterCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeComputeGpuMemoryClusterCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeComputeGpuMemoryClusterCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeComputeGpuMemoryClusterCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeComputeGpuMemoryClusterCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeComputeGpuMemoryClusterCompartmentResponse") + } + return +} + +// changeComputeGpuMemoryClusterCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) changeComputeGpuMemoryClusterCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeGpuMemoryClusters/{computeGpuMemoryClusterId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeComputeGpuMemoryClusterCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ChangeComputeGpuMemoryClusterCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/ChangeComputeGpuMemoryClusterCompartment" + err = common.PostProcessServiceError(err, "Compute", "ChangeComputeGpuMemoryClusterCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeComputeGpuMemoryFabricCompartment Moves a compute GPU memory fabric into a different compartment. For information about moving resources between +// compartments, see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeGpuMemoryFabricCompartment.go.html to see an example of how to use ChangeComputeGpuMemoryFabricCompartment API. +// A default retry strategy applies to this operation ChangeComputeGpuMemoryFabricCompartment() +func (client ComputeClient) ChangeComputeGpuMemoryFabricCompartment(ctx context.Context, request ChangeComputeGpuMemoryFabricCompartmentRequest) (response ChangeComputeGpuMemoryFabricCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeComputeGpuMemoryFabricCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeComputeGpuMemoryFabricCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeComputeGpuMemoryFabricCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeComputeGpuMemoryFabricCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeComputeGpuMemoryFabricCompartmentResponse") + } + return +} + +// changeComputeGpuMemoryFabricCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) changeComputeGpuMemoryFabricCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeGpuMemoryFabrics/{computeGpuMemoryFabricId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeComputeGpuMemoryFabricCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ChangeComputeGpuMemoryFabricCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryFabric/ChangeComputeGpuMemoryFabricCompartment" + err = common.PostProcessServiceError(err, "Compute", "ChangeComputeGpuMemoryFabricCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeComputeHostCompartment Moves a compute host into a different compartment. For information about moving resources between +// compartments, see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeHostCompartment.go.html to see an example of how to use ChangeComputeHostCompartment API. +// A default retry strategy applies to this operation ChangeComputeHostCompartment() +func (client ComputeClient) ChangeComputeHostCompartment(ctx context.Context, request ChangeComputeHostCompartmentRequest) (response ChangeComputeHostCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeComputeHostCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeComputeHostCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeComputeHostCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeComputeHostCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeComputeHostCompartmentResponse") + } + return +} + +// changeComputeHostCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) changeComputeHostCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeHosts/{computeHostId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeComputeHostCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ChangeComputeHostCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/ChangeComputeHostCompartment" + err = common.PostProcessServiceError(err, "Compute", "ChangeComputeHostCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeComputeHostGroupCompartment Moves a compute host group into a different compartment. For information about moving resources between +// compartments, see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeHostGroupCompartment.go.html to see an example of how to use ChangeComputeHostGroupCompartment API. +// A default retry strategy applies to this operation ChangeComputeHostGroupCompartment() +func (client ComputeClient) ChangeComputeHostGroupCompartment(ctx context.Context, request ChangeComputeHostGroupCompartmentRequest) (response ChangeComputeHostGroupCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeComputeHostGroupCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeComputeHostGroupCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeComputeHostGroupCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeComputeHostGroupCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeComputeHostGroupCompartmentResponse") + } + return +} + +// changeComputeHostGroupCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) changeComputeHostGroupCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeHostGroups/{computeHostGroupId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeComputeHostGroupCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ChangeComputeHostGroupCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHostGroup/ChangeComputeHostGroupCompartment" + err = common.PostProcessServiceError(err, "Compute", "ChangeComputeHostGroupCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeComputeImageCapabilitySchemaCompartment Moves a compute image capability schema into a different compartment within the same tenancy. +// For information about moving resources between compartments, see +// +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeImageCapabilitySchemaCompartment.go.html to see an example of how to use ChangeComputeImageCapabilitySchemaCompartment API. +// A default retry strategy applies to this operation ChangeComputeImageCapabilitySchemaCompartment() +func (client ComputeClient) ChangeComputeImageCapabilitySchemaCompartment(ctx context.Context, request ChangeComputeImageCapabilitySchemaCompartmentRequest) (response ChangeComputeImageCapabilitySchemaCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeComputeImageCapabilitySchemaCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeComputeImageCapabilitySchemaCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeComputeImageCapabilitySchemaCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeComputeImageCapabilitySchemaCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeComputeImageCapabilitySchemaCompartmentResponse") + } + return +} + +// changeComputeImageCapabilitySchemaCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) changeComputeImageCapabilitySchemaCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeImageCapabilitySchemas/{computeImageCapabilitySchemaId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeComputeImageCapabilitySchemaCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ChangeComputeImageCapabilitySchemaCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeImageCapabilitySchema/ChangeComputeImageCapabilitySchemaCompartment" + err = common.PostProcessServiceError(err, "Compute", "ChangeComputeImageCapabilitySchemaCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeDedicatedVmHostCompartment Moves a dedicated virtual machine host from one compartment to another. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeDedicatedVmHostCompartment.go.html to see an example of how to use ChangeDedicatedVmHostCompartment API. +func (client ComputeClient) ChangeDedicatedVmHostCompartment(ctx context.Context, request ChangeDedicatedVmHostCompartmentRequest) (response ChangeDedicatedVmHostCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeDedicatedVmHostCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeDedicatedVmHostCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeDedicatedVmHostCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeDedicatedVmHostCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeDedicatedVmHostCompartmentResponse") + } + return +} + +// changeDedicatedVmHostCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) changeDedicatedVmHostCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dedicatedVmHosts/{dedicatedVmHostId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeDedicatedVmHostCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ChangeDedicatedVmHostCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DedicatedVmHost/ChangeDedicatedVmHostCompartment" + err = common.PostProcessServiceError(err, "Compute", "ChangeDedicatedVmHostCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeImageCompartment Moves an image into a different compartment within the same tenancy. For information about moving +// resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeImageCompartment.go.html to see an example of how to use ChangeImageCompartment API. +// A default retry strategy applies to this operation ChangeImageCompartment() +func (client ComputeClient) ChangeImageCompartment(ctx context.Context, request ChangeImageCompartmentRequest) (response ChangeImageCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeImageCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeImageCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeImageCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeImageCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeImageCompartmentResponse") + } + return +} + +// changeImageCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) changeImageCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/images/{imageId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeImageCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ChangeImageCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Image/ChangeImageCompartment" + err = common.PostProcessServiceError(err, "Compute", "ChangeImageCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeInstanceCompartment Moves an instance into a different compartment within the same tenancy. For information about +// moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// When you move an instance to a different compartment, associated resources such as boot volumes and VNICs +// are not moved. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeInstanceCompartment.go.html to see an example of how to use ChangeInstanceCompartment API. +func (client ComputeClient) ChangeInstanceCompartment(ctx context.Context, request ChangeInstanceCompartmentRequest) (response ChangeInstanceCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeInstanceCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeInstanceCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeInstanceCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeInstanceCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeInstanceCompartmentResponse") + } + return +} + +// changeInstanceCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) changeInstanceCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instances/{instanceId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeInstanceCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ChangeInstanceCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Instance/ChangeInstanceCompartment" + err = common.PostProcessServiceError(err, "Compute", "ChangeInstanceCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CheckHostConfiguration Marks the host to be checked for conformance to its target configuration +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CheckHostConfiguration.go.html to see an example of how to use CheckHostConfiguration API. +// A default retry strategy applies to this operation CheckHostConfiguration() +func (client ComputeClient) CheckHostConfiguration(ctx context.Context, request CheckHostConfigurationRequest) (response CheckHostConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.checkHostConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CheckHostConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CheckHostConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CheckHostConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CheckHostConfigurationResponse") + } + return +} + +// checkHostConfiguration implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) checkHostConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeHosts/{computeHostId}/actions/checkConfiguration", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CheckHostConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "CheckHostConfiguration") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/CheckHostConfiguration" + err = common.PostProcessServiceError(err, "Compute", "CheckHostConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateAppCatalogSubscription Create a subscription for listing resource version for a compartment. It will take some time to propagate to all regions. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateAppCatalogSubscription.go.html to see an example of how to use CreateAppCatalogSubscription API. +// A default retry strategy applies to this operation CreateAppCatalogSubscription() +func (client ComputeClient) CreateAppCatalogSubscription(ctx context.Context, request CreateAppCatalogSubscriptionRequest) (response CreateAppCatalogSubscriptionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createAppCatalogSubscription, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateAppCatalogSubscriptionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateAppCatalogSubscriptionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateAppCatalogSubscriptionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateAppCatalogSubscriptionResponse") + } + return +} + +// createAppCatalogSubscription implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) createAppCatalogSubscription(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/appCatalogSubscriptions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateAppCatalogSubscriptionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "CreateAppCatalogSubscription") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/AppCatalogSubscription/CreateAppCatalogSubscription" + err = common.PostProcessServiceError(err, "Compute", "CreateAppCatalogSubscription", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateComputeCapacityReport Generates a report of the host capacity within an availability domain that is available for you +// to create compute instances. Host capacity is the physical infrastructure that resources such as compute +// instances run on. +// Use the capacity report to determine whether sufficient capacity is available for a shape before +// you create an instance or change the shape of an instance. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeCapacityReport.go.html to see an example of how to use CreateComputeCapacityReport API. +// A default retry strategy applies to this operation CreateComputeCapacityReport() +func (client ComputeClient) CreateComputeCapacityReport(ctx context.Context, request CreateComputeCapacityReportRequest) (response CreateComputeCapacityReportResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createComputeCapacityReport, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateComputeCapacityReportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateComputeCapacityReportResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateComputeCapacityReportResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateComputeCapacityReportResponse") + } + return +} + +// createComputeCapacityReport implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) createComputeCapacityReport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeCapacityReports", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateComputeCapacityReportResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "CreateComputeCapacityReport") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCapacityReport/CreateComputeCapacityReport" + err = common.PostProcessServiceError(err, "Compute", "CreateComputeCapacityReport", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateComputeCapacityReservation Creates a new compute capacity reservation in the specified compartment and availability domain. +// Compute capacity reservations let you reserve instances in a compartment. +// When you launch an instance using this reservation, you are assured that you have enough space for your instance, +// and you won't get out of capacity errors. +// For more information, see Reserved Capacity (https://docs.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeCapacityReservation.go.html to see an example of how to use CreateComputeCapacityReservation API. +func (client ComputeClient) CreateComputeCapacityReservation(ctx context.Context, request CreateComputeCapacityReservationRequest) (response CreateComputeCapacityReservationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createComputeCapacityReservation, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateComputeCapacityReservationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateComputeCapacityReservationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateComputeCapacityReservationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateComputeCapacityReservationResponse") + } + return +} + +// createComputeCapacityReservation implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) createComputeCapacityReservation(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeCapacityReservations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateComputeCapacityReservationResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "CreateComputeCapacityReservation") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Compute", "CreateComputeCapacityReservation", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateComputeCapacityTopology Creates a new compute capacity topology in the specified compartment and availability domain. +// Compute capacity topologies provide the RDMA network topology of your bare metal hosts so that you can launch +// instances on your bare metal hosts with targeted network locations. +// Compute capacity topologies report the health status of your bare metal hosts. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeCapacityTopology.go.html to see an example of how to use CreateComputeCapacityTopology API. +// A default retry strategy applies to this operation CreateComputeCapacityTopology() +func (client ComputeClient) CreateComputeCapacityTopology(ctx context.Context, request CreateComputeCapacityTopologyRequest) (response CreateComputeCapacityTopologyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createComputeCapacityTopology, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateComputeCapacityTopologyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateComputeCapacityTopologyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateComputeCapacityTopologyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateComputeCapacityTopologyResponse") + } + return +} + +// createComputeCapacityTopology implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) createComputeCapacityTopology(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeCapacityTopologies", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateComputeCapacityTopologyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "CreateComputeCapacityTopology") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Compute", "CreateComputeCapacityTopology", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateComputeCluster Creates an empty compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). A compute cluster +// is a remote direct memory access (RDMA) network group. +// After the compute cluster is created, you can use the compute cluster's OCID with the +// LaunchInstance operation to create instances in the compute cluster. +// The instances must be created in the same compartment and availability domain as the cluster. +// Use compute clusters when you want to manage instances in the cluster individually in the RDMA network group. +// If you want predictable capacity for a specific number of identical instances that are managed as a group, +// create a cluster network that uses instance pools by using the +// CreateClusterNetwork operation. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeCluster.go.html to see an example of how to use CreateComputeCluster API. +func (client ComputeClient) CreateComputeCluster(ctx context.Context, request CreateComputeClusterRequest) (response CreateComputeClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createComputeCluster, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateComputeClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateComputeClusterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateComputeClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateComputeClusterResponse") + } + return +} + +// createComputeCluster implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) createComputeCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeClusters", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateComputeClusterResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "CreateComputeCluster") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCluster/CreateComputeCluster" + err = common.PostProcessServiceError(err, "Compute", "CreateComputeCluster", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateComputeGpuMemoryCluster Create a compute GPU memory cluster instance on a specific compute GPU memory fabric +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeGpuMemoryCluster.go.html to see an example of how to use CreateComputeGpuMemoryCluster API. +// A default retry strategy applies to this operation CreateComputeGpuMemoryCluster() +func (client ComputeClient) CreateComputeGpuMemoryCluster(ctx context.Context, request CreateComputeGpuMemoryClusterRequest) (response CreateComputeGpuMemoryClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createComputeGpuMemoryCluster, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateComputeGpuMemoryClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateComputeGpuMemoryClusterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateComputeGpuMemoryClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateComputeGpuMemoryClusterResponse") + } + return +} + +// createComputeGpuMemoryCluster implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) createComputeGpuMemoryCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeGpuMemoryClusters", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateComputeGpuMemoryClusterResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "CreateComputeGpuMemoryCluster") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/CreateComputeGpuMemoryCluster" + err = common.PostProcessServiceError(err, "Compute", "CreateComputeGpuMemoryCluster", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateComputeHostGroup Creates a new compute host group in the specified compartment and availability domain. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeHostGroup.go.html to see an example of how to use CreateComputeHostGroup API. +// A default retry strategy applies to this operation CreateComputeHostGroup() +func (client ComputeClient) CreateComputeHostGroup(ctx context.Context, request CreateComputeHostGroupRequest) (response CreateComputeHostGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createComputeHostGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateComputeHostGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateComputeHostGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateComputeHostGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateComputeHostGroupResponse") + } + return +} + +// createComputeHostGroup implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) createComputeHostGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeHostGroups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateComputeHostGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "CreateComputeHostGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHostGroup/CreateComputeHostGroup" + err = common.PostProcessServiceError(err, "Compute", "CreateComputeHostGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateComputeImageCapabilitySchema Creates compute image capability schema. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeImageCapabilitySchema.go.html to see an example of how to use CreateComputeImageCapabilitySchema API. +// A default retry strategy applies to this operation CreateComputeImageCapabilitySchema() +func (client ComputeClient) CreateComputeImageCapabilitySchema(ctx context.Context, request CreateComputeImageCapabilitySchemaRequest) (response CreateComputeImageCapabilitySchemaResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createComputeImageCapabilitySchema, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateComputeImageCapabilitySchemaResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateComputeImageCapabilitySchemaResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateComputeImageCapabilitySchemaResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateComputeImageCapabilitySchemaResponse") + } + return +} + +// createComputeImageCapabilitySchema implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) createComputeImageCapabilitySchema(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeImageCapabilitySchemas", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateComputeImageCapabilitySchemaResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "CreateComputeImageCapabilitySchema") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeImageCapabilitySchema/CreateComputeImageCapabilitySchema" + err = common.PostProcessServiceError(err, "Compute", "CreateComputeImageCapabilitySchema", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateDedicatedVmHost Creates a new dedicated virtual machine host in the specified compartment and the specified availability domain. +// Dedicated virtual machine hosts enable you to run your Compute virtual machine (VM) instances on dedicated servers +// that are a single tenant and not shared with other customers. +// For more information, see Dedicated Virtual Machine Hosts (https://docs.oracle.com/iaas/Content/Compute/Concepts/dedicatedvmhosts.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDedicatedVmHost.go.html to see an example of how to use CreateDedicatedVmHost API. +func (client ComputeClient) CreateDedicatedVmHost(ctx context.Context, request CreateDedicatedVmHostRequest) (response CreateDedicatedVmHostResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createDedicatedVmHost, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateDedicatedVmHostResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateDedicatedVmHostResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateDedicatedVmHostResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateDedicatedVmHostResponse") + } + return +} + +// createDedicatedVmHost implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) createDedicatedVmHost(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dedicatedVmHosts", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateDedicatedVmHostResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "CreateDedicatedVmHost") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DedicatedVmHost/CreateDedicatedVmHost" + err = common.PostProcessServiceError(err, "Compute", "CreateDedicatedVmHost", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateImage Creates a boot disk image for the specified instance or imports an exported image from the Oracle Cloud Infrastructure Object Storage service. +// When creating a new image, you must provide the OCID of the instance you want to use as the basis for the image, and +// the OCID of the compartment containing that instance. For more information about images, +// see Managing Custom Images (https://docs.oracle.com/iaas/Content/Compute/Tasks/managingcustomimages.htm). +// When importing an exported image from Object Storage, you specify the source information +// in ImageSourceDetails. +// When importing an image based on the namespace, bucket name, and object name, +// use ImageSourceViaObjectStorageTupleDetails. +// When importing an image based on the Object Storage URL, use +// ImageSourceViaObjectStorageUriDetails. +// See Object Storage URLs (https://docs.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm#URLs) and Using Pre-Authenticated Requests (https://docs.oracle.com/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm) +// for constructing URLs for image import/export. +// For more information about importing exported images, see +// Image Import/Export (https://docs.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm). +// You may optionally specify a *display name* for the image, which is simply a friendly name or description. +// It does not have to be unique, and you can change it. See UpdateImage. +// Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateImage.go.html to see an example of how to use CreateImage API. +// A default retry strategy applies to this operation CreateImage() +func (client ComputeClient) CreateImage(ctx context.Context, request CreateImageRequest) (response CreateImageResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createImage, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateImageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateImageResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateImageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateImageResponse") + } + return +} + +// createImage implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) createImage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/images", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateImageResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "CreateImage") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Image/CreateImage" + err = common.PostProcessServiceError(err, "Compute", "CreateImage", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateInstanceConsoleConnection Creates a new console connection to the specified instance. +// After the console connection has been created and is available, +// you connect to the console using SSH. +// For more information about instance console connections, see Troubleshooting Instances Using Instance Console Connections (https://docs.oracle.com/iaas/Content/Compute/References/serialconsole.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateInstanceConsoleConnection.go.html to see an example of how to use CreateInstanceConsoleConnection API. +func (client ComputeClient) CreateInstanceConsoleConnection(ctx context.Context, request CreateInstanceConsoleConnectionRequest) (response CreateInstanceConsoleConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createInstanceConsoleConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateInstanceConsoleConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateInstanceConsoleConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateInstanceConsoleConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateInstanceConsoleConnectionResponse") + } + return +} + +// createInstanceConsoleConnection implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) createInstanceConsoleConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instanceConsoleConnections", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateInstanceConsoleConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "CreateInstanceConsoleConnection") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceConsoleConnection/CreateInstanceConsoleConnection" + err = common.PostProcessServiceError(err, "Compute", "CreateInstanceConsoleConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteAppCatalogSubscription Delete a subscription for a listing resource version for a compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteAppCatalogSubscription.go.html to see an example of how to use DeleteAppCatalogSubscription API. +func (client ComputeClient) DeleteAppCatalogSubscription(ctx context.Context, request DeleteAppCatalogSubscriptionRequest) (response DeleteAppCatalogSubscriptionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteAppCatalogSubscription, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteAppCatalogSubscriptionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteAppCatalogSubscriptionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteAppCatalogSubscriptionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteAppCatalogSubscriptionResponse") + } + return +} + +// deleteAppCatalogSubscription implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteAppCatalogSubscription(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/appCatalogSubscriptions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteAppCatalogSubscriptionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DeleteAppCatalogSubscription") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Compute", "DeleteAppCatalogSubscription", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteComputeCapacityReservation Deletes the specified compute capacity reservation. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeCapacityReservation.go.html to see an example of how to use DeleteComputeCapacityReservation API. +func (client ComputeClient) DeleteComputeCapacityReservation(ctx context.Context, request DeleteComputeCapacityReservationRequest) (response DeleteComputeCapacityReservationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteComputeCapacityReservation, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteComputeCapacityReservationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteComputeCapacityReservationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteComputeCapacityReservationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteComputeCapacityReservationResponse") + } + return +} + +// deleteComputeCapacityReservation implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteComputeCapacityReservation(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/computeCapacityReservations/{capacityReservationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteComputeCapacityReservationResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DeleteComputeCapacityReservation") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCapacityReservation/DeleteComputeCapacityReservation" + err = common.PostProcessServiceError(err, "Compute", "DeleteComputeCapacityReservation", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteComputeCapacityTopology Deletes the specified compute capacity topology. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeCapacityTopology.go.html to see an example of how to use DeleteComputeCapacityTopology API. +// A default retry strategy applies to this operation DeleteComputeCapacityTopology() +func (client ComputeClient) DeleteComputeCapacityTopology(ctx context.Context, request DeleteComputeCapacityTopologyRequest) (response DeleteComputeCapacityTopologyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteComputeCapacityTopology, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteComputeCapacityTopologyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteComputeCapacityTopologyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteComputeCapacityTopologyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteComputeCapacityTopologyResponse") + } + return +} + +// deleteComputeCapacityTopology implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteComputeCapacityTopology(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/computeCapacityTopologies/{computeCapacityTopologyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteComputeCapacityTopologyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DeleteComputeCapacityTopology") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCapacityTopology/DeleteComputeCapacityTopology" + err = common.PostProcessServiceError(err, "Compute", "DeleteComputeCapacityTopology", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteComputeCluster Deletes a compute cluster. A compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a +// remote direct memory access (RDMA) network group. +// Before you delete a compute cluster, first delete all instances in the cluster by using +// the TerminateInstance operation. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeCluster.go.html to see an example of how to use DeleteComputeCluster API. +func (client ComputeClient) DeleteComputeCluster(ctx context.Context, request DeleteComputeClusterRequest) (response DeleteComputeClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteComputeCluster, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteComputeClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteComputeClusterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteComputeClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteComputeClusterResponse") + } + return +} + +// deleteComputeCluster implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteComputeCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/computeClusters/{computeClusterId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteComputeClusterResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DeleteComputeCluster") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCluster/DeleteComputeCluster" + err = common.PostProcessServiceError(err, "Compute", "DeleteComputeCluster", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteComputeGpuMemoryCluster Terminates and deletes the specified compute GPU memory cluster and underlying instances. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeGpuMemoryCluster.go.html to see an example of how to use DeleteComputeGpuMemoryCluster API. +// A default retry strategy applies to this operation DeleteComputeGpuMemoryCluster() +func (client ComputeClient) DeleteComputeGpuMemoryCluster(ctx context.Context, request DeleteComputeGpuMemoryClusterRequest) (response DeleteComputeGpuMemoryClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteComputeGpuMemoryCluster, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteComputeGpuMemoryClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteComputeGpuMemoryClusterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteComputeGpuMemoryClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteComputeGpuMemoryClusterResponse") + } + return +} + +// deleteComputeGpuMemoryCluster implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteComputeGpuMemoryCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/computeGpuMemoryClusters/{computeGpuMemoryClusterId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteComputeGpuMemoryClusterResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DeleteComputeGpuMemoryCluster") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/DeleteComputeGpuMemoryCluster" + err = common.PostProcessServiceError(err, "Compute", "DeleteComputeGpuMemoryCluster", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteComputeHostGroup Deletes the specified compute host group +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeHostGroup.go.html to see an example of how to use DeleteComputeHostGroup API. +func (client ComputeClient) DeleteComputeHostGroup(ctx context.Context, request DeleteComputeHostGroupRequest) (response DeleteComputeHostGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteComputeHostGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteComputeHostGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteComputeHostGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteComputeHostGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteComputeHostGroupResponse") + } + return +} + +// deleteComputeHostGroup implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteComputeHostGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/computeHostGroups/{computeHostGroupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteComputeHostGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DeleteComputeHostGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHostGroup/DeleteComputeHostGroup" + err = common.PostProcessServiceError(err, "Compute", "DeleteComputeHostGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteComputeImageCapabilitySchema Deletes the specified Compute Image Capability Schema +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeImageCapabilitySchema.go.html to see an example of how to use DeleteComputeImageCapabilitySchema API. +func (client ComputeClient) DeleteComputeImageCapabilitySchema(ctx context.Context, request DeleteComputeImageCapabilitySchemaRequest) (response DeleteComputeImageCapabilitySchemaResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteComputeImageCapabilitySchema, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteComputeImageCapabilitySchemaResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteComputeImageCapabilitySchemaResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteComputeImageCapabilitySchemaResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteComputeImageCapabilitySchemaResponse") + } + return +} + +// deleteComputeImageCapabilitySchema implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteComputeImageCapabilitySchema(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/computeImageCapabilitySchemas/{computeImageCapabilitySchemaId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteComputeImageCapabilitySchemaResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DeleteComputeImageCapabilitySchema") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeImageCapabilitySchema/DeleteComputeImageCapabilitySchema" + err = common.PostProcessServiceError(err, "Compute", "DeleteComputeImageCapabilitySchema", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteConsoleHistory Deletes the specified console history metadata and the console history data. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteConsoleHistory.go.html to see an example of how to use DeleteConsoleHistory API. +func (client ComputeClient) DeleteConsoleHistory(ctx context.Context, request DeleteConsoleHistoryRequest) (response DeleteConsoleHistoryResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteConsoleHistory, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteConsoleHistoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteConsoleHistoryResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteConsoleHistoryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteConsoleHistoryResponse") + } + return +} + +// deleteConsoleHistory implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteConsoleHistory(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/instanceConsoleHistories/{instanceConsoleHistoryId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteConsoleHistoryResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DeleteConsoleHistory") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ConsoleHistory/DeleteConsoleHistory" + err = common.PostProcessServiceError(err, "Compute", "DeleteConsoleHistory", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteDedicatedVmHost Deletes the specified dedicated virtual machine host. +// If any VM instances are assigned to the dedicated virtual machine host, +// the delete operation will fail and the service will return a 409 response code. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDedicatedVmHost.go.html to see an example of how to use DeleteDedicatedVmHost API. +func (client ComputeClient) DeleteDedicatedVmHost(ctx context.Context, request DeleteDedicatedVmHostRequest) (response DeleteDedicatedVmHostResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteDedicatedVmHost, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteDedicatedVmHostResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteDedicatedVmHostResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteDedicatedVmHostResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDedicatedVmHostResponse") + } + return +} + +// deleteDedicatedVmHost implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteDedicatedVmHost(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/dedicatedVmHosts/{dedicatedVmHostId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteDedicatedVmHostResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DeleteDedicatedVmHost") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DedicatedVmHost/DeleteDedicatedVmHost" + err = common.PostProcessServiceError(err, "Compute", "DeleteDedicatedVmHost", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteImage Deletes an image. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteImage.go.html to see an example of how to use DeleteImage API. +func (client ComputeClient) DeleteImage(ctx context.Context, request DeleteImageRequest) (response DeleteImageResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteImage, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteImageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteImageResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteImageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteImageResponse") + } + return +} + +// deleteImage implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteImage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/images/{imageId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteImageResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DeleteImage") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Compute", "DeleteImage", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteInstanceConsoleConnection Deletes the specified instance console connection. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteInstanceConsoleConnection.go.html to see an example of how to use DeleteInstanceConsoleConnection API. +func (client ComputeClient) DeleteInstanceConsoleConnection(ctx context.Context, request DeleteInstanceConsoleConnectionRequest) (response DeleteInstanceConsoleConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteInstanceConsoleConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteInstanceConsoleConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteInstanceConsoleConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteInstanceConsoleConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteInstanceConsoleConnectionResponse") + } + return +} + +// deleteInstanceConsoleConnection implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteInstanceConsoleConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/instanceConsoleConnections/{instanceConsoleConnectionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteInstanceConsoleConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DeleteInstanceConsoleConnection") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceConsoleConnection/DeleteInstanceConsoleConnection" + err = common.PostProcessServiceError(err, "Compute", "DeleteInstanceConsoleConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DetachBootVolume Detaches a boot volume from an instance. You must specify the OCID of the boot volume attachment. +// This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily +// until the attachment is completely removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachBootVolume.go.html to see an example of how to use DetachBootVolume API. +func (client ComputeClient) DetachBootVolume(ctx context.Context, request DetachBootVolumeRequest) (response DetachBootVolumeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.detachBootVolume, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DetachBootVolumeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DetachBootVolumeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DetachBootVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DetachBootVolumeResponse") + } + return +} + +// detachBootVolume implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) detachBootVolume(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/bootVolumeAttachments/{bootVolumeAttachmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DetachBootVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DetachBootVolume") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Compute", "DetachBootVolume", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DetachComputeHostGroupHost Detaches the specified bare metal host from the compute host group +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachComputeHostGroupHost.go.html to see an example of how to use DetachComputeHostGroupHost API. +// A default retry strategy applies to this operation DetachComputeHostGroupHost() +func (client ComputeClient) DetachComputeHostGroupHost(ctx context.Context, request DetachComputeHostGroupHostRequest) (response DetachComputeHostGroupHostResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.detachComputeHostGroupHost, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DetachComputeHostGroupHostResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DetachComputeHostGroupHostResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DetachComputeHostGroupHostResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DetachComputeHostGroupHostResponse") + } + return +} + +// detachComputeHostGroupHost implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) detachComputeHostGroupHost(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeHosts/{computeHostId}/actions/detachFromHostGroup", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DetachComputeHostGroupHostResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DetachComputeHostGroupHost") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/DetachComputeHostGroupHost" + err = common.PostProcessServiceError(err, "Compute", "DetachComputeHostGroupHost", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DetachVnic Detaches and deletes the specified secondary VNIC. +// This operation cannot be used on the instance's primary VNIC. +// When you terminate an instance, all attached VNICs (primary +// and secondary) are automatically detached and deleted. +// **Important:** If the VNIC has a +// PrivateIp that is the +// target of a route rule (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#privateip), +// deleting the VNIC causes that route rule to blackhole and the traffic +// will be dropped. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachVnic.go.html to see an example of how to use DetachVnic API. +func (client ComputeClient) DetachVnic(ctx context.Context, request DetachVnicRequest) (response DetachVnicResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.detachVnic, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DetachVnicResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DetachVnicResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DetachVnicResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DetachVnicResponse") + } + return +} + +// detachVnic implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) detachVnic(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/vnicAttachments/{vnicAttachmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DetachVnicResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DetachVnic") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VnicAttachment/DetachVnic" + err = common.PostProcessServiceError(err, "Compute", "DetachVnic", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DetachVolume Detaches a storage volume from an instance. You must specify the OCID of the volume attachment. +// This is an asynchronous operation. The attachment's `lifecycleState` will change to DETACHING temporarily +// until the attachment is completely removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachVolume.go.html to see an example of how to use DetachVolume API. +func (client ComputeClient) DetachVolume(ctx context.Context, request DetachVolumeRequest) (response DetachVolumeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.detachVolume, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DetachVolumeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DetachVolumeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DetachVolumeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DetachVolumeResponse") + } + return +} + +// detachVolume implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) detachVolume(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/volumeAttachments/{volumeAttachmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DetachVolumeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "DetachVolume") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeAttachment/DetachVolume" + err = common.PostProcessServiceError(err, "Compute", "DetachVolume", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ExportImage Exports the specified image to the Oracle Cloud Infrastructure Object Storage service. You can use the Object Storage URL, +// or the namespace, bucket name, and object name when specifying the location to export to. +// For more information about exporting images, see Image Import/Export (https://docs.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm). +// To perform an image export, you need write access to the Object Storage bucket for the image, +// see Let Users Write Objects to Object Storage Buckets (https://docs.oracle.com/iaas/Content/Identity/Concepts/commonpolicies.htm#Let4). +// See Object Storage URLs (https://docs.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm#URLs) and Using Pre-Authenticated Requests (https://docs.oracle.com/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm) +// for constructing URLs for image import/export. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ExportImage.go.html to see an example of how to use ExportImage API. +// A default retry strategy applies to this operation ExportImage() +func (client ComputeClient) ExportImage(ctx context.Context, request ExportImageRequest) (response ExportImageResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.exportImage, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ExportImageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ExportImageResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ExportImageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ExportImageResponse") + } + return +} + +// exportImage implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) exportImage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/images/{imageId}/actions/export", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ExportImageResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ExportImage") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Image/ExportImage" + err = common.PostProcessServiceError(err, "Compute", "ExportImage", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetAppCatalogListing Gets the specified listing. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAppCatalogListing.go.html to see an example of how to use GetAppCatalogListing API. +// A default retry strategy applies to this operation GetAppCatalogListing() +func (client ComputeClient) GetAppCatalogListing(ctx context.Context, request GetAppCatalogListingRequest) (response GetAppCatalogListingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getAppCatalogListing, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAppCatalogListingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAppCatalogListingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAppCatalogListingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAppCatalogListingResponse") + } + return +} + +// getAppCatalogListing implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getAppCatalogListing(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/appCatalogListings/{listingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetAppCatalogListingResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetAppCatalogListing") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/AppCatalogListing/GetAppCatalogListing" + err = common.PostProcessServiceError(err, "Compute", "GetAppCatalogListing", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetAppCatalogListingAgreements Retrieves the agreements for a particular resource version of a listing. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAppCatalogListingAgreements.go.html to see an example of how to use GetAppCatalogListingAgreements API. +// A default retry strategy applies to this operation GetAppCatalogListingAgreements() +func (client ComputeClient) GetAppCatalogListingAgreements(ctx context.Context, request GetAppCatalogListingAgreementsRequest) (response GetAppCatalogListingAgreementsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getAppCatalogListingAgreements, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAppCatalogListingAgreementsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAppCatalogListingAgreementsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAppCatalogListingAgreementsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAppCatalogListingAgreementsResponse") + } + return +} + +// getAppCatalogListingAgreements implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getAppCatalogListingAgreements(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/appCatalogListings/{listingId}/resourceVersions/{resourceVersion}/agreements", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetAppCatalogListingAgreementsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetAppCatalogListingAgreements") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/AppCatalogListingResourceVersionAgreements/GetAppCatalogListingAgreements" + err = common.PostProcessServiceError(err, "Compute", "GetAppCatalogListingAgreements", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetAppCatalogListingResourceVersion Gets the specified listing resource version. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAppCatalogListingResourceVersion.go.html to see an example of how to use GetAppCatalogListingResourceVersion API. +// A default retry strategy applies to this operation GetAppCatalogListingResourceVersion() +func (client ComputeClient) GetAppCatalogListingResourceVersion(ctx context.Context, request GetAppCatalogListingResourceVersionRequest) (response GetAppCatalogListingResourceVersionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getAppCatalogListingResourceVersion, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAppCatalogListingResourceVersionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAppCatalogListingResourceVersionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAppCatalogListingResourceVersionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAppCatalogListingResourceVersionResponse") + } + return +} + +// getAppCatalogListingResourceVersion implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getAppCatalogListingResourceVersion(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/appCatalogListings/{listingId}/resourceVersions/{resourceVersion}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetAppCatalogListingResourceVersionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetAppCatalogListingResourceVersion") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/AppCatalogListingResourceVersion/GetAppCatalogListingResourceVersion" + err = common.PostProcessServiceError(err, "Compute", "GetAppCatalogListingResourceVersion", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetBootVolumeAttachment Gets information about the specified boot volume attachment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolumeAttachment.go.html to see an example of how to use GetBootVolumeAttachment API. +func (client ComputeClient) GetBootVolumeAttachment(ctx context.Context, request GetBootVolumeAttachmentRequest) (response GetBootVolumeAttachmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBootVolumeAttachment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetBootVolumeAttachmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetBootVolumeAttachmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetBootVolumeAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBootVolumeAttachmentResponse") + } + return +} + +// getBootVolumeAttachment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getBootVolumeAttachment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumeAttachments/{bootVolumeAttachmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetBootVolumeAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetBootVolumeAttachment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolumeAttachment/GetBootVolumeAttachment" + err = common.PostProcessServiceError(err, "Compute", "GetBootVolumeAttachment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetComputeCapacityReservation Gets information about the specified compute capacity reservation. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeCapacityReservation.go.html to see an example of how to use GetComputeCapacityReservation API. +func (client ComputeClient) GetComputeCapacityReservation(ctx context.Context, request GetComputeCapacityReservationRequest) (response GetComputeCapacityReservationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getComputeCapacityReservation, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetComputeCapacityReservationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetComputeCapacityReservationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetComputeCapacityReservationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetComputeCapacityReservationResponse") + } + return +} + +// getComputeCapacityReservation implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getComputeCapacityReservation(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeCapacityReservations/{capacityReservationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetComputeCapacityReservationResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetComputeCapacityReservation") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCapacityReservation/GetComputeCapacityReservation" + err = common.PostProcessServiceError(err, "Compute", "GetComputeCapacityReservation", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetComputeCapacityTopology Gets information about the specified compute capacity topology. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeCapacityTopology.go.html to see an example of how to use GetComputeCapacityTopology API. +// A default retry strategy applies to this operation GetComputeCapacityTopology() +func (client ComputeClient) GetComputeCapacityTopology(ctx context.Context, request GetComputeCapacityTopologyRequest) (response GetComputeCapacityTopologyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getComputeCapacityTopology, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetComputeCapacityTopologyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetComputeCapacityTopologyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetComputeCapacityTopologyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetComputeCapacityTopologyResponse") + } + return +} + +// getComputeCapacityTopology implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getComputeCapacityTopology(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeCapacityTopologies/{computeCapacityTopologyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetComputeCapacityTopologyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetComputeCapacityTopology") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCapacityTopology/GetComputeCapacityTopology" + err = common.PostProcessServiceError(err, "Compute", "GetComputeCapacityTopology", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetComputeCluster Gets information about a compute cluster. A compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) +// is a remote direct memory access (RDMA) network group. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeCluster.go.html to see an example of how to use GetComputeCluster API. +func (client ComputeClient) GetComputeCluster(ctx context.Context, request GetComputeClusterRequest) (response GetComputeClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getComputeCluster, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetComputeClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetComputeClusterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetComputeClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetComputeClusterResponse") + } + return +} + +// getComputeCluster implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getComputeCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeClusters/{computeClusterId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetComputeClusterResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetComputeCluster") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCluster/GetComputeCluster" + err = common.PostProcessServiceError(err, "Compute", "GetComputeCluster", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetComputeGlobalImageCapabilitySchema Gets the specified Compute Global Image Capability Schema +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeGlobalImageCapabilitySchema.go.html to see an example of how to use GetComputeGlobalImageCapabilitySchema API. +// A default retry strategy applies to this operation GetComputeGlobalImageCapabilitySchema() +func (client ComputeClient) GetComputeGlobalImageCapabilitySchema(ctx context.Context, request GetComputeGlobalImageCapabilitySchemaRequest) (response GetComputeGlobalImageCapabilitySchemaResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getComputeGlobalImageCapabilitySchema, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetComputeGlobalImageCapabilitySchemaResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetComputeGlobalImageCapabilitySchemaResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetComputeGlobalImageCapabilitySchemaResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetComputeGlobalImageCapabilitySchemaResponse") + } + return +} + +// getComputeGlobalImageCapabilitySchema implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getComputeGlobalImageCapabilitySchema(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeGlobalImageCapabilitySchemas/{computeGlobalImageCapabilitySchemaId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetComputeGlobalImageCapabilitySchemaResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetComputeGlobalImageCapabilitySchema") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGlobalImageCapabilitySchema/GetComputeGlobalImageCapabilitySchema" + err = common.PostProcessServiceError(err, "Compute", "GetComputeGlobalImageCapabilitySchema", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetComputeGlobalImageCapabilitySchemaVersion Gets the specified Compute Global Image Capability Schema Version +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeGlobalImageCapabilitySchemaVersion.go.html to see an example of how to use GetComputeGlobalImageCapabilitySchemaVersion API. +// A default retry strategy applies to this operation GetComputeGlobalImageCapabilitySchemaVersion() +func (client ComputeClient) GetComputeGlobalImageCapabilitySchemaVersion(ctx context.Context, request GetComputeGlobalImageCapabilitySchemaVersionRequest) (response GetComputeGlobalImageCapabilitySchemaVersionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getComputeGlobalImageCapabilitySchemaVersion, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetComputeGlobalImageCapabilitySchemaVersionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetComputeGlobalImageCapabilitySchemaVersionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetComputeGlobalImageCapabilitySchemaVersionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetComputeGlobalImageCapabilitySchemaVersionResponse") + } + return +} + +// getComputeGlobalImageCapabilitySchemaVersion implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getComputeGlobalImageCapabilitySchemaVersion(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeGlobalImageCapabilitySchemas/{computeGlobalImageCapabilitySchemaId}/versions/{computeGlobalImageCapabilitySchemaVersionName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetComputeGlobalImageCapabilitySchemaVersionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetComputeGlobalImageCapabilitySchemaVersion") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGlobalImageCapabilitySchemaVersion/GetComputeGlobalImageCapabilitySchemaVersion" + err = common.PostProcessServiceError(err, "Compute", "GetComputeGlobalImageCapabilitySchemaVersion", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetComputeGpuMemoryCluster Gets information about the specified compute GPU memory cluster +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeGpuMemoryCluster.go.html to see an example of how to use GetComputeGpuMemoryCluster API. +func (client ComputeClient) GetComputeGpuMemoryCluster(ctx context.Context, request GetComputeGpuMemoryClusterRequest) (response GetComputeGpuMemoryClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getComputeGpuMemoryCluster, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetComputeGpuMemoryClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetComputeGpuMemoryClusterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetComputeGpuMemoryClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetComputeGpuMemoryClusterResponse") + } + return +} + +// getComputeGpuMemoryCluster implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getComputeGpuMemoryCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeGpuMemoryClusters/{computeGpuMemoryClusterId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetComputeGpuMemoryClusterResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetComputeGpuMemoryCluster") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/GetComputeGpuMemoryCluster" + err = common.PostProcessServiceError(err, "Compute", "GetComputeGpuMemoryCluster", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetComputeGpuMemoryFabric Gets information about the specified compute GPU memory fabric +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeGpuMemoryFabric.go.html to see an example of how to use GetComputeGpuMemoryFabric API. +// A default retry strategy applies to this operation GetComputeGpuMemoryFabric() +func (client ComputeClient) GetComputeGpuMemoryFabric(ctx context.Context, request GetComputeGpuMemoryFabricRequest) (response GetComputeGpuMemoryFabricResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getComputeGpuMemoryFabric, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetComputeGpuMemoryFabricResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetComputeGpuMemoryFabricResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetComputeGpuMemoryFabricResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetComputeGpuMemoryFabricResponse") + } + return +} + +// getComputeGpuMemoryFabric implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getComputeGpuMemoryFabric(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeGpuMemoryFabrics/{computeGpuMemoryFabricId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetComputeGpuMemoryFabricResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetComputeGpuMemoryFabric") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryFabric/GetComputeGpuMemoryFabric" + err = common.PostProcessServiceError(err, "Compute", "GetComputeGpuMemoryFabric", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetComputeHost Gets information about the specified compute host +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeHost.go.html to see an example of how to use GetComputeHost API. +// A default retry strategy applies to this operation GetComputeHost() +func (client ComputeClient) GetComputeHost(ctx context.Context, request GetComputeHostRequest) (response GetComputeHostResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getComputeHost, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetComputeHostResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetComputeHostResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetComputeHostResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetComputeHostResponse") + } + return +} + +// getComputeHost implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getComputeHost(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeHosts/{computeHostId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetComputeHostResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetComputeHost") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/GetComputeHost" + err = common.PostProcessServiceError(err, "Compute", "GetComputeHost", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetComputeHostGroup Gets information about the specified compute host group +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeHostGroup.go.html to see an example of how to use GetComputeHostGroup API. +// A default retry strategy applies to this operation GetComputeHostGroup() +func (client ComputeClient) GetComputeHostGroup(ctx context.Context, request GetComputeHostGroupRequest) (response GetComputeHostGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getComputeHostGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetComputeHostGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetComputeHostGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetComputeHostGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetComputeHostGroupResponse") + } + return +} + +// getComputeHostGroup implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getComputeHostGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeHostGroups/{computeHostGroupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetComputeHostGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetComputeHostGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHostGroup/GetComputeHostGroup" + err = common.PostProcessServiceError(err, "Compute", "GetComputeHostGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetComputeImageCapabilitySchema Gets the specified Compute Image Capability Schema +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeImageCapabilitySchema.go.html to see an example of how to use GetComputeImageCapabilitySchema API. +// A default retry strategy applies to this operation GetComputeImageCapabilitySchema() +func (client ComputeClient) GetComputeImageCapabilitySchema(ctx context.Context, request GetComputeImageCapabilitySchemaRequest) (response GetComputeImageCapabilitySchemaResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getComputeImageCapabilitySchema, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetComputeImageCapabilitySchemaResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetComputeImageCapabilitySchemaResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetComputeImageCapabilitySchemaResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetComputeImageCapabilitySchemaResponse") + } + return +} + +// getComputeImageCapabilitySchema implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getComputeImageCapabilitySchema(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeImageCapabilitySchemas/{computeImageCapabilitySchemaId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetComputeImageCapabilitySchemaResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetComputeImageCapabilitySchema") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeImageCapabilitySchema/GetComputeImageCapabilitySchema" + err = common.PostProcessServiceError(err, "Compute", "GetComputeImageCapabilitySchema", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetConsoleHistory Shows the metadata for the specified console history. +// See CaptureConsoleHistory +// for details about using the console history operations. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetConsoleHistory.go.html to see an example of how to use GetConsoleHistory API. +func (client ComputeClient) GetConsoleHistory(ctx context.Context, request GetConsoleHistoryRequest) (response GetConsoleHistoryResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getConsoleHistory, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetConsoleHistoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetConsoleHistoryResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetConsoleHistoryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetConsoleHistoryResponse") + } + return +} + +// getConsoleHistory implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getConsoleHistory(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instanceConsoleHistories/{instanceConsoleHistoryId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetConsoleHistoryResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetConsoleHistory") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ConsoleHistory/GetConsoleHistory" + err = common.PostProcessServiceError(err, "Compute", "GetConsoleHistory", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetConsoleHistoryContent Gets the actual console history data (not the metadata). +// See CaptureConsoleHistory +// for details about using the console history operations. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetConsoleHistoryContent.go.html to see an example of how to use GetConsoleHistoryContent API. +func (client ComputeClient) GetConsoleHistoryContent(ctx context.Context, request GetConsoleHistoryContentRequest) (response GetConsoleHistoryContentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getConsoleHistoryContent, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetConsoleHistoryContentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetConsoleHistoryContentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetConsoleHistoryContentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetConsoleHistoryContentResponse") + } + return +} + +// getConsoleHistoryContent implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getConsoleHistoryContent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instanceConsoleHistories/{instanceConsoleHistoryId}/data", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetConsoleHistoryContentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetConsoleHistoryContent") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ConsoleHistory/GetConsoleHistoryContent" + err = common.PostProcessServiceError(err, "Compute", "GetConsoleHistoryContent", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDedicatedVmHost Gets information about the specified dedicated virtual machine host. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDedicatedVmHost.go.html to see an example of how to use GetDedicatedVmHost API. +func (client ComputeClient) GetDedicatedVmHost(ctx context.Context, request GetDedicatedVmHostRequest) (response GetDedicatedVmHostResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDedicatedVmHost, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDedicatedVmHostResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDedicatedVmHostResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDedicatedVmHostResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDedicatedVmHostResponse") + } + return +} + +// getDedicatedVmHost implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getDedicatedVmHost(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dedicatedVmHosts/{dedicatedVmHostId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetDedicatedVmHostResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetDedicatedVmHost") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DedicatedVmHost/GetDedicatedVmHost" + err = common.PostProcessServiceError(err, "Compute", "GetDedicatedVmHost", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetFirmwareBundle Returns the Firmware Bundle matching the provided firmwareBundleId. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetFirmwareBundle.go.html to see an example of how to use GetFirmwareBundle API. +func (client ComputeClient) GetFirmwareBundle(ctx context.Context, request GetFirmwareBundleRequest) (response GetFirmwareBundleResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getFirmwareBundle, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetFirmwareBundleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetFirmwareBundleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetFirmwareBundleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetFirmwareBundleResponse") + } + return +} + +// getFirmwareBundle implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getFirmwareBundle(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/firmwareBundles/{firmwareBundleId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetFirmwareBundleResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetFirmwareBundle") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/FirmwareBundle/GetFirmwareBundle" + err = common.PostProcessServiceError(err, "Compute", "GetFirmwareBundle", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetImage Gets the specified image. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetImage.go.html to see an example of how to use GetImage API. +// A default retry strategy applies to this operation GetImage() +func (client ComputeClient) GetImage(ctx context.Context, request GetImageRequest) (response GetImageResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getImage, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetImageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetImageResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetImageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetImageResponse") + } + return +} + +// getImage implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getImage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/images/{imageId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetImageResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetImage") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Image/GetImage" + err = common.PostProcessServiceError(err, "Compute", "GetImage", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetImageShapeCompatibilityEntry Retrieves an image shape compatibility entry. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetImageShapeCompatibilityEntry.go.html to see an example of how to use GetImageShapeCompatibilityEntry API. +// A default retry strategy applies to this operation GetImageShapeCompatibilityEntry() +func (client ComputeClient) GetImageShapeCompatibilityEntry(ctx context.Context, request GetImageShapeCompatibilityEntryRequest) (response GetImageShapeCompatibilityEntryResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getImageShapeCompatibilityEntry, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetImageShapeCompatibilityEntryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetImageShapeCompatibilityEntryResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetImageShapeCompatibilityEntryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetImageShapeCompatibilityEntryResponse") + } + return +} + +// getImageShapeCompatibilityEntry implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getImageShapeCompatibilityEntry(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/images/{imageId}/shapes/{shapeName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetImageShapeCompatibilityEntryResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetImageShapeCompatibilityEntry") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ImageShapeCompatibilityEntry/GetImageShapeCompatibilityEntry" + err = common.PostProcessServiceError(err, "Compute", "GetImageShapeCompatibilityEntry", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetInstance Gets information about the specified instance. +// **Note:** To retrieve public and private IP addresses for an instance, use the ListVnicAttachments +// operation to get the VNIC ID for the instance, and then call GetVnic with the VNIC ID. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstance.go.html to see an example of how to use GetInstance API. +func (client ComputeClient) GetInstance(ctx context.Context, request GetInstanceRequest) (response GetInstanceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getInstance, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetInstanceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetInstanceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetInstanceResponse") + } + return +} + +// getInstance implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instances/{instanceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetInstance") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Instance/GetInstance" + err = common.PostProcessServiceError(err, "Compute", "GetInstance", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetInstanceConsoleConnection Gets the specified instance console connection's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstanceConsoleConnection.go.html to see an example of how to use GetInstanceConsoleConnection API. +func (client ComputeClient) GetInstanceConsoleConnection(ctx context.Context, request GetInstanceConsoleConnectionRequest) (response GetInstanceConsoleConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getInstanceConsoleConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetInstanceConsoleConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetInstanceConsoleConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetInstanceConsoleConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetInstanceConsoleConnectionResponse") + } + return +} + +// getInstanceConsoleConnection implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getInstanceConsoleConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instanceConsoleConnections/{instanceConsoleConnectionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetInstanceConsoleConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetInstanceConsoleConnection") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceConsoleConnection/GetInstanceConsoleConnection" + err = common.PostProcessServiceError(err, "Compute", "GetInstanceConsoleConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetInstanceMaintenanceEvent Gets the maintenance event for the given instance. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstanceMaintenanceEvent.go.html to see an example of how to use GetInstanceMaintenanceEvent API. +func (client ComputeClient) GetInstanceMaintenanceEvent(ctx context.Context, request GetInstanceMaintenanceEventRequest) (response GetInstanceMaintenanceEventResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getInstanceMaintenanceEvent, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetInstanceMaintenanceEventResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetInstanceMaintenanceEventResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetInstanceMaintenanceEventResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetInstanceMaintenanceEventResponse") + } + return +} + +// getInstanceMaintenanceEvent implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getInstanceMaintenanceEvent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instanceMaintenanceEvents/{instanceMaintenanceEventId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetInstanceMaintenanceEventResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetInstanceMaintenanceEvent") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceMaintenanceEvent/GetInstanceMaintenanceEvent" + err = common.PostProcessServiceError(err, "Compute", "GetInstanceMaintenanceEvent", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetInstanceMaintenanceReboot Gets the maximum possible date that a maintenance reboot can be extended. For more information, see +// Infrastructure Maintenance (https://docs.oracle.com/iaas/Content/Compute/References/infrastructure-maintenance.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstanceMaintenanceReboot.go.html to see an example of how to use GetInstanceMaintenanceReboot API. +func (client ComputeClient) GetInstanceMaintenanceReboot(ctx context.Context, request GetInstanceMaintenanceRebootRequest) (response GetInstanceMaintenanceRebootResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getInstanceMaintenanceReboot, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetInstanceMaintenanceRebootResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetInstanceMaintenanceRebootResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetInstanceMaintenanceRebootResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetInstanceMaintenanceRebootResponse") + } + return +} + +// getInstanceMaintenanceReboot implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getInstanceMaintenanceReboot(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instances/{instanceId}/maintenanceReboot", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetInstanceMaintenanceRebootResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetInstanceMaintenanceReboot") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceMaintenanceReboot/GetInstanceMaintenanceReboot" + err = common.PostProcessServiceError(err, "Compute", "GetInstanceMaintenanceReboot", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMeasuredBootReport Gets the measured boot report for this shielded instance. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetMeasuredBootReport.go.html to see an example of how to use GetMeasuredBootReport API. +func (client ComputeClient) GetMeasuredBootReport(ctx context.Context, request GetMeasuredBootReportRequest) (response GetMeasuredBootReportResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getMeasuredBootReport, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMeasuredBootReportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMeasuredBootReportResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMeasuredBootReportResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMeasuredBootReportResponse") + } + return +} + +// getMeasuredBootReport implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getMeasuredBootReport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instances/{instanceId}/measuredBootReport", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetMeasuredBootReportResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetMeasuredBootReport") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/MeasuredBootReport/GetMeasuredBootReport" + err = common.PostProcessServiceError(err, "Compute", "GetMeasuredBootReport", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVnicAttachment Gets the information for the specified VNIC attachment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVnicAttachment.go.html to see an example of how to use GetVnicAttachment API. +func (client ComputeClient) GetVnicAttachment(ctx context.Context, request GetVnicAttachmentRequest) (response GetVnicAttachmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVnicAttachment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVnicAttachmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVnicAttachmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVnicAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVnicAttachmentResponse") + } + return +} + +// getVnicAttachment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getVnicAttachment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vnicAttachments/{vnicAttachmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVnicAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetVnicAttachment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VnicAttachment/GetVnicAttachment" + err = common.PostProcessServiceError(err, "Compute", "GetVnicAttachment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVolumeAttachment Gets information about the specified volume attachment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeAttachment.go.html to see an example of how to use GetVolumeAttachment API. +func (client ComputeClient) GetVolumeAttachment(ctx context.Context, request GetVolumeAttachmentRequest) (response GetVolumeAttachmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVolumeAttachment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVolumeAttachmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVolumeAttachmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVolumeAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVolumeAttachmentResponse") + } + return +} + +// getVolumeAttachment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getVolumeAttachment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeAttachments/{volumeAttachmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVolumeAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetVolumeAttachment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeAttachment/GetVolumeAttachment" + err = common.PostProcessServiceError(err, "Compute", "GetVolumeAttachment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &volumeattachment{}) + return response, err +} + +// GetWindowsInstanceInitialCredentials Gets the generated credentials for the instance. Only works for instances that require a password to log in, such as Windows. +// For certain operating systems, users will be forced to change the initial credentials. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetWindowsInstanceInitialCredentials.go.html to see an example of how to use GetWindowsInstanceInitialCredentials API. +func (client ComputeClient) GetWindowsInstanceInitialCredentials(ctx context.Context, request GetWindowsInstanceInitialCredentialsRequest) (response GetWindowsInstanceInitialCredentialsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getWindowsInstanceInitialCredentials, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetWindowsInstanceInitialCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetWindowsInstanceInitialCredentialsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetWindowsInstanceInitialCredentialsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetWindowsInstanceInitialCredentialsResponse") + } + return +} + +// getWindowsInstanceInitialCredentials implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getWindowsInstanceInitialCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instances/{instanceId}/initialCredentials", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetWindowsInstanceInitialCredentialsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "GetWindowsInstanceInitialCredentials") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceCredentials/GetWindowsInstanceInitialCredentials" + err = common.PostProcessServiceError(err, "Compute", "GetWindowsInstanceInitialCredentials", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// InstanceAction Performs one of the following power actions on the specified instance: +// - **START** - Powers on the instance. +// - **STOP** - Powers off the instance. +// - **RESET** - Powers off the instance and then powers it back on. +// - **SOFTSTOP** - Gracefully shuts down the instance by sending a shutdown command to the operating system. +// After waiting 15 minutes for the OS to shut down, the instance is powered off. +// If the applications that run on the instance take more than 15 minutes to shut down, they could be improperly stopped, resulting +// in data corruption. To avoid this, manually shut down the instance using the commands available in the OS before you softstop the +// instance. +// - **SOFTRESET** - Gracefully reboots the instance by sending a shutdown command to the operating system. +// After waiting 15 minutes for the OS to shut down, the instance is powered off and +// then powered back on. +// +// - **SENDDIAGNOSTICINTERRUPT** - For advanced users. **Caution: Sending a diagnostic interrupt to a live system can +// cause data corruption or system failure.** Sends a diagnostic interrupt that causes the instance's +// OS to crash and then reboot. Before you send a diagnostic interrupt, you must configure the instance to generate a +// crash dump file when it crashes. The crash dump captures information about the state of the OS at the time of +// the crash. After the OS restarts, you can analyze the crash dump to diagnose the issue. For more information, see +// Sending a Diagnostic Interrupt (https://docs.oracle.com/iaas/Content/Compute/Tasks/sendingdiagnosticinterrupt.htm). +// +// - **DIAGNOSTICREBOOT** - Powers off the instance, rebuilds it, and then powers it back on. +// Before you send a diagnostic reboot, restart the instance's OS, confirm that the instance and networking settings are configured +// correctly, and try other troubleshooting steps (https://docs.oracle.com/iaas/Content/Compute/References/troubleshooting-compute-instances.htm). +// Use diagnostic reboot as a final attempt to troubleshoot an unreachable instance. For virtual machine (VM) instances only. +// For more information, see Performing a Diagnostic Reboot (https://docs.oracle.com/iaas/Content/Compute/Tasks/diagnostic-reboot.htm). +// +// - **REBOOTMIGRATE** - Powers off the instance, moves it to new hardware, and then powers it back on. For more information, see +// Infrastructure Maintenance (https://docs.oracle.com/iaas/Content/Compute/References/infrastructure-maintenance.htm). +// +// For more information about managing instance lifecycle states, see +// Stopping and Starting an Instance (https://docs.oracle.com/iaas/Content/Compute/Tasks/restartinginstance.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/InstanceAction.go.html to see an example of how to use InstanceAction API. +func (client ComputeClient) InstanceAction(ctx context.Context, request InstanceActionRequest) (response InstanceActionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.instanceAction, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = InstanceActionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = InstanceActionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(InstanceActionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into InstanceActionResponse") + } + return +} + +// instanceAction implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) instanceAction(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instances/{instanceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response InstanceActionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "InstanceAction") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Instance/InstanceAction" + err = common.PostProcessServiceError(err, "Compute", "InstanceAction", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// LaunchInstance Creates a new instance in the specified compartment and the specified availability domain. +// For general information about instances, see +// Overview of the Compute Service (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm). +// For information about access control and compartments, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). +// For information about availability domains, see +// Regions and Availability Domains (https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm). +// To get a list of availability domains, use the `ListAvailabilityDomains` operation +// in the Identity and Access Management Service API. +// All Oracle Cloud Infrastructure resources, including instances, get an Oracle-assigned, +// unique ID called an Oracle Cloud Identifier (OCID). +// When you create a resource, you can find its OCID in the response. You can +// also retrieve a resource's OCID by using a List API operation +// on that resource type, or by viewing the resource in the Console. +// To launch an instance using an image or a boot volume use the `sourceDetails` parameter in LaunchInstanceDetails. +// When you launch an instance, it is automatically attached to a virtual +// network interface card (VNIC), called the *primary VNIC*. The VNIC +// has a private IP address from the subnet's CIDR. You can either assign a +// private IP address of your choice or let Oracle automatically assign one. +// You can choose whether the instance has a public IP address. To retrieve the +// addresses, use the ListVnicAttachments +// operation to get the VNIC ID for the instance, and then call +// GetVnic with the VNIC ID. +// You can later add secondary VNICs to an instance. For more information, see +// Virtual Network Interface Cards (VNICs) (https://docs.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). +// To launch an instance from a Marketplace image listing, you must provide the image ID of the +// listing resource version that you want, but you also must subscribe to the listing before you try +// to launch the instance. To subscribe to the listing, use the GetAppCatalogListingAgreements +// operation to get the signature for the terms of use agreement for the desired listing resource version. +// Then, call CreateAppCatalogSubscription +// with the signature. To get the image ID for the LaunchInstance operation, call +// GetAppCatalogListingResourceVersion. +// When launching an instance, you may provide the `securityAttributes` parameter in +// LaunchInstanceDetails to manage security attributes via the instance, +// or in the embedded CreateVnicDetails to manage security attributes +// via the VNIC directly, but not both. Providing `securityAttributes` in both locations will return a +// 400 Bad Request response. +// To determine whether capacity is available for a specific shape before you create an instance, +// use the CreateComputeCapacityReport +// operation. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/LaunchInstance.go.html to see an example of how to use LaunchInstance API. +func (client ComputeClient) LaunchInstance(ctx context.Context, request LaunchInstanceRequest) (response LaunchInstanceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.launchInstance, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = LaunchInstanceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = LaunchInstanceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(LaunchInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into LaunchInstanceResponse") + } + return +} + +// launchInstance implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) launchInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instances", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response LaunchInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "LaunchInstance") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Instance/LaunchInstance" + err = common.PostProcessServiceError(err, "Compute", "LaunchInstance", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListAppCatalogListingResourceVersions Gets all resource versions for a particular listing. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListAppCatalogListingResourceVersions.go.html to see an example of how to use ListAppCatalogListingResourceVersions API. +// A default retry strategy applies to this operation ListAppCatalogListingResourceVersions() +func (client ComputeClient) ListAppCatalogListingResourceVersions(ctx context.Context, request ListAppCatalogListingResourceVersionsRequest) (response ListAppCatalogListingResourceVersionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listAppCatalogListingResourceVersions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListAppCatalogListingResourceVersionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListAppCatalogListingResourceVersionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListAppCatalogListingResourceVersionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListAppCatalogListingResourceVersionsResponse") + } + return +} + +// listAppCatalogListingResourceVersions implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listAppCatalogListingResourceVersions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/appCatalogListings/{listingId}/resourceVersions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListAppCatalogListingResourceVersionsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListAppCatalogListingResourceVersions") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/AppCatalogListingResourceVersionSummary/ListAppCatalogListingResourceVersions" + err = common.PostProcessServiceError(err, "Compute", "ListAppCatalogListingResourceVersions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListAppCatalogListings Lists the published listings. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListAppCatalogListings.go.html to see an example of how to use ListAppCatalogListings API. +// A default retry strategy applies to this operation ListAppCatalogListings() +func (client ComputeClient) ListAppCatalogListings(ctx context.Context, request ListAppCatalogListingsRequest) (response ListAppCatalogListingsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listAppCatalogListings, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListAppCatalogListingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListAppCatalogListingsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListAppCatalogListingsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListAppCatalogListingsResponse") + } + return +} + +// listAppCatalogListings implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listAppCatalogListings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/appCatalogListings", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListAppCatalogListingsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListAppCatalogListings") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/AppCatalogListingSummary/ListAppCatalogListings" + err = common.PostProcessServiceError(err, "Compute", "ListAppCatalogListings", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListAppCatalogSubscriptions Lists subscriptions for a compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListAppCatalogSubscriptions.go.html to see an example of how to use ListAppCatalogSubscriptions API. +// A default retry strategy applies to this operation ListAppCatalogSubscriptions() +func (client ComputeClient) ListAppCatalogSubscriptions(ctx context.Context, request ListAppCatalogSubscriptionsRequest) (response ListAppCatalogSubscriptionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listAppCatalogSubscriptions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListAppCatalogSubscriptionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListAppCatalogSubscriptionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListAppCatalogSubscriptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListAppCatalogSubscriptionsResponse") + } + return +} + +// listAppCatalogSubscriptions implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listAppCatalogSubscriptions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/appCatalogSubscriptions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListAppCatalogSubscriptionsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListAppCatalogSubscriptions") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/AppCatalogSubscriptionSummary/ListAppCatalogSubscriptions" + err = common.PostProcessServiceError(err, "Compute", "ListAppCatalogSubscriptions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListBootVolumeAttachments Lists the boot volume attachments in the specified compartment. You can filter the +// list by specifying an instance OCID, boot volume OCID, or both. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBootVolumeAttachments.go.html to see an example of how to use ListBootVolumeAttachments API. +func (client ComputeClient) ListBootVolumeAttachments(ctx context.Context, request ListBootVolumeAttachmentsRequest) (response ListBootVolumeAttachmentsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listBootVolumeAttachments, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListBootVolumeAttachmentsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListBootVolumeAttachmentsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListBootVolumeAttachmentsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBootVolumeAttachmentsResponse") + } + return +} + +// listBootVolumeAttachments implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listBootVolumeAttachments(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bootVolumeAttachments", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListBootVolumeAttachmentsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListBootVolumeAttachments") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/BootVolumeAttachment/ListBootVolumeAttachments" + err = common.PostProcessServiceError(err, "Compute", "ListBootVolumeAttachments", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeCapacityReservationInstanceShapes Lists the shapes that can be reserved within the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityReservationInstanceShapes.go.html to see an example of how to use ListComputeCapacityReservationInstanceShapes API. +func (client ComputeClient) ListComputeCapacityReservationInstanceShapes(ctx context.Context, request ListComputeCapacityReservationInstanceShapesRequest) (response ListComputeCapacityReservationInstanceShapesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeCapacityReservationInstanceShapes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeCapacityReservationInstanceShapesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeCapacityReservationInstanceShapesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeCapacityReservationInstanceShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeCapacityReservationInstanceShapesResponse") + } + return +} + +// listComputeCapacityReservationInstanceShapes implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeCapacityReservationInstanceShapes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeCapacityReservationInstanceShapes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeCapacityReservationInstanceShapesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeCapacityReservationInstanceShapes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCapacityReservationInstanceShapeSummary/ListComputeCapacityReservationInstanceShapes" + err = common.PostProcessServiceError(err, "Compute", "ListComputeCapacityReservationInstanceShapes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeCapacityReservationInstances Lists the instances launched under a capacity reservation. You can filter results by specifying criteria. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityReservationInstances.go.html to see an example of how to use ListComputeCapacityReservationInstances API. +func (client ComputeClient) ListComputeCapacityReservationInstances(ctx context.Context, request ListComputeCapacityReservationInstancesRequest) (response ListComputeCapacityReservationInstancesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeCapacityReservationInstances, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeCapacityReservationInstancesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeCapacityReservationInstancesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeCapacityReservationInstancesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeCapacityReservationInstancesResponse") + } + return +} + +// listComputeCapacityReservationInstances implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeCapacityReservationInstances(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeCapacityReservations/{capacityReservationId}/instances", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeCapacityReservationInstancesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeCapacityReservationInstances") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CapacityReservationInstanceSummary/ListComputeCapacityReservationInstances" + err = common.PostProcessServiceError(err, "Compute", "ListComputeCapacityReservationInstances", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeCapacityReservations Lists the compute capacity reservations that match the specified criteria and compartment. +// You can limit the list by specifying a compute capacity reservation display name +// (the list will include all the identically-named compute capacity reservations in the compartment). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityReservations.go.html to see an example of how to use ListComputeCapacityReservations API. +func (client ComputeClient) ListComputeCapacityReservations(ctx context.Context, request ListComputeCapacityReservationsRequest) (response ListComputeCapacityReservationsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeCapacityReservations, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeCapacityReservationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeCapacityReservationsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeCapacityReservationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeCapacityReservationsResponse") + } + return +} + +// listComputeCapacityReservations implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeCapacityReservations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeCapacityReservations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeCapacityReservationsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeCapacityReservations") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCapacityReservation/ListComputeCapacityReservations" + err = common.PostProcessServiceError(err, "Compute", "ListComputeCapacityReservations", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeCapacityTopologies Lists the compute capacity topologies in the specified compartment. You can filter the list by a compute +// capacity topology display name. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologies.go.html to see an example of how to use ListComputeCapacityTopologies API. +// A default retry strategy applies to this operation ListComputeCapacityTopologies() +func (client ComputeClient) ListComputeCapacityTopologies(ctx context.Context, request ListComputeCapacityTopologiesRequest) (response ListComputeCapacityTopologiesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeCapacityTopologies, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeCapacityTopologiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeCapacityTopologiesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeCapacityTopologiesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeCapacityTopologiesResponse") + } + return +} + +// listComputeCapacityTopologies implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeCapacityTopologies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeCapacityTopologies", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeCapacityTopologiesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeCapacityTopologies") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCapacityTopology/ListComputeCapacityTopologies" + err = common.PostProcessServiceError(err, "Compute", "ListComputeCapacityTopologies", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeCapacityTopologyComputeBareMetalHosts Lists compute bare metal hosts in the specified compute capacity topology. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologyComputeBareMetalHosts.go.html to see an example of how to use ListComputeCapacityTopologyComputeBareMetalHosts API. +// A default retry strategy applies to this operation ListComputeCapacityTopologyComputeBareMetalHosts() +func (client ComputeClient) ListComputeCapacityTopologyComputeBareMetalHosts(ctx context.Context, request ListComputeCapacityTopologyComputeBareMetalHostsRequest) (response ListComputeCapacityTopologyComputeBareMetalHostsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeCapacityTopologyComputeBareMetalHosts, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeCapacityTopologyComputeBareMetalHostsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeCapacityTopologyComputeBareMetalHostsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeCapacityTopologyComputeBareMetalHostsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeCapacityTopologyComputeBareMetalHostsResponse") + } + return +} + +// listComputeCapacityTopologyComputeBareMetalHosts implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeCapacityTopologyComputeBareMetalHosts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeCapacityTopologies/{computeCapacityTopologyId}/computeBareMetalHosts", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeCapacityTopologyComputeBareMetalHostsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeCapacityTopologyComputeBareMetalHosts") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeBareMetalHost/ListComputeCapacityTopologyComputeBareMetalHosts" + err = common.PostProcessServiceError(err, "Compute", "ListComputeCapacityTopologyComputeBareMetalHosts", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeCapacityTopologyComputeHpcIslands Lists compute HPC islands in the specified compute capacity topology. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologyComputeHpcIslands.go.html to see an example of how to use ListComputeCapacityTopologyComputeHpcIslands API. +// A default retry strategy applies to this operation ListComputeCapacityTopologyComputeHpcIslands() +func (client ComputeClient) ListComputeCapacityTopologyComputeHpcIslands(ctx context.Context, request ListComputeCapacityTopologyComputeHpcIslandsRequest) (response ListComputeCapacityTopologyComputeHpcIslandsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeCapacityTopologyComputeHpcIslands, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeCapacityTopologyComputeHpcIslandsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeCapacityTopologyComputeHpcIslandsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeCapacityTopologyComputeHpcIslandsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeCapacityTopologyComputeHpcIslandsResponse") + } + return +} + +// listComputeCapacityTopologyComputeHpcIslands implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeCapacityTopologyComputeHpcIslands(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeCapacityTopologies/{computeCapacityTopologyId}/computeHpcIslands", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeCapacityTopologyComputeHpcIslandsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeCapacityTopologyComputeHpcIslands") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHpcIsland/ListComputeCapacityTopologyComputeHpcIslands" + err = common.PostProcessServiceError(err, "Compute", "ListComputeCapacityTopologyComputeHpcIslands", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeCapacityTopologyComputeNetworkBlocks Lists compute network blocks in the specified compute capacity topology. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologyComputeNetworkBlocks.go.html to see an example of how to use ListComputeCapacityTopologyComputeNetworkBlocks API. +// A default retry strategy applies to this operation ListComputeCapacityTopologyComputeNetworkBlocks() +func (client ComputeClient) ListComputeCapacityTopologyComputeNetworkBlocks(ctx context.Context, request ListComputeCapacityTopologyComputeNetworkBlocksRequest) (response ListComputeCapacityTopologyComputeNetworkBlocksResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeCapacityTopologyComputeNetworkBlocks, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeCapacityTopologyComputeNetworkBlocksResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeCapacityTopologyComputeNetworkBlocksResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeCapacityTopologyComputeNetworkBlocksResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeCapacityTopologyComputeNetworkBlocksResponse") + } + return +} + +// listComputeCapacityTopologyComputeNetworkBlocks implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeCapacityTopologyComputeNetworkBlocks(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeCapacityTopologies/{computeCapacityTopologyId}/computeNetworkBlocks", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeCapacityTopologyComputeNetworkBlocksResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeCapacityTopologyComputeNetworkBlocks") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeNetworkBlock/ListComputeCapacityTopologyComputeNetworkBlocks" + err = common.PostProcessServiceError(err, "Compute", "ListComputeCapacityTopologyComputeNetworkBlocks", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeClusters Lists the compute clusters in the specified compartment. +// A compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory access (RDMA) network group. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeClusters.go.html to see an example of how to use ListComputeClusters API. +func (client ComputeClient) ListComputeClusters(ctx context.Context, request ListComputeClustersRequest) (response ListComputeClustersResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeClusters, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeClustersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeClustersResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeClustersResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeClustersResponse") + } + return +} + +// listComputeClusters implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeClusters(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeClusters", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeClustersResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeClusters") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCluster/ListComputeClusters" + err = common.PostProcessServiceError(err, "Compute", "ListComputeClusters", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeGlobalImageCapabilitySchemaVersions Lists Compute Global Image Capability Schema versions in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeGlobalImageCapabilitySchemaVersions.go.html to see an example of how to use ListComputeGlobalImageCapabilitySchemaVersions API. +// A default retry strategy applies to this operation ListComputeGlobalImageCapabilitySchemaVersions() +func (client ComputeClient) ListComputeGlobalImageCapabilitySchemaVersions(ctx context.Context, request ListComputeGlobalImageCapabilitySchemaVersionsRequest) (response ListComputeGlobalImageCapabilitySchemaVersionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeGlobalImageCapabilitySchemaVersions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeGlobalImageCapabilitySchemaVersionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeGlobalImageCapabilitySchemaVersionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeGlobalImageCapabilitySchemaVersionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeGlobalImageCapabilitySchemaVersionsResponse") + } + return +} + +// listComputeGlobalImageCapabilitySchemaVersions implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeGlobalImageCapabilitySchemaVersions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeGlobalImageCapabilitySchemas/{computeGlobalImageCapabilitySchemaId}/versions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeGlobalImageCapabilitySchemaVersionsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeGlobalImageCapabilitySchemaVersions") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGlobalImageCapabilitySchemaVersionSummary/ListComputeGlobalImageCapabilitySchemaVersions" + err = common.PostProcessServiceError(err, "Compute", "ListComputeGlobalImageCapabilitySchemaVersions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeGlobalImageCapabilitySchemas Lists Compute Global Image Capability Schema in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeGlobalImageCapabilitySchemas.go.html to see an example of how to use ListComputeGlobalImageCapabilitySchemas API. +// A default retry strategy applies to this operation ListComputeGlobalImageCapabilitySchemas() +func (client ComputeClient) ListComputeGlobalImageCapabilitySchemas(ctx context.Context, request ListComputeGlobalImageCapabilitySchemasRequest) (response ListComputeGlobalImageCapabilitySchemasResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeGlobalImageCapabilitySchemas, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeGlobalImageCapabilitySchemasResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeGlobalImageCapabilitySchemasResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeGlobalImageCapabilitySchemasResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeGlobalImageCapabilitySchemasResponse") + } + return +} + +// listComputeGlobalImageCapabilitySchemas implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeGlobalImageCapabilitySchemas(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeGlobalImageCapabilitySchemas", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeGlobalImageCapabilitySchemasResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeGlobalImageCapabilitySchemas") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGlobalImageCapabilitySchemaSummary/ListComputeGlobalImageCapabilitySchemas" + err = common.PostProcessServiceError(err, "Compute", "ListComputeGlobalImageCapabilitySchemas", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeGpuMemoryClusterInstances List all of the GPU memory cluster instances. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeGpuMemoryClusterInstances.go.html to see an example of how to use ListComputeGpuMemoryClusterInstances API. +// A default retry strategy applies to this operation ListComputeGpuMemoryClusterInstances() +func (client ComputeClient) ListComputeGpuMemoryClusterInstances(ctx context.Context, request ListComputeGpuMemoryClusterInstancesRequest) (response ListComputeGpuMemoryClusterInstancesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeGpuMemoryClusterInstances, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeGpuMemoryClusterInstancesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeGpuMemoryClusterInstancesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeGpuMemoryClusterInstancesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeGpuMemoryClusterInstancesResponse") + } + return +} + +// listComputeGpuMemoryClusterInstances implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeGpuMemoryClusterInstances(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeGpuMemoryClusters/{computeGpuMemoryClusterId}/instances", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeGpuMemoryClusterInstancesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeGpuMemoryClusterInstances") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryClusterInstanceSummary/ListComputeGpuMemoryClusterInstances" + err = common.PostProcessServiceError(err, "Compute", "ListComputeGpuMemoryClusterInstances", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeGpuMemoryClusters List all of the compute GPU memory clusters. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeGpuMemoryClusters.go.html to see an example of how to use ListComputeGpuMemoryClusters API. +// A default retry strategy applies to this operation ListComputeGpuMemoryClusters() +func (client ComputeClient) ListComputeGpuMemoryClusters(ctx context.Context, request ListComputeGpuMemoryClustersRequest) (response ListComputeGpuMemoryClustersResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeGpuMemoryClusters, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeGpuMemoryClustersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeGpuMemoryClustersResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeGpuMemoryClustersResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeGpuMemoryClustersResponse") + } + return +} + +// listComputeGpuMemoryClusters implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeGpuMemoryClusters(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeGpuMemoryClusters", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeGpuMemoryClustersResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeGpuMemoryClusters") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/ListComputeGpuMemoryClusters" + err = common.PostProcessServiceError(err, "Compute", "ListComputeGpuMemoryClusters", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeGpuMemoryFabrics Lists the compute GPU memory fabrics that match the specified criteria and compartmentId. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeGpuMemoryFabrics.go.html to see an example of how to use ListComputeGpuMemoryFabrics API. +// A default retry strategy applies to this operation ListComputeGpuMemoryFabrics() +func (client ComputeClient) ListComputeGpuMemoryFabrics(ctx context.Context, request ListComputeGpuMemoryFabricsRequest) (response ListComputeGpuMemoryFabricsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeGpuMemoryFabrics, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeGpuMemoryFabricsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeGpuMemoryFabricsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeGpuMemoryFabricsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeGpuMemoryFabricsResponse") + } + return +} + +// listComputeGpuMemoryFabrics implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeGpuMemoryFabrics(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeGpuMemoryFabrics", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeGpuMemoryFabricsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeGpuMemoryFabrics") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryFabric/ListComputeGpuMemoryFabrics" + err = common.PostProcessServiceError(err, "Compute", "ListComputeGpuMemoryFabrics", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeHostGroups Lists the compute host groups that match the specified criteria and compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeHostGroups.go.html to see an example of how to use ListComputeHostGroups API. +// A default retry strategy applies to this operation ListComputeHostGroups() +func (client ComputeClient) ListComputeHostGroups(ctx context.Context, request ListComputeHostGroupsRequest) (response ListComputeHostGroupsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeHostGroups, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeHostGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeHostGroupsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeHostGroupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeHostGroupsResponse") + } + return +} + +// listComputeHostGroups implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeHostGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeHostGroups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeHostGroupsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeHostGroups") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHostGroup/ListComputeHostGroups" + err = common.PostProcessServiceError(err, "Compute", "ListComputeHostGroups", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeHosts Generates a list of summary host details +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeHosts.go.html to see an example of how to use ListComputeHosts API. +// A default retry strategy applies to this operation ListComputeHosts() +func (client ComputeClient) ListComputeHosts(ctx context.Context, request ListComputeHostsRequest) (response ListComputeHostsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeHosts, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeHostsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeHostsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeHostsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeHostsResponse") + } + return +} + +// listComputeHosts implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeHosts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeHosts", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeHostsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeHosts") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/ListComputeHosts" + err = common.PostProcessServiceError(err, "Compute", "ListComputeHosts", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeImageCapabilitySchemas Lists Compute Image Capability Schema in the specified compartment. You can also query by a specific imageId. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeImageCapabilitySchemas.go.html to see an example of how to use ListComputeImageCapabilitySchemas API. +// A default retry strategy applies to this operation ListComputeImageCapabilitySchemas() +func (client ComputeClient) ListComputeImageCapabilitySchemas(ctx context.Context, request ListComputeImageCapabilitySchemasRequest) (response ListComputeImageCapabilitySchemasResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeImageCapabilitySchemas, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeImageCapabilitySchemasResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeImageCapabilitySchemasResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeImageCapabilitySchemasResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeImageCapabilitySchemasResponse") + } + return +} + +// listComputeImageCapabilitySchemas implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeImageCapabilitySchemas(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeImageCapabilitySchemas", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListComputeImageCapabilitySchemasResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListComputeImageCapabilitySchemas") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeImageCapabilitySchemaSummary/ListComputeImageCapabilitySchemas" + err = common.PostProcessServiceError(err, "Compute", "ListComputeImageCapabilitySchemas", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListConsoleHistories Lists the console history metadata for the specified compartment or instance. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListConsoleHistories.go.html to see an example of how to use ListConsoleHistories API. +func (client ComputeClient) ListConsoleHistories(ctx context.Context, request ListConsoleHistoriesRequest) (response ListConsoleHistoriesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listConsoleHistories, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListConsoleHistoriesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListConsoleHistoriesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListConsoleHistoriesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListConsoleHistoriesResponse") + } + return +} + +// listConsoleHistories implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listConsoleHistories(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instanceConsoleHistories", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListConsoleHistoriesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListConsoleHistories") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ConsoleHistory/ListConsoleHistories" + err = common.PostProcessServiceError(err, "Compute", "ListConsoleHistories", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDedicatedVmHostInstanceShapes Lists the shapes that can be used to launch a virtual machine instance on a dedicated virtual machine host within the specified compartment. +// You can filter the list by compatibility with a specific dedicated virtual machine host shape. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDedicatedVmHostInstanceShapes.go.html to see an example of how to use ListDedicatedVmHostInstanceShapes API. +func (client ComputeClient) ListDedicatedVmHostInstanceShapes(ctx context.Context, request ListDedicatedVmHostInstanceShapesRequest) (response ListDedicatedVmHostInstanceShapesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDedicatedVmHostInstanceShapes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDedicatedVmHostInstanceShapesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDedicatedVmHostInstanceShapesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDedicatedVmHostInstanceShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDedicatedVmHostInstanceShapesResponse") + } + return +} + +// listDedicatedVmHostInstanceShapes implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listDedicatedVmHostInstanceShapes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dedicatedVmHostInstanceShapes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListDedicatedVmHostInstanceShapesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListDedicatedVmHostInstanceShapes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DedicatedVmHostInstanceShapeSummary/ListDedicatedVmHostInstanceShapes" + err = common.PostProcessServiceError(err, "Compute", "ListDedicatedVmHostInstanceShapes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDedicatedVmHostInstances Returns the list of instances on the dedicated virtual machine hosts that match the specified criteria. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDedicatedVmHostInstances.go.html to see an example of how to use ListDedicatedVmHostInstances API. +func (client ComputeClient) ListDedicatedVmHostInstances(ctx context.Context, request ListDedicatedVmHostInstancesRequest) (response ListDedicatedVmHostInstancesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDedicatedVmHostInstances, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDedicatedVmHostInstancesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDedicatedVmHostInstancesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDedicatedVmHostInstancesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDedicatedVmHostInstancesResponse") + } + return +} + +// listDedicatedVmHostInstances implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listDedicatedVmHostInstances(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dedicatedVmHosts/{dedicatedVmHostId}/instances", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListDedicatedVmHostInstancesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListDedicatedVmHostInstances") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DedicatedVmHostInstanceSummary/ListDedicatedVmHostInstances" + err = common.PostProcessServiceError(err, "Compute", "ListDedicatedVmHostInstances", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDedicatedVmHostShapes Lists the shapes that can be used to launch a dedicated virtual machine host within the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDedicatedVmHostShapes.go.html to see an example of how to use ListDedicatedVmHostShapes API. +func (client ComputeClient) ListDedicatedVmHostShapes(ctx context.Context, request ListDedicatedVmHostShapesRequest) (response ListDedicatedVmHostShapesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDedicatedVmHostShapes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDedicatedVmHostShapesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDedicatedVmHostShapesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDedicatedVmHostShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDedicatedVmHostShapesResponse") + } + return +} + +// listDedicatedVmHostShapes implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listDedicatedVmHostShapes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dedicatedVmHostShapes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListDedicatedVmHostShapesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListDedicatedVmHostShapes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DedicatedVmHostShapeSummary/ListDedicatedVmHostShapes" + err = common.PostProcessServiceError(err, "Compute", "ListDedicatedVmHostShapes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDedicatedVmHosts Returns the list of dedicated virtual machine hosts that match the specified criteria in the specified compartment. +// You can limit the list by specifying a dedicated virtual machine host display name. The list will include all the identically-named +// dedicated virtual machine hosts in the compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDedicatedVmHosts.go.html to see an example of how to use ListDedicatedVmHosts API. +func (client ComputeClient) ListDedicatedVmHosts(ctx context.Context, request ListDedicatedVmHostsRequest) (response ListDedicatedVmHostsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDedicatedVmHosts, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDedicatedVmHostsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDedicatedVmHostsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDedicatedVmHostsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDedicatedVmHostsResponse") + } + return +} + +// listDedicatedVmHosts implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listDedicatedVmHosts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dedicatedVmHosts", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListDedicatedVmHostsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListDedicatedVmHosts") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DedicatedVmHostSummary/ListDedicatedVmHosts" + err = common.PostProcessServiceError(err, "Compute", "ListDedicatedVmHosts", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListFirmwareBundles Gets a list of all Firmware Bundles in a compartment for specified platform. Can filter results to include +// only the default (recommended) Firmware Bundle for the given platform. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListFirmwareBundles.go.html to see an example of how to use ListFirmwareBundles API. +func (client ComputeClient) ListFirmwareBundles(ctx context.Context, request ListFirmwareBundlesRequest) (response ListFirmwareBundlesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listFirmwareBundles, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListFirmwareBundlesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListFirmwareBundlesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListFirmwareBundlesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListFirmwareBundlesResponse") + } + return +} + +// listFirmwareBundles implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listFirmwareBundles(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/firmwareBundles", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListFirmwareBundlesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListFirmwareBundles") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/FirmwareBundlesCollection/ListFirmwareBundles" + err = common.PostProcessServiceError(err, "Compute", "ListFirmwareBundles", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListImageShapeCompatibilityEntries Lists the compatible shapes for the specified image. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListImageShapeCompatibilityEntries.go.html to see an example of how to use ListImageShapeCompatibilityEntries API. +// A default retry strategy applies to this operation ListImageShapeCompatibilityEntries() +func (client ComputeClient) ListImageShapeCompatibilityEntries(ctx context.Context, request ListImageShapeCompatibilityEntriesRequest) (response ListImageShapeCompatibilityEntriesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listImageShapeCompatibilityEntries, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListImageShapeCompatibilityEntriesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListImageShapeCompatibilityEntriesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListImageShapeCompatibilityEntriesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListImageShapeCompatibilityEntriesResponse") + } + return +} + +// listImageShapeCompatibilityEntries implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listImageShapeCompatibilityEntries(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/images/{imageId}/shapes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListImageShapeCompatibilityEntriesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListImageShapeCompatibilityEntries") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ImageShapeCompatibilityEntry/ListImageShapeCompatibilityEntries" + err = common.PostProcessServiceError(err, "Compute", "ListImageShapeCompatibilityEntries", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListImages Lists a subset of images available in the specified compartment, including +// platform images (https://docs.oracle.com/iaas/Content/Compute/References/images.htm) and +// custom images (https://docs.oracle.com/iaas/Content/Compute/Tasks/managingcustomimages.htm). +// The list of platform images includes the three most recently published versions +// of each major distribution. The list does not support filtering based on image tags. +// The list of images returned is ordered to first show the recent platform images, +// then all of the custom images. +// **Caution:** Platform images are refreshed regularly. When new images are released, older versions are replaced. +// The image OCIDs remain available, but when the platform image is replaced, the image OCIDs are no longer returned as part of the platform image list. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListImages.go.html to see an example of how to use ListImages API. +// A default retry strategy applies to this operation ListImages() +func (client ComputeClient) ListImages(ctx context.Context, request ListImagesRequest) (response ListImagesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listImages, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListImagesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListImagesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListImagesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListImagesResponse") + } + return +} + +// listImages implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listImages(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/images", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListImagesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListImages") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Image/ListImages" + err = common.PostProcessServiceError(err, "Compute", "ListImages", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListInstanceConsoleConnections Lists the console connections for the specified compartment or instance. +// For more information about instance console connections, see Troubleshooting Instances Using Instance Console Connections (https://docs.oracle.com/iaas/Content/Compute/References/serialconsole.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstanceConsoleConnections.go.html to see an example of how to use ListInstanceConsoleConnections API. +func (client ComputeClient) ListInstanceConsoleConnections(ctx context.Context, request ListInstanceConsoleConnectionsRequest) (response ListInstanceConsoleConnectionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listInstanceConsoleConnections, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListInstanceConsoleConnectionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListInstanceConsoleConnectionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListInstanceConsoleConnectionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListInstanceConsoleConnectionsResponse") + } + return +} + +// listInstanceConsoleConnections implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listInstanceConsoleConnections(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instanceConsoleConnections", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListInstanceConsoleConnectionsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListInstanceConsoleConnections") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceConsoleConnection/ListInstanceConsoleConnections" + err = common.PostProcessServiceError(err, "Compute", "ListInstanceConsoleConnections", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListInstanceDevices Gets a list of all the devices for given instance. You can optionally filter results by device availability. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstanceDevices.go.html to see an example of how to use ListInstanceDevices API. +func (client ComputeClient) ListInstanceDevices(ctx context.Context, request ListInstanceDevicesRequest) (response ListInstanceDevicesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listInstanceDevices, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListInstanceDevicesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListInstanceDevicesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListInstanceDevicesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListInstanceDevicesResponse") + } + return +} + +// listInstanceDevices implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listInstanceDevices(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instances/{instanceId}/devices", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListInstanceDevicesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListInstanceDevices") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Device/ListInstanceDevices" + err = common.PostProcessServiceError(err, "Compute", "ListInstanceDevices", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListInstanceMaintenanceEvents Gets a list of all the maintenance events for the given compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstanceMaintenanceEvents.go.html to see an example of how to use ListInstanceMaintenanceEvents API. +func (client ComputeClient) ListInstanceMaintenanceEvents(ctx context.Context, request ListInstanceMaintenanceEventsRequest) (response ListInstanceMaintenanceEventsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listInstanceMaintenanceEvents, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListInstanceMaintenanceEventsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListInstanceMaintenanceEventsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListInstanceMaintenanceEventsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListInstanceMaintenanceEventsResponse") + } + return +} + +// listInstanceMaintenanceEvents implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listInstanceMaintenanceEvents(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instanceMaintenanceEvents", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListInstanceMaintenanceEventsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListInstanceMaintenanceEvents") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceMaintenanceEventSummary/ListInstanceMaintenanceEvents" + err = common.PostProcessServiceError(err, "Compute", "ListInstanceMaintenanceEvents", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListInstances Lists the instances in the specified compartment and the specified availability domain. +// You can filter the results by specifying an instance name (the list will include all the identically-named +// instances in the compartment). +// **Note:** To retrieve public and private IP addresses for an instance, use the ListVnicAttachments +// operation to get the VNIC ID for the instance, and then call GetVnic with the VNIC ID. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstances.go.html to see an example of how to use ListInstances API. +func (client ComputeClient) ListInstances(ctx context.Context, request ListInstancesRequest) (response ListInstancesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listInstances, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListInstancesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListInstancesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListInstancesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListInstancesResponse") + } + return +} + +// listInstances implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listInstances(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instances", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListInstancesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListInstances") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Instance/ListInstances" + err = common.PostProcessServiceError(err, "Compute", "ListInstances", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListShapes Lists the shapes that can be used to launch an instance within the specified compartment. You can +// filter the list by compatibility with a specific image. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListShapes.go.html to see an example of how to use ListShapes API. +func (client ComputeClient) ListShapes(ctx context.Context, request ListShapesRequest) (response ListShapesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listShapes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListShapesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListShapesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListShapesResponse") + } + return +} + +// listShapes implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listShapes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/shapes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListShapesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListShapes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Shape/ListShapes" + err = common.PostProcessServiceError(err, "Compute", "ListShapes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVnicAttachments Lists the VNIC attachments in the specified compartment. A VNIC attachment +// resides in the same compartment as the attached instance. The list can be +// filtered by instance, VNIC, or availability domain. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVnicAttachments.go.html to see an example of how to use ListVnicAttachments API. +func (client ComputeClient) ListVnicAttachments(ctx context.Context, request ListVnicAttachmentsRequest) (response ListVnicAttachmentsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVnicAttachments, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVnicAttachmentsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVnicAttachmentsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVnicAttachmentsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVnicAttachmentsResponse") + } + return +} + +// listVnicAttachments implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listVnicAttachments(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vnicAttachments", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVnicAttachmentsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListVnicAttachments") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VnicAttachment/ListVnicAttachments" + err = common.PostProcessServiceError(err, "Compute", "ListVnicAttachments", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// listvolumeattachment allows to unmarshal list of polymorphic VolumeAttachment +type listvolumeattachment []volumeattachment + +// UnmarshalPolymorphicJSON unmarshals polymorphic json list of items +func (m *listvolumeattachment) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + res := make([]VolumeAttachment, len(*m)) + for i, v := range *m { + nn, err := v.UnmarshalPolymorphicJSON(v.JsonData) + if err != nil { + return nil, err + } + res[i] = nn.(VolumeAttachment) + } + return res, nil +} + +// ListVolumeAttachments Lists the volume attachments in the specified compartment. You can filter the +// list by specifying an instance OCID, volume OCID, or both. +// Currently, the only supported volume attachment type are IScsiVolumeAttachment and +// ParavirtualizedVolumeAttachment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeAttachments.go.html to see an example of how to use ListVolumeAttachments API. +func (client ComputeClient) ListVolumeAttachments(ctx context.Context, request ListVolumeAttachmentsRequest) (response ListVolumeAttachmentsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVolumeAttachments, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVolumeAttachmentsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVolumeAttachmentsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVolumeAttachmentsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVolumeAttachmentsResponse") + } + return +} + +// listVolumeAttachments implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listVolumeAttachments(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/volumeAttachments", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVolumeAttachmentsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "ListVolumeAttachments") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeAttachment/ListVolumeAttachments" + err = common.PostProcessServiceError(err, "Compute", "ListVolumeAttachments", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &listvolumeattachment{}) + return response, err +} + +// RemoveImageShapeCompatibilityEntry Removes a shape from the compatible shapes list for the image. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveImageShapeCompatibilityEntry.go.html to see an example of how to use RemoveImageShapeCompatibilityEntry API. +func (client ComputeClient) RemoveImageShapeCompatibilityEntry(ctx context.Context, request RemoveImageShapeCompatibilityEntryRequest) (response RemoveImageShapeCompatibilityEntryResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.removeImageShapeCompatibilityEntry, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RemoveImageShapeCompatibilityEntryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RemoveImageShapeCompatibilityEntryResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RemoveImageShapeCompatibilityEntryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RemoveImageShapeCompatibilityEntryResponse") + } + return +} + +// removeImageShapeCompatibilityEntry implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) removeImageShapeCompatibilityEntry(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/images/{imageId}/shapes/{shapeName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response RemoveImageShapeCompatibilityEntryResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "RemoveImageShapeCompatibilityEntry") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ImageShapeCompatibilityEntry/RemoveImageShapeCompatibilityEntry" + err = common.PostProcessServiceError(err, "Compute", "RemoveImageShapeCompatibilityEntry", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// TerminateInstance Permanently terminates (deletes) the specified instance. Any attached VNICs and volumes are automatically detached +// when the instance terminates. +// To preserve the boot volume associated with the instance, specify `true` for `PreserveBootVolumeQueryParam`. +// To delete the boot volume when the instance is deleted, specify `false` or do not specify a value for `PreserveBootVolumeQueryParam`. +// To preserve data volumes created with the instance, specify `true` or do not specify a value for `PreserveDataVolumesQueryParam`. +// To delete the data volumes when the instance itself is deleted, specify `false` for `PreserveDataVolumesQueryParam`. +// This is an asynchronous operation. The instance's `lifecycleState` changes to TERMINATING temporarily +// until the instance is completely deleted. After the instance is deleted, the record remains visible in the list of instances +// with the state TERMINATED for at least 12 hours, but no further action is needed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/TerminateInstance.go.html to see an example of how to use TerminateInstance API. +func (client ComputeClient) TerminateInstance(ctx context.Context, request TerminateInstanceRequest) (response TerminateInstanceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.terminateInstance, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = TerminateInstanceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = TerminateInstanceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(TerminateInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into TerminateInstanceResponse") + } + return +} + +// terminateInstance implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) terminateInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/instances/{instanceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response TerminateInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "TerminateInstance") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Compute", "TerminateInstance", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateComputeCapacityReservation Updates the specified capacity reservation and its associated capacity configurations. +// Fields that are not provided in the request will not be updated. Capacity configurations that are not included will be deleted. +// Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeCapacityReservation.go.html to see an example of how to use UpdateComputeCapacityReservation API. +func (client ComputeClient) UpdateComputeCapacityReservation(ctx context.Context, request UpdateComputeCapacityReservationRequest) (response UpdateComputeCapacityReservationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateComputeCapacityReservation, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateComputeCapacityReservationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateComputeCapacityReservationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateComputeCapacityReservationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateComputeCapacityReservationResponse") + } + return +} + +// updateComputeCapacityReservation implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateComputeCapacityReservation(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/computeCapacityReservations/{capacityReservationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateComputeCapacityReservationResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateComputeCapacityReservation") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCapacityReservation/UpdateComputeCapacityReservation" + err = common.PostProcessServiceError(err, "Compute", "UpdateComputeCapacityReservation", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateComputeCapacityTopology Updates the specified compute capacity topology. Fields that are not provided in the request will not be updated. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeCapacityTopology.go.html to see an example of how to use UpdateComputeCapacityTopology API. +// A default retry strategy applies to this operation UpdateComputeCapacityTopology() +func (client ComputeClient) UpdateComputeCapacityTopology(ctx context.Context, request UpdateComputeCapacityTopologyRequest) (response UpdateComputeCapacityTopologyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateComputeCapacityTopology, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateComputeCapacityTopologyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateComputeCapacityTopologyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateComputeCapacityTopologyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateComputeCapacityTopologyResponse") + } + return +} + +// updateComputeCapacityTopology implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateComputeCapacityTopology(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/computeCapacityTopologies/{computeCapacityTopologyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateComputeCapacityTopologyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateComputeCapacityTopology") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCapacityTopology/UpdateComputeCapacityTopology" + err = common.PostProcessServiceError(err, "Compute", "UpdateComputeCapacityTopology", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateComputeCluster Updates a compute cluster. A compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a +// remote direct memory access (RDMA) network group. +// To create instances within a compute cluster, use the LaunchInstance +// operation. +// To delete instances from a compute cluster, use the TerminateInstance +// operation. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeCluster.go.html to see an example of how to use UpdateComputeCluster API. +func (client ComputeClient) UpdateComputeCluster(ctx context.Context, request UpdateComputeClusterRequest) (response UpdateComputeClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateComputeCluster, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateComputeClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateComputeClusterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateComputeClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateComputeClusterResponse") + } + return +} + +// updateComputeCluster implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateComputeCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/computeClusters/{computeClusterId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateComputeClusterResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateComputeCluster") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCluster/UpdateComputeCluster" + err = common.PostProcessServiceError(err, "Compute", "UpdateComputeCluster", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateComputeGpuMemoryCluster Updates a compute gpu memory cluster resource. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeGpuMemoryCluster.go.html to see an example of how to use UpdateComputeGpuMemoryCluster API. +// A default retry strategy applies to this operation UpdateComputeGpuMemoryCluster() +func (client ComputeClient) UpdateComputeGpuMemoryCluster(ctx context.Context, request UpdateComputeGpuMemoryClusterRequest) (response UpdateComputeGpuMemoryClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateComputeGpuMemoryCluster, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateComputeGpuMemoryClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateComputeGpuMemoryClusterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateComputeGpuMemoryClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateComputeGpuMemoryClusterResponse") + } + return +} + +// updateComputeGpuMemoryCluster implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateComputeGpuMemoryCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/computeGpuMemoryClusters/{computeGpuMemoryClusterId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateComputeGpuMemoryClusterResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateComputeGpuMemoryCluster") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryCluster/UpdateComputeGpuMemoryCluster" + err = common.PostProcessServiceError(err, "Compute", "UpdateComputeGpuMemoryCluster", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateComputeGpuMemoryFabric Customer can update displayName, tags and desired firmware bundle, recycle level for +// compute GPU memory fabric record +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeGpuMemoryFabric.go.html to see an example of how to use UpdateComputeGpuMemoryFabric API. +// A default retry strategy applies to this operation UpdateComputeGpuMemoryFabric() +func (client ComputeClient) UpdateComputeGpuMemoryFabric(ctx context.Context, request UpdateComputeGpuMemoryFabricRequest) (response UpdateComputeGpuMemoryFabricResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateComputeGpuMemoryFabric, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateComputeGpuMemoryFabricResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateComputeGpuMemoryFabricResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateComputeGpuMemoryFabricResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateComputeGpuMemoryFabricResponse") + } + return +} + +// updateComputeGpuMemoryFabric implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateComputeGpuMemoryFabric(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/computeGpuMemoryFabrics/{computeGpuMemoryFabricId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateComputeGpuMemoryFabricResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateComputeGpuMemoryFabric") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeGpuMemoryFabric/UpdateComputeGpuMemoryFabric" + err = common.PostProcessServiceError(err, "Compute", "UpdateComputeGpuMemoryFabric", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateComputeHost Customer can update the some fields for ComputeHost record +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeHost.go.html to see an example of how to use UpdateComputeHost API. +// A default retry strategy applies to this operation UpdateComputeHost() +func (client ComputeClient) UpdateComputeHost(ctx context.Context, request UpdateComputeHostRequest) (response UpdateComputeHostResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateComputeHost, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateComputeHostResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateComputeHostResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateComputeHostResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateComputeHostResponse") + } + return +} + +// updateComputeHost implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateComputeHost(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/computeHosts/{computeHostId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateComputeHostResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateComputeHost") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHost/UpdateComputeHost" + err = common.PostProcessServiceError(err, "Compute", "UpdateComputeHost", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateComputeHostGroup Updates the specified compute host group details. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeHostGroup.go.html to see an example of how to use UpdateComputeHostGroup API. +// A default retry strategy applies to this operation UpdateComputeHostGroup() +func (client ComputeClient) UpdateComputeHostGroup(ctx context.Context, request UpdateComputeHostGroupRequest) (response UpdateComputeHostGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateComputeHostGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateComputeHostGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateComputeHostGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateComputeHostGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateComputeHostGroupResponse") + } + return +} + +// updateComputeHostGroup implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateComputeHostGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/computeHostGroups/{computeHostGroupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateComputeHostGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateComputeHostGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeHostGroup/UpdateComputeHostGroup" + err = common.PostProcessServiceError(err, "Compute", "UpdateComputeHostGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateComputeImageCapabilitySchema Updates the specified Compute Image Capability Schema +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeImageCapabilitySchema.go.html to see an example of how to use UpdateComputeImageCapabilitySchema API. +func (client ComputeClient) UpdateComputeImageCapabilitySchema(ctx context.Context, request UpdateComputeImageCapabilitySchemaRequest) (response UpdateComputeImageCapabilitySchemaResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateComputeImageCapabilitySchema, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateComputeImageCapabilitySchemaResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateComputeImageCapabilitySchemaResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateComputeImageCapabilitySchemaResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateComputeImageCapabilitySchemaResponse") + } + return +} + +// updateComputeImageCapabilitySchema implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateComputeImageCapabilitySchema(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/computeImageCapabilitySchemas/{computeImageCapabilitySchemaId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateComputeImageCapabilitySchemaResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateComputeImageCapabilitySchema") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeImageCapabilitySchema/UpdateComputeImageCapabilitySchema" + err = common.PostProcessServiceError(err, "Compute", "UpdateComputeImageCapabilitySchema", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateConsoleHistory Updates the specified console history metadata. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateConsoleHistory.go.html to see an example of how to use UpdateConsoleHistory API. +func (client ComputeClient) UpdateConsoleHistory(ctx context.Context, request UpdateConsoleHistoryRequest) (response UpdateConsoleHistoryResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateConsoleHistory, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateConsoleHistoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateConsoleHistoryResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateConsoleHistoryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateConsoleHistoryResponse") + } + return +} + +// updateConsoleHistory implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateConsoleHistory(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/instanceConsoleHistories/{instanceConsoleHistoryId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateConsoleHistoryResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateConsoleHistory") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ConsoleHistory/UpdateConsoleHistory" + err = common.PostProcessServiceError(err, "Compute", "UpdateConsoleHistory", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateDedicatedVmHost Updates the displayName, freeformTags, and definedTags attributes for the specified dedicated virtual machine host. +// If an attribute value is not included, it will not be updated. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDedicatedVmHost.go.html to see an example of how to use UpdateDedicatedVmHost API. +func (client ComputeClient) UpdateDedicatedVmHost(ctx context.Context, request UpdateDedicatedVmHostRequest) (response UpdateDedicatedVmHostResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateDedicatedVmHost, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateDedicatedVmHostResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateDedicatedVmHostResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateDedicatedVmHostResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDedicatedVmHostResponse") + } + return +} + +// updateDedicatedVmHost implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateDedicatedVmHost(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/dedicatedVmHosts/{dedicatedVmHostId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateDedicatedVmHostResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateDedicatedVmHost") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DedicatedVmHost/UpdateDedicatedVmHost" + err = common.PostProcessServiceError(err, "Compute", "UpdateDedicatedVmHost", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateImage Updates the display name of the image. Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateImage.go.html to see an example of how to use UpdateImage API. +func (client ComputeClient) UpdateImage(ctx context.Context, request UpdateImageRequest) (response UpdateImageResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateImage, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateImageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateImageResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateImageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateImageResponse") + } + return +} + +// updateImage implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateImage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/images/{imageId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateImageResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateImage") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Image/UpdateImage" + err = common.PostProcessServiceError(err, "Compute", "UpdateImage", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateInstance Updates certain fields on the specified instance. Fields that are not provided in the +// request will not be updated. Avoid entering confidential information. +// Changes to metadata fields will be reflected in the instance metadata service (this may take +// up to a minute). +// The OCID of the instance remains the same. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInstance.go.html to see an example of how to use UpdateInstance API. +func (client ComputeClient) UpdateInstance(ctx context.Context, request UpdateInstanceRequest) (response UpdateInstanceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateInstance, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateInstanceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateInstanceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateInstanceResponse") + } + return +} + +// updateInstance implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/instances/{instanceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateInstance") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Instance/UpdateInstance" + err = common.PostProcessServiceError(err, "Compute", "UpdateInstance", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateInstanceConsoleConnection Updates the defined tags and free-form tags for the specified instance console connection. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInstanceConsoleConnection.go.html to see an example of how to use UpdateInstanceConsoleConnection API. +func (client ComputeClient) UpdateInstanceConsoleConnection(ctx context.Context, request UpdateInstanceConsoleConnectionRequest) (response UpdateInstanceConsoleConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateInstanceConsoleConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateInstanceConsoleConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateInstanceConsoleConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateInstanceConsoleConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateInstanceConsoleConnectionResponse") + } + return +} + +// updateInstanceConsoleConnection implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateInstanceConsoleConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/instanceConsoleConnections/{instanceConsoleConnectionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateInstanceConsoleConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateInstanceConsoleConnection") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceConsoleConnection/UpdateInstanceConsoleConnection" + err = common.PostProcessServiceError(err, "Compute", "UpdateInstanceConsoleConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateInstanceMaintenanceEvent Updates the maintenance event for the given instance. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInstanceMaintenanceEvent.go.html to see an example of how to use UpdateInstanceMaintenanceEvent API. +// A default retry strategy applies to this operation UpdateInstanceMaintenanceEvent() +func (client ComputeClient) UpdateInstanceMaintenanceEvent(ctx context.Context, request UpdateInstanceMaintenanceEventRequest) (response UpdateInstanceMaintenanceEventResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateInstanceMaintenanceEvent, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateInstanceMaintenanceEventResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateInstanceMaintenanceEventResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateInstanceMaintenanceEventResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateInstanceMaintenanceEventResponse") + } + return +} + +// updateInstanceMaintenanceEvent implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateInstanceMaintenanceEvent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/instanceMaintenanceEvents/{instanceMaintenanceEventId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateInstanceMaintenanceEventResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateInstanceMaintenanceEvent") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceMaintenanceEvent/UpdateInstanceMaintenanceEvent" + err = common.PostProcessServiceError(err, "Compute", "UpdateInstanceMaintenanceEvent", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVolumeAttachment Updates information about the specified volume attachment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeAttachment.go.html to see an example of how to use UpdateVolumeAttachment API. +func (client ComputeClient) UpdateVolumeAttachment(ctx context.Context, request UpdateVolumeAttachmentRequest) (response UpdateVolumeAttachmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVolumeAttachment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateVolumeAttachmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateVolumeAttachmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateVolumeAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVolumeAttachmentResponse") + } + return +} + +// updateVolumeAttachment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateVolumeAttachment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/volumeAttachments/{volumeAttachmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateVolumeAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "compute", "UpdateVolumeAttachment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VolumeAttachment/UpdateVolumeAttachment" + err = common.PostProcessServiceError(err, "Compute", "UpdateVolumeAttachment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &volumeattachment{}) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/core_computemanagement_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_computemanagement_client.go new file mode 100644 index 000000000..097940f3d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_computemanagement_client.go @@ -0,0 +1,2379 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// ComputeManagementClient a client for ComputeManagement +type ComputeManagementClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewComputeManagementClientWithConfigurationProvider Creates a new default ComputeManagement client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewComputeManagementClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ComputeManagementClient, err error) { + if enabled := common.CheckForEnabledServices("core"); !enabled { + return client, fmt.Errorf("the Developer Tool configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local developer-tool-configuration.json file configured the service you're targeting or contact the cloud provider on the availability of this service") + } + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newComputeManagementClientFromBaseClient(baseClient, provider) +} + +// NewComputeManagementClientWithOboToken Creates a new default ComputeManagement client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// +// as well as reading the region +func NewComputeManagementClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client ComputeManagementClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newComputeManagementClientFromBaseClient(baseClient, configProvider) +} + +func newComputeManagementClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client ComputeManagementClient, err error) { + // ComputeManagement service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("ComputeManagement")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = ComputeManagementClient{BaseClient: baseClient} + client.BasePath = "20160918" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *ComputeManagementClient) SetRegion(region string) { + client.Host, _ = common.StringToRegion(region).EndpointForTemplateDottedRegion("iaas", "https://iaas.{region}.{dualStack?ds.oci.:}{secondLevelDomain}", "iaas") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *ComputeManagementClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *ComputeManagementClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// EnableDualStackEndpoints Determines whether dual stack endpoint should be used or not. +// Default value is false +func (client *ComputeManagementClient) EnableDualStackEndpoints(enableDualStack bool) { + client.BaseClient.EnableDualStackEndpoints(enableDualStack) +} + +// AttachInstancePoolInstance Attaches an instance to an instance pool. For information about the prerequisites +// that an instance must meet before you can attach it to a pool, see +// Attaching an Instance to an Instance Pool (https://docs.oracle.com/iaas/Content/Compute/Tasks/updatinginstancepool.htm#attach-instance). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachInstancePoolInstance.go.html to see an example of how to use AttachInstancePoolInstance API. +func (client ComputeManagementClient) AttachInstancePoolInstance(ctx context.Context, request AttachInstancePoolInstanceRequest) (response AttachInstancePoolInstanceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.attachInstancePoolInstance, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AttachInstancePoolInstanceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AttachInstancePoolInstanceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AttachInstancePoolInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AttachInstancePoolInstanceResponse") + } + return +} + +// attachInstancePoolInstance implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) attachInstancePoolInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instancePools/{instancePoolId}/instances", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AttachInstancePoolInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "AttachInstancePoolInstance") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "ComputeManagement", "AttachInstancePoolInstance", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AttachLoadBalancer Attach a load balancer to the instance pool. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachLoadBalancer.go.html to see an example of how to use AttachLoadBalancer API. +func (client ComputeManagementClient) AttachLoadBalancer(ctx context.Context, request AttachLoadBalancerRequest) (response AttachLoadBalancerResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.attachLoadBalancer, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AttachLoadBalancerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AttachLoadBalancerResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AttachLoadBalancerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AttachLoadBalancerResponse") + } + return +} + +// attachLoadBalancer implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) attachLoadBalancer(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instancePools/{instancePoolId}/actions/attachLoadBalancer", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AttachLoadBalancerResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "AttachLoadBalancer") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePool/AttachLoadBalancer" + err = common.PostProcessServiceError(err, "ComputeManagement", "AttachLoadBalancer", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeClusterNetworkCompartment Moves a cluster network with instance pools (https://docs.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm) +// into a different compartment within the same tenancy. For +// information about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// When you move a cluster network to a different compartment, associated resources such as the instances +// in the cluster network, boot volumes, and VNICs are not moved. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeClusterNetworkCompartment.go.html to see an example of how to use ChangeClusterNetworkCompartment API. +func (client ComputeManagementClient) ChangeClusterNetworkCompartment(ctx context.Context, request ChangeClusterNetworkCompartmentRequest) (response ChangeClusterNetworkCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeClusterNetworkCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeClusterNetworkCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeClusterNetworkCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeClusterNetworkCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeClusterNetworkCompartmentResponse") + } + return +} + +// changeClusterNetworkCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) changeClusterNetworkCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusterNetworks/{clusterNetworkId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeClusterNetworkCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "ChangeClusterNetworkCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ClusterNetwork/ChangeClusterNetworkCompartment" + err = common.PostProcessServiceError(err, "ComputeManagement", "ChangeClusterNetworkCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeInstanceConfigurationCompartment Moves an instance configuration into a different compartment within the same tenancy. +// For information about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// When you move an instance configuration to a different compartment, associated resources such as +// instance pools are not moved. +// **Important:** Most of the properties for an existing instance configuration, including the compartment, +// cannot be modified after you create the instance configuration. Although you can move an instance configuration +// to a different compartment, you will not be able to use the instance configuration to manage instance pools +// in the new compartment. If you want to update an instance configuration to point to a different compartment, +// you should instead create a new instance configuration in the target compartment using +// CreateInstanceConfiguration (https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceConfiguration/CreateInstanceConfiguration). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeInstanceConfigurationCompartment.go.html to see an example of how to use ChangeInstanceConfigurationCompartment API. +func (client ComputeManagementClient) ChangeInstanceConfigurationCompartment(ctx context.Context, request ChangeInstanceConfigurationCompartmentRequest) (response ChangeInstanceConfigurationCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeInstanceConfigurationCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeInstanceConfigurationCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeInstanceConfigurationCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeInstanceConfigurationCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeInstanceConfigurationCompartmentResponse") + } + return +} + +// changeInstanceConfigurationCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) changeInstanceConfigurationCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instanceConfigurations/{instanceConfigurationId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeInstanceConfigurationCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "ChangeInstanceConfigurationCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceConfiguration/ChangeInstanceConfigurationCompartment" + err = common.PostProcessServiceError(err, "ComputeManagement", "ChangeInstanceConfigurationCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeInstancePoolCompartment Moves an instance pool into a different compartment within the same tenancy. For +// information about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// When you move an instance pool to a different compartment, associated resources such as the instances in +// the pool, boot volumes, VNICs, and autoscaling configurations are not moved. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeInstancePoolCompartment.go.html to see an example of how to use ChangeInstancePoolCompartment API. +func (client ComputeManagementClient) ChangeInstancePoolCompartment(ctx context.Context, request ChangeInstancePoolCompartmentRequest) (response ChangeInstancePoolCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeInstancePoolCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeInstancePoolCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeInstancePoolCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeInstancePoolCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeInstancePoolCompartmentResponse") + } + return +} + +// changeInstancePoolCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) changeInstancePoolCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instancePools/{instancePoolId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeInstancePoolCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "ChangeInstancePoolCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePool/ChangeInstancePoolCompartment" + err = common.PostProcessServiceError(err, "ComputeManagement", "ChangeInstancePoolCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateClusterNetwork Creates a cluster network with instance pools (https://docs.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). +// A cluster network is a group of high performance computing (HPC), GPU, or optimized bare metal +// instances that are connected with an ultra low-latency remote direct memory access (RDMA) network. +// Cluster networks with instance pools use instance pools to manage groups of identical instances. +// Use cluster networks with instance pools when you want predictable capacity for a specific number of identical +// instances that are managed as a group. +// If you want to manage instances in the RDMA network independently of each other or use different types of instances +// in the network group, create a compute cluster by using the CreateComputeCluster +// operation. +// To determine whether capacity is available for a specific shape before you create a cluster network, +// use the CreateComputeCapacityReport +// operation. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateClusterNetwork.go.html to see an example of how to use CreateClusterNetwork API. +func (client ComputeManagementClient) CreateClusterNetwork(ctx context.Context, request CreateClusterNetworkRequest) (response CreateClusterNetworkResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createClusterNetwork, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateClusterNetworkResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateClusterNetworkResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateClusterNetworkResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateClusterNetworkResponse") + } + return +} + +// createClusterNetwork implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) createClusterNetwork(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusterNetworks", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateClusterNetworkResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "CreateClusterNetwork") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ClusterNetwork/CreateClusterNetwork" + err = common.PostProcessServiceError(err, "ComputeManagement", "CreateClusterNetwork", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateInstanceConfiguration Creates an instance configuration. An instance configuration is a template that defines the +// settings to use when creating Compute instances. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateInstanceConfiguration.go.html to see an example of how to use CreateInstanceConfiguration API. +func (client ComputeManagementClient) CreateInstanceConfiguration(ctx context.Context, request CreateInstanceConfigurationRequest) (response CreateInstanceConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createInstanceConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateInstanceConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateInstanceConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateInstanceConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateInstanceConfigurationResponse") + } + return +} + +// createInstanceConfiguration implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) createInstanceConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instanceConfigurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateInstanceConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "CreateInstanceConfiguration") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceConfiguration/CreateInstanceConfiguration" + err = common.PostProcessServiceError(err, "ComputeManagement", "CreateInstanceConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateInstancePool Creates an instance pool. +// To determine whether capacity is available for a specific shape before you create an instance pool, +// use the CreateComputeCapacityReport +// operation. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateInstancePool.go.html to see an example of how to use CreateInstancePool API. +func (client ComputeManagementClient) CreateInstancePool(ctx context.Context, request CreateInstancePoolRequest) (response CreateInstancePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createInstancePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateInstancePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateInstancePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateInstancePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateInstancePoolResponse") + } + return +} + +// createInstancePool implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) createInstancePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instancePools", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateInstancePoolResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "CreateInstancePool") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePool/CreateInstancePool" + err = common.PostProcessServiceError(err, "ComputeManagement", "CreateInstancePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteInstanceConfiguration Deletes an instance configuration. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteInstanceConfiguration.go.html to see an example of how to use DeleteInstanceConfiguration API. +func (client ComputeManagementClient) DeleteInstanceConfiguration(ctx context.Context, request DeleteInstanceConfigurationRequest) (response DeleteInstanceConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteInstanceConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteInstanceConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteInstanceConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteInstanceConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteInstanceConfigurationResponse") + } + return +} + +// deleteInstanceConfiguration implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) deleteInstanceConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/instanceConfigurations/{instanceConfigurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteInstanceConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "DeleteInstanceConfiguration") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "ComputeManagement", "DeleteInstanceConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DetachInstancePoolInstance Detaches an instance from an instance pool. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachInstancePoolInstance.go.html to see an example of how to use DetachInstancePoolInstance API. +func (client ComputeManagementClient) DetachInstancePoolInstance(ctx context.Context, request DetachInstancePoolInstanceRequest) (response DetachInstancePoolInstanceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.detachInstancePoolInstance, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DetachInstancePoolInstanceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DetachInstancePoolInstanceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DetachInstancePoolInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DetachInstancePoolInstanceResponse") + } + return +} + +// detachInstancePoolInstance implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) detachInstancePoolInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instancePools/{instancePoolId}/actions/detachInstance", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DetachInstancePoolInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "DetachInstancePoolInstance") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePoolInstance/DetachInstancePoolInstance" + err = common.PostProcessServiceError(err, "ComputeManagement", "DetachInstancePoolInstance", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DetachLoadBalancer Detach a load balancer from the instance pool. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachLoadBalancer.go.html to see an example of how to use DetachLoadBalancer API. +func (client ComputeManagementClient) DetachLoadBalancer(ctx context.Context, request DetachLoadBalancerRequest) (response DetachLoadBalancerResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.detachLoadBalancer, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DetachLoadBalancerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DetachLoadBalancerResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DetachLoadBalancerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DetachLoadBalancerResponse") + } + return +} + +// detachLoadBalancer implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) detachLoadBalancer(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instancePools/{instancePoolId}/actions/detachLoadBalancer", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DetachLoadBalancerResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "DetachLoadBalancer") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePool/DetachLoadBalancer" + err = common.PostProcessServiceError(err, "ComputeManagement", "DetachLoadBalancer", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetClusterNetwork Gets information about a cluster network with instance pools (https://docs.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetClusterNetwork.go.html to see an example of how to use GetClusterNetwork API. +func (client ComputeManagementClient) GetClusterNetwork(ctx context.Context, request GetClusterNetworkRequest) (response GetClusterNetworkResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getClusterNetwork, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetClusterNetworkResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetClusterNetworkResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetClusterNetworkResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetClusterNetworkResponse") + } + return +} + +// getClusterNetwork implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) getClusterNetwork(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusterNetworks/{clusterNetworkId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetClusterNetworkResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "GetClusterNetwork") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ClusterNetwork/GetClusterNetwork" + err = common.PostProcessServiceError(err, "ComputeManagement", "GetClusterNetwork", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetInstanceConfiguration Gets the specified instance configuration +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstanceConfiguration.go.html to see an example of how to use GetInstanceConfiguration API. +func (client ComputeManagementClient) GetInstanceConfiguration(ctx context.Context, request GetInstanceConfigurationRequest) (response GetInstanceConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getInstanceConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetInstanceConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetInstanceConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetInstanceConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetInstanceConfigurationResponse") + } + return +} + +// getInstanceConfiguration implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) getInstanceConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instanceConfigurations/{instanceConfigurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetInstanceConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "GetInstanceConfiguration") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceConfiguration/GetInstanceConfiguration" + err = common.PostProcessServiceError(err, "ComputeManagement", "GetInstanceConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetInstancePool Gets the specified instance pool +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstancePool.go.html to see an example of how to use GetInstancePool API. +func (client ComputeManagementClient) GetInstancePool(ctx context.Context, request GetInstancePoolRequest) (response GetInstancePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getInstancePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetInstancePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetInstancePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetInstancePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetInstancePoolResponse") + } + return +} + +// getInstancePool implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) getInstancePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instancePools/{instancePoolId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetInstancePoolResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "GetInstancePool") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePool/GetInstancePool" + err = common.PostProcessServiceError(err, "ComputeManagement", "GetInstancePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetInstancePoolInstance Gets information about an instance that belongs to an instance pool. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstancePoolInstance.go.html to see an example of how to use GetInstancePoolInstance API. +func (client ComputeManagementClient) GetInstancePoolInstance(ctx context.Context, request GetInstancePoolInstanceRequest) (response GetInstancePoolInstanceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getInstancePoolInstance, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetInstancePoolInstanceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetInstancePoolInstanceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetInstancePoolInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetInstancePoolInstanceResponse") + } + return +} + +// getInstancePoolInstance implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) getInstancePoolInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instancePools/{instancePoolId}/instances/{instanceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetInstancePoolInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "GetInstancePoolInstance") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePoolInstance/GetInstancePoolInstance" + err = common.PostProcessServiceError(err, "ComputeManagement", "GetInstancePoolInstance", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetInstancePoolLoadBalancerAttachment Gets information about a load balancer that is attached to the specified instance pool. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstancePoolLoadBalancerAttachment.go.html to see an example of how to use GetInstancePoolLoadBalancerAttachment API. +func (client ComputeManagementClient) GetInstancePoolLoadBalancerAttachment(ctx context.Context, request GetInstancePoolLoadBalancerAttachmentRequest) (response GetInstancePoolLoadBalancerAttachmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getInstancePoolLoadBalancerAttachment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetInstancePoolLoadBalancerAttachmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetInstancePoolLoadBalancerAttachmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetInstancePoolLoadBalancerAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetInstancePoolLoadBalancerAttachmentResponse") + } + return +} + +// getInstancePoolLoadBalancerAttachment implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) getInstancePoolLoadBalancerAttachment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instancePools/{instancePoolId}/loadBalancerAttachments/{instancePoolLoadBalancerAttachmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetInstancePoolLoadBalancerAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "GetInstancePoolLoadBalancerAttachment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePoolLoadBalancerAttachment/GetInstancePoolLoadBalancerAttachment" + err = common.PostProcessServiceError(err, "ComputeManagement", "GetInstancePoolLoadBalancerAttachment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// LaunchInstanceConfiguration Creates an instance from an instance configuration. +// If the instance configuration does not include all of the parameters that are +// required to create an instance, such as the availability domain and subnet ID, you must +// provide these parameters when you create an instance from the instance configuration. +// For more information, see the InstanceConfiguration +// resource. +// To determine whether capacity is available for a specific shape before you create an instance, +// use the CreateComputeCapacityReport +// operation. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/LaunchInstanceConfiguration.go.html to see an example of how to use LaunchInstanceConfiguration API. +func (client ComputeManagementClient) LaunchInstanceConfiguration(ctx context.Context, request LaunchInstanceConfigurationRequest) (response LaunchInstanceConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.launchInstanceConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = LaunchInstanceConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = LaunchInstanceConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(LaunchInstanceConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into LaunchInstanceConfigurationResponse") + } + return +} + +// launchInstanceConfiguration implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) launchInstanceConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instanceConfigurations/{instanceConfigurationId}/actions/launch", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response LaunchInstanceConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "LaunchInstanceConfiguration") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Instance/LaunchInstanceConfiguration" + err = common.PostProcessServiceError(err, "ComputeManagement", "LaunchInstanceConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListClusterNetworkInstances Lists the instances in a cluster network with instance pools (https://docs.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListClusterNetworkInstances.go.html to see an example of how to use ListClusterNetworkInstances API. +func (client ComputeManagementClient) ListClusterNetworkInstances(ctx context.Context, request ListClusterNetworkInstancesRequest) (response ListClusterNetworkInstancesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listClusterNetworkInstances, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListClusterNetworkInstancesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListClusterNetworkInstancesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListClusterNetworkInstancesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListClusterNetworkInstancesResponse") + } + return +} + +// listClusterNetworkInstances implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) listClusterNetworkInstances(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusterNetworks/{clusterNetworkId}/instances", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListClusterNetworkInstancesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "ListClusterNetworkInstances") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ClusterNetwork/ListClusterNetworkInstances" + err = common.PostProcessServiceError(err, "ComputeManagement", "ListClusterNetworkInstances", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListClusterNetworks Lists the cluster networks with instance pools (https://docs.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm) +// in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListClusterNetworks.go.html to see an example of how to use ListClusterNetworks API. +func (client ComputeManagementClient) ListClusterNetworks(ctx context.Context, request ListClusterNetworksRequest) (response ListClusterNetworksResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listClusterNetworks, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListClusterNetworksResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListClusterNetworksResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListClusterNetworksResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListClusterNetworksResponse") + } + return +} + +// listClusterNetworks implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) listClusterNetworks(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusterNetworks", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListClusterNetworksResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "ListClusterNetworks") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ClusterNetwork/ListClusterNetworks" + err = common.PostProcessServiceError(err, "ComputeManagement", "ListClusterNetworks", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListInstanceConfigurations Lists the instance configurations in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstanceConfigurations.go.html to see an example of how to use ListInstanceConfigurations API. +func (client ComputeManagementClient) ListInstanceConfigurations(ctx context.Context, request ListInstanceConfigurationsRequest) (response ListInstanceConfigurationsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listInstanceConfigurations, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListInstanceConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListInstanceConfigurationsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListInstanceConfigurationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListInstanceConfigurationsResponse") + } + return +} + +// listInstanceConfigurations implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) listInstanceConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instanceConfigurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListInstanceConfigurationsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "ListInstanceConfigurations") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceConfigurationSummary/ListInstanceConfigurations" + err = common.PostProcessServiceError(err, "ComputeManagement", "ListInstanceConfigurations", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListInstancePoolInstances List the instances in the specified instance pool. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstancePoolInstances.go.html to see an example of how to use ListInstancePoolInstances API. +func (client ComputeManagementClient) ListInstancePoolInstances(ctx context.Context, request ListInstancePoolInstancesRequest) (response ListInstancePoolInstancesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listInstancePoolInstances, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListInstancePoolInstancesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListInstancePoolInstancesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListInstancePoolInstancesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListInstancePoolInstancesResponse") + } + return +} + +// listInstancePoolInstances implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) listInstancePoolInstances(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instancePools/{instancePoolId}/instances", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListInstancePoolInstancesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "ListInstancePoolInstances") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceSummary/ListInstancePoolInstances" + err = common.PostProcessServiceError(err, "ComputeManagement", "ListInstancePoolInstances", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListInstancePools Lists the instance pools in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstancePools.go.html to see an example of how to use ListInstancePools API. +func (client ComputeManagementClient) ListInstancePools(ctx context.Context, request ListInstancePoolsRequest) (response ListInstancePoolsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listInstancePools, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListInstancePoolsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListInstancePoolsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListInstancePoolsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListInstancePoolsResponse") + } + return +} + +// listInstancePools implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) listInstancePools(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/instancePools", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListInstancePoolsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "ListInstancePools") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePoolSummary/ListInstancePools" + err = common.PostProcessServiceError(err, "ComputeManagement", "ListInstancePools", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ResetInstancePool Performs the reset (immediate power off and power on) action on the specified instance pool, +// which performs the action on all the instances in the pool. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ResetInstancePool.go.html to see an example of how to use ResetInstancePool API. +func (client ComputeManagementClient) ResetInstancePool(ctx context.Context, request ResetInstancePoolRequest) (response ResetInstancePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.resetInstancePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ResetInstancePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ResetInstancePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ResetInstancePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ResetInstancePoolResponse") + } + return +} + +// resetInstancePool implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) resetInstancePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instancePools/{instancePoolId}/actions/reset", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ResetInstancePoolResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "ResetInstancePool") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePool/ResetInstancePool" + err = common.PostProcessServiceError(err, "ComputeManagement", "ResetInstancePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// SoftresetInstancePool Performs the softreset (ACPI shutdown and power on) action on the specified instance pool, +// which performs the action on all the instances in the pool. +// Softreset gracefully reboots the instances by sending a shutdown command to the operating systems. +// After waiting 15 minutes for the OS to shut down, the instances are powered off and then powered back on. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/SoftresetInstancePool.go.html to see an example of how to use SoftresetInstancePool API. +func (client ComputeManagementClient) SoftresetInstancePool(ctx context.Context, request SoftresetInstancePoolRequest) (response SoftresetInstancePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.softresetInstancePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = SoftresetInstancePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = SoftresetInstancePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(SoftresetInstancePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into SoftresetInstancePoolResponse") + } + return +} + +// softresetInstancePool implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) softresetInstancePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instancePools/{instancePoolId}/actions/softreset", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response SoftresetInstancePoolResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "SoftresetInstancePool") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePool/SoftresetInstancePool" + err = common.PostProcessServiceError(err, "ComputeManagement", "SoftresetInstancePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// SoftstopInstancePool Performs the softstop (ACPI shutdown and power on) action on the specified instance pool, +// which performs the action on all the instances in the pool. +// Softstop gracefully reboots the instances by sending a shutdown command to the operating systems. +// After waiting 15 minutes for the OS to shutdown, the instances are powered off and then powered back on. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/SoftstopInstancePool.go.html to see an example of how to use SoftstopInstancePool API. +func (client ComputeManagementClient) SoftstopInstancePool(ctx context.Context, request SoftstopInstancePoolRequest) (response SoftstopInstancePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.softstopInstancePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = SoftstopInstancePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = SoftstopInstancePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(SoftstopInstancePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into SoftstopInstancePoolResponse") + } + return +} + +// softstopInstancePool implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) softstopInstancePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instancePools/{instancePoolId}/actions/softstop", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response SoftstopInstancePoolResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "SoftstopInstancePool") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePool/SoftstopInstancePool" + err = common.PostProcessServiceError(err, "ComputeManagement", "SoftstopInstancePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// StartInstancePool Performs the start (power on) action on the specified instance pool, +// which performs the action on all the instances in the pool. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/StartInstancePool.go.html to see an example of how to use StartInstancePool API. +func (client ComputeManagementClient) StartInstancePool(ctx context.Context, request StartInstancePoolRequest) (response StartInstancePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.startInstancePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = StartInstancePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = StartInstancePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(StartInstancePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into StartInstancePoolResponse") + } + return +} + +// startInstancePool implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) startInstancePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instancePools/{instancePoolId}/actions/start", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response StartInstancePoolResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "StartInstancePool") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePool/StartInstancePool" + err = common.PostProcessServiceError(err, "ComputeManagement", "StartInstancePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// StopInstancePool Performs the stop (immediate power off) action on the specified instance pool, +// which performs the action on all the instances in the pool. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/StopInstancePool.go.html to see an example of how to use StopInstancePool API. +func (client ComputeManagementClient) StopInstancePool(ctx context.Context, request StopInstancePoolRequest) (response StopInstancePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.stopInstancePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = StopInstancePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = StopInstancePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(StopInstancePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into StopInstancePoolResponse") + } + return +} + +// stopInstancePool implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) stopInstancePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instancePools/{instancePoolId}/actions/stop", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response StopInstancePoolResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "StopInstancePool") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePool/StopInstancePool" + err = common.PostProcessServiceError(err, "ComputeManagement", "StopInstancePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// TerminateClusterNetwork Deletes (terminates) a cluster network with instance pools (https://docs.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). +// When you delete a cluster network, all of its resources are permanently deleted, +// including associated instances and instance pools. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/TerminateClusterNetwork.go.html to see an example of how to use TerminateClusterNetwork API. +func (client ComputeManagementClient) TerminateClusterNetwork(ctx context.Context, request TerminateClusterNetworkRequest) (response TerminateClusterNetworkResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.terminateClusterNetwork, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = TerminateClusterNetworkResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = TerminateClusterNetworkResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(TerminateClusterNetworkResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into TerminateClusterNetworkResponse") + } + return +} + +// terminateClusterNetwork implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) terminateClusterNetwork(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/clusterNetworks/{clusterNetworkId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response TerminateClusterNetworkResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "TerminateClusterNetwork") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ClusterNetwork/TerminateClusterNetwork" + err = common.PostProcessServiceError(err, "ComputeManagement", "TerminateClusterNetwork", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// TerminateInstancePool Terminate the specified instance pool. +// **Warning:** When you delete an instance pool, the resources that were created by the pool are permanently +// deleted, including associated instances, attached boot volumes, and block volumes. +// If an autoscaling configuration applies to the instance pool, the autoscaling configuration will be deleted +// asynchronously after the pool is deleted. You can also manually delete the autoscaling configuration using +// the `DeleteAutoScalingConfiguration` operation in the Autoscaling API. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/TerminateInstancePool.go.html to see an example of how to use TerminateInstancePool API. +func (client ComputeManagementClient) TerminateInstancePool(ctx context.Context, request TerminateInstancePoolRequest) (response TerminateInstancePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.terminateInstancePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = TerminateInstancePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = TerminateInstancePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(TerminateInstancePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into TerminateInstancePoolResponse") + } + return +} + +// terminateInstancePool implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) terminateInstancePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/instancePools/{instancePoolId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response TerminateInstancePoolResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "TerminateInstancePool") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "ComputeManagement", "TerminateInstancePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// TerminationProceedInstancePoolInstance Marks an instance in an instance pool to be ready for termination. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/TerminationProceedInstancePoolInstance.go.html to see an example of how to use TerminationProceedInstancePoolInstance API. +func (client ComputeManagementClient) TerminationProceedInstancePoolInstance(ctx context.Context, request TerminationProceedInstancePoolInstanceRequest) (response TerminationProceedInstancePoolInstanceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.terminationProceedInstancePoolInstance, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = TerminationProceedInstancePoolInstanceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = TerminationProceedInstancePoolInstanceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(TerminationProceedInstancePoolInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into TerminationProceedInstancePoolInstanceResponse") + } + return +} + +// terminationProceedInstancePoolInstance implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) terminationProceedInstancePoolInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/instancePools/{instancePoolId}/actions/terminationProceed", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response TerminationProceedInstancePoolInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "TerminationProceedInstancePoolInstance") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePoolInstance/TerminationProceedInstancePoolInstance" + err = common.PostProcessServiceError(err, "ComputeManagement", "TerminationProceedInstancePoolInstance", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateClusterNetwork Updates a cluster network with instance pools (https://docs.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). +// The OCID of the cluster network remains the same. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateClusterNetwork.go.html to see an example of how to use UpdateClusterNetwork API. +func (client ComputeManagementClient) UpdateClusterNetwork(ctx context.Context, request UpdateClusterNetworkRequest) (response UpdateClusterNetworkResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateClusterNetwork, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateClusterNetworkResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateClusterNetworkResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateClusterNetworkResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateClusterNetworkResponse") + } + return +} + +// updateClusterNetwork implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) updateClusterNetwork(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/clusterNetworks/{clusterNetworkId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateClusterNetworkResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "UpdateClusterNetwork") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ClusterNetwork/UpdateClusterNetwork" + err = common.PostProcessServiceError(err, "ComputeManagement", "UpdateClusterNetwork", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateInstanceConfiguration Updates the free-form tags, defined tags, and display name of an instance configuration. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInstanceConfiguration.go.html to see an example of how to use UpdateInstanceConfiguration API. +func (client ComputeManagementClient) UpdateInstanceConfiguration(ctx context.Context, request UpdateInstanceConfigurationRequest) (response UpdateInstanceConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateInstanceConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateInstanceConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateInstanceConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateInstanceConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateInstanceConfigurationResponse") + } + return +} + +// updateInstanceConfiguration implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) updateInstanceConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/instanceConfigurations/{instanceConfigurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateInstanceConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "UpdateInstanceConfiguration") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceConfiguration/UpdateInstanceConfiguration" + err = common.PostProcessServiceError(err, "ComputeManagement", "UpdateInstanceConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateInstancePool Update the specified instance pool. +// The OCID of the instance pool remains the same. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInstancePool.go.html to see an example of how to use UpdateInstancePool API. +func (client ComputeManagementClient) UpdateInstancePool(ctx context.Context, request UpdateInstancePoolRequest) (response UpdateInstancePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateInstancePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateInstancePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateInstancePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateInstancePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateInstancePoolResponse") + } + return +} + +// updateInstancePool implements the OCIOperation interface (enables retrying operations) +func (client ComputeManagementClient) updateInstancePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/instancePools/{instancePoolId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateInstancePoolResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "computeManagement", "UpdateInstancePool") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstancePool/UpdateInstancePool" + err = common.PostProcessServiceError(err, "ComputeManagement", "UpdateInstancePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/core_virtualnetwork_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_virtualnetwork_client.go new file mode 100644 index 000000000..560ed9ef5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/core_virtualnetwork_client.go @@ -0,0 +1,18675 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// VirtualNetworkClient a client for VirtualNetwork +type VirtualNetworkClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewVirtualNetworkClientWithConfigurationProvider Creates a new default VirtualNetwork client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewVirtualNetworkClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client VirtualNetworkClient, err error) { + if enabled := common.CheckForEnabledServices("core"); !enabled { + return client, fmt.Errorf("the Developer Tool configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local developer-tool-configuration.json file configured the service you're targeting or contact the cloud provider on the availability of this service") + } + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newVirtualNetworkClientFromBaseClient(baseClient, provider) +} + +// NewVirtualNetworkClientWithOboToken Creates a new default VirtualNetwork client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// +// as well as reading the region +func NewVirtualNetworkClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client VirtualNetworkClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newVirtualNetworkClientFromBaseClient(baseClient, configProvider) +} + +func newVirtualNetworkClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client VirtualNetworkClient, err error) { + // VirtualNetwork service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("VirtualNetwork")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = VirtualNetworkClient{BaseClient: baseClient} + client.BasePath = "20160918" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *VirtualNetworkClient) SetRegion(region string) { + client.Host, _ = common.StringToRegion(region).EndpointForTemplateDottedRegion("iaas", "https://iaas.{region}.{dualStack?ds.oci.:}{secondLevelDomain}", "iaas") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *VirtualNetworkClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *VirtualNetworkClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// EnableDualStackEndpoints Determines whether dual stack endpoint should be used or not. +// Default value is false +func (client *VirtualNetworkClient) EnableDualStackEndpoints(enableDualStack bool) { + client.BaseClient.EnableDualStackEndpoints(enableDualStack) +} + +// AddDrgRouteDistributionStatements Adds one or more route distribution statements to the specified route distribution. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddDrgRouteDistributionStatements.go.html to see an example of how to use AddDrgRouteDistributionStatements API. +func (client VirtualNetworkClient) AddDrgRouteDistributionStatements(ctx context.Context, request AddDrgRouteDistributionStatementsRequest) (response AddDrgRouteDistributionStatementsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.addDrgRouteDistributionStatements, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AddDrgRouteDistributionStatementsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AddDrgRouteDistributionStatementsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AddDrgRouteDistributionStatementsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AddDrgRouteDistributionStatementsResponse") + } + return +} + +// addDrgRouteDistributionStatements implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) addDrgRouteDistributionStatements(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgRouteDistributions/{drgRouteDistributionId}/actions/addDrgRouteDistributionStatements", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AddDrgRouteDistributionStatementsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "AddDrgRouteDistributionStatements") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteDistributionStatement/AddDrgRouteDistributionStatements" + err = common.PostProcessServiceError(err, "VirtualNetwork", "AddDrgRouteDistributionStatements", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AddDrgRouteRules Adds one or more static route rules to the specified DRG route table. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddDrgRouteRules.go.html to see an example of how to use AddDrgRouteRules API. +func (client VirtualNetworkClient) AddDrgRouteRules(ctx context.Context, request AddDrgRouteRulesRequest) (response AddDrgRouteRulesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.addDrgRouteRules, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AddDrgRouteRulesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AddDrgRouteRulesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AddDrgRouteRulesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AddDrgRouteRulesResponse") + } + return +} + +// addDrgRouteRules implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) addDrgRouteRules(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgRouteTables/{drgRouteTableId}/actions/addDrgRouteRules", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AddDrgRouteRulesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "AddDrgRouteRules") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteRule/AddDrgRouteRules" + err = common.PostProcessServiceError(err, "VirtualNetwork", "AddDrgRouteRules", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AddIpv4SubnetCidr Add an IPv4 prefix to a subnet. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddIpv4SubnetCidr.go.html to see an example of how to use AddIpv4SubnetCidr API. +// A default retry strategy applies to this operation AddIpv4SubnetCidr() +func (client VirtualNetworkClient) AddIpv4SubnetCidr(ctx context.Context, request AddIpv4SubnetCidrRequest) (response AddIpv4SubnetCidrResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.addIpv4SubnetCidr, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AddIpv4SubnetCidrResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AddIpv4SubnetCidrResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AddIpv4SubnetCidrResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AddIpv4SubnetCidrResponse") + } + return +} + +// addIpv4SubnetCidr implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) addIpv4SubnetCidr(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/subnets/{subnetId}/actions/addIpv4Cidr", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AddIpv4SubnetCidrResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "AddIpv4SubnetCidr") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Subnet/AddIpv4SubnetCidr" + err = common.PostProcessServiceError(err, "VirtualNetwork", "AddIpv4SubnetCidr", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AddIpv6SubnetCidr Add an IPv6 prefix to a subnet. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddIpv6SubnetCidr.go.html to see an example of how to use AddIpv6SubnetCidr API. +func (client VirtualNetworkClient) AddIpv6SubnetCidr(ctx context.Context, request AddIpv6SubnetCidrRequest) (response AddIpv6SubnetCidrResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.addIpv6SubnetCidr, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AddIpv6SubnetCidrResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AddIpv6SubnetCidrResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AddIpv6SubnetCidrResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AddIpv6SubnetCidrResponse") + } + return +} + +// addIpv6SubnetCidr implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) addIpv6SubnetCidr(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/subnets/{subnetId}/actions/addIpv6Cidr", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AddIpv6SubnetCidrResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "AddIpv6SubnetCidr") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Subnet/AddIpv6SubnetCidr" + err = common.PostProcessServiceError(err, "VirtualNetwork", "AddIpv6SubnetCidr", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AddIpv6VcnCidr Add an IPv6 prefix to a VCN. The VCN size is always /56 and assigned by Oracle. +// Once added the IPv6 prefix cannot be removed or modified. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddIpv6VcnCidr.go.html to see an example of how to use AddIpv6VcnCidr API. +func (client VirtualNetworkClient) AddIpv6VcnCidr(ctx context.Context, request AddIpv6VcnCidrRequest) (response AddIpv6VcnCidrResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.addIpv6VcnCidr, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AddIpv6VcnCidrResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AddIpv6VcnCidrResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AddIpv6VcnCidrResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AddIpv6VcnCidrResponse") + } + return +} + +// addIpv6VcnCidr implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) addIpv6VcnCidr(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/vcns/{vcnId}/actions/addIpv6Cidr", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AddIpv6VcnCidrResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "AddIpv6VcnCidr") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/AddIpv6VcnCidr" + err = common.PostProcessServiceError(err, "VirtualNetwork", "AddIpv6VcnCidr", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AddNetworkSecurityGroupSecurityRules Adds up to 25 security rules to the specified network security group. Adding more than 25 rules requires multiple operations. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddNetworkSecurityGroupSecurityRules.go.html to see an example of how to use AddNetworkSecurityGroupSecurityRules API. +func (client VirtualNetworkClient) AddNetworkSecurityGroupSecurityRules(ctx context.Context, request AddNetworkSecurityGroupSecurityRulesRequest) (response AddNetworkSecurityGroupSecurityRulesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.addNetworkSecurityGroupSecurityRules, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AddNetworkSecurityGroupSecurityRulesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AddNetworkSecurityGroupSecurityRulesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AddNetworkSecurityGroupSecurityRulesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AddNetworkSecurityGroupSecurityRulesResponse") + } + return +} + +// addNetworkSecurityGroupSecurityRules implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) addNetworkSecurityGroupSecurityRules(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/networkSecurityGroups/{networkSecurityGroupId}/actions/addSecurityRules", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AddNetworkSecurityGroupSecurityRulesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "AddNetworkSecurityGroupSecurityRules") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/SecurityRule/AddNetworkSecurityGroupSecurityRules" + err = common.PostProcessServiceError(err, "VirtualNetwork", "AddNetworkSecurityGroupSecurityRules", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AddPublicIpPoolCapacity Adds some or all of a CIDR block to a public IP pool. +// The CIDR block (or subrange) must not overlap with any other CIDR block already added to this or any other public IP pool. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddPublicIpPoolCapacity.go.html to see an example of how to use AddPublicIpPoolCapacity API. +func (client VirtualNetworkClient) AddPublicIpPoolCapacity(ctx context.Context, request AddPublicIpPoolCapacityRequest) (response AddPublicIpPoolCapacityResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.addPublicIpPoolCapacity, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AddPublicIpPoolCapacityResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AddPublicIpPoolCapacityResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AddPublicIpPoolCapacityResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AddPublicIpPoolCapacityResponse") + } + return +} + +// addPublicIpPoolCapacity implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) addPublicIpPoolCapacity(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/publicIpPools/{publicIpPoolId}/actions/addCapacity", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AddPublicIpPoolCapacityResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "AddPublicIpPoolCapacity") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIpPool/AddPublicIpPoolCapacity" + err = common.PostProcessServiceError(err, "VirtualNetwork", "AddPublicIpPoolCapacity", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AddVcnCidr Adds a CIDR block to a VCN. The CIDR block you add: +// - Must be valid. +// - Must not overlap with another CIDR block in the VCN, a CIDR block of a peered VCN, or the on-premises network CIDR block. +// - Must not exceed the limit of CIDR blocks allowed per VCN. +// **Note:** Adding a CIDR block places your VCN in an updating state until the changes are complete. You cannot create or update the VCN's subnets, VLANs, LPGs, or route tables during this operation. The time to completion can take a few minutes. You can use the `GetWorkRequest` operation to check the status of the update. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AddVcnCidr.go.html to see an example of how to use AddVcnCidr API. +func (client VirtualNetworkClient) AddVcnCidr(ctx context.Context, request AddVcnCidrRequest) (response AddVcnCidrResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.addVcnCidr, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AddVcnCidrResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AddVcnCidrResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AddVcnCidrResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AddVcnCidrResponse") + } + return +} + +// addVcnCidr implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) addVcnCidr(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/vcns/{vcnId}/actions/addCidr", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AddVcnCidrResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "AddVcnCidr") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/AddVcnCidr" + err = common.PostProcessServiceError(err, "VirtualNetwork", "AddVcnCidr", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AdvertiseByoipRange Begins BGP route advertisements for the BYOIP CIDR block you imported to the Oracle Cloud. +// The `ByoipRange` resource must be in the PROVISIONED state before the BYOIP CIDR block routes can be advertised with BGP. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AdvertiseByoipRange.go.html to see an example of how to use AdvertiseByoipRange API. +func (client VirtualNetworkClient) AdvertiseByoipRange(ctx context.Context, request AdvertiseByoipRangeRequest) (response AdvertiseByoipRangeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.advertiseByoipRange, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AdvertiseByoipRangeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AdvertiseByoipRangeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AdvertiseByoipRangeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AdvertiseByoipRangeResponse") + } + return +} + +// advertiseByoipRange implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) advertiseByoipRange(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/byoipRanges/{byoipRangeId}/actions/advertise", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AdvertiseByoipRangeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "AdvertiseByoipRange") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ByoipRange/AdvertiseByoipRange" + err = common.PostProcessServiceError(err, "VirtualNetwork", "AdvertiseByoipRange", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// AttachServiceId Adds the specified Service to the list of enabled +// `Service` objects for the specified gateway. You must also set up a route rule with the +// `cidrBlock` of the `Service` as the rule's destination and the service gateway as the rule's +// target. See RouteTable. +// **Note:** The `AttachServiceId` operation is an easy way to add an individual `Service` to +// the service gateway. Compare it with +// UpdateServiceGateway, which replaces +// the entire existing list of enabled `Service` objects with the list that you provide in the +// `Update` call. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/AttachServiceId.go.html to see an example of how to use AttachServiceId API. +func (client VirtualNetworkClient) AttachServiceId(ctx context.Context, request AttachServiceIdRequest) (response AttachServiceIdResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.attachServiceId, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AttachServiceIdResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AttachServiceIdResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AttachServiceIdResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AttachServiceIdResponse") + } + return +} + +// attachServiceId implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) attachServiceId(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/serviceGateways/{serviceGatewayId}/actions/attachService", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AttachServiceIdResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "AttachServiceId") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ServiceGateway/AttachServiceId" + err = common.PostProcessServiceError(err, "VirtualNetwork", "AttachServiceId", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// BulkAddVirtualCircuitPublicPrefixes Adds one or more customer public IP prefixes to the specified public virtual circuit. +// Use this operation (and not UpdateVirtualCircuit) +// to add prefixes to the virtual circuit. Oracle must verify the customer's ownership +// of each prefix before traffic for that prefix will flow across the virtual circuit. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkAddVirtualCircuitPublicPrefixes.go.html to see an example of how to use BulkAddVirtualCircuitPublicPrefixes API. +// A default retry strategy applies to this operation BulkAddVirtualCircuitPublicPrefixes() +func (client VirtualNetworkClient) BulkAddVirtualCircuitPublicPrefixes(ctx context.Context, request BulkAddVirtualCircuitPublicPrefixesRequest) (response BulkAddVirtualCircuitPublicPrefixesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.bulkAddVirtualCircuitPublicPrefixes, policy) + if err != nil { + if ociResponse != nil { + response = BulkAddVirtualCircuitPublicPrefixesResponse{RawResponse: ociResponse.HTTPResponse()} + } + return + } + if convertedResponse, ok := ociResponse.(BulkAddVirtualCircuitPublicPrefixesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into BulkAddVirtualCircuitPublicPrefixesResponse") + } + return +} + +// bulkAddVirtualCircuitPublicPrefixes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) bulkAddVirtualCircuitPublicPrefixes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/virtualCircuits/{virtualCircuitId}/actions/bulkAddPublicPrefixes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response BulkAddVirtualCircuitPublicPrefixesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "BulkAddVirtualCircuitPublicPrefixes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VirtualCircuitPublicPrefix/BulkAddVirtualCircuitPublicPrefixes" + err = common.PostProcessServiceError(err, "VirtualNetwork", "BulkAddVirtualCircuitPublicPrefixes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// BulkCreateIpv6s Create new IPv6s in bulk for a VNIC or subnet. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkCreateIpv6s.go.html to see an example of how to use BulkCreateIpv6s API. +// A default retry strategy applies to this operation BulkCreateIpv6s() +func (client VirtualNetworkClient) BulkCreateIpv6s(ctx context.Context, request BulkCreateIpv6sRequest) (response BulkCreateIpv6sResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.bulkCreateIpv6s, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = BulkCreateIpv6sResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = BulkCreateIpv6sResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(BulkCreateIpv6sResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into BulkCreateIpv6sResponse") + } + return +} + +// bulkCreateIpv6s implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) bulkCreateIpv6s(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/ipv6/actions/bulkCreateIpv6s", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response BulkCreateIpv6sResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "BulkCreateIpv6s") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Ipv6/BulkCreateIpv6s" + err = common.PostProcessServiceError(err, "VirtualNetwork", "BulkCreateIpv6s", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// BulkCreatePrivateIps Create secondary private IPv4 addresses. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkCreatePrivateIps.go.html to see an example of how to use BulkCreatePrivateIps API. +// A default retry strategy applies to this operation BulkCreatePrivateIps() +func (client VirtualNetworkClient) BulkCreatePrivateIps(ctx context.Context, request BulkCreatePrivateIpsRequest) (response BulkCreatePrivateIpsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.bulkCreatePrivateIps, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = BulkCreatePrivateIpsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = BulkCreatePrivateIpsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(BulkCreatePrivateIpsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into BulkCreatePrivateIpsResponse") + } + return +} + +// bulkCreatePrivateIps implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) bulkCreatePrivateIps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/privateIps/actions/bulkCreatePrivateIps", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response BulkCreatePrivateIpsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "BulkCreatePrivateIps") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PrivateIp/BulkCreatePrivateIps" + err = common.PostProcessServiceError(err, "VirtualNetwork", "BulkCreatePrivateIps", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// BulkDeleteIpv6s Unassign and delete IPv6s for a VNIC in bulk. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkDeleteIpv6s.go.html to see an example of how to use BulkDeleteIpv6s API. +// A default retry strategy applies to this operation BulkDeleteIpv6s() +func (client VirtualNetworkClient) BulkDeleteIpv6s(ctx context.Context, request BulkDeleteIpv6sRequest) (response BulkDeleteIpv6sResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.bulkDeleteIpv6s, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = BulkDeleteIpv6sResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = BulkDeleteIpv6sResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(BulkDeleteIpv6sResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into BulkDeleteIpv6sResponse") + } + return +} + +// bulkDeleteIpv6s implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) bulkDeleteIpv6s(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/ipv6/actions/bulkDeleteIpv6s", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response BulkDeleteIpv6sResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "BulkDeleteIpv6s") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Ipv6/BulkDeleteIpv6s" + err = common.PostProcessServiceError(err, "VirtualNetwork", "BulkDeleteIpv6s", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// BulkDeletePrivateIps Unassign and delete secondary private IPv4s for a VNIC. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkDeletePrivateIps.go.html to see an example of how to use BulkDeletePrivateIps API. +// A default retry strategy applies to this operation BulkDeletePrivateIps() +func (client VirtualNetworkClient) BulkDeletePrivateIps(ctx context.Context, request BulkDeletePrivateIpsRequest) (response BulkDeletePrivateIpsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.bulkDeletePrivateIps, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = BulkDeletePrivateIpsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = BulkDeletePrivateIpsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(BulkDeletePrivateIpsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into BulkDeletePrivateIpsResponse") + } + return +} + +// bulkDeletePrivateIps implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) bulkDeletePrivateIps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/privateIps/actions/bulkDeletePrivateIps", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response BulkDeletePrivateIpsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "BulkDeletePrivateIps") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PrivateIp/BulkDeletePrivateIps" + err = common.PostProcessServiceError(err, "VirtualNetwork", "BulkDeletePrivateIps", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// BulkDeleteVirtualCircuitPublicPrefixes Removes one or more customer public IP prefixes from the specified public virtual circuit. +// Use this operation (and not UpdateVirtualCircuit) +// to remove prefixes from the virtual circuit. When the virtual circuit's state switches +// back to PROVISIONED, Oracle stops advertising the specified prefixes across the connection. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkDeleteVirtualCircuitPublicPrefixes.go.html to see an example of how to use BulkDeleteVirtualCircuitPublicPrefixes API. +// A default retry strategy applies to this operation BulkDeleteVirtualCircuitPublicPrefixes() +func (client VirtualNetworkClient) BulkDeleteVirtualCircuitPublicPrefixes(ctx context.Context, request BulkDeleteVirtualCircuitPublicPrefixesRequest) (response BulkDeleteVirtualCircuitPublicPrefixesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.bulkDeleteVirtualCircuitPublicPrefixes, policy) + if err != nil { + if ociResponse != nil { + response = BulkDeleteVirtualCircuitPublicPrefixesResponse{RawResponse: ociResponse.HTTPResponse()} + } + return + } + if convertedResponse, ok := ociResponse.(BulkDeleteVirtualCircuitPublicPrefixesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into BulkDeleteVirtualCircuitPublicPrefixesResponse") + } + return +} + +// bulkDeleteVirtualCircuitPublicPrefixes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) bulkDeleteVirtualCircuitPublicPrefixes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/virtualCircuits/{virtualCircuitId}/actions/bulkDeletePublicPrefixes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response BulkDeleteVirtualCircuitPublicPrefixesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "BulkDeleteVirtualCircuitPublicPrefixes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VirtualCircuitPublicPrefix/BulkDeleteVirtualCircuitPublicPrefixes" + err = common.PostProcessServiceError(err, "VirtualNetwork", "BulkDeleteVirtualCircuitPublicPrefixes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// BulkDetachIpv6s Detach the specified IPv6s. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkDetachIpv6s.go.html to see an example of how to use BulkDetachIpv6s API. +// A default retry strategy applies to this operation BulkDetachIpv6s() +func (client VirtualNetworkClient) BulkDetachIpv6s(ctx context.Context, request BulkDetachIpv6sRequest) (response BulkDetachIpv6sResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.bulkDetachIpv6s, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = BulkDetachIpv6sResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = BulkDetachIpv6sResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(BulkDetachIpv6sResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into BulkDetachIpv6sResponse") + } + return +} + +// bulkDetachIpv6s implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) bulkDetachIpv6s(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/ipv6/actions/bulkDetachIpv6s", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response BulkDetachIpv6sResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "BulkDetachIpv6s") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Ipv6/BulkDetachIpv6s" + err = common.PostProcessServiceError(err, "VirtualNetwork", "BulkDetachIpv6s", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// BulkDetachPrivateIps Unassign the specified private IP addresses from the Virtual Network Interface Card (VNIC). You must specify the PrivateIP object's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkDetachPrivateIps.go.html to see an example of how to use BulkDetachPrivateIps API. +// A default retry strategy applies to this operation BulkDetachPrivateIps() +func (client VirtualNetworkClient) BulkDetachPrivateIps(ctx context.Context, request BulkDetachPrivateIpsRequest) (response BulkDetachPrivateIpsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.bulkDetachPrivateIps, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = BulkDetachPrivateIpsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = BulkDetachPrivateIpsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(BulkDetachPrivateIpsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into BulkDetachPrivateIpsResponse") + } + return +} + +// bulkDetachPrivateIps implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) bulkDetachPrivateIps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/privateIps/actions/bulkDetachPrivateIps", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response BulkDetachPrivateIpsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "BulkDetachPrivateIps") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PrivateIp/BulkDetachPrivateIps" + err = common.PostProcessServiceError(err, "VirtualNetwork", "BulkDetachPrivateIps", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// BulkUpdateIpv6s Updates the specified IPv6s in bulk. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkUpdateIpv6s.go.html to see an example of how to use BulkUpdateIpv6s API. +// A default retry strategy applies to this operation BulkUpdateIpv6s() +func (client VirtualNetworkClient) BulkUpdateIpv6s(ctx context.Context, request BulkUpdateIpv6sRequest) (response BulkUpdateIpv6sResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.bulkUpdateIpv6s, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = BulkUpdateIpv6sResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = BulkUpdateIpv6sResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(BulkUpdateIpv6sResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into BulkUpdateIpv6sResponse") + } + return +} + +// bulkUpdateIpv6s implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) bulkUpdateIpv6s(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/ipv6/actions/bulkUpdateIpv6s", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response BulkUpdateIpv6sResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "BulkUpdateIpv6s") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Ipv6/BulkUpdateIpv6s" + err = common.PostProcessServiceError(err, "VirtualNetwork", "BulkUpdateIpv6s", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// BulkUpdatePrivateIps Update existing secondary private IPv4s for a VNIC. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/BulkUpdatePrivateIps.go.html to see an example of how to use BulkUpdatePrivateIps API. +// A default retry strategy applies to this operation BulkUpdatePrivateIps() +func (client VirtualNetworkClient) BulkUpdatePrivateIps(ctx context.Context, request BulkUpdatePrivateIpsRequest) (response BulkUpdatePrivateIpsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.bulkUpdatePrivateIps, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = BulkUpdatePrivateIpsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = BulkUpdatePrivateIpsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(BulkUpdatePrivateIpsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into BulkUpdatePrivateIpsResponse") + } + return +} + +// bulkUpdatePrivateIps implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) bulkUpdatePrivateIps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/privateIps/actions/bulkUpdatePrivateIps", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response BulkUpdatePrivateIpsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "BulkUpdatePrivateIps") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PrivateIp/BulkUpdatePrivateIps" + err = common.PostProcessServiceError(err, "VirtualNetwork", "BulkUpdatePrivateIps", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeByoasnCompartment Moves a BYOASN Resource to a different compartment. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeByoasnCompartment.go.html to see an example of how to use ChangeByoasnCompartment API. +// A default retry strategy applies to this operation ChangeByoasnCompartment() +func (client VirtualNetworkClient) ChangeByoasnCompartment(ctx context.Context, request ChangeByoasnCompartmentRequest) (response ChangeByoasnCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeByoasnCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeByoasnCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeByoasnCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeByoasnCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeByoasnCompartmentResponse") + } + return +} + +// changeByoasnCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeByoasnCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/byoasns/{byoasnId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeByoasnCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeByoasnCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Byoasn/ChangeByoasnCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeByoasnCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeByoipRangeCompartment Moves a BYOIP CIDR block to a different compartment. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeByoipRangeCompartment.go.html to see an example of how to use ChangeByoipRangeCompartment API. +func (client VirtualNetworkClient) ChangeByoipRangeCompartment(ctx context.Context, request ChangeByoipRangeCompartmentRequest) (response ChangeByoipRangeCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeByoipRangeCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeByoipRangeCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeByoipRangeCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeByoipRangeCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeByoipRangeCompartmentResponse") + } + return +} + +// changeByoipRangeCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeByoipRangeCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/byoipRanges/{byoipRangeId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeByoipRangeCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeByoipRangeCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ByoipRange/ChangeByoipRangeCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeByoipRangeCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeCaptureFilterCompartment Moves a capture filter to a new compartment in the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeCaptureFilterCompartment.go.html to see an example of how to use ChangeCaptureFilterCompartment API. +func (client VirtualNetworkClient) ChangeCaptureFilterCompartment(ctx context.Context, request ChangeCaptureFilterCompartmentRequest) (response ChangeCaptureFilterCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeCaptureFilterCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeCaptureFilterCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeCaptureFilterCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeCaptureFilterCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeCaptureFilterCompartmentResponse") + } + return +} + +// changeCaptureFilterCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeCaptureFilterCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/captureFilters/{captureFilterId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeCaptureFilterCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeCaptureFilterCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CaptureFilter/ChangeCaptureFilterCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeCaptureFilterCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeCpeCompartment Moves a CPE object into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeCpeCompartment.go.html to see an example of how to use ChangeCpeCompartment API. +// A default retry strategy applies to this operation ChangeCpeCompartment() +func (client VirtualNetworkClient) ChangeCpeCompartment(ctx context.Context, request ChangeCpeCompartmentRequest) (response ChangeCpeCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeCpeCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeCpeCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeCpeCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeCpeCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeCpeCompartmentResponse") + } + return +} + +// changeCpeCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeCpeCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/cpes/{cpeId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeCpeCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeCpeCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Cpe/ChangeCpeCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeCpeCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeCrossConnectCompartment Moves a cross-connect into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeCrossConnectCompartment.go.html to see an example of how to use ChangeCrossConnectCompartment API. +// A default retry strategy applies to this operation ChangeCrossConnectCompartment() +func (client VirtualNetworkClient) ChangeCrossConnectCompartment(ctx context.Context, request ChangeCrossConnectCompartmentRequest) (response ChangeCrossConnectCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeCrossConnectCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeCrossConnectCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeCrossConnectCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeCrossConnectCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeCrossConnectCompartmentResponse") + } + return +} + +// changeCrossConnectCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeCrossConnectCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/crossConnects/{crossConnectId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeCrossConnectCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeCrossConnectCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CrossConnect/ChangeCrossConnectCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeCrossConnectCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeCrossConnectGroupCompartment Moves a cross-connect group into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeCrossConnectGroupCompartment.go.html to see an example of how to use ChangeCrossConnectGroupCompartment API. +// A default retry strategy applies to this operation ChangeCrossConnectGroupCompartment() +func (client VirtualNetworkClient) ChangeCrossConnectGroupCompartment(ctx context.Context, request ChangeCrossConnectGroupCompartmentRequest) (response ChangeCrossConnectGroupCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeCrossConnectGroupCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeCrossConnectGroupCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeCrossConnectGroupCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeCrossConnectGroupCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeCrossConnectGroupCompartmentResponse") + } + return +} + +// changeCrossConnectGroupCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeCrossConnectGroupCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/crossConnectGroups/{crossConnectGroupId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeCrossConnectGroupCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeCrossConnectGroupCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CrossConnectGroup/ChangeCrossConnectGroupCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeCrossConnectGroupCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeDhcpOptionsCompartment Moves a set of DHCP options into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeDhcpOptionsCompartment.go.html to see an example of how to use ChangeDhcpOptionsCompartment API. +func (client VirtualNetworkClient) ChangeDhcpOptionsCompartment(ctx context.Context, request ChangeDhcpOptionsCompartmentRequest) (response ChangeDhcpOptionsCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeDhcpOptionsCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeDhcpOptionsCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeDhcpOptionsCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeDhcpOptionsCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeDhcpOptionsCompartmentResponse") + } + return +} + +// changeDhcpOptionsCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeDhcpOptionsCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dhcps/{dhcpId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeDhcpOptionsCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeDhcpOptionsCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DhcpOptions/ChangeDhcpOptionsCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeDhcpOptionsCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeDrgCompartment Moves a DRG into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeDrgCompartment.go.html to see an example of how to use ChangeDrgCompartment API. +func (client VirtualNetworkClient) ChangeDrgCompartment(ctx context.Context, request ChangeDrgCompartmentRequest) (response ChangeDrgCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeDrgCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeDrgCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeDrgCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeDrgCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeDrgCompartmentResponse") + } + return +} + +// changeDrgCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeDrgCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgs/{drgId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeDrgCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeDrgCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Drg/ChangeDrgCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeDrgCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeIPSecConnectionCompartment Moves an IPSec connection into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeIPSecConnectionCompartment.go.html to see an example of how to use ChangeIPSecConnectionCompartment API. +// A default retry strategy applies to this operation ChangeIPSecConnectionCompartment() +func (client VirtualNetworkClient) ChangeIPSecConnectionCompartment(ctx context.Context, request ChangeIPSecConnectionCompartmentRequest) (response ChangeIPSecConnectionCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeIPSecConnectionCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeIPSecConnectionCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeIPSecConnectionCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeIPSecConnectionCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeIPSecConnectionCompartmentResponse") + } + return +} + +// changeIPSecConnectionCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeIPSecConnectionCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/ipsecConnections/{ipscId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeIPSecConnectionCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeIPSecConnectionCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IPSecConnection/ChangeIPSecConnectionCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeIPSecConnectionCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeInternetGatewayCompartment Moves an internet gateway into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeInternetGatewayCompartment.go.html to see an example of how to use ChangeInternetGatewayCompartment API. +func (client VirtualNetworkClient) ChangeInternetGatewayCompartment(ctx context.Context, request ChangeInternetGatewayCompartmentRequest) (response ChangeInternetGatewayCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeInternetGatewayCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeInternetGatewayCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeInternetGatewayCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeInternetGatewayCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeInternetGatewayCompartmentResponse") + } + return +} + +// changeInternetGatewayCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeInternetGatewayCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/internetGateways/{igId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeInternetGatewayCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeInternetGatewayCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InternetGateway/ChangeInternetGatewayCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeInternetGatewayCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeLocalPeeringGatewayCompartment Moves a local peering gateway into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeLocalPeeringGatewayCompartment.go.html to see an example of how to use ChangeLocalPeeringGatewayCompartment API. +func (client VirtualNetworkClient) ChangeLocalPeeringGatewayCompartment(ctx context.Context, request ChangeLocalPeeringGatewayCompartmentRequest) (response ChangeLocalPeeringGatewayCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeLocalPeeringGatewayCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeLocalPeeringGatewayCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeLocalPeeringGatewayCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeLocalPeeringGatewayCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeLocalPeeringGatewayCompartmentResponse") + } + return +} + +// changeLocalPeeringGatewayCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeLocalPeeringGatewayCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/localPeeringGateways/{localPeeringGatewayId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeLocalPeeringGatewayCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeLocalPeeringGatewayCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/LocalPeeringGateway/ChangeLocalPeeringGatewayCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeLocalPeeringGatewayCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeNatGatewayCompartment Moves a NAT gateway into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeNatGatewayCompartment.go.html to see an example of how to use ChangeNatGatewayCompartment API. +func (client VirtualNetworkClient) ChangeNatGatewayCompartment(ctx context.Context, request ChangeNatGatewayCompartmentRequest) (response ChangeNatGatewayCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeNatGatewayCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeNatGatewayCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeNatGatewayCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeNatGatewayCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeNatGatewayCompartmentResponse") + } + return +} + +// changeNatGatewayCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeNatGatewayCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/natGateways/{natGatewayId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeNatGatewayCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeNatGatewayCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/NatGateway/ChangeNatGatewayCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeNatGatewayCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeNetworkSecurityGroupCompartment Moves a network security group into a different compartment within the same tenancy. For +// information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeNetworkSecurityGroupCompartment.go.html to see an example of how to use ChangeNetworkSecurityGroupCompartment API. +func (client VirtualNetworkClient) ChangeNetworkSecurityGroupCompartment(ctx context.Context, request ChangeNetworkSecurityGroupCompartmentRequest) (response ChangeNetworkSecurityGroupCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeNetworkSecurityGroupCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeNetworkSecurityGroupCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeNetworkSecurityGroupCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeNetworkSecurityGroupCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeNetworkSecurityGroupCompartmentResponse") + } + return +} + +// changeNetworkSecurityGroupCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeNetworkSecurityGroupCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/networkSecurityGroups/{networkSecurityGroupId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeNetworkSecurityGroupCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeNetworkSecurityGroupCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/NetworkSecurityGroup/ChangeNetworkSecurityGroupCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeNetworkSecurityGroupCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangePublicIpCompartment Moves a public IP into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// This operation applies only to reserved public IPs. Ephemeral public IPs always belong to the +// same compartment as their VNIC and move accordingly. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangePublicIpCompartment.go.html to see an example of how to use ChangePublicIpCompartment API. +func (client VirtualNetworkClient) ChangePublicIpCompartment(ctx context.Context, request ChangePublicIpCompartmentRequest) (response ChangePublicIpCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changePublicIpCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangePublicIpCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangePublicIpCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangePublicIpCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangePublicIpCompartmentResponse") + } + return +} + +// changePublicIpCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changePublicIpCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/publicIps/{publicIpId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangePublicIpCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangePublicIpCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIp/ChangePublicIpCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangePublicIpCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangePublicIpPoolCompartment Moves a public IP pool to a different compartment. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangePublicIpPoolCompartment.go.html to see an example of how to use ChangePublicIpPoolCompartment API. +func (client VirtualNetworkClient) ChangePublicIpPoolCompartment(ctx context.Context, request ChangePublicIpPoolCompartmentRequest) (response ChangePublicIpPoolCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changePublicIpPoolCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangePublicIpPoolCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangePublicIpPoolCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangePublicIpPoolCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangePublicIpPoolCompartmentResponse") + } + return +} + +// changePublicIpPoolCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changePublicIpPoolCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/publicIpPools/{publicIpPoolId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangePublicIpPoolCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangePublicIpPoolCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIpPool/ChangePublicIpPoolCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangePublicIpPoolCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeRemotePeeringConnectionCompartment Moves a remote peering connection (RPC) into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeRemotePeeringConnectionCompartment.go.html to see an example of how to use ChangeRemotePeeringConnectionCompartment API. +// A default retry strategy applies to this operation ChangeRemotePeeringConnectionCompartment() +func (client VirtualNetworkClient) ChangeRemotePeeringConnectionCompartment(ctx context.Context, request ChangeRemotePeeringConnectionCompartmentRequest) (response ChangeRemotePeeringConnectionCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeRemotePeeringConnectionCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeRemotePeeringConnectionCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeRemotePeeringConnectionCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeRemotePeeringConnectionCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeRemotePeeringConnectionCompartmentResponse") + } + return +} + +// changeRemotePeeringConnectionCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeRemotePeeringConnectionCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/remotePeeringConnections/{remotePeeringConnectionId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeRemotePeeringConnectionCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeRemotePeeringConnectionCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/RemotePeeringConnection/ChangeRemotePeeringConnectionCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeRemotePeeringConnectionCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeRouteTableCompartment Moves a route table into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeRouteTableCompartment.go.html to see an example of how to use ChangeRouteTableCompartment API. +func (client VirtualNetworkClient) ChangeRouteTableCompartment(ctx context.Context, request ChangeRouteTableCompartmentRequest) (response ChangeRouteTableCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeRouteTableCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeRouteTableCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeRouteTableCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeRouteTableCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeRouteTableCompartmentResponse") + } + return +} + +// changeRouteTableCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeRouteTableCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/routeTables/{rtId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeRouteTableCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeRouteTableCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/RouteTable/ChangeRouteTableCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeRouteTableCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeSecurityListCompartment Moves a security list into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeSecurityListCompartment.go.html to see an example of how to use ChangeSecurityListCompartment API. +func (client VirtualNetworkClient) ChangeSecurityListCompartment(ctx context.Context, request ChangeSecurityListCompartmentRequest) (response ChangeSecurityListCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeSecurityListCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeSecurityListCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeSecurityListCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeSecurityListCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeSecurityListCompartmentResponse") + } + return +} + +// changeSecurityListCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeSecurityListCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/securityLists/{securityListId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeSecurityListCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeSecurityListCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/SecurityList/ChangeSecurityListCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeSecurityListCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeServiceGatewayCompartment Moves a service gateway into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeServiceGatewayCompartment.go.html to see an example of how to use ChangeServiceGatewayCompartment API. +func (client VirtualNetworkClient) ChangeServiceGatewayCompartment(ctx context.Context, request ChangeServiceGatewayCompartmentRequest) (response ChangeServiceGatewayCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeServiceGatewayCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeServiceGatewayCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeServiceGatewayCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeServiceGatewayCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeServiceGatewayCompartmentResponse") + } + return +} + +// changeServiceGatewayCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeServiceGatewayCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/serviceGateways/{serviceGatewayId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeServiceGatewayCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeServiceGatewayCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ServiceGateway/ChangeServiceGatewayCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeServiceGatewayCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeSubnetCompartment Moves a subnet into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeSubnetCompartment.go.html to see an example of how to use ChangeSubnetCompartment API. +func (client VirtualNetworkClient) ChangeSubnetCompartment(ctx context.Context, request ChangeSubnetCompartmentRequest) (response ChangeSubnetCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeSubnetCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeSubnetCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeSubnetCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeSubnetCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeSubnetCompartmentResponse") + } + return +} + +// changeSubnetCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeSubnetCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/subnets/{subnetId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeSubnetCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeSubnetCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Subnet/ChangeSubnetCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeSubnetCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeVcnCompartment Moves a VCN into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVcnCompartment.go.html to see an example of how to use ChangeVcnCompartment API. +func (client VirtualNetworkClient) ChangeVcnCompartment(ctx context.Context, request ChangeVcnCompartmentRequest) (response ChangeVcnCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeVcnCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeVcnCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeVcnCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeVcnCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeVcnCompartmentResponse") + } + return +} + +// changeVcnCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeVcnCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/vcns/{vcnId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeVcnCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeVcnCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/ChangeVcnCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeVcnCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeVirtualCircuitCompartment Moves a virtual circuit into a different compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVirtualCircuitCompartment.go.html to see an example of how to use ChangeVirtualCircuitCompartment API. +// A default retry strategy applies to this operation ChangeVirtualCircuitCompartment() +func (client VirtualNetworkClient) ChangeVirtualCircuitCompartment(ctx context.Context, request ChangeVirtualCircuitCompartmentRequest) (response ChangeVirtualCircuitCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeVirtualCircuitCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeVirtualCircuitCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeVirtualCircuitCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeVirtualCircuitCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeVirtualCircuitCompartmentResponse") + } + return +} + +// changeVirtualCircuitCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeVirtualCircuitCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/virtualCircuits/{virtualCircuitId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeVirtualCircuitCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeVirtualCircuitCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VirtualCircuit/ChangeVirtualCircuitCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeVirtualCircuitCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeVlanCompartment Moves a VLAN into a different compartment within the same tenancy. +// For information about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVlanCompartment.go.html to see an example of how to use ChangeVlanCompartment API. +func (client VirtualNetworkClient) ChangeVlanCompartment(ctx context.Context, request ChangeVlanCompartmentRequest) (response ChangeVlanCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeVlanCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeVlanCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeVlanCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeVlanCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeVlanCompartmentResponse") + } + return +} + +// changeVlanCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeVlanCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/vlans/{vlanId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeVlanCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeVlanCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vlan/ChangeVlanCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeVlanCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeVtapCompartment Moves a VTAP to a new compartment within the same tenancy. For information +// about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeVtapCompartment.go.html to see an example of how to use ChangeVtapCompartment API. +func (client VirtualNetworkClient) ChangeVtapCompartment(ctx context.Context, request ChangeVtapCompartmentRequest) (response ChangeVtapCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeVtapCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeVtapCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeVtapCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeVtapCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeVtapCompartmentResponse") + } + return +} + +// changeVtapCompartment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) changeVtapCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/vtaps/{vtapId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ChangeVtapCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ChangeVtapCompartment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vtap/ChangeVtapCompartment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ChangeVtapCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ConnectLocalPeeringGateways Connects this local peering gateway (LPG) to another one in the same region. +// This operation must be called by the VCN administrator who is designated as +// the *requestor* in the peering relationship. The *acceptor* must implement +// an Identity and Access Management (IAM) policy that gives the requestor permission +// to connect to LPGs in the acceptor's compartment. Without that permission, this +// operation will fail. For more information, see +// VCN Peering (https://docs.oracle.com/iaas/Content/Network/Tasks/VCNpeering.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ConnectLocalPeeringGateways.go.html to see an example of how to use ConnectLocalPeeringGateways API. +func (client VirtualNetworkClient) ConnectLocalPeeringGateways(ctx context.Context, request ConnectLocalPeeringGatewaysRequest) (response ConnectLocalPeeringGatewaysResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.connectLocalPeeringGateways, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ConnectLocalPeeringGatewaysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ConnectLocalPeeringGatewaysResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ConnectLocalPeeringGatewaysResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ConnectLocalPeeringGatewaysResponse") + } + return +} + +// connectLocalPeeringGateways implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) connectLocalPeeringGateways(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/localPeeringGateways/{localPeeringGatewayId}/actions/connect", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ConnectLocalPeeringGatewaysResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ConnectLocalPeeringGateways") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/LocalPeeringGateway/ConnectLocalPeeringGateways" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ConnectLocalPeeringGateways", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ConnectRemotePeeringConnections Connects this RPC to another one in a different region. +// This operation must be called by the VCN administrator who is designated as +// the *requestor* in the peering relationship. The *acceptor* must implement +// an Identity and Access Management (IAM) policy that gives the requestor permission +// to connect to RPCs in the acceptor's compartment. Without that permission, this +// operation will fail. For more information, see +// VCN Peering (https://docs.oracle.com/iaas/Content/Network/Tasks/VCNpeering.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ConnectRemotePeeringConnections.go.html to see an example of how to use ConnectRemotePeeringConnections API. +// A default retry strategy applies to this operation ConnectRemotePeeringConnections() +func (client VirtualNetworkClient) ConnectRemotePeeringConnections(ctx context.Context, request ConnectRemotePeeringConnectionsRequest) (response ConnectRemotePeeringConnectionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.connectRemotePeeringConnections, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ConnectRemotePeeringConnectionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ConnectRemotePeeringConnectionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ConnectRemotePeeringConnectionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ConnectRemotePeeringConnectionsResponse") + } + return +} + +// connectRemotePeeringConnections implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) connectRemotePeeringConnections(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/remotePeeringConnections/{remotePeeringConnectionId}/actions/connect", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ConnectRemotePeeringConnectionsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ConnectRemotePeeringConnections") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/RemotePeeringConnection/ConnectRemotePeeringConnections" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ConnectRemotePeeringConnections", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateByoasn Creates a BYOASN Resource +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateByoasn.go.html to see an example of how to use CreateByoasn API. +// A default retry strategy applies to this operation CreateByoasn() +func (client VirtualNetworkClient) CreateByoasn(ctx context.Context, request CreateByoasnRequest) (response CreateByoasnResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createByoasn, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateByoasnResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateByoasnResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateByoasnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateByoasnResponse") + } + return +} + +// createByoasn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createByoasn(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/byoasns", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateByoasnResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateByoasn") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Byoasn/CreateByoasn" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateByoasn", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateByoipRange Creates a subrange of the BYOIP CIDR block. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateByoipRange.go.html to see an example of how to use CreateByoipRange API. +func (client VirtualNetworkClient) CreateByoipRange(ctx context.Context, request CreateByoipRangeRequest) (response CreateByoipRangeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createByoipRange, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateByoipRangeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateByoipRangeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateByoipRangeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateByoipRangeResponse") + } + return +} + +// createByoipRange implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createByoipRange(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/byoipRanges", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateByoipRangeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateByoipRange") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ByoipRange/CreateByoipRange" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateByoipRange", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateCaptureFilter Creates a virtual test access point (VTAP) capture filter in the specified compartment. +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains +// the VTAP. For more information about compartments and access control, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see Resource Identifiers (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// You may optionally specify a *display name* for the VTAP, otherwise a default is provided. +// It does not have to be unique, and you can change it. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateCaptureFilter.go.html to see an example of how to use CreateCaptureFilter API. +func (client VirtualNetworkClient) CreateCaptureFilter(ctx context.Context, request CreateCaptureFilterRequest) (response CreateCaptureFilterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createCaptureFilter, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateCaptureFilterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateCaptureFilterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateCaptureFilterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateCaptureFilterResponse") + } + return +} + +// createCaptureFilter implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createCaptureFilter(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/captureFilters", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateCaptureFilterResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateCaptureFilter") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CaptureFilter/CreateCaptureFilter" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateCaptureFilter", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateCpe Creates a new virtual customer-premises equipment (CPE) object in the specified compartment. For +// more information, see Site-to-Site VPN Overview (https://docs.oracle.com/iaas/Content/Network/Tasks/overviewIPsec.htm). +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want +// the CPE to reside. Notice that the CPE doesn't have to be in the same compartment as the IPSec +// connection or other Networking Service components. If you're not sure which compartment to +// use, put the CPE in the same compartment as the DRG. For more information about +// compartments and access control, see Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see Resource Identifiers (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// You must provide the public IP address of your on-premises router. See +// CPE Configuration (https://docs.oracle.com/iaas/Content/Network/Tasks/configuringCPE.htm). +// You may optionally specify a *display name* for the CPE, otherwise a default is provided. It does not have to +// be unique, and you can change it. Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateCpe.go.html to see an example of how to use CreateCpe API. +// A default retry strategy applies to this operation CreateCpe() +func (client VirtualNetworkClient) CreateCpe(ctx context.Context, request CreateCpeRequest) (response CreateCpeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createCpe, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateCpeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateCpeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateCpeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateCpeResponse") + } + return +} + +// createCpe implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createCpe(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/cpes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateCpeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateCpe") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Cpe/CreateCpe" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateCpe", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateCrossConnect Creates a new cross-connect. Oracle recommends you create each cross-connect in a +// CrossConnectGroup so you can use link aggregation +// with the connection. +// After creating the `CrossConnect` object, you need to go the FastConnect location +// and request to have the physical cable installed. For more information, see +// FastConnect Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the +// compartment where you want the cross-connect to reside. If you're +// not sure which compartment to use, put the cross-connect in the +// same compartment with your VCN. For more information about +// compartments and access control, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see +// Resource Identifiers (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// You may optionally specify a *display name* for the cross-connect. +// It does not have to be unique, and you can change it. Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateCrossConnect.go.html to see an example of how to use CreateCrossConnect API. +// A default retry strategy applies to this operation CreateCrossConnect() +func (client VirtualNetworkClient) CreateCrossConnect(ctx context.Context, request CreateCrossConnectRequest) (response CreateCrossConnectResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createCrossConnect, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateCrossConnectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateCrossConnectResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateCrossConnectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateCrossConnectResponse") + } + return +} + +// createCrossConnect implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createCrossConnect(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/crossConnects", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateCrossConnectResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateCrossConnect") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CrossConnect/CreateCrossConnect" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateCrossConnect", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateCrossConnectGroup Creates a new cross-connect group to use with Oracle Cloud Infrastructure +// FastConnect. For more information, see +// FastConnect Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the +// compartment where you want the cross-connect group to reside. If you're +// not sure which compartment to use, put the cross-connect group in the +// same compartment with your VCN. For more information about +// compartments and access control, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see +// Resource Identifiers (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// You may optionally specify a *display name* for the cross-connect group. +// It does not have to be unique, and you can change it. Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateCrossConnectGroup.go.html to see an example of how to use CreateCrossConnectGroup API. +// A default retry strategy applies to this operation CreateCrossConnectGroup() +func (client VirtualNetworkClient) CreateCrossConnectGroup(ctx context.Context, request CreateCrossConnectGroupRequest) (response CreateCrossConnectGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createCrossConnectGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateCrossConnectGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateCrossConnectGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateCrossConnectGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateCrossConnectGroupResponse") + } + return +} + +// createCrossConnectGroup implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createCrossConnectGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/crossConnectGroups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateCrossConnectGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateCrossConnectGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CrossConnectGroup/CreateCrossConnectGroup" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateCrossConnectGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateDhcpOptions Creates a new set of DHCP options for the specified VCN. For more information, see +// DhcpOptions. +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want the set of +// DHCP options to reside. Notice that the set of options doesn't have to be in the same compartment as the VCN, +// subnets, or other Networking Service components. If you're not sure which compartment to use, put the set +// of DHCP options in the same compartment as the VCN. For more information about compartments and access control, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about OCIDs, see +// Resource Identifiers (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// You may optionally specify a *display name* for the set of DHCP options, otherwise a default is provided. +// It does not have to be unique, and you can change it. Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDhcpOptions.go.html to see an example of how to use CreateDhcpOptions API. +func (client VirtualNetworkClient) CreateDhcpOptions(ctx context.Context, request CreateDhcpOptionsRequest) (response CreateDhcpOptionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createDhcpOptions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateDhcpOptionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateDhcpOptionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateDhcpOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateDhcpOptionsResponse") + } + return +} + +// createDhcpOptions implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createDhcpOptions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dhcps", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateDhcpOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateDhcpOptions") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DhcpOptions/CreateDhcpOptions" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateDhcpOptions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateDrg Creates a new dynamic routing gateway (DRG) in the specified compartment. For more information, +// see Dynamic Routing Gateways (DRGs) (https://docs.oracle.com/iaas/Content/Network/Tasks/managingDRGs.htm). +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want +// the DRG to reside. Notice that the DRG doesn't have to be in the same compartment as the VCN, +// the DRG attachment, or other Networking Service components. If you're not sure which compartment +// to use, put the DRG in the same compartment as the VCN. For more information about compartments +// and access control, see Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see Resource Identifiers (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// You may optionally specify a *display name* for the DRG, otherwise a default is provided. +// It does not have to be unique, and you can change it. Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDrg.go.html to see an example of how to use CreateDrg API. +func (client VirtualNetworkClient) CreateDrg(ctx context.Context, request CreateDrgRequest) (response CreateDrgResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createDrg, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateDrgResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateDrgResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateDrgResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateDrgResponse") + } + return +} + +// createDrg implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createDrg(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateDrgResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateDrg") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Drg/CreateDrg" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateDrg", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateDrgAttachment Attaches the specified DRG to the specified network resource. A VCN can be attached to only one DRG +// at a time, but a DRG can be attached to more than one VCN. The response includes a `DrgAttachment` +// object with its own OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). For more information about DRGs, see +// Dynamic Routing Gateways (DRGs) (https://docs.oracle.com/iaas/Content/Network/Tasks/managingDRGs.htm). +// You may optionally specify a *display name* for the attachment, otherwise a default is provided. +// It does not have to be unique, and you can change it. Avoid entering confidential information. +// For the purposes of access control, the DRG attachment is automatically placed into the currently selected compartment. +// For more information about compartments and access control, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDrgAttachment.go.html to see an example of how to use CreateDrgAttachment API. +func (client VirtualNetworkClient) CreateDrgAttachment(ctx context.Context, request CreateDrgAttachmentRequest) (response CreateDrgAttachmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createDrgAttachment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateDrgAttachmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateDrgAttachmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateDrgAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateDrgAttachmentResponse") + } + return +} + +// createDrgAttachment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createDrgAttachment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgAttachments", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateDrgAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateDrgAttachment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgAttachment/CreateDrgAttachment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateDrgAttachment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateDrgRouteDistribution Creates a new route distribution for the specified DRG. +// Assign the route distribution as an import distribution to a DRG route table using the `UpdateDrgRouteTable` or `CreateDrgRouteTable` operations. +// Assign the route distribution as an export distribution to a DRG attachment +// using the `UpdateDrgAttachment` or `CreateDrgAttachment` operations. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDrgRouteDistribution.go.html to see an example of how to use CreateDrgRouteDistribution API. +func (client VirtualNetworkClient) CreateDrgRouteDistribution(ctx context.Context, request CreateDrgRouteDistributionRequest) (response CreateDrgRouteDistributionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createDrgRouteDistribution, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateDrgRouteDistributionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateDrgRouteDistributionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateDrgRouteDistributionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateDrgRouteDistributionResponse") + } + return +} + +// createDrgRouteDistribution implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createDrgRouteDistribution(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgRouteDistributions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateDrgRouteDistributionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateDrgRouteDistribution") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteDistribution/CreateDrgRouteDistribution" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateDrgRouteDistribution", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateDrgRouteTable Creates a new DRG route table for the specified DRG. Assign the DRG route table to a DRG attachment +// using the `UpdateDrgAttachment` or `CreateDrgAttachment` operations. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDrgRouteTable.go.html to see an example of how to use CreateDrgRouteTable API. +func (client VirtualNetworkClient) CreateDrgRouteTable(ctx context.Context, request CreateDrgRouteTableRequest) (response CreateDrgRouteTableResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createDrgRouteTable, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateDrgRouteTableResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateDrgRouteTableResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateDrgRouteTableResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateDrgRouteTableResponse") + } + return +} + +// createDrgRouteTable implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createDrgRouteTable(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgRouteTables", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateDrgRouteTableResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateDrgRouteTable") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteTable/CreateDrgRouteTable" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateDrgRouteTable", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateIPSecConnection Creates a new IPSec connection between the specified DRG and CPE. For more information, see +// Site-to-Site VPN Overview (https://docs.oracle.com/iaas/Content/Network/Tasks/overviewIPsec.htm). +// If you configure at least one tunnel to use static routing, then in the request you must provide +// at least one valid static route (you're allowed a maximum of 10). For example: 10.0.0.0/16. +// If you configure both tunnels to use BGP dynamic routing, you can provide an empty list for +// the static routes. For more information, see the important note in +// IPSecConnection. +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want the +// IPSec connection to reside. Notice that the IPSec connection doesn't have to be in the same compartment +// as the DRG, CPE, or other Networking Service components. If you're not sure which compartment to +// use, put the IPSec connection in the same compartment as the DRG. For more information about +// compartments and access control, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). +// You may optionally specify a *display name* for the IPSec connection, otherwise a default is provided. +// It does not have to be unique, and you can change it. Avoid entering confidential information. +// After creating the IPSec connection, you need to configure your on-premises router +// with tunnel-specific information. For tunnel status and the required configuration information, see: +// - IPSecConnectionTunnel +// - IPSecConnectionTunnelSharedSecret +// +// For each tunnel, you need the IP address of Oracle's VPN headend and the shared secret +// (that is, the pre-shared key). For more information, see +// CPE Configuration (https://docs.oracle.com/iaas/Content/Network/Tasks/configuringCPE.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateIPSecConnection.go.html to see an example of how to use CreateIPSecConnection API. +// A default retry strategy applies to this operation CreateIPSecConnection() +func (client VirtualNetworkClient) CreateIPSecConnection(ctx context.Context, request CreateIPSecConnectionRequest) (response CreateIPSecConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createIPSecConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateIPSecConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateIPSecConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateIPSecConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateIPSecConnectionResponse") + } + return +} + +// createIPSecConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createIPSecConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/ipsecConnections", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateIPSecConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateIPSecConnection") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IPSecConnection/CreateIPSecConnection" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateIPSecConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateInternetGateway Creates a new internet gateway for the specified VCN. For more information, see +// Access to the Internet (https://docs.oracle.com/iaas/Content/Network/Tasks/managingIGs.htm). +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want the Internet +// Gateway to reside. Notice that the internet gateway doesn't have to be in the same compartment as the VCN or +// other Networking Service components. If you're not sure which compartment to use, put the Internet +// Gateway in the same compartment with the VCN. For more information about compartments and access control, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). +// You may optionally specify a *display name* for the internet gateway, otherwise a default is provided. It +// does not have to be unique, and you can change it. Avoid entering confidential information. +// For traffic to flow between a subnet and an internet gateway, you must create a route rule accordingly in +// the subnet's route table (for example, 0.0.0.0/0 > internet gateway). See +// UpdateRouteTable. +// You must specify whether the internet gateway is enabled when you create it. If it's disabled, that means no +// traffic will flow to/from the internet even if there's a route rule that enables that traffic. You can later +// use UpdateInternetGateway to easily disable/enable +// the gateway without changing the route rule. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateInternetGateway.go.html to see an example of how to use CreateInternetGateway API. +func (client VirtualNetworkClient) CreateInternetGateway(ctx context.Context, request CreateInternetGatewayRequest) (response CreateInternetGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createInternetGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateInternetGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateInternetGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateInternetGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateInternetGatewayResponse") + } + return +} + +// createInternetGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createInternetGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/internetGateways", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateInternetGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateInternetGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InternetGateway/CreateInternetGateway" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateInternetGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateIpv6 Creates an IPv6 for the specified VNIC. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateIpv6.go.html to see an example of how to use CreateIpv6 API. +func (client VirtualNetworkClient) CreateIpv6(ctx context.Context, request CreateIpv6Request) (response CreateIpv6Response, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createIpv6, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateIpv6Response{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateIpv6Response{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateIpv6Response); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateIpv6Response") + } + return +} + +// createIpv6 implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createIpv6(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/ipv6", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateIpv6Response + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateIpv6") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Ipv6/CreateIpv6" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateIpv6", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateLocalPeeringGateway Creates a new local peering gateway (LPG) for the specified VCN. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateLocalPeeringGateway.go.html to see an example of how to use CreateLocalPeeringGateway API. +func (client VirtualNetworkClient) CreateLocalPeeringGateway(ctx context.Context, request CreateLocalPeeringGatewayRequest) (response CreateLocalPeeringGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createLocalPeeringGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateLocalPeeringGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateLocalPeeringGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateLocalPeeringGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateLocalPeeringGatewayResponse") + } + return +} + +// createLocalPeeringGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createLocalPeeringGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/localPeeringGateways", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateLocalPeeringGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateLocalPeeringGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/LocalPeeringGateway/CreateLocalPeeringGateway" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateLocalPeeringGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateNatGateway Creates a new NAT gateway for the specified VCN. You must also set up a route rule with the +// NAT gateway as the rule's target. See RouteTable. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateNatGateway.go.html to see an example of how to use CreateNatGateway API. +func (client VirtualNetworkClient) CreateNatGateway(ctx context.Context, request CreateNatGatewayRequest) (response CreateNatGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createNatGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateNatGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateNatGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateNatGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateNatGatewayResponse") + } + return +} + +// createNatGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createNatGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/natGateways", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateNatGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateNatGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/NatGateway/CreateNatGateway" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateNatGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateNetworkSecurityGroup Creates a new network security group for the specified VCN. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateNetworkSecurityGroup.go.html to see an example of how to use CreateNetworkSecurityGroup API. +func (client VirtualNetworkClient) CreateNetworkSecurityGroup(ctx context.Context, request CreateNetworkSecurityGroupRequest) (response CreateNetworkSecurityGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createNetworkSecurityGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateNetworkSecurityGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateNetworkSecurityGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateNetworkSecurityGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateNetworkSecurityGroupResponse") + } + return +} + +// createNetworkSecurityGroup implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createNetworkSecurityGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/networkSecurityGroups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateNetworkSecurityGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateNetworkSecurityGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/NetworkSecurityGroup/CreateNetworkSecurityGroup" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateNetworkSecurityGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreatePrivateIp Creates a private IP. +// For more information about private IPs, see +// IP Addresses (https://docs.oracle.com/iaas/Content/Network/Tasks/managingIPaddresses.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreatePrivateIp.go.html to see an example of how to use CreatePrivateIp API. +func (client VirtualNetworkClient) CreatePrivateIp(ctx context.Context, request CreatePrivateIpRequest) (response CreatePrivateIpResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createPrivateIp, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreatePrivateIpResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreatePrivateIpResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreatePrivateIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePrivateIpResponse") + } + return +} + +// createPrivateIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createPrivateIp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/privateIps", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreatePrivateIpResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreatePrivateIp") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PrivateIp/CreatePrivateIp" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreatePrivateIp", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreatePublicIp Creates a public IP. Use the `lifetime` property to specify whether it's an ephemeral or +// reserved public IP. For information about limits on how many you can create, see +// Public IP Addresses (https://docs.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm). +// * **For an ephemeral public IP assigned to a private IP:** You must also specify a `privateIpId` +// with the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary private IP you want to assign the public IP to. The public IP is +// created in the same availability domain as the private IP. An ephemeral public IP must always be +// assigned to a private IP, and only to the *primary* private IP on a VNIC, not a secondary +// private IP. Exception: If you create a NatGateway, Oracle +// automatically assigns the NAT gateway a regional ephemeral public IP that you cannot remove. +// * **For a reserved public IP:** You may also optionally assign the public IP to a private +// IP by specifying `privateIpId`. Or you can later assign the public IP with +// UpdatePublicIp. +// **Note:** When assigning a public IP to a private IP, the private IP must not already have +// a public IP with `lifecycleState` = ASSIGNING or ASSIGNED. If it does, an error is returned. +// Also, for reserved public IPs, the optional assignment part of this operation is +// asynchronous. Poll the public IP's `lifecycleState` to determine if the assignment +// succeeded. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreatePublicIp.go.html to see an example of how to use CreatePublicIp API. +func (client VirtualNetworkClient) CreatePublicIp(ctx context.Context, request CreatePublicIpRequest) (response CreatePublicIpResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createPublicIp, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreatePublicIpResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreatePublicIpResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreatePublicIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePublicIpResponse") + } + return +} + +// createPublicIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createPublicIp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/publicIps", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreatePublicIpResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreatePublicIp") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIp/CreatePublicIp" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreatePublicIp", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreatePublicIpPool Creates a public IP pool. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreatePublicIpPool.go.html to see an example of how to use CreatePublicIpPool API. +func (client VirtualNetworkClient) CreatePublicIpPool(ctx context.Context, request CreatePublicIpPoolRequest) (response CreatePublicIpPoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createPublicIpPool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreatePublicIpPoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreatePublicIpPoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreatePublicIpPoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePublicIpPoolResponse") + } + return +} + +// createPublicIpPool implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createPublicIpPool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/publicIpPools", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreatePublicIpPoolResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreatePublicIpPool") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIpPool/CreatePublicIpPool" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreatePublicIpPool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateRemotePeeringConnection Creates a new remote peering connection (RPC) for the specified DRG. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateRemotePeeringConnection.go.html to see an example of how to use CreateRemotePeeringConnection API. +// A default retry strategy applies to this operation CreateRemotePeeringConnection() +func (client VirtualNetworkClient) CreateRemotePeeringConnection(ctx context.Context, request CreateRemotePeeringConnectionRequest) (response CreateRemotePeeringConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createRemotePeeringConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateRemotePeeringConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateRemotePeeringConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateRemotePeeringConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateRemotePeeringConnectionResponse") + } + return +} + +// createRemotePeeringConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createRemotePeeringConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/remotePeeringConnections", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateRemotePeeringConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateRemotePeeringConnection") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/RemotePeeringConnection/CreateRemotePeeringConnection" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateRemotePeeringConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateRouteTable Creates a new route table for the specified VCN. In the request you must also include at least one route +// rule for the new route table. For information on the number of rules you can have in a route table, see +// Service Limits (https://docs.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). For general information about route +// tables in your VCN and the types of targets you can use in route rules, +// see Route Tables (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm). +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want the route +// table to reside. Notice that the route table doesn't have to be in the same compartment as the VCN, subnets, +// or other Networking Service components. If you're not sure which compartment to use, put the route +// table in the same compartment as the VCN. For more information about compartments and access control, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about OCIDs, see +// Resource Identifiers (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// You may optionally specify a *display name* for the route table, otherwise a default is provided. +// It does not have to be unique, and you can change it. Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateRouteTable.go.html to see an example of how to use CreateRouteTable API. +func (client VirtualNetworkClient) CreateRouteTable(ctx context.Context, request CreateRouteTableRequest) (response CreateRouteTableResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createRouteTable, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateRouteTableResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateRouteTableResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateRouteTableResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateRouteTableResponse") + } + return +} + +// createRouteTable implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createRouteTable(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/routeTables", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateRouteTableResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateRouteTable") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/RouteTable/CreateRouteTable" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateRouteTable", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateSecurityList Creates a new security list for the specified VCN. For more information +// about security lists, see Security Lists (https://docs.oracle.com/iaas/Content/Network/Concepts/securitylists.htm). +// For information on the number of rules you can have in a security list, see +// Service Limits (https://docs.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want the security +// list to reside. Notice that the security list doesn't have to be in the same compartment as the VCN, subnets, +// or other Networking Service components. If you're not sure which compartment to use, put the security +// list in the same compartment as the VCN. For more information about compartments and access control, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about OCIDs, see +// Resource Identifiers (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// You may optionally specify a *display name* for the security list, otherwise a default is provided. +// It does not have to be unique, and you can change it. Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateSecurityList.go.html to see an example of how to use CreateSecurityList API. +func (client VirtualNetworkClient) CreateSecurityList(ctx context.Context, request CreateSecurityListRequest) (response CreateSecurityListResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createSecurityList, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateSecurityListResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateSecurityListResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateSecurityListResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSecurityListResponse") + } + return +} + +// createSecurityList implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createSecurityList(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/securityLists", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateSecurityListResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateSecurityList") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/SecurityList/CreateSecurityList" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateSecurityList", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateServiceGateway Creates a new service gateway in the specified compartment. +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want +// the service gateway to reside. For more information about compartments and access control, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see Resource Identifiers (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// You may optionally specify a *display name* for the service gateway, otherwise a default is provided. +// It does not have to be unique, and you can change it. Avoid entering confidential information. +// Use the ListServices operation to find service CIDR labels +// available in the region. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateServiceGateway.go.html to see an example of how to use CreateServiceGateway API. +func (client VirtualNetworkClient) CreateServiceGateway(ctx context.Context, request CreateServiceGatewayRequest) (response CreateServiceGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createServiceGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateServiceGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateServiceGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateServiceGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateServiceGatewayResponse") + } + return +} + +// createServiceGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createServiceGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/serviceGateways", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateServiceGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateServiceGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ServiceGateway/CreateServiceGateway" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateServiceGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateSubnet Creates a new subnet in the specified VCN. You can't change the size of the subnet after creation, +// so it's important to think about the size of subnets you need before creating them. +// For more information, see VCNs and Subnets (https://docs.oracle.com/iaas/Content/Network/Tasks/managingVCNs.htm). +// For information on the number of subnets you can have in a VCN, see +// Service Limits (https://docs.oracle.com/iaas/Content/General/Concepts/servicelimits.htm). +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want the subnet +// to reside. Notice that the subnet doesn't have to be in the same compartment as the VCN, route tables, or +// other Networking Service components. If you're not sure which compartment to use, put the subnet in +// the same compartment as the VCN. For more information about compartments and access control, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about OCIDs, +// see Resource Identifiers (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// You may optionally associate a route table with the subnet. If you don't, the subnet will use the +// VCN's default route table. For more information about route tables, see +// Route Tables (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm). +// You may optionally associate a security list with the subnet. If you don't, the subnet will use the +// VCN's default security list. For more information about security lists, see +// Security Lists (https://docs.oracle.com/iaas/Content/Network/Concepts/securitylists.htm). +// You may optionally associate a set of DHCP options with the subnet. If you don't, the subnet will use the +// VCN's default set. For more information about DHCP options, see +// DHCP Options (https://docs.oracle.com/iaas/Content/Network/Tasks/managingDHCP.htm). +// You may optionally specify a *display name* for the subnet, otherwise a default is provided. +// It does not have to be unique, and you can change it. Avoid entering confidential information. +// You can also add a DNS label for the subnet, which is required if you want the Internet and +// VCN Resolver to resolve hostnames for instances in the subnet. For more information, see +// DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateSubnet.go.html to see an example of how to use CreateSubnet API. +func (client VirtualNetworkClient) CreateSubnet(ctx context.Context, request CreateSubnetRequest) (response CreateSubnetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createSubnet, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateSubnetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateSubnetResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateSubnetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSubnetResponse") + } + return +} + +// createSubnet implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createSubnet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/subnets", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateSubnetResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateSubnet") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Subnet/CreateSubnet" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateSubnet", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateVcn Creates a new virtual cloud network (VCN). For more information, see +// VCNs and Subnets (https://docs.oracle.com/iaas/Content/Network/Tasks/managingVCNs.htm). +// For the VCN, you specify a list of one or more IPv4 CIDR blocks that meet the following criteria: +// - The CIDR blocks must be valid. +// - They must not overlap with each other or with the on-premises network CIDR block. +// - The number of CIDR blocks does not exceed the limit of CIDR blocks allowed per VCN. +// For a CIDR block, Oracle recommends that you use one of the private IP address ranges specified in RFC 1918 (https://tools.ietf.org/html/rfc1918) (10.0.0.0/8, 172.16/12, and 192.168/16). Example: +// 172.16.0.0/16. The CIDR blocks can range from /16 to /30. +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want the VCN to +// reside. Consult an Oracle Cloud Infrastructure administrator in your organization if you're not sure which +// compartment to use. Notice that the VCN doesn't have to be in the same compartment as the subnets or other +// Networking Service components. For more information about compartments and access control, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about OCIDs, see +// Resource Identifiers (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// You may optionally specify a *display name* for the VCN, otherwise a default is provided. It does not have to +// be unique, and you can change it. Avoid entering confidential information. +// You can also add a DNS label for the VCN, which is required if you want the instances to use the +// Interent and VCN Resolver option for DNS in the VCN. For more information, see +// DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). +// The VCN automatically comes with a default route table, default security list, and default set of DHCP options. +// The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for each is returned in the response. You can't delete these default objects, but you can change their +// contents (that is, change the route rules, security list rules, and so on). +// The VCN and subnets you create are not accessible until you attach an internet gateway or set up a Site-to-Site VPN +// or FastConnect. For more information, see +// Overview of the Networking Service (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVcn.go.html to see an example of how to use CreateVcn API. +func (client VirtualNetworkClient) CreateVcn(ctx context.Context, request CreateVcnRequest) (response CreateVcnResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createVcn, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateVcnResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateVcnResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateVcnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVcnResponse") + } + return +} + +// createVcn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createVcn(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/vcns", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateVcnResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateVcn") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/CreateVcn" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateVcn", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateVirtualCircuit Creates a new virtual circuit to use with Oracle Cloud +// Infrastructure FastConnect. For more information, see +// FastConnect Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the +// compartment where you want the virtual circuit to reside. If you're +// not sure which compartment to use, put the virtual circuit in the +// same compartment with the DRG it's using. For more information about +// compartments and access control, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see +// Resource Identifiers (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// You may optionally specify a *display name* for the virtual circuit. +// It does not have to be unique, and you can change it. Avoid entering confidential information. +// **Important:** When creating a virtual circuit, you specify a DRG for +// the traffic to flow through. Make sure you attach the DRG to your +// VCN and confirm the VCN's routing sends traffic to the DRG. Otherwise +// traffic will not flow. For more information, see +// Route Tables (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVirtualCircuit.go.html to see an example of how to use CreateVirtualCircuit API. +// A default retry strategy applies to this operation CreateVirtualCircuit() +func (client VirtualNetworkClient) CreateVirtualCircuit(ctx context.Context, request CreateVirtualCircuitRequest) (response CreateVirtualCircuitResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createVirtualCircuit, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateVirtualCircuitResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateVirtualCircuitResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateVirtualCircuitResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVirtualCircuitResponse") + } + return +} + +// createVirtualCircuit implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createVirtualCircuit(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/virtualCircuits", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateVirtualCircuitResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateVirtualCircuit") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VirtualCircuit/CreateVirtualCircuit" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateVirtualCircuit", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateVlan Creates a VLAN in the specified VCN and the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVlan.go.html to see an example of how to use CreateVlan API. +func (client VirtualNetworkClient) CreateVlan(ctx context.Context, request CreateVlanRequest) (response CreateVlanResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createVlan, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateVlanResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateVlanResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateVlanResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVlanResponse") + } + return +} + +// createVlan implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createVlan(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/vlans", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateVlanResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateVlan") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vlan/CreateVlan" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateVlan", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateVtap Creates a virtual test access point (VTAP) in the specified compartment. +// For the purposes of access control, you must provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the VTAP. +// For more information about compartments and access control, see +// Overview of the IAM Service (https://docs.oracle.com/iaas/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see Resource Identifiers (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// You may optionally specify a *display name* for the VTAP, otherwise a default is provided. +// It does not have to be unique, and you can change it. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVtap.go.html to see an example of how to use CreateVtap API. +func (client VirtualNetworkClient) CreateVtap(ctx context.Context, request CreateVtapRequest) (response CreateVtapResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createVtap, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateVtapResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateVtapResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateVtapResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVtapResponse") + } + return +} + +// createVtap implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) createVtap(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/vtaps", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateVtapResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "CreateVtap") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vtap/CreateVtap" + err = common.PostProcessServiceError(err, "VirtualNetwork", "CreateVtap", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteByoasn Deletes the specified `Byoasn` resource. +// The resource must be in one of the following states: CREATING, ACTIVE or FAILED. +// It must not be in use by any of the byoipRanges or deletion will fail. +// You must specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteByoasn.go.html to see an example of how to use DeleteByoasn API. +func (client VirtualNetworkClient) DeleteByoasn(ctx context.Context, request DeleteByoasnRequest) (response DeleteByoasnResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteByoasn, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteByoasnResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteByoasnResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteByoasnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteByoasnResponse") + } + return +} + +// deleteByoasn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteByoasn(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/byoasns/{byoasnId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteByoasnResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteByoasn") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Byoasn/DeleteByoasn" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteByoasn", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteByoipRange Deletes the specified `ByoipRange` resource. +// The resource must be in one of the following states: CREATING, PROVISIONED, ACTIVE, or FAILED. +// It must not have any subranges currently allocated to a PublicIpPool object or the deletion will fail. +// You must specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// If the `ByoipRange` resource is currently in the PROVISIONED or ACTIVE state, it will be de-provisioned and then deleted. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteByoipRange.go.html to see an example of how to use DeleteByoipRange API. +func (client VirtualNetworkClient) DeleteByoipRange(ctx context.Context, request DeleteByoipRangeRequest) (response DeleteByoipRangeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteByoipRange, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteByoipRangeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteByoipRangeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteByoipRangeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteByoipRangeResponse") + } + return +} + +// deleteByoipRange implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteByoipRange(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/byoipRanges/{byoipRangeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteByoipRangeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteByoipRange") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ByoipRange/DeleteByoipRange" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteByoipRange", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteCaptureFilter Deletes the specified VTAP capture filter. This is an asynchronous operation. The VTAP capture filter's `lifecycleState` will +// change to TERMINATING temporarily until the VTAP capture filter is completely removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteCaptureFilter.go.html to see an example of how to use DeleteCaptureFilter API. +func (client VirtualNetworkClient) DeleteCaptureFilter(ctx context.Context, request DeleteCaptureFilterRequest) (response DeleteCaptureFilterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteCaptureFilter, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteCaptureFilterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteCaptureFilterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteCaptureFilterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteCaptureFilterResponse") + } + return +} + +// deleteCaptureFilter implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteCaptureFilter(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/captureFilters/{captureFilterId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteCaptureFilterResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteCaptureFilter") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CaptureFilter/DeleteCaptureFilter" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteCaptureFilter", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteCpe Deletes the specified CPE object. The CPE must not be connected to a DRG. This is an asynchronous +// operation. The CPE's `lifecycleState` will change to TERMINATING temporarily until the CPE is completely +// removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteCpe.go.html to see an example of how to use DeleteCpe API. +// A default retry strategy applies to this operation DeleteCpe() +func (client VirtualNetworkClient) DeleteCpe(ctx context.Context, request DeleteCpeRequest) (response DeleteCpeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteCpe, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteCpeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteCpeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteCpeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteCpeResponse") + } + return +} + +// deleteCpe implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteCpe(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/cpes/{cpeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteCpeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteCpe") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteCpe", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteCrossConnect Deletes the specified cross-connect. It must not be mapped to a +// VirtualCircuit. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteCrossConnect.go.html to see an example of how to use DeleteCrossConnect API. +// A default retry strategy applies to this operation DeleteCrossConnect() +func (client VirtualNetworkClient) DeleteCrossConnect(ctx context.Context, request DeleteCrossConnectRequest) (response DeleteCrossConnectResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteCrossConnect, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteCrossConnectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteCrossConnectResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteCrossConnectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteCrossConnectResponse") + } + return +} + +// deleteCrossConnect implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteCrossConnect(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/crossConnects/{crossConnectId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteCrossConnectResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteCrossConnect") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteCrossConnect", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteCrossConnectGroup Deletes the specified cross-connect group. It must not contain any +// cross-connects, and it cannot be mapped to a +// VirtualCircuit. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteCrossConnectGroup.go.html to see an example of how to use DeleteCrossConnectGroup API. +// A default retry strategy applies to this operation DeleteCrossConnectGroup() +func (client VirtualNetworkClient) DeleteCrossConnectGroup(ctx context.Context, request DeleteCrossConnectGroupRequest) (response DeleteCrossConnectGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteCrossConnectGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteCrossConnectGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteCrossConnectGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteCrossConnectGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteCrossConnectGroupResponse") + } + return +} + +// deleteCrossConnectGroup implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteCrossConnectGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/crossConnectGroups/{crossConnectGroupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteCrossConnectGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteCrossConnectGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteCrossConnectGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteDhcpOptions Deletes the specified set of DHCP options, but only if it's not associated with a subnet. You can't delete a +// VCN's default set of DHCP options. +// This is an asynchronous operation. The state of the set of options will switch to TERMINATING temporarily +// until the set is completely removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDhcpOptions.go.html to see an example of how to use DeleteDhcpOptions API. +func (client VirtualNetworkClient) DeleteDhcpOptions(ctx context.Context, request DeleteDhcpOptionsRequest) (response DeleteDhcpOptionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteDhcpOptions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteDhcpOptionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteDhcpOptionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteDhcpOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDhcpOptionsResponse") + } + return +} + +// deleteDhcpOptions implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteDhcpOptions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/dhcps/{dhcpId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteDhcpOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteDhcpOptions") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteDhcpOptions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteDrg Deletes the specified DRG. The DRG must not be attached to a VCN or be connected to your on-premise +// network. Also, there must not be a route table that lists the DRG as a target. This is an asynchronous +// operation. The DRG's `lifecycleState` will change to TERMINATING temporarily until the DRG is completely +// removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDrg.go.html to see an example of how to use DeleteDrg API. +func (client VirtualNetworkClient) DeleteDrg(ctx context.Context, request DeleteDrgRequest) (response DeleteDrgResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteDrg, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteDrgResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteDrgResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteDrgResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDrgResponse") + } + return +} + +// deleteDrg implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteDrg(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/drgs/{drgId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteDrgResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteDrg") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteDrg", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteDrgAttachment Detaches a DRG from a network resource by deleting the corresponding `DrgAttachment` resource. This is an asynchronous +// operation. The attachment's `lifecycleState` will temporarily change to DETACHING until the attachment +// is completely removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDrgAttachment.go.html to see an example of how to use DeleteDrgAttachment API. +func (client VirtualNetworkClient) DeleteDrgAttachment(ctx context.Context, request DeleteDrgAttachmentRequest) (response DeleteDrgAttachmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteDrgAttachment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteDrgAttachmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteDrgAttachmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteDrgAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDrgAttachmentResponse") + } + return +} + +// deleteDrgAttachment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteDrgAttachment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/drgAttachments/{drgAttachmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteDrgAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteDrgAttachment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteDrgAttachment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteDrgRouteDistribution Deletes the specified route distribution. You can't delete a route distribution currently in use by a DRG attachment or DRG route table. +// Remove the DRG route distribution from a DRG attachment or DRG route table by using the "RemoveExportDrgRouteDistribution" or "RemoveImportDrgRouteDistribution' operations. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDrgRouteDistribution.go.html to see an example of how to use DeleteDrgRouteDistribution API. +func (client VirtualNetworkClient) DeleteDrgRouteDistribution(ctx context.Context, request DeleteDrgRouteDistributionRequest) (response DeleteDrgRouteDistributionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteDrgRouteDistribution, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteDrgRouteDistributionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteDrgRouteDistributionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteDrgRouteDistributionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDrgRouteDistributionResponse") + } + return +} + +// deleteDrgRouteDistribution implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteDrgRouteDistribution(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/drgRouteDistributions/{drgRouteDistributionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteDrgRouteDistributionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteDrgRouteDistribution") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteDistributionStatement/DeleteDrgRouteDistribution" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteDrgRouteDistribution", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteDrgRouteTable Deletes the specified DRG route table. There must not be any DRG attachments assigned. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDrgRouteTable.go.html to see an example of how to use DeleteDrgRouteTable API. +func (client VirtualNetworkClient) DeleteDrgRouteTable(ctx context.Context, request DeleteDrgRouteTableRequest) (response DeleteDrgRouteTableResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteDrgRouteTable, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteDrgRouteTableResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteDrgRouteTableResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteDrgRouteTableResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDrgRouteTableResponse") + } + return +} + +// deleteDrgRouteTable implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteDrgRouteTable(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/drgRouteTables/{drgRouteTableId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteDrgRouteTableResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteDrgRouteTable") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InternalPublicIp/DeleteDrgRouteTable" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteDrgRouteTable", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteIPSecConnection Deletes the specified IPSec connection. If your goal is to disable the Site-to-Site VPN between your VCN and +// on-premises network, it's easiest to simply detach the DRG but keep all the Site-to-Site VPN components intact. +// If you were to delete all the components and then later need to create an Site-to-Site VPN again, you would +// need to configure your on-premises router again with the new information returned from +// CreateIPSecConnection. +// This is an asynchronous operation. The connection's `lifecycleState` will change to TERMINATING temporarily +// until the connection is completely removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteIPSecConnection.go.html to see an example of how to use DeleteIPSecConnection API. +// A default retry strategy applies to this operation DeleteIPSecConnection() +func (client VirtualNetworkClient) DeleteIPSecConnection(ctx context.Context, request DeleteIPSecConnectionRequest) (response DeleteIPSecConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteIPSecConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteIPSecConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteIPSecConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteIPSecConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteIPSecConnectionResponse") + } + return +} + +// deleteIPSecConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteIPSecConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/ipsecConnections/{ipscId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteIPSecConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteIPSecConnection") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteIPSecConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteInternetGateway Deletes the specified internet gateway. The internet gateway does not have to be disabled, but +// there must not be a route table that lists it as a target. +// This is an asynchronous operation. The gateway's `lifecycleState` will change to TERMINATING temporarily +// until the gateway is completely removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteInternetGateway.go.html to see an example of how to use DeleteInternetGateway API. +func (client VirtualNetworkClient) DeleteInternetGateway(ctx context.Context, request DeleteInternetGatewayRequest) (response DeleteInternetGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteInternetGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteInternetGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteInternetGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteInternetGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteInternetGatewayResponse") + } + return +} + +// deleteInternetGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteInternetGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/internetGateways/{igId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteInternetGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteInternetGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteInternetGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteIpv6 Unassigns and deletes the specified IPv6. You must specify the object's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// The IPv6 address is returned to the subnet's pool of available addresses. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteIpv6.go.html to see an example of how to use DeleteIpv6 API. +func (client VirtualNetworkClient) DeleteIpv6(ctx context.Context, request DeleteIpv6Request) (response DeleteIpv6Response, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteIpv6, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteIpv6Response{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteIpv6Response{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteIpv6Response); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteIpv6Response") + } + return +} + +// deleteIpv6 implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteIpv6(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/ipv6/{ipv6Id}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteIpv6Response + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteIpv6") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteIpv6", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteLocalPeeringGateway Deletes the specified local peering gateway (LPG). +// This is an asynchronous operation; the local peering gateway's `lifecycleState` changes to TERMINATING temporarily +// until the local peering gateway is completely removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteLocalPeeringGateway.go.html to see an example of how to use DeleteLocalPeeringGateway API. +func (client VirtualNetworkClient) DeleteLocalPeeringGateway(ctx context.Context, request DeleteLocalPeeringGatewayRequest) (response DeleteLocalPeeringGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteLocalPeeringGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteLocalPeeringGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteLocalPeeringGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteLocalPeeringGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteLocalPeeringGatewayResponse") + } + return +} + +// deleteLocalPeeringGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteLocalPeeringGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/localPeeringGateways/{localPeeringGatewayId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteLocalPeeringGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteLocalPeeringGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteLocalPeeringGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteNatGateway Deletes the specified NAT gateway. The NAT gateway does not have to be disabled, but there +// must not be a route rule that lists the NAT gateway as a target. +// This is an asynchronous operation. The NAT gateway's `lifecycleState` will change to +// TERMINATING temporarily until the NAT gateway is completely removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteNatGateway.go.html to see an example of how to use DeleteNatGateway API. +func (client VirtualNetworkClient) DeleteNatGateway(ctx context.Context, request DeleteNatGatewayRequest) (response DeleteNatGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteNatGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteNatGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteNatGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteNatGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteNatGatewayResponse") + } + return +} + +// deleteNatGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteNatGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/natGateways/{natGatewayId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteNatGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteNatGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteNatGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteNetworkSecurityGroup Deletes the specified network security group. The group must not contain any VNICs. +// To get a list of the VNICs in a network security group, use +// ListNetworkSecurityGroupVnics. +// Each returned NetworkSecurityGroupVnic object +// contains both the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC and the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC's parent resource (for example, +// the Compute instance that the VNIC is attached to). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteNetworkSecurityGroup.go.html to see an example of how to use DeleteNetworkSecurityGroup API. +func (client VirtualNetworkClient) DeleteNetworkSecurityGroup(ctx context.Context, request DeleteNetworkSecurityGroupRequest) (response DeleteNetworkSecurityGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteNetworkSecurityGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteNetworkSecurityGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteNetworkSecurityGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteNetworkSecurityGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteNetworkSecurityGroupResponse") + } + return +} + +// deleteNetworkSecurityGroup implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteNetworkSecurityGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/networkSecurityGroups/{networkSecurityGroupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteNetworkSecurityGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteNetworkSecurityGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/NetworkSecurityGroup/DeleteNetworkSecurityGroup" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteNetworkSecurityGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeletePrivateIp Unassigns and deletes the specified private IP. You must +// specify the object's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). The private IP address is returned to +// the subnet's pool of available addresses. +// This operation cannot be used with primary private IPs, which are +// automatically unassigned and deleted when the VNIC is terminated. +// **Important:** If a secondary private IP is the +// target of a route rule (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#privateip), +// unassigning it from the VNIC causes that route rule to blackhole and the traffic +// will be dropped. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeletePrivateIp.go.html to see an example of how to use DeletePrivateIp API. +func (client VirtualNetworkClient) DeletePrivateIp(ctx context.Context, request DeletePrivateIpRequest) (response DeletePrivateIpResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deletePrivateIp, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePrivateIpResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePrivateIpResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePrivateIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePrivateIpResponse") + } + return +} + +// deletePrivateIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deletePrivateIp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/privateIps/{privateIpId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeletePrivateIpResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeletePrivateIp") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeletePrivateIp", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeletePublicIp Unassigns and deletes the specified public IP (either ephemeral or reserved). +// You must specify the object's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). The public IP address is returned to the +// Oracle Cloud Infrastructure public IP pool. +// **Note:** You cannot update, unassign, or delete the public IP that Oracle automatically +// assigned to an entity for you (such as a load balancer or NAT gateway). The public IP is +// automatically deleted if the assigned entity is terminated. +// For an assigned reserved public IP, the initial unassignment portion of this operation +// is asynchronous. Poll the public IP's `lifecycleState` to determine +// if the operation succeeded. +// If you want to simply unassign a reserved public IP and return it to your pool +// of reserved public IPs, instead use +// UpdatePublicIp. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeletePublicIp.go.html to see an example of how to use DeletePublicIp API. +func (client VirtualNetworkClient) DeletePublicIp(ctx context.Context, request DeletePublicIpRequest) (response DeletePublicIpResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deletePublicIp, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePublicIpResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePublicIpResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePublicIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePublicIpResponse") + } + return +} + +// deletePublicIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deletePublicIp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/publicIps/{publicIpId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeletePublicIpResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeletePublicIp") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeletePublicIp", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeletePublicIpPool Deletes the specified public IP pool. +// To delete a public IP pool it must not have any active IP address allocations. +// You must specify the object's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) when deleting an IP pool. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeletePublicIpPool.go.html to see an example of how to use DeletePublicIpPool API. +func (client VirtualNetworkClient) DeletePublicIpPool(ctx context.Context, request DeletePublicIpPoolRequest) (response DeletePublicIpPoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deletePublicIpPool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePublicIpPoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePublicIpPoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePublicIpPoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePublicIpPoolResponse") + } + return +} + +// deletePublicIpPool implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deletePublicIpPool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/publicIpPools/{publicIpPoolId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeletePublicIpPoolResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeletePublicIpPool") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIpPool/DeletePublicIpPool" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeletePublicIpPool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteRemotePeeringConnection Deletes the remote peering connection (RPC). +// This is an asynchronous operation; the RPC's `lifecycleState` changes to TERMINATING temporarily +// until the RPC is completely removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteRemotePeeringConnection.go.html to see an example of how to use DeleteRemotePeeringConnection API. +// A default retry strategy applies to this operation DeleteRemotePeeringConnection() +func (client VirtualNetworkClient) DeleteRemotePeeringConnection(ctx context.Context, request DeleteRemotePeeringConnectionRequest) (response DeleteRemotePeeringConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteRemotePeeringConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteRemotePeeringConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteRemotePeeringConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteRemotePeeringConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteRemotePeeringConnectionResponse") + } + return +} + +// deleteRemotePeeringConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteRemotePeeringConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/remotePeeringConnections/{remotePeeringConnectionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteRemotePeeringConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteRemotePeeringConnection") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteRemotePeeringConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteRouteTable Deletes the specified route table, but only if it's not associated with a subnet. You can't delete a +// VCN's default route table. +// This is an asynchronous operation. The route table's `lifecycleState` will change to TERMINATING temporarily +// until the route table is completely removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteRouteTable.go.html to see an example of how to use DeleteRouteTable API. +func (client VirtualNetworkClient) DeleteRouteTable(ctx context.Context, request DeleteRouteTableRequest) (response DeleteRouteTableResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteRouteTable, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteRouteTableResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteRouteTableResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteRouteTableResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteRouteTableResponse") + } + return +} + +// deleteRouteTable implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteRouteTable(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/routeTables/{rtId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteRouteTableResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteRouteTable") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteRouteTable", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteSecurityList Deletes the specified security list, but only if it's not associated with a subnet. You can't delete +// a VCN's default security list. +// This is an asynchronous operation. The security list's `lifecycleState` will change to TERMINATING temporarily +// until the security list is completely removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteSecurityList.go.html to see an example of how to use DeleteSecurityList API. +func (client VirtualNetworkClient) DeleteSecurityList(ctx context.Context, request DeleteSecurityListRequest) (response DeleteSecurityListResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteSecurityList, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteSecurityListResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteSecurityListResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteSecurityListResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSecurityListResponse") + } + return +} + +// deleteSecurityList implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteSecurityList(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/securityLists/{securityListId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteSecurityListResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteSecurityList") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteSecurityList", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteServiceGateway Deletes the specified service gateway. There must not be a route table that lists the service +// gateway as a target. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteServiceGateway.go.html to see an example of how to use DeleteServiceGateway API. +func (client VirtualNetworkClient) DeleteServiceGateway(ctx context.Context, request DeleteServiceGatewayRequest) (response DeleteServiceGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteServiceGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteServiceGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteServiceGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteServiceGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteServiceGatewayResponse") + } + return +} + +// deleteServiceGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteServiceGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/serviceGateways/{serviceGatewayId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteServiceGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteServiceGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteServiceGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteSubnet Deletes the specified subnet, but only if there are no instances in the subnet. This is an asynchronous +// operation. The subnet's `lifecycleState` will change to TERMINATING temporarily. If there are any +// instances in the subnet, the state will instead change back to AVAILABLE. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteSubnet.go.html to see an example of how to use DeleteSubnet API. +func (client VirtualNetworkClient) DeleteSubnet(ctx context.Context, request DeleteSubnetRequest) (response DeleteSubnetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteSubnet, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteSubnetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteSubnetResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteSubnetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSubnetResponse") + } + return +} + +// deleteSubnet implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteSubnet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/subnets/{subnetId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteSubnetResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteSubnet") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteSubnet", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVcn Deletes the specified VCN. The VCN must be completely empty and have no attached gateways. This is an asynchronous +// operation. +// A deleted VCN's `lifecycleState` changes to TERMINATING and then TERMINATED temporarily until the VCN is completely +// removed. A completely removed VCN does not appear in the results of a `ListVcns` operation and can't be used in a +// `GetVcn` operation. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVcn.go.html to see an example of how to use DeleteVcn API. +func (client VirtualNetworkClient) DeleteVcn(ctx context.Context, request DeleteVcnRequest) (response DeleteVcnResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVcn, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteVcnResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteVcnResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteVcnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVcnResponse") + } + return +} + +// deleteVcn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteVcn(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/vcns/{vcnId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteVcnResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteVcn") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteVcn", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVirtualCircuit Deletes the specified virtual circuit. +// **Important:** If you're using FastConnect via a provider, +// make sure to also terminate the connection with +// the provider, or else the provider may continue to bill you. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVirtualCircuit.go.html to see an example of how to use DeleteVirtualCircuit API. +// A default retry strategy applies to this operation DeleteVirtualCircuit() +func (client VirtualNetworkClient) DeleteVirtualCircuit(ctx context.Context, request DeleteVirtualCircuitRequest) (response DeleteVirtualCircuitResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVirtualCircuit, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteVirtualCircuitResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteVirtualCircuitResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteVirtualCircuitResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVirtualCircuitResponse") + } + return +} + +// deleteVirtualCircuit implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteVirtualCircuit(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/virtualCircuits/{virtualCircuitId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteVirtualCircuitResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteVirtualCircuit") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteVirtualCircuit", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVlan Deletes the specified VLAN, but only if there are no VNICs in the VLAN. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVlan.go.html to see an example of how to use DeleteVlan API. +func (client VirtualNetworkClient) DeleteVlan(ctx context.Context, request DeleteVlanRequest) (response DeleteVlanResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVlan, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteVlanResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteVlanResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteVlanResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVlanResponse") + } + return +} + +// deleteVlan implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteVlan(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/vlans/{vlanId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteVlanResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteVlan") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vlan/DeleteVlan" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteVlan", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVtap Deletes the specified VTAP. This is an asynchronous operation. The VTAP's `lifecycleState` will change to +// TERMINATING temporarily until the VTAP is completely removed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVtap.go.html to see an example of how to use DeleteVtap API. +func (client VirtualNetworkClient) DeleteVtap(ctx context.Context, request DeleteVtapRequest) (response DeleteVtapResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVtap, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteVtapResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteVtapResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteVtapResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVtapResponse") + } + return +} + +// deleteVtap implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) deleteVtap(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/vtaps/{vtapId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteVtapResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DeleteVtap") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vtap/DeleteVtap" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DeleteVtap", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DetachServiceId Removes the specified Service from the list of enabled +// `Service` objects for the specified gateway. You do not need to remove any route +// rules that specify this `Service` object's `cidrBlock` as the destination CIDR. However, consider +// removing the rules if your intent is to permanently disable use of the `Service` through this +// service gateway. +// **Note:** The `DetachServiceId` operation is an easy way to remove an individual `Service` from +// the service gateway. Compare it with +// UpdateServiceGateway, which replaces +// the entire existing list of enabled `Service` objects with the list that you provide in the +// `Update` call. `UpdateServiceGateway` also lets you block all traffic through the service +// gateway without having to remove each of the individual `Service` objects. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachServiceId.go.html to see an example of how to use DetachServiceId API. +func (client VirtualNetworkClient) DetachServiceId(ctx context.Context, request DetachServiceIdRequest) (response DetachServiceIdResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.detachServiceId, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DetachServiceIdResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DetachServiceIdResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DetachServiceIdResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DetachServiceIdResponse") + } + return +} + +// detachServiceId implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) detachServiceId(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/serviceGateways/{serviceGatewayId}/actions/detachService", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DetachServiceIdResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "DetachServiceId") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ServiceGateway/DetachServiceId" + err = common.PostProcessServiceError(err, "VirtualNetwork", "DetachServiceId", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetAllDrgAttachments Returns a complete list of DRG attachments that belong to a particular DRG. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAllDrgAttachments.go.html to see an example of how to use GetAllDrgAttachments API. +func (client VirtualNetworkClient) GetAllDrgAttachments(ctx context.Context, request GetAllDrgAttachmentsRequest) (response GetAllDrgAttachmentsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getAllDrgAttachments, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAllDrgAttachmentsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAllDrgAttachmentsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAllDrgAttachmentsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAllDrgAttachmentsResponse") + } + return +} + +// getAllDrgAttachments implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getAllDrgAttachments(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgs/{drgId}/actions/getAllDrgAttachments", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetAllDrgAttachmentsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetAllDrgAttachments") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Drg/GetAllDrgAttachments" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetAllDrgAttachments", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetAllowedIkeIPSecParameters The parameters allowed for IKE IPSec tunnels. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAllowedIkeIPSecParameters.go.html to see an example of how to use GetAllowedIkeIPSecParameters API. +// A default retry strategy applies to this operation GetAllowedIkeIPSecParameters() +func (client VirtualNetworkClient) GetAllowedIkeIPSecParameters(ctx context.Context, request GetAllowedIkeIPSecParametersRequest) (response GetAllowedIkeIPSecParametersResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getAllowedIkeIPSecParameters, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAllowedIkeIPSecParametersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAllowedIkeIPSecParametersResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAllowedIkeIPSecParametersResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAllowedIkeIPSecParametersResponse") + } + return +} + +// getAllowedIkeIPSecParameters implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getAllowedIkeIPSecParameters(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecAlgorithms", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetAllowedIkeIPSecParametersResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetAllowedIkeIPSecParameters") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/AllowedIkeIPSecParameters/GetAllowedIkeIPSecParameters" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetAllowedIkeIPSecParameters", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetByoasn Gets the `Byoasn` resource. You must specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetByoasn.go.html to see an example of how to use GetByoasn API. +// A default retry strategy applies to this operation GetByoasn() +func (client VirtualNetworkClient) GetByoasn(ctx context.Context, request GetByoasnRequest) (response GetByoasnResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getByoasn, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetByoasnResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetByoasnResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetByoasnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetByoasnResponse") + } + return +} + +// getByoasn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getByoasn(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/byoasns/{byoasnId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetByoasnResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetByoasn") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Byoasn/GetByoasn" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetByoasn", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetByoipRange Gets the `ByoipRange` resource. You must specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetByoipRange.go.html to see an example of how to use GetByoipRange API. +func (client VirtualNetworkClient) GetByoipRange(ctx context.Context, request GetByoipRangeRequest) (response GetByoipRangeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getByoipRange, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetByoipRangeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetByoipRangeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetByoipRangeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetByoipRangeResponse") + } + return +} + +// getByoipRange implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getByoipRange(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/byoipRanges/{byoipRangeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetByoipRangeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetByoipRange") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ByoipRange/GetByoipRange" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetByoipRange", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCaptureFilter Gets information about the specified VTAP capture filter. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCaptureFilter.go.html to see an example of how to use GetCaptureFilter API. +func (client VirtualNetworkClient) GetCaptureFilter(ctx context.Context, request GetCaptureFilterRequest) (response GetCaptureFilterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCaptureFilter, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCaptureFilterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCaptureFilterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCaptureFilterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCaptureFilterResponse") + } + return +} + +// getCaptureFilter implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getCaptureFilter(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/captureFilters/{captureFilterId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetCaptureFilterResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetCaptureFilter") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CaptureFilter/GetCaptureFilter" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetCaptureFilter", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCpe Gets the specified CPE's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCpe.go.html to see an example of how to use GetCpe API. +// A default retry strategy applies to this operation GetCpe() +func (client VirtualNetworkClient) GetCpe(ctx context.Context, request GetCpeRequest) (response GetCpeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCpe, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCpeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCpeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCpeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCpeResponse") + } + return +} + +// getCpe implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getCpe(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/cpes/{cpeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetCpeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetCpe") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Cpe/GetCpe" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetCpe", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCpeDeviceConfigContent Renders a set of CPE configuration content that can help a network engineer configure the actual +// CPE device (for example, a hardware router) represented by the specified Cpe +// object. +// The rendered content is specific to the type of CPE device (for example, Cisco ASA). Therefore the +// Cpe must have the CPE's device type specified by the `cpeDeviceShapeId` +// attribute. The content optionally includes answers that the customer provides (see +// UpdateTunnelCpeDeviceConfig), +// merged with a template of other information specific to the CPE device type. +// The operation returns configuration information for *all* of the +// IPSecConnection objects that use the specified CPE. +// Here are similar operations: +// - GetIpsecCpeDeviceConfigContent +// returns CPE configuration content for all IPSec tunnels in a single IPSec connection. +// - GetTunnelCpeDeviceConfigContent +// returns CPE configuration content for a specific IPSec tunnel in an IPSec connection. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCpeDeviceConfigContent.go.html to see an example of how to use GetCpeDeviceConfigContent API. +// A default retry strategy applies to this operation GetCpeDeviceConfigContent() +func (client VirtualNetworkClient) GetCpeDeviceConfigContent(ctx context.Context, request GetCpeDeviceConfigContentRequest) (response GetCpeDeviceConfigContentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCpeDeviceConfigContent, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCpeDeviceConfigContentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCpeDeviceConfigContentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCpeDeviceConfigContentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCpeDeviceConfigContentResponse") + } + return +} + +// getCpeDeviceConfigContent implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getCpeDeviceConfigContent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/cpes/{cpeId}/cpeConfigContent", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetCpeDeviceConfigContentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetCpeDeviceConfigContent") + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Cpe/GetCpeDeviceConfigContent" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetCpeDeviceConfigContent", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCpeDeviceShape Gets the detailed information about the specified CPE device type. This might include a set of questions +// that are specific to the particular CPE device type. The customer must supply answers to those questions +// (see UpdateTunnelCpeDeviceConfig). +// The service merges the answers with a template of other information for the CPE device type. The following +// operations return the merged content: +// - GetCpeDeviceConfigContent +// - GetIpsecCpeDeviceConfigContent +// - GetTunnelCpeDeviceConfigContent +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCpeDeviceShape.go.html to see an example of how to use GetCpeDeviceShape API. +// A default retry strategy applies to this operation GetCpeDeviceShape() +func (client VirtualNetworkClient) GetCpeDeviceShape(ctx context.Context, request GetCpeDeviceShapeRequest) (response GetCpeDeviceShapeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCpeDeviceShape, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCpeDeviceShapeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCpeDeviceShapeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCpeDeviceShapeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCpeDeviceShapeResponse") + } + return +} + +// getCpeDeviceShape implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getCpeDeviceShape(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/cpeDeviceShapes/{cpeDeviceShapeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetCpeDeviceShapeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetCpeDeviceShape") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CpeDeviceShapeDetail/GetCpeDeviceShape" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetCpeDeviceShape", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCrossConnect Gets the specified cross-connect's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCrossConnect.go.html to see an example of how to use GetCrossConnect API. +// A default retry strategy applies to this operation GetCrossConnect() +func (client VirtualNetworkClient) GetCrossConnect(ctx context.Context, request GetCrossConnectRequest) (response GetCrossConnectResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCrossConnect, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCrossConnectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCrossConnectResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCrossConnectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCrossConnectResponse") + } + return +} + +// getCrossConnect implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getCrossConnect(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnects/{crossConnectId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetCrossConnectResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetCrossConnect") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CrossConnect/GetCrossConnect" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetCrossConnect", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCrossConnectGroup Gets the specified cross-connect group's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCrossConnectGroup.go.html to see an example of how to use GetCrossConnectGroup API. +// A default retry strategy applies to this operation GetCrossConnectGroup() +func (client VirtualNetworkClient) GetCrossConnectGroup(ctx context.Context, request GetCrossConnectGroupRequest) (response GetCrossConnectGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCrossConnectGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCrossConnectGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCrossConnectGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCrossConnectGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCrossConnectGroupResponse") + } + return +} + +// getCrossConnectGroup implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getCrossConnectGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnectGroups/{crossConnectGroupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetCrossConnectGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetCrossConnectGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CrossConnectGroup/GetCrossConnectGroup" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetCrossConnectGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCrossConnectLetterOfAuthority Gets the Letter of Authority for the specified cross-connect. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCrossConnectLetterOfAuthority.go.html to see an example of how to use GetCrossConnectLetterOfAuthority API. +// A default retry strategy applies to this operation GetCrossConnectLetterOfAuthority() +func (client VirtualNetworkClient) GetCrossConnectLetterOfAuthority(ctx context.Context, request GetCrossConnectLetterOfAuthorityRequest) (response GetCrossConnectLetterOfAuthorityResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCrossConnectLetterOfAuthority, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCrossConnectLetterOfAuthorityResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCrossConnectLetterOfAuthorityResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCrossConnectLetterOfAuthorityResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCrossConnectLetterOfAuthorityResponse") + } + return +} + +// getCrossConnectLetterOfAuthority implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getCrossConnectLetterOfAuthority(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnects/{crossConnectId}/letterOfAuthority", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetCrossConnectLetterOfAuthorityResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetCrossConnectLetterOfAuthority") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/LetterOfAuthority/GetCrossConnectLetterOfAuthority" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetCrossConnectLetterOfAuthority", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCrossConnectStatus Gets the status of the specified cross-connect. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCrossConnectStatus.go.html to see an example of how to use GetCrossConnectStatus API. +// A default retry strategy applies to this operation GetCrossConnectStatus() +func (client VirtualNetworkClient) GetCrossConnectStatus(ctx context.Context, request GetCrossConnectStatusRequest) (response GetCrossConnectStatusResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCrossConnectStatus, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCrossConnectStatusResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCrossConnectStatusResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCrossConnectStatusResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCrossConnectStatusResponse") + } + return +} + +// getCrossConnectStatus implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getCrossConnectStatus(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnects/{crossConnectId}/status", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetCrossConnectStatusResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetCrossConnectStatus") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CrossConnectStatus/GetCrossConnectStatus" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetCrossConnectStatus", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDhcpOptions Gets the specified set of DHCP options. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDhcpOptions.go.html to see an example of how to use GetDhcpOptions API. +func (client VirtualNetworkClient) GetDhcpOptions(ctx context.Context, request GetDhcpOptionsRequest) (response GetDhcpOptionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDhcpOptions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDhcpOptionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDhcpOptionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDhcpOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDhcpOptionsResponse") + } + return +} + +// getDhcpOptions implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getDhcpOptions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dhcps/{dhcpId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetDhcpOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetDhcpOptions") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DhcpOptions/GetDhcpOptions" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetDhcpOptions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDrg Gets the specified DRG's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrg.go.html to see an example of how to use GetDrg API. +func (client VirtualNetworkClient) GetDrg(ctx context.Context, request GetDrgRequest) (response GetDrgResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDrg, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDrgResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDrgResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDrgResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDrgResponse") + } + return +} + +// getDrg implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getDrg(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgs/{drgId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetDrgResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetDrg") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Drg/GetDrg" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetDrg", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDrgAttachment Gets the `DrgAttachment` resource. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrgAttachment.go.html to see an example of how to use GetDrgAttachment API. +func (client VirtualNetworkClient) GetDrgAttachment(ctx context.Context, request GetDrgAttachmentRequest) (response GetDrgAttachmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDrgAttachment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDrgAttachmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDrgAttachmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDrgAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDrgAttachmentResponse") + } + return +} + +// getDrgAttachment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getDrgAttachment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgAttachments/{drgAttachmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetDrgAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetDrgAttachment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgAttachment/GetDrgAttachment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetDrgAttachment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDrgRedundancyStatus Gets the redundancy status for the specified DRG. For more information, see +// Redundancy Remedies (https://docs.oracle.com/iaas/Content/Network/Troubleshoot/drgredundancy.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrgRedundancyStatus.go.html to see an example of how to use GetDrgRedundancyStatus API. +// A default retry strategy applies to this operation GetDrgRedundancyStatus() +func (client VirtualNetworkClient) GetDrgRedundancyStatus(ctx context.Context, request GetDrgRedundancyStatusRequest) (response GetDrgRedundancyStatusResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDrgRedundancyStatus, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDrgRedundancyStatusResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDrgRedundancyStatusResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDrgRedundancyStatusResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDrgRedundancyStatusResponse") + } + return +} + +// getDrgRedundancyStatus implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getDrgRedundancyStatus(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgs/{drgId}/redundancyStatus", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetDrgRedundancyStatusResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetDrgRedundancyStatus") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRedundancyStatus/GetDrgRedundancyStatus" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetDrgRedundancyStatus", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDrgRouteDistribution Gets the specified route distribution's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrgRouteDistribution.go.html to see an example of how to use GetDrgRouteDistribution API. +func (client VirtualNetworkClient) GetDrgRouteDistribution(ctx context.Context, request GetDrgRouteDistributionRequest) (response GetDrgRouteDistributionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDrgRouteDistribution, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDrgRouteDistributionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDrgRouteDistributionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDrgRouteDistributionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDrgRouteDistributionResponse") + } + return +} + +// getDrgRouteDistribution implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getDrgRouteDistribution(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgRouteDistributions/{drgRouteDistributionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetDrgRouteDistributionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetDrgRouteDistribution") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteDistribution/GetDrgRouteDistribution" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetDrgRouteDistribution", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDrgRouteTable Gets the specified DRG route table's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrgRouteTable.go.html to see an example of how to use GetDrgRouteTable API. +func (client VirtualNetworkClient) GetDrgRouteTable(ctx context.Context, request GetDrgRouteTableRequest) (response GetDrgRouteTableResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getDrgRouteTable, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDrgRouteTableResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDrgRouteTableResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDrgRouteTableResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDrgRouteTableResponse") + } + return +} + +// getDrgRouteTable implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getDrgRouteTable(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgRouteTables/{drgRouteTableId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetDrgRouteTableResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetDrgRouteTable") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteTable/GetDrgRouteTable" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetDrgRouteTable", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetFastConnectProviderService Gets the specified provider service. +// For more information, see FastConnect Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetFastConnectProviderService.go.html to see an example of how to use GetFastConnectProviderService API. +// A default retry strategy applies to this operation GetFastConnectProviderService() +func (client VirtualNetworkClient) GetFastConnectProviderService(ctx context.Context, request GetFastConnectProviderServiceRequest) (response GetFastConnectProviderServiceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getFastConnectProviderService, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetFastConnectProviderServiceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetFastConnectProviderServiceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetFastConnectProviderServiceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetFastConnectProviderServiceResponse") + } + return +} + +// getFastConnectProviderService implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getFastConnectProviderService(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fastConnectProviderServices/{providerServiceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetFastConnectProviderServiceResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetFastConnectProviderService") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/FastConnectProviderService/GetFastConnectProviderService" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetFastConnectProviderService", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetFastConnectProviderServiceKey Gets the specified provider service key's information. Use this operation to validate a +// provider service key. An invalid key returns a 404 error. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetFastConnectProviderServiceKey.go.html to see an example of how to use GetFastConnectProviderServiceKey API. +// A default retry strategy applies to this operation GetFastConnectProviderServiceKey() +func (client VirtualNetworkClient) GetFastConnectProviderServiceKey(ctx context.Context, request GetFastConnectProviderServiceKeyRequest) (response GetFastConnectProviderServiceKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getFastConnectProviderServiceKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetFastConnectProviderServiceKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetFastConnectProviderServiceKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetFastConnectProviderServiceKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetFastConnectProviderServiceKeyResponse") + } + return +} + +// getFastConnectProviderServiceKey implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getFastConnectProviderServiceKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fastConnectProviderServices/{providerServiceId}/providerServiceKeys/{providerServiceKeyName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetFastConnectProviderServiceKeyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetFastConnectProviderServiceKey") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/FastConnectProviderServiceKey/GetFastConnectProviderServiceKey" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetFastConnectProviderServiceKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetIPSecConnection Gets the specified IPSec connection's basic information, including the static routes for the +// on-premises router. If you want the status of the connection (whether it's up or down), use +// GetIPSecConnectionTunnel. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnection.go.html to see an example of how to use GetIPSecConnection API. +// A default retry strategy applies to this operation GetIPSecConnection() +func (client VirtualNetworkClient) GetIPSecConnection(ctx context.Context, request GetIPSecConnectionRequest) (response GetIPSecConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getIPSecConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetIPSecConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetIPSecConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetIPSecConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIPSecConnectionResponse") + } + return +} + +// getIPSecConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getIPSecConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetIPSecConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetIPSecConnection") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IPSecConnection/GetIPSecConnection" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetIPSecConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetIPSecConnectionDeviceConfig Deprecated. To get tunnel information, instead use: +// * GetIPSecConnectionTunnel +// * GetIPSecConnectionTunnelSharedSecret +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionDeviceConfig.go.html to see an example of how to use GetIPSecConnectionDeviceConfig API. +// A default retry strategy applies to this operation GetIPSecConnectionDeviceConfig() +func (client VirtualNetworkClient) GetIPSecConnectionDeviceConfig(ctx context.Context, request GetIPSecConnectionDeviceConfigRequest) (response GetIPSecConnectionDeviceConfigResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getIPSecConnectionDeviceConfig, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetIPSecConnectionDeviceConfigResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetIPSecConnectionDeviceConfigResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetIPSecConnectionDeviceConfigResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIPSecConnectionDeviceConfigResponse") + } + return +} + +// getIPSecConnectionDeviceConfig implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getIPSecConnectionDeviceConfig(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}/deviceConfig", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetIPSecConnectionDeviceConfigResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetIPSecConnectionDeviceConfig") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IPSecConnectionDeviceConfig/GetIPSecConnectionDeviceConfig" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetIPSecConnectionDeviceConfig", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetIPSecConnectionDeviceStatus Deprecated. To get the tunnel status, instead use +// GetIPSecConnectionTunnel. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionDeviceStatus.go.html to see an example of how to use GetIPSecConnectionDeviceStatus API. +// A default retry strategy applies to this operation GetIPSecConnectionDeviceStatus() +func (client VirtualNetworkClient) GetIPSecConnectionDeviceStatus(ctx context.Context, request GetIPSecConnectionDeviceStatusRequest) (response GetIPSecConnectionDeviceStatusResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getIPSecConnectionDeviceStatus, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetIPSecConnectionDeviceStatusResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetIPSecConnectionDeviceStatusResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetIPSecConnectionDeviceStatusResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIPSecConnectionDeviceStatusResponse") + } + return +} + +// getIPSecConnectionDeviceStatus implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getIPSecConnectionDeviceStatus(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}/deviceStatus", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetIPSecConnectionDeviceStatusResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetIPSecConnectionDeviceStatus") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IPSecConnectionDeviceStatus/GetIPSecConnectionDeviceStatus" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetIPSecConnectionDeviceStatus", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetIPSecConnectionTunnel Gets the specified tunnel's information. The resulting object does not include the tunnel's +// shared secret (pre-shared key). To retrieve that, use +// GetIPSecConnectionTunnelSharedSecret. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionTunnel.go.html to see an example of how to use GetIPSecConnectionTunnel API. +// A default retry strategy applies to this operation GetIPSecConnectionTunnel() +func (client VirtualNetworkClient) GetIPSecConnectionTunnel(ctx context.Context, request GetIPSecConnectionTunnelRequest) (response GetIPSecConnectionTunnelResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getIPSecConnectionTunnel, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetIPSecConnectionTunnelResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetIPSecConnectionTunnelResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetIPSecConnectionTunnelResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIPSecConnectionTunnelResponse") + } + return +} + +// getIPSecConnectionTunnel implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getIPSecConnectionTunnel(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}/tunnels/{tunnelId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetIPSecConnectionTunnelResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetIPSecConnectionTunnel") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IPSecConnectionTunnel/GetIPSecConnectionTunnel" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetIPSecConnectionTunnel", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetIPSecConnectionTunnelError Gets the identified error for the specified IPSec tunnel ID. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionTunnelError.go.html to see an example of how to use GetIPSecConnectionTunnelError API. +// A default retry strategy applies to this operation GetIPSecConnectionTunnelError() +func (client VirtualNetworkClient) GetIPSecConnectionTunnelError(ctx context.Context, request GetIPSecConnectionTunnelErrorRequest) (response GetIPSecConnectionTunnelErrorResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getIPSecConnectionTunnelError, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetIPSecConnectionTunnelErrorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetIPSecConnectionTunnelErrorResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetIPSecConnectionTunnelErrorResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIPSecConnectionTunnelErrorResponse") + } + return +} + +// getIPSecConnectionTunnelError implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getIPSecConnectionTunnelError(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/error", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetIPSecConnectionTunnelErrorResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetIPSecConnectionTunnelError") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IPSecConnectionTunnelErrorDetails/GetIPSecConnectionTunnelError" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetIPSecConnectionTunnelError", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetIPSecConnectionTunnelSharedSecret Gets the specified tunnel's shared secret (pre-shared key). To get other information +// about the tunnel, use GetIPSecConnectionTunnel. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionTunnelSharedSecret.go.html to see an example of how to use GetIPSecConnectionTunnelSharedSecret API. +// A default retry strategy applies to this operation GetIPSecConnectionTunnelSharedSecret() +func (client VirtualNetworkClient) GetIPSecConnectionTunnelSharedSecret(ctx context.Context, request GetIPSecConnectionTunnelSharedSecretRequest) (response GetIPSecConnectionTunnelSharedSecretResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getIPSecConnectionTunnelSharedSecret, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetIPSecConnectionTunnelSharedSecretResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetIPSecConnectionTunnelSharedSecretResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetIPSecConnectionTunnelSharedSecretResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIPSecConnectionTunnelSharedSecretResponse") + } + return +} + +// getIPSecConnectionTunnelSharedSecret implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getIPSecConnectionTunnelSharedSecret(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/sharedSecret", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetIPSecConnectionTunnelSharedSecretResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetIPSecConnectionTunnelSharedSecret") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IPSecConnectionTunnelSharedSecret/GetIPSecConnectionTunnelSharedSecret" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetIPSecConnectionTunnelSharedSecret", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetInternetGateway Gets the specified internet gateway's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInternetGateway.go.html to see an example of how to use GetInternetGateway API. +func (client VirtualNetworkClient) GetInternetGateway(ctx context.Context, request GetInternetGatewayRequest) (response GetInternetGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getInternetGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetInternetGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetInternetGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetInternetGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetInternetGatewayResponse") + } + return +} + +// getInternetGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getInternetGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/internetGateways/{igId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetInternetGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetInternetGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InternetGateway/GetInternetGateway" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetInternetGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetIpsecCpeDeviceConfigContent Renders a set of CPE configuration content for the specified IPSec connection (for all the +// tunnels in the connection). The content helps a network engineer configure the actual CPE +// device (for example, a hardware router) that the specified IPSec connection terminates on. +// The rendered content is specific to the type of CPE device (for example, Cisco ASA). Therefore the +// Cpe used by the specified IPSecConnection +// must have the CPE's device type specified by the `cpeDeviceShapeId` attribute. The content +// optionally includes answers that the customer provides (see +// UpdateTunnelCpeDeviceConfig), +// merged with a template of other information specific to the CPE device type. +// The operation returns configuration information for all tunnels in the single specified +// IPSecConnection object. Here are other similar +// operations: +// - GetTunnelCpeDeviceConfigContent +// returns CPE configuration content for a specific tunnel within an IPSec connection. +// - GetCpeDeviceConfigContent +// returns CPE configuration content for *all* IPSec connections that use a specific CPE. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIpsecCpeDeviceConfigContent.go.html to see an example of how to use GetIpsecCpeDeviceConfigContent API. +// A default retry strategy applies to this operation GetIpsecCpeDeviceConfigContent() +func (client VirtualNetworkClient) GetIpsecCpeDeviceConfigContent(ctx context.Context, request GetIpsecCpeDeviceConfigContentRequest) (response GetIpsecCpeDeviceConfigContentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getIpsecCpeDeviceConfigContent, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetIpsecCpeDeviceConfigContentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetIpsecCpeDeviceConfigContentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetIpsecCpeDeviceConfigContentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIpsecCpeDeviceConfigContentResponse") + } + return +} + +// getIpsecCpeDeviceConfigContent implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getIpsecCpeDeviceConfigContent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}/cpeConfigContent", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetIpsecCpeDeviceConfigContentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetIpsecCpeDeviceConfigContent") + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IPSecConnection/GetIpsecCpeDeviceConfigContent" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetIpsecCpeDeviceConfigContent", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetIpv6 Gets the specified IPv6. You must specify the object's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// Alternatively, you can get the object by using +// ListIpv6s +// with the IPv6 address (for example, 2001:0db8:0123:1111:98fe:dcba:9876:4321) and subnet OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIpv6.go.html to see an example of how to use GetIpv6 API. +func (client VirtualNetworkClient) GetIpv6(ctx context.Context, request GetIpv6Request) (response GetIpv6Response, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getIpv6, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetIpv6Response{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetIpv6Response{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetIpv6Response); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIpv6Response") + } + return +} + +// getIpv6 implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getIpv6(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipv6/{ipv6Id}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetIpv6Response + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetIpv6") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Ipv6/GetIpv6" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetIpv6", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetLocalPeeringGateway Gets the specified local peering gateway's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetLocalPeeringGateway.go.html to see an example of how to use GetLocalPeeringGateway API. +func (client VirtualNetworkClient) GetLocalPeeringGateway(ctx context.Context, request GetLocalPeeringGatewayRequest) (response GetLocalPeeringGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getLocalPeeringGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetLocalPeeringGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetLocalPeeringGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetLocalPeeringGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetLocalPeeringGatewayResponse") + } + return +} + +// getLocalPeeringGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getLocalPeeringGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/localPeeringGateways/{localPeeringGatewayId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetLocalPeeringGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetLocalPeeringGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/LocalPeeringGateway/GetLocalPeeringGateway" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetLocalPeeringGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetNatGateway Gets the specified NAT gateway's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetNatGateway.go.html to see an example of how to use GetNatGateway API. +func (client VirtualNetworkClient) GetNatGateway(ctx context.Context, request GetNatGatewayRequest) (response GetNatGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getNatGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetNatGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetNatGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetNatGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetNatGatewayResponse") + } + return +} + +// getNatGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getNatGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/natGateways/{natGatewayId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetNatGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetNatGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/NatGateway/GetNatGateway" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetNatGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetNetworkSecurityGroup Gets the specified network security group's information. +// To list the VNICs in an NSG, see +// ListNetworkSecurityGroupVnics. +// To list the security rules in an NSG, see +// ListNetworkSecurityGroupSecurityRules. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetNetworkSecurityGroup.go.html to see an example of how to use GetNetworkSecurityGroup API. +func (client VirtualNetworkClient) GetNetworkSecurityGroup(ctx context.Context, request GetNetworkSecurityGroupRequest) (response GetNetworkSecurityGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getNetworkSecurityGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetNetworkSecurityGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetNetworkSecurityGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetNetworkSecurityGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetNetworkSecurityGroupResponse") + } + return +} + +// getNetworkSecurityGroup implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getNetworkSecurityGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/networkSecurityGroups/{networkSecurityGroupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetNetworkSecurityGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetNetworkSecurityGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/NetworkSecurityGroup/GetNetworkSecurityGroup" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetNetworkSecurityGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetNetworkingTopology Gets a virtual networking topology for the current region. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetNetworkingTopology.go.html to see an example of how to use GetNetworkingTopology API. +func (client VirtualNetworkClient) GetNetworkingTopology(ctx context.Context, request GetNetworkingTopologyRequest) (response GetNetworkingTopologyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getNetworkingTopology, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetNetworkingTopologyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetNetworkingTopologyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetNetworkingTopologyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetNetworkingTopologyResponse") + } + return +} + +// getNetworkingTopology implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getNetworkingTopology(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/networkingTopology", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetNetworkingTopologyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetNetworkingTopology") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/NetworkingTopology/GetNetworkingTopology" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetNetworkingTopology", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPrivateIp Gets the specified private IP. You must specify the object's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// Alternatively, you can get the object by using +// ListPrivateIps +// with the private IP address (for example, 10.0.3.3) and subnet OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPrivateIp.go.html to see an example of how to use GetPrivateIp API. +func (client VirtualNetworkClient) GetPrivateIp(ctx context.Context, request GetPrivateIpRequest) (response GetPrivateIpResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPrivateIp, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPrivateIpResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPrivateIpResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPrivateIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPrivateIpResponse") + } + return +} + +// getPrivateIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getPrivateIp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/privateIps/{privateIpId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetPrivateIpResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetPrivateIp") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PrivateIp/GetPrivateIp" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetPrivateIp", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPublicIp Gets the specified public IP. You must specify the object's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// Alternatively, you can get the object by using GetPublicIpByIpAddress +// with the public IP address (for example, 203.0.113.2). +// Or you can use GetPublicIpByPrivateIpId +// with the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private IP that the public IP is assigned to. +// **Note:** If you're fetching a reserved public IP that is in the process of being +// moved to a different private IP, the service returns the public IP object with +// `lifecycleState` = ASSIGNING and `assignedEntityId` = OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the target private IP. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPublicIp.go.html to see an example of how to use GetPublicIp API. +func (client VirtualNetworkClient) GetPublicIp(ctx context.Context, request GetPublicIpRequest) (response GetPublicIpResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPublicIp, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPublicIpResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPublicIpResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPublicIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPublicIpResponse") + } + return +} + +// getPublicIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getPublicIp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/publicIps/{publicIpId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetPublicIpResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetPublicIp") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIp/GetPublicIp" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetPublicIp", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPublicIpByIpAddress Gets the public IP based on the public IP address (for example, 203.0.113.2). +// **Note:** If you're fetching a reserved public IP that is in the process of being +// moved to a different private IP, the service returns the public IP object with +// `lifecycleState` = ASSIGNING and `assignedEntityId` = OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the target private IP. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPublicIpByIpAddress.go.html to see an example of how to use GetPublicIpByIpAddress API. +func (client VirtualNetworkClient) GetPublicIpByIpAddress(ctx context.Context, request GetPublicIpByIpAddressRequest) (response GetPublicIpByIpAddressResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPublicIpByIpAddress, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPublicIpByIpAddressResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPublicIpByIpAddressResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPublicIpByIpAddressResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPublicIpByIpAddressResponse") + } + return +} + +// getPublicIpByIpAddress implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getPublicIpByIpAddress(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/publicIps/actions/getByIpAddress", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetPublicIpByIpAddressResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetPublicIpByIpAddress") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIp/GetPublicIpByIpAddress" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetPublicIpByIpAddress", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPublicIpByPrivateIpId Gets the public IP assigned to the specified private IP. You must specify the OCID +// of the private IP. If no public IP is assigned, a 404 is returned. +// **Note:** If you're fetching a reserved public IP that is in the process of being +// moved to a different private IP, and you provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the original private +// IP, this operation returns a 404. If you instead provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the target +// private IP, or if you instead call +// GetPublicIp or +// GetPublicIpByIpAddress, the +// service returns the public IP object with `lifecycleState` = ASSIGNING and +// `assignedEntityId` = OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the target private IP. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPublicIpByPrivateIpId.go.html to see an example of how to use GetPublicIpByPrivateIpId API. +func (client VirtualNetworkClient) GetPublicIpByPrivateIpId(ctx context.Context, request GetPublicIpByPrivateIpIdRequest) (response GetPublicIpByPrivateIpIdResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPublicIpByPrivateIpId, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPublicIpByPrivateIpIdResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPublicIpByPrivateIpIdResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPublicIpByPrivateIpIdResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPublicIpByPrivateIpIdResponse") + } + return +} + +// getPublicIpByPrivateIpId implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getPublicIpByPrivateIpId(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/publicIps/actions/getByPrivateIpId", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetPublicIpByPrivateIpIdResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetPublicIpByPrivateIpId") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIp/GetPublicIpByPrivateIpId" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetPublicIpByPrivateIpId", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPublicIpPool Gets the specified `PublicIpPool` object. You must specify the object's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPublicIpPool.go.html to see an example of how to use GetPublicIpPool API. +func (client VirtualNetworkClient) GetPublicIpPool(ctx context.Context, request GetPublicIpPoolRequest) (response GetPublicIpPoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPublicIpPool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPublicIpPoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPublicIpPoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPublicIpPoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPublicIpPoolResponse") + } + return +} + +// getPublicIpPool implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getPublicIpPool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/publicIpPools/{publicIpPoolId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetPublicIpPoolResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetPublicIpPool") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIpPool/GetPublicIpPool" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetPublicIpPool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetRemotePeeringConnection Get the specified remote peering connection's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetRemotePeeringConnection.go.html to see an example of how to use GetRemotePeeringConnection API. +// A default retry strategy applies to this operation GetRemotePeeringConnection() +func (client VirtualNetworkClient) GetRemotePeeringConnection(ctx context.Context, request GetRemotePeeringConnectionRequest) (response GetRemotePeeringConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getRemotePeeringConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetRemotePeeringConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetRemotePeeringConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetRemotePeeringConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRemotePeeringConnectionResponse") + } + return +} + +// getRemotePeeringConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getRemotePeeringConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/remotePeeringConnections/{remotePeeringConnectionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetRemotePeeringConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetRemotePeeringConnection") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/RemotePeeringConnection/GetRemotePeeringConnection" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetRemotePeeringConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetResourceIpInventory Gets the `IpInventory` resource. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetResourceIpInventory.go.html to see an example of how to use GetResourceIpInventory API. +func (client VirtualNetworkClient) GetResourceIpInventory(ctx context.Context, request GetResourceIpInventoryRequest) (response GetResourceIpInventoryResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getResourceIpInventory, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetResourceIpInventoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetResourceIpInventoryResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetResourceIpInventoryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetResourceIpInventoryResponse") + } + return +} + +// getResourceIpInventory implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getResourceIpInventory(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipinventory/DataRequestId/{dataRequestId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetResourceIpInventoryResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetResourceIpInventory") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IpInventoryCollection/GetResourceIpInventory" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetResourceIpInventory", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetRouteTable Gets the specified route table's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetRouteTable.go.html to see an example of how to use GetRouteTable API. +func (client VirtualNetworkClient) GetRouteTable(ctx context.Context, request GetRouteTableRequest) (response GetRouteTableResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getRouteTable, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetRouteTableResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetRouteTableResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetRouteTableResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRouteTableResponse") + } + return +} + +// getRouteTable implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getRouteTable(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/routeTables/{rtId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetRouteTableResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetRouteTable") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/RouteTable/GetRouteTable" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetRouteTable", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetSecurityList Gets the specified security list's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSecurityList.go.html to see an example of how to use GetSecurityList API. +func (client VirtualNetworkClient) GetSecurityList(ctx context.Context, request GetSecurityListRequest) (response GetSecurityListResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getSecurityList, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetSecurityListResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetSecurityListResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetSecurityListResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetSecurityListResponse") + } + return +} + +// getSecurityList implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getSecurityList(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/securityLists/{securityListId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetSecurityListResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetSecurityList") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/SecurityList/GetSecurityList" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetSecurityList", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetService Gets the specified Service object. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetService.go.html to see an example of how to use GetService API. +func (client VirtualNetworkClient) GetService(ctx context.Context, request GetServiceRequest) (response GetServiceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getService, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetServiceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetServiceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetServiceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetServiceResponse") + } + return +} + +// getService implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getService(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/services/{serviceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetServiceResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetService") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Service/GetService" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetService", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetServiceGateway Gets the specified service gateway's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetServiceGateway.go.html to see an example of how to use GetServiceGateway API. +func (client VirtualNetworkClient) GetServiceGateway(ctx context.Context, request GetServiceGatewayRequest) (response GetServiceGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getServiceGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetServiceGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetServiceGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetServiceGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetServiceGatewayResponse") + } + return +} + +// getServiceGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getServiceGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/serviceGateways/{serviceGatewayId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetServiceGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetServiceGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ServiceGateway/GetServiceGateway" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetServiceGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetSubnet Gets the specified subnet's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSubnet.go.html to see an example of how to use GetSubnet API. +func (client VirtualNetworkClient) GetSubnet(ctx context.Context, request GetSubnetRequest) (response GetSubnetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getSubnet, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetSubnetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetSubnetResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetSubnetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetSubnetResponse") + } + return +} + +// getSubnet implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getSubnet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/subnets/{subnetId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetSubnetResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetSubnet") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Subnet/GetSubnet" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetSubnet", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetSubnetCidrUtilization Gets the CIDR utilization data of the specified subnet. Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSubnetCidrUtilization.go.html to see an example of how to use GetSubnetCidrUtilization API. +func (client VirtualNetworkClient) GetSubnetCidrUtilization(ctx context.Context, request GetSubnetCidrUtilizationRequest) (response GetSubnetCidrUtilizationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getSubnetCidrUtilization, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetSubnetCidrUtilizationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetSubnetCidrUtilizationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetSubnetCidrUtilizationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetSubnetCidrUtilizationResponse") + } + return +} + +// getSubnetCidrUtilization implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getSubnetCidrUtilization(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipInventory/subnets/{subnetId}/cidrs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetSubnetCidrUtilizationResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetSubnetCidrUtilization") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IpInventoryCidrUtilizationCollection/GetSubnetCidrUtilization" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetSubnetCidrUtilization", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetSubnetIpInventory Gets the IP Inventory data of the specified subnet. Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSubnetIpInventory.go.html to see an example of how to use GetSubnetIpInventory API. +func (client VirtualNetworkClient) GetSubnetIpInventory(ctx context.Context, request GetSubnetIpInventoryRequest) (response GetSubnetIpInventoryResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getSubnetIpInventory, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetSubnetIpInventoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetSubnetIpInventoryResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetSubnetIpInventoryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetSubnetIpInventoryResponse") + } + return +} + +// getSubnetIpInventory implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getSubnetIpInventory(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipInventory/subnets/{subnetId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetSubnetIpInventoryResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetSubnetIpInventory") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IpInventorySubnetResourceCollection/GetSubnetIpInventory" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetSubnetIpInventory", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetSubnetTopology Gets a topology for a given subnet. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSubnetTopology.go.html to see an example of how to use GetSubnetTopology API. +func (client VirtualNetworkClient) GetSubnetTopology(ctx context.Context, request GetSubnetTopologyRequest) (response GetSubnetTopologyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getSubnetTopology, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetSubnetTopologyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetSubnetTopologyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetSubnetTopologyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetSubnetTopologyResponse") + } + return +} + +// getSubnetTopology implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getSubnetTopology(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/subnetTopology", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetSubnetTopologyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetSubnetTopology") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/SubnetTopology/GetSubnetTopology" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetSubnetTopology", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetTunnelCpeDeviceConfig Gets the set of CPE configuration answers for the tunnel, which the customer provided in +// UpdateTunnelCpeDeviceConfig. +// To get the full set of content for the tunnel (any answers merged with the template of other +// information specific to the CPE device type), use +// GetTunnelCpeDeviceConfigContent. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetTunnelCpeDeviceConfig.go.html to see an example of how to use GetTunnelCpeDeviceConfig API. +// A default retry strategy applies to this operation GetTunnelCpeDeviceConfig() +func (client VirtualNetworkClient) GetTunnelCpeDeviceConfig(ctx context.Context, request GetTunnelCpeDeviceConfigRequest) (response GetTunnelCpeDeviceConfigResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getTunnelCpeDeviceConfig, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetTunnelCpeDeviceConfigResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetTunnelCpeDeviceConfigResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetTunnelCpeDeviceConfigResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetTunnelCpeDeviceConfigResponse") + } + return +} + +// getTunnelCpeDeviceConfig implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getTunnelCpeDeviceConfig(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/tunnelDeviceConfig", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetTunnelCpeDeviceConfigResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetTunnelCpeDeviceConfig") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/TunnelCpeDeviceConfig/GetTunnelCpeDeviceConfig" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetTunnelCpeDeviceConfig", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetTunnelCpeDeviceConfigContent Renders a set of CPE configuration content for the specified IPSec tunnel. The content helps a +// network engineer configure the actual CPE device (for example, a hardware router) that the specified +// IPSec tunnel terminates on. +// The rendered content is specific to the type of CPE device (for example, Cisco ASA). Therefore the +// Cpe used by the specified IPSecConnection +// must have the CPE's device type specified by the `cpeDeviceShapeId` attribute. The content +// optionally includes answers that the customer provides (see +// UpdateTunnelCpeDeviceConfig), +// merged with a template of other information specific to the CPE device type. +// The operation returns configuration information for only the specified IPSec tunnel. +// Here are other similar operations: +// - GetIpsecCpeDeviceConfigContent +// returns CPE configuration content for all tunnels in a single IPSec connection. +// - GetCpeDeviceConfigContent +// returns CPE configuration content for *all* IPSec connections that use a specific CPE. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetTunnelCpeDeviceConfigContent.go.html to see an example of how to use GetTunnelCpeDeviceConfigContent API. +// A default retry strategy applies to this operation GetTunnelCpeDeviceConfigContent() +func (client VirtualNetworkClient) GetTunnelCpeDeviceConfigContent(ctx context.Context, request GetTunnelCpeDeviceConfigContentRequest) (response GetTunnelCpeDeviceConfigContentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getTunnelCpeDeviceConfigContent, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetTunnelCpeDeviceConfigContentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetTunnelCpeDeviceConfigContentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetTunnelCpeDeviceConfigContentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetTunnelCpeDeviceConfigContentResponse") + } + return +} + +// getTunnelCpeDeviceConfigContent implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getTunnelCpeDeviceConfigContent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/tunnelDeviceConfig/content", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetTunnelCpeDeviceConfigContentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetTunnelCpeDeviceConfigContent") + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/TunnelCpeDeviceConfig/GetTunnelCpeDeviceConfigContent" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetTunnelCpeDeviceConfigContent", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetUpgradeStatus Returns the DRG upgrade status. The status can be not updated, in progress, or updated. Also indicates how much of the upgrade is completed. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetUpgradeStatus.go.html to see an example of how to use GetUpgradeStatus API. +func (client VirtualNetworkClient) GetUpgradeStatus(ctx context.Context, request GetUpgradeStatusRequest) (response GetUpgradeStatusResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getUpgradeStatus, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetUpgradeStatusResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetUpgradeStatusResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetUpgradeStatusResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetUpgradeStatusResponse") + } + return +} + +// getUpgradeStatus implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getUpgradeStatus(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgs/{drgId}/actions/upgradeStatus", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetUpgradeStatusResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetUpgradeStatus") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Drg/GetUpgradeStatus" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetUpgradeStatus", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVcn Gets the specified VCN's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVcn.go.html to see an example of how to use GetVcn API. +func (client VirtualNetworkClient) GetVcn(ctx context.Context, request GetVcnRequest) (response GetVcnResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVcn, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVcnResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVcnResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVcnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVcnResponse") + } + return +} + +// getVcn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getVcn(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vcns/{vcnId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVcnResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetVcn") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/GetVcn" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetVcn", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVcnDnsResolverAssociation Get the associated DNS resolver information with a vcn +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVcnDnsResolverAssociation.go.html to see an example of how to use GetVcnDnsResolverAssociation API. +func (client VirtualNetworkClient) GetVcnDnsResolverAssociation(ctx context.Context, request GetVcnDnsResolverAssociationRequest) (response GetVcnDnsResolverAssociationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVcnDnsResolverAssociation, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVcnDnsResolverAssociationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVcnDnsResolverAssociationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVcnDnsResolverAssociationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVcnDnsResolverAssociationResponse") + } + return +} + +// getVcnDnsResolverAssociation implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getVcnDnsResolverAssociation(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vcns/{vcnId}/dnsResolverAssociation", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVcnDnsResolverAssociationResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetVcnDnsResolverAssociation") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VcnDnsResolverAssociation/GetVcnDnsResolverAssociation" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetVcnDnsResolverAssociation", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVcnOverlap Gets the CIDR overlap information of the specified VCN in selected compartments. Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVcnOverlap.go.html to see an example of how to use GetVcnOverlap API. +func (client VirtualNetworkClient) GetVcnOverlap(ctx context.Context, request GetVcnOverlapRequest) (response GetVcnOverlapResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getVcnOverlap, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVcnOverlapResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVcnOverlapResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVcnOverlapResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVcnOverlapResponse") + } + return +} + +// getVcnOverlap implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getVcnOverlap(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/ipInventory/vcns/{vcnId}/overlaps", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVcnOverlapResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetVcnOverlap") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IpInventoryVcnOverlapCollection/GetVcnOverlap" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetVcnOverlap", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVcnTopology Gets a virtual network topology for a given VCN. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVcnTopology.go.html to see an example of how to use GetVcnTopology API. +func (client VirtualNetworkClient) GetVcnTopology(ctx context.Context, request GetVcnTopologyRequest) (response GetVcnTopologyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVcnTopology, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVcnTopologyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVcnTopologyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVcnTopologyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVcnTopologyResponse") + } + return +} + +// getVcnTopology implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getVcnTopology(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vcnTopology", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVcnTopologyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetVcnTopology") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VcnTopology/GetVcnTopology" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetVcnTopology", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVirtualCircuit Gets the specified virtual circuit's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVirtualCircuit.go.html to see an example of how to use GetVirtualCircuit API. +// A default retry strategy applies to this operation GetVirtualCircuit() +func (client VirtualNetworkClient) GetVirtualCircuit(ctx context.Context, request GetVirtualCircuitRequest) (response GetVirtualCircuitResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVirtualCircuit, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVirtualCircuitResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVirtualCircuitResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVirtualCircuitResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVirtualCircuitResponse") + } + return +} + +// getVirtualCircuit implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getVirtualCircuit(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualCircuits/{virtualCircuitId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVirtualCircuitResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetVirtualCircuit") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VirtualCircuit/GetVirtualCircuit" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetVirtualCircuit", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVlan Gets the specified VLAN's information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVlan.go.html to see an example of how to use GetVlan API. +func (client VirtualNetworkClient) GetVlan(ctx context.Context, request GetVlanRequest) (response GetVlanResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVlan, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVlanResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVlanResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVlanResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVlanResponse") + } + return +} + +// getVlan implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getVlan(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vlans/{vlanId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVlanResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetVlan") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vlan/GetVlan" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetVlan", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVnic Gets the information for the specified virtual network interface card (VNIC). +// You can get the VNIC OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) from the +// ListVnicAttachments +// operation. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVnic.go.html to see an example of how to use GetVnic API. +func (client VirtualNetworkClient) GetVnic(ctx context.Context, request GetVnicRequest) (response GetVnicResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVnic, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVnicResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVnicResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVnicResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVnicResponse") + } + return +} + +// getVnic implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getVnic(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vnics/{vnicId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVnicResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetVnic") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vnic/GetVnic" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetVnic", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVtap Gets the specified `Vtap` resource. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVtap.go.html to see an example of how to use GetVtap API. +func (client VirtualNetworkClient) GetVtap(ctx context.Context, request GetVtapRequest) (response GetVtapResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVtap, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVtapResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVtapResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVtapResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVtapResponse") + } + return +} + +// getVtap implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) getVtap(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vtaps/{vtapId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetVtapResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "GetVtap") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vtap/GetVtap" + err = common.PostProcessServiceError(err, "VirtualNetwork", "GetVtap", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// Ipv6VnicDetach Unassign the specified IPv6 address from Virtual Network Interface Card (VNIC). You must specify the IPv6 OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/Ipv6VnicDetach.go.html to see an example of how to use Ipv6VnicDetach API. +func (client VirtualNetworkClient) Ipv6VnicDetach(ctx context.Context, request Ipv6VnicDetachRequest) (response Ipv6VnicDetachResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.ipv6VnicDetach, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = Ipv6VnicDetachResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = Ipv6VnicDetachResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(Ipv6VnicDetachResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into Ipv6VnicDetachResponse") + } + return +} + +// ipv6VnicDetach implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) ipv6VnicDetach(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/ipv6/{ipv6Id}/actions/detach", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response Ipv6VnicDetachResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "Ipv6VnicDetach") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Ipv6/Ipv6VnicDetach" + err = common.PostProcessServiceError(err, "VirtualNetwork", "Ipv6VnicDetach", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListAllowedPeerRegionsForRemotePeering Lists the regions that support remote VCN peering (which is peering across regions). +// For more information, see VCN Peering (https://docs.oracle.com/iaas/Content/Network/Tasks/VCNpeering.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListAllowedPeerRegionsForRemotePeering.go.html to see an example of how to use ListAllowedPeerRegionsForRemotePeering API. +// A default retry strategy applies to this operation ListAllowedPeerRegionsForRemotePeering() +func (client VirtualNetworkClient) ListAllowedPeerRegionsForRemotePeering(ctx context.Context, request ListAllowedPeerRegionsForRemotePeeringRequest) (response ListAllowedPeerRegionsForRemotePeeringResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listAllowedPeerRegionsForRemotePeering, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListAllowedPeerRegionsForRemotePeeringResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListAllowedPeerRegionsForRemotePeeringResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListAllowedPeerRegionsForRemotePeeringResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListAllowedPeerRegionsForRemotePeeringResponse") + } + return +} + +// listAllowedPeerRegionsForRemotePeering implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listAllowedPeerRegionsForRemotePeering(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/allowedPeerRegionsForRemotePeering", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListAllowedPeerRegionsForRemotePeeringResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListAllowedPeerRegionsForRemotePeering") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PeerRegionForRemotePeering/ListAllowedPeerRegionsForRemotePeering" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListAllowedPeerRegionsForRemotePeering", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListByoasns Lists the `Byoasn` resources in the specified compartment. +// You can filter the list using query parameters. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListByoasns.go.html to see an example of how to use ListByoasns API. +// A default retry strategy applies to this operation ListByoasns() +func (client VirtualNetworkClient) ListByoasns(ctx context.Context, request ListByoasnsRequest) (response ListByoasnsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listByoasns, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListByoasnsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListByoasnsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListByoasnsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListByoasnsResponse") + } + return +} + +// listByoasns implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listByoasns(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/byoasns", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListByoasnsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListByoasns") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Byoasn/ListByoasns" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListByoasns", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListByoipAllocatedRanges Lists the subranges of a BYOIP CIDR block currently allocated to an IP pool. +// Each `ByoipAllocatedRange` object also lists the IP pool where it is allocated. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListByoipAllocatedRanges.go.html to see an example of how to use ListByoipAllocatedRanges API. +func (client VirtualNetworkClient) ListByoipAllocatedRanges(ctx context.Context, request ListByoipAllocatedRangesRequest) (response ListByoipAllocatedRangesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listByoipAllocatedRanges, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListByoipAllocatedRangesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListByoipAllocatedRangesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListByoipAllocatedRangesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListByoipAllocatedRangesResponse") + } + return +} + +// listByoipAllocatedRanges implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listByoipAllocatedRanges(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/byoipRanges/{byoipRangeId}/byoipAllocatedRanges", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListByoipAllocatedRangesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListByoipAllocatedRanges") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ByoipAllocatedRangeSummary/ListByoipAllocatedRanges" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListByoipAllocatedRanges", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListByoipRanges Lists the `ByoipRange` resources in the specified compartment. +// You can filter the list using query parameters. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListByoipRanges.go.html to see an example of how to use ListByoipRanges API. +func (client VirtualNetworkClient) ListByoipRanges(ctx context.Context, request ListByoipRangesRequest) (response ListByoipRangesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listByoipRanges, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListByoipRangesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListByoipRangesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListByoipRangesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListByoipRangesResponse") + } + return +} + +// listByoipRanges implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listByoipRanges(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/byoipRanges", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListByoipRangesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListByoipRanges") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ByoipRange/ListByoipRanges" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListByoipRanges", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListCaptureFilters Lists the capture filters in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCaptureFilters.go.html to see an example of how to use ListCaptureFilters API. +func (client VirtualNetworkClient) ListCaptureFilters(ctx context.Context, request ListCaptureFiltersRequest) (response ListCaptureFiltersResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCaptureFilters, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListCaptureFiltersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListCaptureFiltersResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListCaptureFiltersResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCaptureFiltersResponse") + } + return +} + +// listCaptureFilters implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listCaptureFilters(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/captureFilters", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListCaptureFiltersResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListCaptureFilters") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CaptureFilter/ListCaptureFilters" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListCaptureFilters", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListCpeDeviceShapes Lists the CPE device types that the Networking service provides CPE configuration +// content for (example: Cisco ASA). The content helps a network engineer configure +// the actual CPE device represented by a Cpe object. +// If you want to generate CPE configuration content for one of the returned CPE device types, +// ensure that the Cpe object's `cpeDeviceShapeId` attribute is set +// to the CPE device type's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) (returned by this operation). +// For information about generating CPE configuration content, see these operations: +// - GetCpeDeviceConfigContent +// - GetIpsecCpeDeviceConfigContent +// - GetTunnelCpeDeviceConfigContent +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCpeDeviceShapes.go.html to see an example of how to use ListCpeDeviceShapes API. +// A default retry strategy applies to this operation ListCpeDeviceShapes() +func (client VirtualNetworkClient) ListCpeDeviceShapes(ctx context.Context, request ListCpeDeviceShapesRequest) (response ListCpeDeviceShapesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCpeDeviceShapes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListCpeDeviceShapesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListCpeDeviceShapesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListCpeDeviceShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCpeDeviceShapesResponse") + } + return +} + +// listCpeDeviceShapes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listCpeDeviceShapes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/cpeDeviceShapes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListCpeDeviceShapesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListCpeDeviceShapes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CpeDeviceShapeSummary/ListCpeDeviceShapes" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListCpeDeviceShapes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListCpes Lists the customer-premises equipment objects (CPEs) in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCpes.go.html to see an example of how to use ListCpes API. +// A default retry strategy applies to this operation ListCpes() +func (client VirtualNetworkClient) ListCpes(ctx context.Context, request ListCpesRequest) (response ListCpesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCpes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListCpesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListCpesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListCpesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCpesResponse") + } + return +} + +// listCpes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listCpes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/cpes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListCpesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListCpes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Cpe/ListCpes" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListCpes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListCrossConnectGroups Lists the cross-connect groups in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossConnectGroups.go.html to see an example of how to use ListCrossConnectGroups API. +// A default retry strategy applies to this operation ListCrossConnectGroups() +func (client VirtualNetworkClient) ListCrossConnectGroups(ctx context.Context, request ListCrossConnectGroupsRequest) (response ListCrossConnectGroupsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCrossConnectGroups, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListCrossConnectGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListCrossConnectGroupsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListCrossConnectGroupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCrossConnectGroupsResponse") + } + return +} + +// listCrossConnectGroups implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listCrossConnectGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnectGroups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListCrossConnectGroupsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListCrossConnectGroups") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CrossConnectGroup/ListCrossConnectGroups" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListCrossConnectGroups", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListCrossConnectLocations Lists the available FastConnect locations for cross-connect installation. You need +// this information so you can specify your desired location when you create a cross-connect. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossConnectLocations.go.html to see an example of how to use ListCrossConnectLocations API. +// A default retry strategy applies to this operation ListCrossConnectLocations() +func (client VirtualNetworkClient) ListCrossConnectLocations(ctx context.Context, request ListCrossConnectLocationsRequest) (response ListCrossConnectLocationsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCrossConnectLocations, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListCrossConnectLocationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListCrossConnectLocationsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListCrossConnectLocationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCrossConnectLocationsResponse") + } + return +} + +// listCrossConnectLocations implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listCrossConnectLocations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnectLocations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListCrossConnectLocationsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListCrossConnectLocations") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CrossConnectLocation/ListCrossConnectLocations" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListCrossConnectLocations", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListCrossConnectMappings Lists the Cross Connect mapping Details for the specified +// virtual circuit. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossConnectMappings.go.html to see an example of how to use ListCrossConnectMappings API. +// A default retry strategy applies to this operation ListCrossConnectMappings() +func (client VirtualNetworkClient) ListCrossConnectMappings(ctx context.Context, request ListCrossConnectMappingsRequest) (response ListCrossConnectMappingsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCrossConnectMappings, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListCrossConnectMappingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListCrossConnectMappingsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListCrossConnectMappingsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCrossConnectMappingsResponse") + } + return +} + +// listCrossConnectMappings implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listCrossConnectMappings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualCircuits/{virtualCircuitId}/crossConnectMappings", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListCrossConnectMappingsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListCrossConnectMappings") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CrossConnectMappingDetailsCollection/ListCrossConnectMappings" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListCrossConnectMappings", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListCrossConnects Lists the cross-connects in the specified compartment. You can filter the list +// by specifying the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a cross-connect group. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossConnects.go.html to see an example of how to use ListCrossConnects API. +// A default retry strategy applies to this operation ListCrossConnects() +func (client VirtualNetworkClient) ListCrossConnects(ctx context.Context, request ListCrossConnectsRequest) (response ListCrossConnectsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCrossConnects, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListCrossConnectsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListCrossConnectsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListCrossConnectsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCrossConnectsResponse") + } + return +} + +// listCrossConnects implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listCrossConnects(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnects", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListCrossConnectsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListCrossConnects") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CrossConnect/ListCrossConnects" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListCrossConnects", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListCrossconnectPortSpeedShapes Lists the available port speeds for cross-connects. You need this information +// so you can specify your desired port speed (that is, shape) when you create a +// cross-connect. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossconnectPortSpeedShapes.go.html to see an example of how to use ListCrossconnectPortSpeedShapes API. +// A default retry strategy applies to this operation ListCrossconnectPortSpeedShapes() +func (client VirtualNetworkClient) ListCrossconnectPortSpeedShapes(ctx context.Context, request ListCrossconnectPortSpeedShapesRequest) (response ListCrossconnectPortSpeedShapesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCrossconnectPortSpeedShapes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListCrossconnectPortSpeedShapesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListCrossconnectPortSpeedShapesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListCrossconnectPortSpeedShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCrossconnectPortSpeedShapesResponse") + } + return +} + +// listCrossconnectPortSpeedShapes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listCrossconnectPortSpeedShapes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/crossConnectPortSpeedShapes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListCrossconnectPortSpeedShapesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListCrossconnectPortSpeedShapes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CrossConnectPortSpeedShape/ListCrossconnectPortSpeedShapes" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListCrossconnectPortSpeedShapes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDhcpOptions Lists the sets of DHCP options in the specified VCN and specified compartment. +// If the VCN ID is not provided, then the list includes the sets of DHCP options from all VCNs in the specified compartment. +// The response includes the default set of options that automatically comes with each VCN, +// plus any other sets you've created. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDhcpOptions.go.html to see an example of how to use ListDhcpOptions API. +func (client VirtualNetworkClient) ListDhcpOptions(ctx context.Context, request ListDhcpOptionsRequest) (response ListDhcpOptionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDhcpOptions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDhcpOptionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDhcpOptionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDhcpOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDhcpOptionsResponse") + } + return +} + +// listDhcpOptions implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listDhcpOptions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dhcps", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListDhcpOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListDhcpOptions") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DhcpOptions/ListDhcpOptions" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListDhcpOptions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDrgAttachments Lists the `DrgAttachment` resource for the specified compartment. You can filter the +// results by DRG, attached network, attachment type, DRG route table or +// VCN route table. +// The LIST API lists DRG attachments by attachment type. It will default to list VCN attachments, +// but you may request to list ALL attachments of ALL types. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgAttachments.go.html to see an example of how to use ListDrgAttachments API. +func (client VirtualNetworkClient) ListDrgAttachments(ctx context.Context, request ListDrgAttachmentsRequest) (response ListDrgAttachmentsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDrgAttachments, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDrgAttachmentsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDrgAttachmentsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDrgAttachmentsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDrgAttachmentsResponse") + } + return +} + +// listDrgAttachments implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listDrgAttachments(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgAttachments", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListDrgAttachmentsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListDrgAttachments") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgAttachment/ListDrgAttachments" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListDrgAttachments", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDrgRouteDistributionStatements Lists the statements for the specified route distribution. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgRouteDistributionStatements.go.html to see an example of how to use ListDrgRouteDistributionStatements API. +func (client VirtualNetworkClient) ListDrgRouteDistributionStatements(ctx context.Context, request ListDrgRouteDistributionStatementsRequest) (response ListDrgRouteDistributionStatementsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDrgRouteDistributionStatements, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDrgRouteDistributionStatementsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDrgRouteDistributionStatementsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDrgRouteDistributionStatementsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDrgRouteDistributionStatementsResponse") + } + return +} + +// listDrgRouteDistributionStatements implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listDrgRouteDistributionStatements(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgRouteDistributions/{drgRouteDistributionId}/drgRouteDistributionStatements", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListDrgRouteDistributionStatementsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListDrgRouteDistributionStatements") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteDistributionStatement/ListDrgRouteDistributionStatements" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListDrgRouteDistributionStatements", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDrgRouteDistributions Lists the route distributions in the specified DRG. +// To retrieve the statements in a distribution, use the +// ListDrgRouteDistributionStatements operation. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgRouteDistributions.go.html to see an example of how to use ListDrgRouteDistributions API. +func (client VirtualNetworkClient) ListDrgRouteDistributions(ctx context.Context, request ListDrgRouteDistributionsRequest) (response ListDrgRouteDistributionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDrgRouteDistributions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDrgRouteDistributionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDrgRouteDistributionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDrgRouteDistributionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDrgRouteDistributionsResponse") + } + return +} + +// listDrgRouteDistributions implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listDrgRouteDistributions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgRouteDistributions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListDrgRouteDistributionsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListDrgRouteDistributions") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteDistribution/ListDrgRouteDistributions" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListDrgRouteDistributions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDrgRouteRules Lists the route rules in the specified DRG route table. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgRouteRules.go.html to see an example of how to use ListDrgRouteRules API. +func (client VirtualNetworkClient) ListDrgRouteRules(ctx context.Context, request ListDrgRouteRulesRequest) (response ListDrgRouteRulesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDrgRouteRules, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDrgRouteRulesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDrgRouteRulesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDrgRouteRulesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDrgRouteRulesResponse") + } + return +} + +// listDrgRouteRules implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listDrgRouteRules(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgRouteTables/{drgRouteTableId}/drgRouteRules", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListDrgRouteRulesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListDrgRouteRules") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteRule/ListDrgRouteRules" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListDrgRouteRules", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDrgRouteTables Lists the DRG route tables for the specified DRG. +// Use the `ListDrgRouteRules` operation to retrieve the route rules in a table. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgRouteTables.go.html to see an example of how to use ListDrgRouteTables API. +func (client VirtualNetworkClient) ListDrgRouteTables(ctx context.Context, request ListDrgRouteTablesRequest) (response ListDrgRouteTablesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDrgRouteTables, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDrgRouteTablesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDrgRouteTablesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDrgRouteTablesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDrgRouteTablesResponse") + } + return +} + +// listDrgRouteTables implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listDrgRouteTables(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgRouteTables", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListDrgRouteTablesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListDrgRouteTables") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteTable/ListDrgRouteTables" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListDrgRouteTables", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDrgs Lists the DRGs in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgs.go.html to see an example of how to use ListDrgs API. +func (client VirtualNetworkClient) ListDrgs(ctx context.Context, request ListDrgsRequest) (response ListDrgsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listDrgs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDrgsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDrgsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDrgsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDrgsResponse") + } + return +} + +// listDrgs implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listDrgs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/drgs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListDrgsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListDrgs") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Drg/ListDrgs" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListDrgs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListFastConnectProviderServices Lists the service offerings from supported providers. You need this +// information so you can specify your desired provider and service +// offering when you create a virtual circuit. +// For the compartment ID, provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of your tenancy (the root compartment). +// For more information, see FastConnect Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListFastConnectProviderServices.go.html to see an example of how to use ListFastConnectProviderServices API. +// A default retry strategy applies to this operation ListFastConnectProviderServices() +func (client VirtualNetworkClient) ListFastConnectProviderServices(ctx context.Context, request ListFastConnectProviderServicesRequest) (response ListFastConnectProviderServicesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listFastConnectProviderServices, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListFastConnectProviderServicesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListFastConnectProviderServicesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListFastConnectProviderServicesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListFastConnectProviderServicesResponse") + } + return +} + +// listFastConnectProviderServices implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listFastConnectProviderServices(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fastConnectProviderServices", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListFastConnectProviderServicesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListFastConnectProviderServices") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/FastConnectProviderService/ListFastConnectProviderServices" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListFastConnectProviderServices", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListFastConnectProviderVirtualCircuitBandwidthShapes Gets the list of available virtual circuit bandwidth levels for a provider. +// You need this information so you can specify your desired bandwidth level (shape) when you create a virtual circuit. +// For more information about virtual circuits, see FastConnect Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListFastConnectProviderVirtualCircuitBandwidthShapes.go.html to see an example of how to use ListFastConnectProviderVirtualCircuitBandwidthShapes API. +// A default retry strategy applies to this operation ListFastConnectProviderVirtualCircuitBandwidthShapes() +func (client VirtualNetworkClient) ListFastConnectProviderVirtualCircuitBandwidthShapes(ctx context.Context, request ListFastConnectProviderVirtualCircuitBandwidthShapesRequest) (response ListFastConnectProviderVirtualCircuitBandwidthShapesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listFastConnectProviderVirtualCircuitBandwidthShapes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListFastConnectProviderVirtualCircuitBandwidthShapesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListFastConnectProviderVirtualCircuitBandwidthShapesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListFastConnectProviderVirtualCircuitBandwidthShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListFastConnectProviderVirtualCircuitBandwidthShapesResponse") + } + return +} + +// listFastConnectProviderVirtualCircuitBandwidthShapes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listFastConnectProviderVirtualCircuitBandwidthShapes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fastConnectProviderServices/{providerServiceId}/virtualCircuitBandwidthShapes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListFastConnectProviderVirtualCircuitBandwidthShapesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListFastConnectProviderVirtualCircuitBandwidthShapes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/FastConnectProviderService/ListFastConnectProviderVirtualCircuitBandwidthShapes" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListFastConnectProviderVirtualCircuitBandwidthShapes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListIPSecConnectionTunnelRoutes The routes advertised to the on-premises network and the routes received from the on-premises network. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIPSecConnectionTunnelRoutes.go.html to see an example of how to use ListIPSecConnectionTunnelRoutes API. +// A default retry strategy applies to this operation ListIPSecConnectionTunnelRoutes() +func (client VirtualNetworkClient) ListIPSecConnectionTunnelRoutes(ctx context.Context, request ListIPSecConnectionTunnelRoutesRequest) (response ListIPSecConnectionTunnelRoutesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listIPSecConnectionTunnelRoutes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListIPSecConnectionTunnelRoutesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListIPSecConnectionTunnelRoutesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListIPSecConnectionTunnelRoutesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListIPSecConnectionTunnelRoutesResponse") + } + return +} + +// listIPSecConnectionTunnelRoutes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listIPSecConnectionTunnelRoutes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/routes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListIPSecConnectionTunnelRoutesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListIPSecConnectionTunnelRoutes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/TunnelRouteSummary/ListIPSecConnectionTunnelRoutes" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListIPSecConnectionTunnelRoutes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListIPSecConnectionTunnelSecurityAssociations Lists the tunnel security associations information for the specified IPSec tunnel ID. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIPSecConnectionTunnelSecurityAssociations.go.html to see an example of how to use ListIPSecConnectionTunnelSecurityAssociations API. +// A default retry strategy applies to this operation ListIPSecConnectionTunnelSecurityAssociations() +func (client VirtualNetworkClient) ListIPSecConnectionTunnelSecurityAssociations(ctx context.Context, request ListIPSecConnectionTunnelSecurityAssociationsRequest) (response ListIPSecConnectionTunnelSecurityAssociationsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listIPSecConnectionTunnelSecurityAssociations, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListIPSecConnectionTunnelSecurityAssociationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListIPSecConnectionTunnelSecurityAssociationsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListIPSecConnectionTunnelSecurityAssociationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListIPSecConnectionTunnelSecurityAssociationsResponse") + } + return +} + +// listIPSecConnectionTunnelSecurityAssociations implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listIPSecConnectionTunnelSecurityAssociations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/tunnelSecurityAssociations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListIPSecConnectionTunnelSecurityAssociationsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListIPSecConnectionTunnelSecurityAssociations") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/TunnelSecurityAssociationSummary/ListIPSecConnectionTunnelSecurityAssociations" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListIPSecConnectionTunnelSecurityAssociations", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListIPSecConnectionTunnels Lists the tunnel information for the specified IPSec connection. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIPSecConnectionTunnels.go.html to see an example of how to use ListIPSecConnectionTunnels API. +// A default retry strategy applies to this operation ListIPSecConnectionTunnels() +func (client VirtualNetworkClient) ListIPSecConnectionTunnels(ctx context.Context, request ListIPSecConnectionTunnelsRequest) (response ListIPSecConnectionTunnelsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listIPSecConnectionTunnels, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListIPSecConnectionTunnelsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListIPSecConnectionTunnelsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListIPSecConnectionTunnelsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListIPSecConnectionTunnelsResponse") + } + return +} + +// listIPSecConnectionTunnels implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listIPSecConnectionTunnels(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections/{ipscId}/tunnels", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListIPSecConnectionTunnelsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListIPSecConnectionTunnels") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IPSecConnectionTunnel/ListIPSecConnectionTunnels" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListIPSecConnectionTunnels", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListIPSecConnections Lists the IPSec connections for the specified compartment. You can filter the +// results by DRG or CPE. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIPSecConnections.go.html to see an example of how to use ListIPSecConnections API. +// A default retry strategy applies to this operation ListIPSecConnections() +func (client VirtualNetworkClient) ListIPSecConnections(ctx context.Context, request ListIPSecConnectionsRequest) (response ListIPSecConnectionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listIPSecConnections, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListIPSecConnectionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListIPSecConnectionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListIPSecConnectionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListIPSecConnectionsResponse") + } + return +} + +// listIPSecConnections implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listIPSecConnections(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipsecConnections", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListIPSecConnectionsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListIPSecConnections") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IPSecConnection/ListIPSecConnections" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListIPSecConnections", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListInternetGateways Lists the internet gateways in the specified VCN and the specified compartment. +// If the VCN ID is not provided, then the list includes the internet gateways from all VCNs in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInternetGateways.go.html to see an example of how to use ListInternetGateways API. +func (client VirtualNetworkClient) ListInternetGateways(ctx context.Context, request ListInternetGatewaysRequest) (response ListInternetGatewaysResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listInternetGateways, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListInternetGatewaysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListInternetGatewaysResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListInternetGatewaysResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListInternetGatewaysResponse") + } + return +} + +// listInternetGateways implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listInternetGateways(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/internetGateways", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListInternetGatewaysResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListInternetGateways") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InternetGateway/ListInternetGateways" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListInternetGateways", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListIpInventory Lists the IP Inventory information in the selected compartments. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIpInventory.go.html to see an example of how to use ListIpInventory API. +func (client VirtualNetworkClient) ListIpInventory(ctx context.Context, request ListIpInventoryRequest) (response ListIpInventoryResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listIpInventory, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListIpInventoryResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListIpInventoryResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListIpInventoryResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListIpInventoryResponse") + } + return +} + +// listIpInventory implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listIpInventory(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/ipInventory", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListIpInventoryResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListIpInventory") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IpInventoryCollection/ListIpInventory" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListIpInventory", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListIpv6s Lists the Ipv6 objects based +// on one of these filters: +// - Subnet OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// - VNIC OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// - Both IPv6 address and subnet OCID: This lets you get an `Ipv6` object based on its private +// IPv6 address (for example, 2001:0db8:0123:1111:abcd:ef01:2345:6789) and not its OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). For comparison, +// GetIpv6 requires the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIpv6s.go.html to see an example of how to use ListIpv6s API. +func (client VirtualNetworkClient) ListIpv6s(ctx context.Context, request ListIpv6sRequest) (response ListIpv6sResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listIpv6s, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListIpv6sResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListIpv6sResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListIpv6sResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListIpv6sResponse") + } + return +} + +// listIpv6s implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listIpv6s(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/ipv6", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListIpv6sResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListIpv6s") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Ipv6/ListIpv6s" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListIpv6s", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListLocalPeeringGateways Lists the local peering gateways (LPGs) for the specified VCN and specified compartment. +// If the VCN ID is not provided, then the list includes the LPGs from all VCNs in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListLocalPeeringGateways.go.html to see an example of how to use ListLocalPeeringGateways API. +func (client VirtualNetworkClient) ListLocalPeeringGateways(ctx context.Context, request ListLocalPeeringGatewaysRequest) (response ListLocalPeeringGatewaysResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listLocalPeeringGateways, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListLocalPeeringGatewaysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListLocalPeeringGatewaysResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListLocalPeeringGatewaysResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListLocalPeeringGatewaysResponse") + } + return +} + +// listLocalPeeringGateways implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listLocalPeeringGateways(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/localPeeringGateways", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListLocalPeeringGatewaysResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListLocalPeeringGateways") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/LocalPeeringGateway/ListLocalPeeringGateways" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListLocalPeeringGateways", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListNatGateways Lists the NAT gateways in the specified compartment. You may optionally specify a VCN OCID +// to filter the results by VCN. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListNatGateways.go.html to see an example of how to use ListNatGateways API. +func (client VirtualNetworkClient) ListNatGateways(ctx context.Context, request ListNatGatewaysRequest) (response ListNatGatewaysResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listNatGateways, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListNatGatewaysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListNatGatewaysResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListNatGatewaysResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListNatGatewaysResponse") + } + return +} + +// listNatGateways implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listNatGateways(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/natGateways", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListNatGatewaysResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListNatGateways") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/NatGateway/ListNatGateways" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListNatGateways", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListNetworkSecurityGroupSecurityRules Lists the security rules in the specified network security group. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListNetworkSecurityGroupSecurityRules.go.html to see an example of how to use ListNetworkSecurityGroupSecurityRules API. +func (client VirtualNetworkClient) ListNetworkSecurityGroupSecurityRules(ctx context.Context, request ListNetworkSecurityGroupSecurityRulesRequest) (response ListNetworkSecurityGroupSecurityRulesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listNetworkSecurityGroupSecurityRules, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListNetworkSecurityGroupSecurityRulesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListNetworkSecurityGroupSecurityRulesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListNetworkSecurityGroupSecurityRulesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListNetworkSecurityGroupSecurityRulesResponse") + } + return +} + +// listNetworkSecurityGroupSecurityRules implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listNetworkSecurityGroupSecurityRules(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/networkSecurityGroups/{networkSecurityGroupId}/securityRules", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListNetworkSecurityGroupSecurityRulesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListNetworkSecurityGroupSecurityRules") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/SecurityRule/ListNetworkSecurityGroupSecurityRules" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListNetworkSecurityGroupSecurityRules", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListNetworkSecurityGroupVnics Lists the VNICs in the specified network security group. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListNetworkSecurityGroupVnics.go.html to see an example of how to use ListNetworkSecurityGroupVnics API. +func (client VirtualNetworkClient) ListNetworkSecurityGroupVnics(ctx context.Context, request ListNetworkSecurityGroupVnicsRequest) (response ListNetworkSecurityGroupVnicsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listNetworkSecurityGroupVnics, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListNetworkSecurityGroupVnicsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListNetworkSecurityGroupVnicsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListNetworkSecurityGroupVnicsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListNetworkSecurityGroupVnicsResponse") + } + return +} + +// listNetworkSecurityGroupVnics implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listNetworkSecurityGroupVnics(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/networkSecurityGroups/{networkSecurityGroupId}/vnics", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListNetworkSecurityGroupVnicsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListNetworkSecurityGroupVnics") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/NetworkSecurityGroupVnic/ListNetworkSecurityGroupVnics" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListNetworkSecurityGroupVnics", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListNetworkSecurityGroups Lists either the network security groups in the specified compartment, or those associated with the specified VLAN. +// You must specify either a `vlanId` or a `compartmentId`, but not both. If you specify a `vlanId`, all other parameters are ignored. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListNetworkSecurityGroups.go.html to see an example of how to use ListNetworkSecurityGroups API. +func (client VirtualNetworkClient) ListNetworkSecurityGroups(ctx context.Context, request ListNetworkSecurityGroupsRequest) (response ListNetworkSecurityGroupsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listNetworkSecurityGroups, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListNetworkSecurityGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListNetworkSecurityGroupsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListNetworkSecurityGroupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListNetworkSecurityGroupsResponse") + } + return +} + +// listNetworkSecurityGroups implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listNetworkSecurityGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/networkSecurityGroups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListNetworkSecurityGroupsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListNetworkSecurityGroups") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/NetworkSecurityGroup/ListNetworkSecurityGroups" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListNetworkSecurityGroups", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListPrivateIps Lists the PrivateIp objects based +// on one of these filters: +// - Subnet OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// - VNIC OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// - Both private IP address and subnet OCID: This lets +// you get a `privateIP` object based on its private IP +// address (for example, 10.0.3.3) and not its OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). For comparison, +// GetPrivateIp +// requires the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// +// If you're listing all the private IPs associated with a given subnet +// or VNIC, the response includes both primary and secondary private IPs. +// If you are an Oracle Cloud VMware Solution customer and have VLANs +// in your VCN, you can filter the list by VLAN OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). See Vlan. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListPrivateIps.go.html to see an example of how to use ListPrivateIps API. +func (client VirtualNetworkClient) ListPrivateIps(ctx context.Context, request ListPrivateIpsRequest) (response ListPrivateIpsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listPrivateIps, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListPrivateIpsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListPrivateIpsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListPrivateIpsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPrivateIpsResponse") + } + return +} + +// listPrivateIps implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listPrivateIps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/privateIps", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListPrivateIpsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListPrivateIps") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PrivateIp/ListPrivateIps" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListPrivateIps", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListPublicIpPools Lists the public IP pools in the specified compartment. +// You can filter the list using query parameters. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListPublicIpPools.go.html to see an example of how to use ListPublicIpPools API. +func (client VirtualNetworkClient) ListPublicIpPools(ctx context.Context, request ListPublicIpPoolsRequest) (response ListPublicIpPoolsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listPublicIpPools, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListPublicIpPoolsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListPublicIpPoolsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListPublicIpPoolsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPublicIpPoolsResponse") + } + return +} + +// listPublicIpPools implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listPublicIpPools(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/publicIpPools", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListPublicIpPoolsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListPublicIpPools") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIpPool/ListPublicIpPools" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListPublicIpPools", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListPublicIps Lists the PublicIp objects +// in the specified compartment. You can filter the list by using query parameters. +// To list your reserved public IPs: +// - Set `scope` = `REGION` (required) +// - Leave the `availabilityDomain` parameter empty +// - Set `lifetime` = `RESERVED` +// +// To list the ephemeral public IPs assigned to a regional entity such as a NAT gateway: +// - Set `scope` = `REGION` (required) +// - Leave the `availabilityDomain` parameter empty +// - Set `lifetime` = `EPHEMERAL` +// +// To list the ephemeral public IPs assigned to private IPs: +// - Set `scope` = `AVAILABILITY_DOMAIN` (required) +// - Set the `availabilityDomain` parameter to the desired availability domain (required) +// - Set `lifetime` = `EPHEMERAL` +// +// **Note:** An ephemeral public IP assigned to a private IP +// is always in the same availability domain and compartment as the private IP. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListPublicIps.go.html to see an example of how to use ListPublicIps API. +func (client VirtualNetworkClient) ListPublicIps(ctx context.Context, request ListPublicIpsRequest) (response ListPublicIpsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listPublicIps, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListPublicIpsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListPublicIpsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListPublicIpsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPublicIpsResponse") + } + return +} + +// listPublicIps implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listPublicIps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/publicIps", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListPublicIpsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListPublicIps") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIp/ListPublicIps" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListPublicIps", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListRemotePeeringConnections Lists the remote peering connections (RPCs) for the specified DRG and compartment +// (the RPC's compartment). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListRemotePeeringConnections.go.html to see an example of how to use ListRemotePeeringConnections API. +// A default retry strategy applies to this operation ListRemotePeeringConnections() +func (client VirtualNetworkClient) ListRemotePeeringConnections(ctx context.Context, request ListRemotePeeringConnectionsRequest) (response ListRemotePeeringConnectionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listRemotePeeringConnections, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListRemotePeeringConnectionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListRemotePeeringConnectionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListRemotePeeringConnectionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListRemotePeeringConnectionsResponse") + } + return +} + +// listRemotePeeringConnections implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listRemotePeeringConnections(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/remotePeeringConnections", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListRemotePeeringConnectionsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListRemotePeeringConnections") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/RemotePeeringConnection/ListRemotePeeringConnections" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListRemotePeeringConnections", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListRouteTables Lists the route tables in the specified VCN and specified compartment. +// If the VCN ID is not provided, then the list includes the route tables from all VCNs in the specified compartment. +// The response includes the default route table that automatically comes with +// each VCN in the specified compartment, plus any route tables you've created. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListRouteTables.go.html to see an example of how to use ListRouteTables API. +func (client VirtualNetworkClient) ListRouteTables(ctx context.Context, request ListRouteTablesRequest) (response ListRouteTablesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listRouteTables, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListRouteTablesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListRouteTablesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListRouteTablesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListRouteTablesResponse") + } + return +} + +// listRouteTables implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listRouteTables(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/routeTables", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListRouteTablesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListRouteTables") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/RouteTable/ListRouteTables" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListRouteTables", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListSecurityLists Lists the security lists in the specified VCN and compartment. +// If the VCN ID is not provided, then the list includes the security lists from all VCNs in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListSecurityLists.go.html to see an example of how to use ListSecurityLists API. +func (client VirtualNetworkClient) ListSecurityLists(ctx context.Context, request ListSecurityListsRequest) (response ListSecurityListsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listSecurityLists, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListSecurityListsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListSecurityListsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListSecurityListsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSecurityListsResponse") + } + return +} + +// listSecurityLists implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listSecurityLists(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/securityLists", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListSecurityListsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListSecurityLists") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/SecurityList/ListSecurityLists" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListSecurityLists", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListServiceGateways Lists the service gateways in the specified compartment. You may optionally specify a VCN OCID +// to filter the results by VCN. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListServiceGateways.go.html to see an example of how to use ListServiceGateways API. +func (client VirtualNetworkClient) ListServiceGateways(ctx context.Context, request ListServiceGatewaysRequest) (response ListServiceGatewaysResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listServiceGateways, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListServiceGatewaysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListServiceGatewaysResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListServiceGatewaysResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListServiceGatewaysResponse") + } + return +} + +// listServiceGateways implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listServiceGateways(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/serviceGateways", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListServiceGatewaysResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListServiceGateways") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ServiceGateway/ListServiceGateways" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListServiceGateways", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListServices Lists the available Service objects that you can enable for a +// service gateway in this region. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListServices.go.html to see an example of how to use ListServices API. +func (client VirtualNetworkClient) ListServices(ctx context.Context, request ListServicesRequest) (response ListServicesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listServices, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListServicesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListServicesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListServicesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListServicesResponse") + } + return +} + +// listServices implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listServices(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/services", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListServicesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListServices") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Service/ListServices" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListServices", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListSubnets Lists the subnets in the specified VCN and the specified compartment. +// If the VCN ID is not provided, then the list includes the subnets from all VCNs in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListSubnets.go.html to see an example of how to use ListSubnets API. +func (client VirtualNetworkClient) ListSubnets(ctx context.Context, request ListSubnetsRequest) (response ListSubnetsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listSubnets, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListSubnetsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListSubnetsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListSubnetsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSubnetsResponse") + } + return +} + +// listSubnets implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listSubnets(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/subnets", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListSubnetsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListSubnets") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Subnet/ListSubnets" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListSubnets", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVcns Lists the virtual cloud networks (VCNs) in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVcns.go.html to see an example of how to use ListVcns API. +func (client VirtualNetworkClient) ListVcns(ctx context.Context, request ListVcnsRequest) (response ListVcnsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVcns, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVcnsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVcnsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVcnsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVcnsResponse") + } + return +} + +// listVcns implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listVcns(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vcns", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVcnsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListVcns") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/ListVcns" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListVcns", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVirtualCircuitAssociatedTunnels Gets the specified virtual circuit's associatedTunnelsInfo. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuitAssociatedTunnels.go.html to see an example of how to use ListVirtualCircuitAssociatedTunnels API. +// A default retry strategy applies to this operation ListVirtualCircuitAssociatedTunnels() +func (client VirtualNetworkClient) ListVirtualCircuitAssociatedTunnels(ctx context.Context, request ListVirtualCircuitAssociatedTunnelsRequest) (response ListVirtualCircuitAssociatedTunnelsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVirtualCircuitAssociatedTunnels, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVirtualCircuitAssociatedTunnelsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVirtualCircuitAssociatedTunnelsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVirtualCircuitAssociatedTunnelsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVirtualCircuitAssociatedTunnelsResponse") + } + return +} + +// listVirtualCircuitAssociatedTunnels implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listVirtualCircuitAssociatedTunnels(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualCircuits/{virtualCircuitId}/associatedTunnels", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVirtualCircuitAssociatedTunnelsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListVirtualCircuitAssociatedTunnels") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VirtualCircuitAssociatedTunnelDetails/ListVirtualCircuitAssociatedTunnels" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListVirtualCircuitAssociatedTunnels", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVirtualCircuitBandwidthShapes The operation lists available bandwidth levels for virtual circuits. For the compartment ID, provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of your tenancy (the root compartment). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuitBandwidthShapes.go.html to see an example of how to use ListVirtualCircuitBandwidthShapes API. +// A default retry strategy applies to this operation ListVirtualCircuitBandwidthShapes() +func (client VirtualNetworkClient) ListVirtualCircuitBandwidthShapes(ctx context.Context, request ListVirtualCircuitBandwidthShapesRequest) (response ListVirtualCircuitBandwidthShapesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVirtualCircuitBandwidthShapes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVirtualCircuitBandwidthShapesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVirtualCircuitBandwidthShapesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVirtualCircuitBandwidthShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVirtualCircuitBandwidthShapesResponse") + } + return +} + +// listVirtualCircuitBandwidthShapes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listVirtualCircuitBandwidthShapes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualCircuitBandwidthShapes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVirtualCircuitBandwidthShapesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListVirtualCircuitBandwidthShapes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VirtualCircuitBandwidthShape/ListVirtualCircuitBandwidthShapes" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListVirtualCircuitBandwidthShapes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVirtualCircuitPublicPrefixes Lists the public IP prefixes and their details for the specified +// public virtual circuit. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuitPublicPrefixes.go.html to see an example of how to use ListVirtualCircuitPublicPrefixes API. +// A default retry strategy applies to this operation ListVirtualCircuitPublicPrefixes() +func (client VirtualNetworkClient) ListVirtualCircuitPublicPrefixes(ctx context.Context, request ListVirtualCircuitPublicPrefixesRequest) (response ListVirtualCircuitPublicPrefixesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVirtualCircuitPublicPrefixes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVirtualCircuitPublicPrefixesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVirtualCircuitPublicPrefixesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVirtualCircuitPublicPrefixesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVirtualCircuitPublicPrefixesResponse") + } + return +} + +// listVirtualCircuitPublicPrefixes implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listVirtualCircuitPublicPrefixes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualCircuits/{virtualCircuitId}/publicPrefixes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVirtualCircuitPublicPrefixesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListVirtualCircuitPublicPrefixes") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VirtualCircuitPublicPrefix/ListVirtualCircuitPublicPrefixes" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListVirtualCircuitPublicPrefixes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVirtualCircuits Lists the virtual circuits in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuits.go.html to see an example of how to use ListVirtualCircuits API. +// A default retry strategy applies to this operation ListVirtualCircuits() +func (client VirtualNetworkClient) ListVirtualCircuits(ctx context.Context, request ListVirtualCircuitsRequest) (response ListVirtualCircuitsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVirtualCircuits, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVirtualCircuitsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVirtualCircuitsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVirtualCircuitsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVirtualCircuitsResponse") + } + return +} + +// listVirtualCircuits implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listVirtualCircuits(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualCircuits", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVirtualCircuitsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListVirtualCircuits") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VirtualCircuit/ListVirtualCircuits" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListVirtualCircuits", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVlans Lists the VLANs in the specified VCN and the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVlans.go.html to see an example of how to use ListVlans API. +func (client VirtualNetworkClient) ListVlans(ctx context.Context, request ListVlansRequest) (response ListVlansResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVlans, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVlansResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVlansResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVlansResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVlansResponse") + } + return +} + +// listVlans implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listVlans(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vlans", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVlansResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListVlans") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vlan/ListVlans" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListVlans", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVtaps Lists the virtual test access points (VTAPs) in the specified compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVtaps.go.html to see an example of how to use ListVtaps API. +func (client VirtualNetworkClient) ListVtaps(ctx context.Context, request ListVtapsRequest) (response ListVtapsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVtaps, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVtapsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVtapsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVtapsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVtapsResponse") + } + return +} + +// listVtaps implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listVtaps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/vtaps", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListVtapsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ListVtaps") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vtap/ListVtaps" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListVtaps", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ModifyIpv4SubnetCidr Updates the specified Ipv4 CIDR block of a Subnet. The new Ipv4 CIDR IP range must meet the following criteria: +// - Must be valid. +// - Must not overlap with another Ipv4 CIDR block in the Subnet or the on-premises network CIDR block. +// - Must not exceed the limit of Ipv4 CIDR blocks allowed per Subnet. +// - Must include IP addresses from the original CIDR block that are used in the VCN's existing route rules. +// - No IP address in an existing subnet should be outside of the new CIDR block range. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ModifyIpv4SubnetCidr.go.html to see an example of how to use ModifyIpv4SubnetCidr API. +// A default retry strategy applies to this operation ModifyIpv4SubnetCidr() +func (client VirtualNetworkClient) ModifyIpv4SubnetCidr(ctx context.Context, request ModifyIpv4SubnetCidrRequest) (response ModifyIpv4SubnetCidrResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.modifyIpv4SubnetCidr, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ModifyIpv4SubnetCidrResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ModifyIpv4SubnetCidrResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ModifyIpv4SubnetCidrResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ModifyIpv4SubnetCidrResponse") + } + return +} + +// modifyIpv4SubnetCidr implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) modifyIpv4SubnetCidr(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/subnets/{subnetId}/actions/modifyIpv4Cidr", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ModifyIpv4SubnetCidrResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ModifyIpv4SubnetCidr") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Subnet/ModifyIpv4SubnetCidr" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ModifyIpv4SubnetCidr", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ModifyVcnCidr Updates the specified CIDR block of a VCN. The new CIDR IP range must meet the following criteria: +// - Must be valid. +// - Must not overlap with another CIDR block in the VCN, a CIDR block of a peered VCN, or the on-premises network CIDR block. +// - Must not exceed the limit of CIDR blocks allowed per VCN. +// - Must include IP addresses from the original CIDR block that are used in the VCN's existing route rules. +// - No IP address in an existing subnet should be outside of the new CIDR block range. +// **Note:** Modifying a CIDR block places your VCN in an updating state until the changes are complete. You cannot create or update the VCN's subnets, VLANs, LPGs, or route tables during this operation. The time to completion can vary depending on the size of your network. Updating a small network could take about a minute, and updating a large network could take up to an hour. You can use the `GetWorkRequest` operation to check the status of the update. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ModifyVcnCidr.go.html to see an example of how to use ModifyVcnCidr API. +func (client VirtualNetworkClient) ModifyVcnCidr(ctx context.Context, request ModifyVcnCidrRequest) (response ModifyVcnCidrResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.modifyVcnCidr, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ModifyVcnCidrResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ModifyVcnCidrResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ModifyVcnCidrResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ModifyVcnCidrResponse") + } + return +} + +// modifyVcnCidr implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) modifyVcnCidr(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/vcns/{vcnId}/actions/modifyCidr", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ModifyVcnCidrResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ModifyVcnCidr") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/ModifyVcnCidr" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ModifyVcnCidr", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// PatchSubnet Updates a Subnet by evaluating a sequence of patch instructions (JSON List Patch). +// This operation is restricted to IPv6 CIDR-related fields only. +// Supported selections (exact match) are: +// - ipv6CidrBlock +// - ipv6CidrBlocks +// +// Only the REPLACE operation is supported. +// The request must include the If-Match header for optimistic concurrency control. +// This is an asynchronous operation. The subnet’s lifecycleState is set to UPDATING while the patch work request +// is in progress, and changes back to AVAILABLE after the patch operation is complete. +// All patch instructions are applied atomically as a single operation; either all succeed or none are applied. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/PatchSubnet.go.html to see an example of how to use PatchSubnet API. +// A default retry strategy applies to this operation PatchSubnet() +func (client VirtualNetworkClient) PatchSubnet(ctx context.Context, request PatchSubnetRequest) (response PatchSubnetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.patchSubnet, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = PatchSubnetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = PatchSubnetResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(PatchSubnetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PatchSubnetResponse") + } + return +} + +// patchSubnet implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) patchSubnet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/subnets/{subnetId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response PatchSubnetResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "PatchSubnet") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Subnet/PatchSubnet" + err = common.PostProcessServiceError(err, "VirtualNetwork", "PatchSubnet", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// PatchVcn Updates a VCN by evaluating a sequence of patch instructions (JSON List Patch). +// This operation is restricted to IPv6 CIDR-related fields only. +// Supported selections (exact match) are: +// - ipv6CidrBlock +// - ipv6PublicCidrBlock +// - ipv6PrivateCidrBlocks +// - byoipv6CidrDetails +// +// Only the REPLACE operation is supported. +// The request must include the If-Match header for optimistic concurrency control. +// This is an asynchronous operation. The VCN’s lifecycleState is set to UPDATING while the patch work request +// is in progress, and changes back to AVAILABLE after the patch operation is complete. +// All patch instructions are applied atomically as a single operation; either all succeed or none are applied. +// NOTE: +// `ipv6PublicCidrBlock` represents Oracle provided GUA on VCN. With PATCH API, customer can only remove it if present. +// Since this is Oracle provided CIDR, there is no concept of replacing with customer provided CIDR. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/PatchVcn.go.html to see an example of how to use PatchVcn API. +// A default retry strategy applies to this operation PatchVcn() +func (client VirtualNetworkClient) PatchVcn(ctx context.Context, request PatchVcnRequest) (response PatchVcnResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.patchVcn, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = PatchVcnResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = PatchVcnResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(PatchVcnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PatchVcnResponse") + } + return +} + +// patchVcn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) patchVcn(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/vcns/{vcnId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response PatchVcnResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "PatchVcn") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/PatchVcn" + err = common.PostProcessServiceError(err, "VirtualNetwork", "PatchVcn", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// PrivateIpVnicDetach Unassign the specified PrivateIP address from Virtual Network Interface Card (VNIC). You must specify the PrivateIP OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/PrivateIpVnicDetach.go.html to see an example of how to use PrivateIpVnicDetach API. +func (client VirtualNetworkClient) PrivateIpVnicDetach(ctx context.Context, request PrivateIpVnicDetachRequest) (response PrivateIpVnicDetachResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.privateIpVnicDetach, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = PrivateIpVnicDetachResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = PrivateIpVnicDetachResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(PrivateIpVnicDetachResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PrivateIpVnicDetachResponse") + } + return +} + +// privateIpVnicDetach implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) privateIpVnicDetach(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/privateIps/{privateIpId}/actions/detach", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response PrivateIpVnicDetachResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "PrivateIpVnicDetach") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PrivateIp/PrivateIpVnicDetach" + err = common.PostProcessServiceError(err, "VirtualNetwork", "PrivateIpVnicDetach", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RemoveDrgRouteDistributionStatements Removes one or more route distribution statements from the specified route distribution's map. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveDrgRouteDistributionStatements.go.html to see an example of how to use RemoveDrgRouteDistributionStatements API. +func (client VirtualNetworkClient) RemoveDrgRouteDistributionStatements(ctx context.Context, request RemoveDrgRouteDistributionStatementsRequest) (response RemoveDrgRouteDistributionStatementsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.removeDrgRouteDistributionStatements, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RemoveDrgRouteDistributionStatementsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RemoveDrgRouteDistributionStatementsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RemoveDrgRouteDistributionStatementsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RemoveDrgRouteDistributionStatementsResponse") + } + return +} + +// removeDrgRouteDistributionStatements implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) removeDrgRouteDistributionStatements(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgRouteDistributions/{drgRouteDistributionId}/actions/removeDrgRouteDistributionStatements", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response RemoveDrgRouteDistributionStatementsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "RemoveDrgRouteDistributionStatements") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteDistributionStatement/RemoveDrgRouteDistributionStatements" + err = common.PostProcessServiceError(err, "VirtualNetwork", "RemoveDrgRouteDistributionStatements", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RemoveDrgRouteRules Removes one or more route rules from the specified DRG route table. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveDrgRouteRules.go.html to see an example of how to use RemoveDrgRouteRules API. +func (client VirtualNetworkClient) RemoveDrgRouteRules(ctx context.Context, request RemoveDrgRouteRulesRequest) (response RemoveDrgRouteRulesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.removeDrgRouteRules, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RemoveDrgRouteRulesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RemoveDrgRouteRulesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RemoveDrgRouteRulesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RemoveDrgRouteRulesResponse") + } + return +} + +// removeDrgRouteRules implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) removeDrgRouteRules(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgRouteTables/{drgRouteTableId}/actions/removeDrgRouteRules", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response RemoveDrgRouteRulesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "RemoveDrgRouteRules") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteRule/RemoveDrgRouteRules" + err = common.PostProcessServiceError(err, "VirtualNetwork", "RemoveDrgRouteRules", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RemoveExportDrgRouteDistribution Removes the export route distribution from the DRG attachment so no routes are advertised to it. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveExportDrgRouteDistribution.go.html to see an example of how to use RemoveExportDrgRouteDistribution API. +func (client VirtualNetworkClient) RemoveExportDrgRouteDistribution(ctx context.Context, request RemoveExportDrgRouteDistributionRequest) (response RemoveExportDrgRouteDistributionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.removeExportDrgRouteDistribution, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RemoveExportDrgRouteDistributionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RemoveExportDrgRouteDistributionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RemoveExportDrgRouteDistributionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RemoveExportDrgRouteDistributionResponse") + } + return +} + +// removeExportDrgRouteDistribution implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) removeExportDrgRouteDistribution(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgAttachments/{drgAttachmentId}/actions/removeExportDrgRouteDistribution", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response RemoveExportDrgRouteDistributionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "RemoveExportDrgRouteDistribution") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgAttachment/RemoveExportDrgRouteDistribution" + err = common.PostProcessServiceError(err, "VirtualNetwork", "RemoveExportDrgRouteDistribution", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RemoveImportDrgRouteDistribution Removes the import route distribution from the DRG route table so no routes are imported +// into it. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveImportDrgRouteDistribution.go.html to see an example of how to use RemoveImportDrgRouteDistribution API. +func (client VirtualNetworkClient) RemoveImportDrgRouteDistribution(ctx context.Context, request RemoveImportDrgRouteDistributionRequest) (response RemoveImportDrgRouteDistributionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.removeImportDrgRouteDistribution, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RemoveImportDrgRouteDistributionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RemoveImportDrgRouteDistributionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RemoveImportDrgRouteDistributionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RemoveImportDrgRouteDistributionResponse") + } + return +} + +// removeImportDrgRouteDistribution implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) removeImportDrgRouteDistribution(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgRouteTables/{drgRouteTableId}/actions/removeImportDrgRouteDistribution", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response RemoveImportDrgRouteDistributionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "RemoveImportDrgRouteDistribution") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteTable/RemoveImportDrgRouteDistribution" + err = common.PostProcessServiceError(err, "VirtualNetwork", "RemoveImportDrgRouteDistribution", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RemoveIpv4SubnetCidr Remove an IPv4 prefix from a subnet +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveIpv4SubnetCidr.go.html to see an example of how to use RemoveIpv4SubnetCidr API. +// A default retry strategy applies to this operation RemoveIpv4SubnetCidr() +func (client VirtualNetworkClient) RemoveIpv4SubnetCidr(ctx context.Context, request RemoveIpv4SubnetCidrRequest) (response RemoveIpv4SubnetCidrResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.removeIpv4SubnetCidr, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RemoveIpv4SubnetCidrResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RemoveIpv4SubnetCidrResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RemoveIpv4SubnetCidrResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RemoveIpv4SubnetCidrResponse") + } + return +} + +// removeIpv4SubnetCidr implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) removeIpv4SubnetCidr(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/subnets/{subnetId}/actions/removeIpv4Cidr", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response RemoveIpv4SubnetCidrResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "RemoveIpv4SubnetCidr") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Subnet/RemoveIpv4SubnetCidr" + err = common.PostProcessServiceError(err, "VirtualNetwork", "RemoveIpv4SubnetCidr", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RemoveIpv6SubnetCidr Remove an IPv6 prefix from a subnet. At least one IPv6 CIDR should remain. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveIpv6SubnetCidr.go.html to see an example of how to use RemoveIpv6SubnetCidr API. +func (client VirtualNetworkClient) RemoveIpv6SubnetCidr(ctx context.Context, request RemoveIpv6SubnetCidrRequest) (response RemoveIpv6SubnetCidrResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.removeIpv6SubnetCidr, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RemoveIpv6SubnetCidrResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RemoveIpv6SubnetCidrResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RemoveIpv6SubnetCidrResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RemoveIpv6SubnetCidrResponse") + } + return +} + +// removeIpv6SubnetCidr implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) removeIpv6SubnetCidr(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/subnets/{subnetId}/actions/removeIpv6Cidr", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response RemoveIpv6SubnetCidrResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "RemoveIpv6SubnetCidr") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Subnet/RemoveIpv6SubnetCidr" + err = common.PostProcessServiceError(err, "VirtualNetwork", "RemoveIpv6SubnetCidr", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RemoveIpv6VcnCidr Removing an existing IPv6 prefix from a VCN. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveIpv6VcnCidr.go.html to see an example of how to use RemoveIpv6VcnCidr API. +func (client VirtualNetworkClient) RemoveIpv6VcnCidr(ctx context.Context, request RemoveIpv6VcnCidrRequest) (response RemoveIpv6VcnCidrResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.removeIpv6VcnCidr, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RemoveIpv6VcnCidrResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RemoveIpv6VcnCidrResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RemoveIpv6VcnCidrResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RemoveIpv6VcnCidrResponse") + } + return +} + +// removeIpv6VcnCidr implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) removeIpv6VcnCidr(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/vcns/{vcnId}/actions/removeIpv6Cidr", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response RemoveIpv6VcnCidrResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "RemoveIpv6VcnCidr") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/RemoveIpv6VcnCidr" + err = common.PostProcessServiceError(err, "VirtualNetwork", "RemoveIpv6VcnCidr", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RemoveNetworkSecurityGroupSecurityRules Removes one or more security rules from the specified network security group. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveNetworkSecurityGroupSecurityRules.go.html to see an example of how to use RemoveNetworkSecurityGroupSecurityRules API. +func (client VirtualNetworkClient) RemoveNetworkSecurityGroupSecurityRules(ctx context.Context, request RemoveNetworkSecurityGroupSecurityRulesRequest) (response RemoveNetworkSecurityGroupSecurityRulesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.removeNetworkSecurityGroupSecurityRules, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RemoveNetworkSecurityGroupSecurityRulesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RemoveNetworkSecurityGroupSecurityRulesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RemoveNetworkSecurityGroupSecurityRulesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RemoveNetworkSecurityGroupSecurityRulesResponse") + } + return +} + +// removeNetworkSecurityGroupSecurityRules implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) removeNetworkSecurityGroupSecurityRules(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/networkSecurityGroups/{networkSecurityGroupId}/actions/removeSecurityRules", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response RemoveNetworkSecurityGroupSecurityRulesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "RemoveNetworkSecurityGroupSecurityRules") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/SecurityRule/RemoveNetworkSecurityGroupSecurityRules" + err = common.PostProcessServiceError(err, "VirtualNetwork", "RemoveNetworkSecurityGroupSecurityRules", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RemovePublicIpPoolCapacity Removes a CIDR block from the referenced public IP pool. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemovePublicIpPoolCapacity.go.html to see an example of how to use RemovePublicIpPoolCapacity API. +func (client VirtualNetworkClient) RemovePublicIpPoolCapacity(ctx context.Context, request RemovePublicIpPoolCapacityRequest) (response RemovePublicIpPoolCapacityResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.removePublicIpPoolCapacity, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RemovePublicIpPoolCapacityResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RemovePublicIpPoolCapacityResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RemovePublicIpPoolCapacityResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RemovePublicIpPoolCapacityResponse") + } + return +} + +// removePublicIpPoolCapacity implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) removePublicIpPoolCapacity(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/publicIpPools/{publicIpPoolId}/actions/removeCapacity", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response RemovePublicIpPoolCapacityResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "RemovePublicIpPoolCapacity") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIpPool/RemovePublicIpPoolCapacity" + err = common.PostProcessServiceError(err, "VirtualNetwork", "RemovePublicIpPoolCapacity", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RemoveVcnCidr Removes a specified CIDR block from a VCN. +// **Notes:** +// - You cannot remove a CIDR block if an IP address in its range is in use. +// - Removing a CIDR block places your VCN in an updating state until the changes are complete. You cannot create or update the VCN's subnets, VLANs, LPGs, or route tables during this operation. The time to completion can take a few minutes. You can use the `GetWorkRequest` operation to check the status of the update. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveVcnCidr.go.html to see an example of how to use RemoveVcnCidr API. +func (client VirtualNetworkClient) RemoveVcnCidr(ctx context.Context, request RemoveVcnCidrRequest) (response RemoveVcnCidrResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.removeVcnCidr, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RemoveVcnCidrResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RemoveVcnCidrResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RemoveVcnCidrResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RemoveVcnCidrResponse") + } + return +} + +// removeVcnCidr implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) removeVcnCidr(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/vcns/{vcnId}/actions/removeCidr", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response RemoveVcnCidrResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "RemoveVcnCidr") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/RemoveVcnCidr" + err = common.PostProcessServiceError(err, "VirtualNetwork", "RemoveVcnCidr", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// SetOriginAsn Update BYOIP's origin ASN to byoasn. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/SetOriginAsn.go.html to see an example of how to use SetOriginAsn API. +// A default retry strategy applies to this operation SetOriginAsn() +func (client VirtualNetworkClient) SetOriginAsn(ctx context.Context, request SetOriginAsnRequest) (response SetOriginAsnResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.setOriginAsn, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = SetOriginAsnResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = SetOriginAsnResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(SetOriginAsnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into SetOriginAsnResponse") + } + return +} + +// setOriginAsn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) setOriginAsn(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/byoipRanges/{byoipRangeId}/actions/setOrigin/byoasn", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response SetOriginAsnResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "SetOriginAsn") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ByoipRange/SetOriginAsn" + err = common.PostProcessServiceError(err, "VirtualNetwork", "SetOriginAsn", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// SetOriginAsnToOracle Update prefix's origin ASN to OCI +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/SetOriginAsnToOracle.go.html to see an example of how to use SetOriginAsnToOracle API. +func (client VirtualNetworkClient) SetOriginAsnToOracle(ctx context.Context, request SetOriginAsnToOracleRequest) (response SetOriginAsnToOracleResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.setOriginAsnToOracle, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = SetOriginAsnToOracleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = SetOriginAsnToOracleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(SetOriginAsnToOracleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into SetOriginAsnToOracleResponse") + } + return +} + +// setOriginAsnToOracle implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) setOriginAsnToOracle(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/byoipRanges/{byoipRangeId}/actions/setOrigin/oracleAsn", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response SetOriginAsnToOracleResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "SetOriginAsnToOracle") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ByoipRange/SetOriginAsnToOracle" + err = common.PostProcessServiceError(err, "VirtualNetwork", "SetOriginAsnToOracle", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateByoasn Updates the tags or display name associated with the specified BYOASN Resource. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateByoasn.go.html to see an example of how to use UpdateByoasn API. +func (client VirtualNetworkClient) UpdateByoasn(ctx context.Context, request UpdateByoasnRequest) (response UpdateByoasnResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateByoasn, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateByoasnResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateByoasnResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateByoasnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateByoasnResponse") + } + return +} + +// updateByoasn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateByoasn(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/byoasns/{byoasnId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateByoasnResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateByoasn") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Byoasn/UpdateByoasn" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateByoasn", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateByoipRange Updates the tags or display name associated to the specified BYOIP CIDR block. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateByoipRange.go.html to see an example of how to use UpdateByoipRange API. +func (client VirtualNetworkClient) UpdateByoipRange(ctx context.Context, request UpdateByoipRangeRequest) (response UpdateByoipRangeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateByoipRange, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateByoipRangeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateByoipRangeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateByoipRangeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateByoipRangeResponse") + } + return +} + +// updateByoipRange implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateByoipRange(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/byoipRanges/{byoipRangeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateByoipRangeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateByoipRange") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ByoipRange/UpdateByoipRange" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateByoipRange", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateCaptureFilter Updates the specified VTAP capture filter's display name or tags. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateCaptureFilter.go.html to see an example of how to use UpdateCaptureFilter API. +func (client VirtualNetworkClient) UpdateCaptureFilter(ctx context.Context, request UpdateCaptureFilterRequest) (response UpdateCaptureFilterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateCaptureFilter, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateCaptureFilterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateCaptureFilterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateCaptureFilterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateCaptureFilterResponse") + } + return +} + +// updateCaptureFilter implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateCaptureFilter(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/captureFilters/{captureFilterId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateCaptureFilterResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateCaptureFilter") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CaptureFilter/UpdateCaptureFilter" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateCaptureFilter", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateCpe Updates the specified CPE's display name or tags. +// Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateCpe.go.html to see an example of how to use UpdateCpe API. +// A default retry strategy applies to this operation UpdateCpe() +func (client VirtualNetworkClient) UpdateCpe(ctx context.Context, request UpdateCpeRequest) (response UpdateCpeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateCpe, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateCpeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateCpeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateCpeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateCpeResponse") + } + return +} + +// updateCpe implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateCpe(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/cpes/{cpeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateCpeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateCpe") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Cpe/UpdateCpe" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateCpe", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateCrossConnect Updates the specified cross-connect. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateCrossConnect.go.html to see an example of how to use UpdateCrossConnect API. +// A default retry strategy applies to this operation UpdateCrossConnect() +func (client VirtualNetworkClient) UpdateCrossConnect(ctx context.Context, request UpdateCrossConnectRequest) (response UpdateCrossConnectResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateCrossConnect, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateCrossConnectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateCrossConnectResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateCrossConnectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateCrossConnectResponse") + } + return +} + +// updateCrossConnect implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateCrossConnect(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/crossConnects/{crossConnectId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateCrossConnectResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateCrossConnect") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CrossConnect/UpdateCrossConnect" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateCrossConnect", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateCrossConnectGroup Updates the specified cross-connect group's display name. +// Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateCrossConnectGroup.go.html to see an example of how to use UpdateCrossConnectGroup API. +// A default retry strategy applies to this operation UpdateCrossConnectGroup() +func (client VirtualNetworkClient) UpdateCrossConnectGroup(ctx context.Context, request UpdateCrossConnectGroupRequest) (response UpdateCrossConnectGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateCrossConnectGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateCrossConnectGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateCrossConnectGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateCrossConnectGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateCrossConnectGroupResponse") + } + return +} + +// updateCrossConnectGroup implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateCrossConnectGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/crossConnectGroups/{crossConnectGroupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateCrossConnectGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateCrossConnectGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/CrossConnectGroup/UpdateCrossConnectGroup" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateCrossConnectGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateDhcpOptions Updates the specified set of DHCP options. You can update the display name or the options +// themselves. Avoid entering confidential information. +// Note that the `options` object you provide replaces the entire existing set of options. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDhcpOptions.go.html to see an example of how to use UpdateDhcpOptions API. +func (client VirtualNetworkClient) UpdateDhcpOptions(ctx context.Context, request UpdateDhcpOptionsRequest) (response UpdateDhcpOptionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDhcpOptions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateDhcpOptionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateDhcpOptionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateDhcpOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDhcpOptionsResponse") + } + return +} + +// updateDhcpOptions implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateDhcpOptions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/dhcps/{dhcpId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateDhcpOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateDhcpOptions") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DhcpOptions/UpdateDhcpOptions" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateDhcpOptions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateDrg Updates the specified DRG's display name or tags. Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrg.go.html to see an example of how to use UpdateDrg API. +func (client VirtualNetworkClient) UpdateDrg(ctx context.Context, request UpdateDrgRequest) (response UpdateDrgResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDrg, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateDrgResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateDrgResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateDrgResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDrgResponse") + } + return +} + +// updateDrg implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateDrg(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/drgs/{drgId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateDrgResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateDrg") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Drg/UpdateDrg" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateDrg", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateDrgAttachment Updates the display name and routing information for the specified `DrgAttachment`. +// Avoid entering confidential information. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgAttachment.go.html to see an example of how to use UpdateDrgAttachment API. +func (client VirtualNetworkClient) UpdateDrgAttachment(ctx context.Context, request UpdateDrgAttachmentRequest) (response UpdateDrgAttachmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDrgAttachment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateDrgAttachmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateDrgAttachmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateDrgAttachmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDrgAttachmentResponse") + } + return +} + +// updateDrgAttachment implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateDrgAttachment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/drgAttachments/{drgAttachmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateDrgAttachmentResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateDrgAttachment") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgAttachment/UpdateDrgAttachment" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateDrgAttachment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateDrgRouteDistribution Updates the specified route distribution +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgRouteDistribution.go.html to see an example of how to use UpdateDrgRouteDistribution API. +func (client VirtualNetworkClient) UpdateDrgRouteDistribution(ctx context.Context, request UpdateDrgRouteDistributionRequest) (response UpdateDrgRouteDistributionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDrgRouteDistribution, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateDrgRouteDistributionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateDrgRouteDistributionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateDrgRouteDistributionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDrgRouteDistributionResponse") + } + return +} + +// updateDrgRouteDistribution implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateDrgRouteDistribution(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/drgRouteDistributions/{drgRouteDistributionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateDrgRouteDistributionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateDrgRouteDistribution") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteDistribution/UpdateDrgRouteDistribution" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateDrgRouteDistribution", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateDrgRouteDistributionStatements Updates one or more route distribution statements in the specified route distribution. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgRouteDistributionStatements.go.html to see an example of how to use UpdateDrgRouteDistributionStatements API. +func (client VirtualNetworkClient) UpdateDrgRouteDistributionStatements(ctx context.Context, request UpdateDrgRouteDistributionStatementsRequest) (response UpdateDrgRouteDistributionStatementsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDrgRouteDistributionStatements, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateDrgRouteDistributionStatementsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateDrgRouteDistributionStatementsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateDrgRouteDistributionStatementsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDrgRouteDistributionStatementsResponse") + } + return +} + +// updateDrgRouteDistributionStatements implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateDrgRouteDistributionStatements(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgRouteDistributions/{drgRouteDistributionId}/actions/updateDrgRouteDistributionStatements", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateDrgRouteDistributionStatementsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateDrgRouteDistributionStatements") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteDistributionStatement/UpdateDrgRouteDistributionStatements" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateDrgRouteDistributionStatements", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateDrgRouteRules Updates one or more route rules in the specified DRG route table. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgRouteRules.go.html to see an example of how to use UpdateDrgRouteRules API. +func (client VirtualNetworkClient) UpdateDrgRouteRules(ctx context.Context, request UpdateDrgRouteRulesRequest) (response UpdateDrgRouteRulesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDrgRouteRules, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateDrgRouteRulesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateDrgRouteRulesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateDrgRouteRulesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDrgRouteRulesResponse") + } + return +} + +// updateDrgRouteRules implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateDrgRouteRules(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgRouteTables/{drgRouteTableId}/actions/updateDrgRouteRules", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateDrgRouteRulesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateDrgRouteRules") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteRule/UpdateDrgRouteRules" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateDrgRouteRules", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateDrgRouteTable Updates the specified DRG route table. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgRouteTable.go.html to see an example of how to use UpdateDrgRouteTable API. +func (client VirtualNetworkClient) UpdateDrgRouteTable(ctx context.Context, request UpdateDrgRouteTableRequest) (response UpdateDrgRouteTableResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateDrgRouteTable, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateDrgRouteTableResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateDrgRouteTableResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateDrgRouteTableResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDrgRouteTableResponse") + } + return +} + +// updateDrgRouteTable implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateDrgRouteTable(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/drgRouteTables/{drgRouteTableId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateDrgRouteTableResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateDrgRouteTable") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/DrgRouteTable/UpdateDrgRouteTable" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateDrgRouteTable", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateIPSecConnection Updates the specified IPSec connection. +// To update an individual IPSec tunnel's attributes, use +// UpdateIPSecConnectionTunnel. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateIPSecConnection.go.html to see an example of how to use UpdateIPSecConnection API. +// A default retry strategy applies to this operation UpdateIPSecConnection() +func (client VirtualNetworkClient) UpdateIPSecConnection(ctx context.Context, request UpdateIPSecConnectionRequest) (response UpdateIPSecConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateIPSecConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateIPSecConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateIPSecConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateIPSecConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateIPSecConnectionResponse") + } + return +} + +// updateIPSecConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateIPSecConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/ipsecConnections/{ipscId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateIPSecConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateIPSecConnection") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IPSecConnection/UpdateIPSecConnection" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateIPSecConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateIPSecConnectionTunnel Updates the specified tunnel. This operation lets you change tunnel attributes such as the +// routing type (BGP dynamic routing or static routing). Here are some important notes: +// - If you change the tunnel's routing type or BGP session configuration, the tunnel will go +// down while it's reprovisioned. +// - If you want to switch the tunnel's `routing` from `STATIC` to `BGP`, make sure the tunnel's +// BGP session configuration attributes have been set (BgpSessionInfo). +// - If you want to switch the tunnel's `routing` from `BGP` to `STATIC`, make sure the +// IPSecConnection already has at least one valid CIDR +// static route. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateIPSecConnectionTunnel.go.html to see an example of how to use UpdateIPSecConnectionTunnel API. +// A default retry strategy applies to this operation UpdateIPSecConnectionTunnel() +func (client VirtualNetworkClient) UpdateIPSecConnectionTunnel(ctx context.Context, request UpdateIPSecConnectionTunnelRequest) (response UpdateIPSecConnectionTunnelResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateIPSecConnectionTunnel, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateIPSecConnectionTunnelResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateIPSecConnectionTunnelResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateIPSecConnectionTunnelResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateIPSecConnectionTunnelResponse") + } + return +} + +// updateIPSecConnectionTunnel implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateIPSecConnectionTunnel(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/ipsecConnections/{ipscId}/tunnels/{tunnelId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateIPSecConnectionTunnelResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateIPSecConnectionTunnel") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IPSecConnectionTunnel/UpdateIPSecConnectionTunnel" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateIPSecConnectionTunnel", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateIPSecConnectionTunnelSharedSecret Updates the shared secret (pre-shared key) for the specified tunnel. +// **Important:** If you change the shared secret, the tunnel will go down while it's reprovisioned. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateIPSecConnectionTunnelSharedSecret.go.html to see an example of how to use UpdateIPSecConnectionTunnelSharedSecret API. +// A default retry strategy applies to this operation UpdateIPSecConnectionTunnelSharedSecret() +func (client VirtualNetworkClient) UpdateIPSecConnectionTunnelSharedSecret(ctx context.Context, request UpdateIPSecConnectionTunnelSharedSecretRequest) (response UpdateIPSecConnectionTunnelSharedSecretResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateIPSecConnectionTunnelSharedSecret, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateIPSecConnectionTunnelSharedSecretResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateIPSecConnectionTunnelSharedSecretResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateIPSecConnectionTunnelSharedSecretResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateIPSecConnectionTunnelSharedSecretResponse") + } + return +} + +// updateIPSecConnectionTunnelSharedSecret implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateIPSecConnectionTunnelSharedSecret(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/sharedSecret", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateIPSecConnectionTunnelSharedSecretResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateIPSecConnectionTunnelSharedSecret") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IPSecConnectionTunnelSharedSecret/UpdateIPSecConnectionTunnelSharedSecret" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateIPSecConnectionTunnelSharedSecret", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateInternetGateway Updates the specified internet gateway. You can disable/enable it, or change its display name +// or tags. Avoid entering confidential information. +// If the gateway is disabled, that means no traffic will flow to/from the internet even if there's +// a route rule that enables that traffic. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInternetGateway.go.html to see an example of how to use UpdateInternetGateway API. +func (client VirtualNetworkClient) UpdateInternetGateway(ctx context.Context, request UpdateInternetGatewayRequest) (response UpdateInternetGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateInternetGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateInternetGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateInternetGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateInternetGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateInternetGatewayResponse") + } + return +} + +// updateInternetGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateInternetGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/internetGateways/{igId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateInternetGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateInternetGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InternetGateway/UpdateInternetGateway" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateInternetGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateIpv6 Updates the specified IPv6. You must specify the object's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// Use this operation if you want to: +// - Move an IPv6 to a different VNIC in the same subnet. +// - Enable/disable internet access for an IPv6. +// - Change the display name for an IPv6. +// - Update resource tags for an IPv6. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateIpv6.go.html to see an example of how to use UpdateIpv6 API. +func (client VirtualNetworkClient) UpdateIpv6(ctx context.Context, request UpdateIpv6Request) (response UpdateIpv6Response, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateIpv6, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateIpv6Response{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateIpv6Response{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateIpv6Response); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateIpv6Response") + } + return +} + +// updateIpv6 implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateIpv6(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/ipv6/{ipv6Id}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateIpv6Response + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateIpv6") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Ipv6/UpdateIpv6" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateIpv6", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateLocalPeeringGateway Updates the specified local peering gateway (LPG). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateLocalPeeringGateway.go.html to see an example of how to use UpdateLocalPeeringGateway API. +func (client VirtualNetworkClient) UpdateLocalPeeringGateway(ctx context.Context, request UpdateLocalPeeringGatewayRequest) (response UpdateLocalPeeringGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateLocalPeeringGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateLocalPeeringGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateLocalPeeringGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateLocalPeeringGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateLocalPeeringGatewayResponse") + } + return +} + +// updateLocalPeeringGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateLocalPeeringGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/localPeeringGateways/{localPeeringGatewayId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateLocalPeeringGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateLocalPeeringGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/LocalPeeringGateway/UpdateLocalPeeringGateway" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateLocalPeeringGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateNatGateway Updates the specified NAT gateway. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateNatGateway.go.html to see an example of how to use UpdateNatGateway API. +func (client VirtualNetworkClient) UpdateNatGateway(ctx context.Context, request UpdateNatGatewayRequest) (response UpdateNatGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateNatGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateNatGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateNatGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateNatGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateNatGatewayResponse") + } + return +} + +// updateNatGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateNatGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/natGateways/{natGatewayId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateNatGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateNatGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/NatGateway/UpdateNatGateway" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateNatGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateNetworkSecurityGroup Updates the specified network security group. +// To add or remove an existing VNIC from the group, use +// UpdateVnic. +// To add a VNIC to the group *when you create the VNIC*, specify the NSG's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) during creation. +// For example, see the `nsgIds` attribute in CreateVnicDetails. +// To add or remove security rules from the group, use +// AddNetworkSecurityGroupSecurityRules +// or +// RemoveNetworkSecurityGroupSecurityRules. +// To edit the contents of existing security rules in the group, use +// UpdateNetworkSecurityGroupSecurityRules. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateNetworkSecurityGroup.go.html to see an example of how to use UpdateNetworkSecurityGroup API. +func (client VirtualNetworkClient) UpdateNetworkSecurityGroup(ctx context.Context, request UpdateNetworkSecurityGroupRequest) (response UpdateNetworkSecurityGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateNetworkSecurityGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateNetworkSecurityGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateNetworkSecurityGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateNetworkSecurityGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateNetworkSecurityGroupResponse") + } + return +} + +// updateNetworkSecurityGroup implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateNetworkSecurityGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/networkSecurityGroups/{networkSecurityGroupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateNetworkSecurityGroupResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateNetworkSecurityGroup") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/NetworkSecurityGroup/UpdateNetworkSecurityGroup" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateNetworkSecurityGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateNetworkSecurityGroupSecurityRules Updates one or more security rules in the specified network security group. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateNetworkSecurityGroupSecurityRules.go.html to see an example of how to use UpdateNetworkSecurityGroupSecurityRules API. +func (client VirtualNetworkClient) UpdateNetworkSecurityGroupSecurityRules(ctx context.Context, request UpdateNetworkSecurityGroupSecurityRulesRequest) (response UpdateNetworkSecurityGroupSecurityRulesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateNetworkSecurityGroupSecurityRules, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateNetworkSecurityGroupSecurityRulesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateNetworkSecurityGroupSecurityRulesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateNetworkSecurityGroupSecurityRulesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateNetworkSecurityGroupSecurityRulesResponse") + } + return +} + +// updateNetworkSecurityGroupSecurityRules implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateNetworkSecurityGroupSecurityRules(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/networkSecurityGroups/{networkSecurityGroupId}/actions/updateSecurityRules", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateNetworkSecurityGroupSecurityRulesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateNetworkSecurityGroupSecurityRules") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/SecurityRule/UpdateNetworkSecurityGroupSecurityRules" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateNetworkSecurityGroupSecurityRules", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdatePrivateIp Updates the specified private IP. You must specify the object's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +// Use this operation if you want to: +// - Move a secondary private IP to a different VNIC in the same subnet. +// - Change the display name for a secondary private IP. +// - Change the hostname for a secondary private IP. +// +// This operation cannot be used with primary private IPs. +// To update the hostname for the primary IP on a VNIC, use +// UpdateVnic. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdatePrivateIp.go.html to see an example of how to use UpdatePrivateIp API. +func (client VirtualNetworkClient) UpdatePrivateIp(ctx context.Context, request UpdatePrivateIpRequest) (response UpdatePrivateIpResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updatePrivateIp, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdatePrivateIpResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdatePrivateIpResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdatePrivateIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdatePrivateIpResponse") + } + return +} + +// updatePrivateIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updatePrivateIp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/privateIps/{privateIpId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdatePrivateIpResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdatePrivateIp") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PrivateIp/UpdatePrivateIp" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdatePrivateIp", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdatePublicIp Updates the specified public IP. You must specify the object's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). Use this operation if you want to: +// * Assign a reserved public IP in your pool to a private IP. +// * Move a reserved public IP to a different private IP. +// * Unassign a reserved public IP from a private IP (which returns it to your pool +// of reserved public IPs). +// * Change the display name or tags for a public IP. +// Assigning, moving, and unassigning a reserved public IP are asynchronous +// operations. Poll the public IP's `lifecycleState` to determine if the operation +// succeeded. +// **Note:** When moving a reserved public IP, the target private IP +// must not already have a public IP with `lifecycleState` = ASSIGNING or ASSIGNED. If it +// does, an error is returned. Also, the initial unassignment from the original +// private IP always succeeds, but the assignment to the target private IP is asynchronous and +// could fail silently (for example, if the target private IP is deleted or has a different public IP +// assigned to it in the interim). If that occurs, the public IP remains unassigned and its +// `lifecycleState` switches to AVAILABLE (it is not reassigned to its original private IP). +// You must poll the public IP's `lifecycleState` to determine if the move succeeded. +// Regarding ephemeral public IPs: +// * If you want to assign an ephemeral public IP to a primary private IP, use +// CreatePublicIp. +// * You can't move an ephemeral public IP to a different private IP. +// * If you want to unassign an ephemeral public IP from its private IP, use +// DeletePublicIp, which +// unassigns and deletes the ephemeral public IP. +// **Note:** If a public IP is assigned to a secondary private +// IP (see PrivateIp), and you move that secondary +// private IP to another VNIC, the public IP moves with it. +// **Note:** There's a limit to the number of PublicIp +// a VNIC or instance can have. If you try to move a reserved public IP +// to a VNIC or instance that has already reached its public IP limit, an error is +// returned. For information about the public IP limits, see +// Public IP Addresses (https://docs.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdatePublicIp.go.html to see an example of how to use UpdatePublicIp API. +func (client VirtualNetworkClient) UpdatePublicIp(ctx context.Context, request UpdatePublicIpRequest) (response UpdatePublicIpResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updatePublicIp, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdatePublicIpResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdatePublicIpResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdatePublicIpResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdatePublicIpResponse") + } + return +} + +// updatePublicIp implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updatePublicIp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/publicIps/{publicIpId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdatePublicIpResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdatePublicIp") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIp/UpdatePublicIp" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdatePublicIp", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdatePublicIpPool Updates the specified public IP pool. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdatePublicIpPool.go.html to see an example of how to use UpdatePublicIpPool API. +func (client VirtualNetworkClient) UpdatePublicIpPool(ctx context.Context, request UpdatePublicIpPoolRequest) (response UpdatePublicIpPoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updatePublicIpPool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdatePublicIpPoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdatePublicIpPoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdatePublicIpPoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdatePublicIpPoolResponse") + } + return +} + +// updatePublicIpPool implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updatePublicIpPool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/publicIpPools/{publicIpPoolId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdatePublicIpPoolResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdatePublicIpPool") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PublicIpPool/UpdatePublicIpPool" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdatePublicIpPool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateRemotePeeringConnection Updates the specified remote peering connection (RPC). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateRemotePeeringConnection.go.html to see an example of how to use UpdateRemotePeeringConnection API. +// A default retry strategy applies to this operation UpdateRemotePeeringConnection() +func (client VirtualNetworkClient) UpdateRemotePeeringConnection(ctx context.Context, request UpdateRemotePeeringConnectionRequest) (response UpdateRemotePeeringConnectionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateRemotePeeringConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateRemotePeeringConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateRemotePeeringConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateRemotePeeringConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateRemotePeeringConnectionResponse") + } + return +} + +// updateRemotePeeringConnection implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateRemotePeeringConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/remotePeeringConnections/{remotePeeringConnectionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateRemotePeeringConnectionResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateRemotePeeringConnection") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/RemotePeeringConnection/UpdateRemotePeeringConnection" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateRemotePeeringConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateRouteTable Updates the specified route table's display name or route rules. +// Avoid entering confidential information. +// Note that the `routeRules` object you provide replaces the entire existing set of rules. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateRouteTable.go.html to see an example of how to use UpdateRouteTable API. +func (client VirtualNetworkClient) UpdateRouteTable(ctx context.Context, request UpdateRouteTableRequest) (response UpdateRouteTableResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateRouteTable, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateRouteTableResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateRouteTableResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateRouteTableResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateRouteTableResponse") + } + return +} + +// updateRouteTable implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateRouteTable(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/routeTables/{rtId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateRouteTableResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateRouteTable") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/RouteTable/UpdateRouteTable" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateRouteTable", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateSecurityList Updates the specified security list's display name or rules. +// Avoid entering confidential information. +// Note that the `egressSecurityRules` or `ingressSecurityRules` objects you provide replace the entire +// existing objects. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateSecurityList.go.html to see an example of how to use UpdateSecurityList API. +func (client VirtualNetworkClient) UpdateSecurityList(ctx context.Context, request UpdateSecurityListRequest) (response UpdateSecurityListResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateSecurityList, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateSecurityListResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateSecurityListResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateSecurityListResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateSecurityListResponse") + } + return +} + +// updateSecurityList implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateSecurityList(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/securityLists/{securityListId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateSecurityListResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateSecurityList") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/SecurityList/UpdateSecurityList" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateSecurityList", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateServiceGateway Updates the specified service gateway. The information you provide overwrites the existing +// attributes of the gateway. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateServiceGateway.go.html to see an example of how to use UpdateServiceGateway API. +func (client VirtualNetworkClient) UpdateServiceGateway(ctx context.Context, request UpdateServiceGatewayRequest) (response UpdateServiceGatewayResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateServiceGateway, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateServiceGatewayResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateServiceGatewayResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateServiceGatewayResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateServiceGatewayResponse") + } + return +} + +// updateServiceGateway implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateServiceGateway(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/serviceGateways/{serviceGatewayId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateServiceGatewayResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateServiceGateway") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ServiceGateway/UpdateServiceGateway" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateServiceGateway", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateSubnet Updates the specified subnet. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateSubnet.go.html to see an example of how to use UpdateSubnet API. +func (client VirtualNetworkClient) UpdateSubnet(ctx context.Context, request UpdateSubnetRequest) (response UpdateSubnetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateSubnet, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateSubnetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateSubnetResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateSubnetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateSubnetResponse") + } + return +} + +// updateSubnet implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateSubnet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/subnets/{subnetId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateSubnetResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateSubnet") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Subnet/UpdateSubnet" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateSubnet", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateTunnelCpeDeviceConfig Creates or updates the set of CPE configuration answers for the specified tunnel. +// The answers correlate to the questions that are specific to the CPE device type (see the +// `parameters` attribute of CpeDeviceShapeDetail). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateTunnelCpeDeviceConfig.go.html to see an example of how to use UpdateTunnelCpeDeviceConfig API. +// A default retry strategy applies to this operation UpdateTunnelCpeDeviceConfig() +func (client VirtualNetworkClient) UpdateTunnelCpeDeviceConfig(ctx context.Context, request UpdateTunnelCpeDeviceConfigRequest) (response UpdateTunnelCpeDeviceConfigResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateTunnelCpeDeviceConfig, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateTunnelCpeDeviceConfigResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateTunnelCpeDeviceConfigResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateTunnelCpeDeviceConfigResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateTunnelCpeDeviceConfigResponse") + } + return +} + +// updateTunnelCpeDeviceConfig implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateTunnelCpeDeviceConfig(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/ipsecConnections/{ipscId}/tunnels/{tunnelId}/tunnelDeviceConfig", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateTunnelCpeDeviceConfigResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateTunnelCpeDeviceConfig") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/TunnelCpeDeviceConfig/UpdateTunnelCpeDeviceConfig" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateTunnelCpeDeviceConfig", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVcn Updates the specified VCN. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVcn.go.html to see an example of how to use UpdateVcn API. +func (client VirtualNetworkClient) UpdateVcn(ctx context.Context, request UpdateVcnRequest) (response UpdateVcnResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVcn, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateVcnResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateVcnResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateVcnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVcnResponse") + } + return +} + +// updateVcn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateVcn(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/vcns/{vcnId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateVcnResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateVcn") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/UpdateVcn" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateVcn", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVirtualCircuit Updates the specified virtual circuit. This can be called by +// either the customer who owns the virtual circuit, or the +// provider (when provisioning or de-provisioning the virtual +// circuit from their end). The documentation for +// UpdateVirtualCircuitDetails +// indicates who can update each property of the virtual circuit. +// **Important:** If the virtual circuit is working and in the +// PROVISIONED state, updating any of the network-related properties +// (such as the DRG being used, the BGP ASN, and so on) will cause the virtual +// circuit's state to switch to PROVISIONING and the related BGP +// session to go down. After Oracle re-provisions the virtual circuit, +// its state will return to PROVISIONED. Make sure you confirm that +// the associated BGP session is back up. For more information +// about the various states and how to test connectivity, see +// FastConnect Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +// To change the list of public IP prefixes for a public virtual circuit, +// use BulkAddVirtualCircuitPublicPrefixes +// and +// BulkDeleteVirtualCircuitPublicPrefixes. +// Updating the list of prefixes does NOT cause the BGP session to go down. However, +// Oracle must verify the customer's ownership of each added prefix before +// traffic for that prefix will flow across the virtual circuit. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVirtualCircuit.go.html to see an example of how to use UpdateVirtualCircuit API. +// A default retry strategy applies to this operation UpdateVirtualCircuit() +func (client VirtualNetworkClient) UpdateVirtualCircuit(ctx context.Context, request UpdateVirtualCircuitRequest) (response UpdateVirtualCircuitResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVirtualCircuit, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateVirtualCircuitResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateVirtualCircuitResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateVirtualCircuitResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVirtualCircuitResponse") + } + return +} + +// updateVirtualCircuit implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateVirtualCircuit(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/virtualCircuits/{virtualCircuitId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateVirtualCircuitResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateVirtualCircuit") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/VirtualCircuit/UpdateVirtualCircuit" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateVirtualCircuit", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVlan Updates the specified VLAN. Note that this operation might require changes to all +// the VNICs in the VLAN, which can take a while. The VLAN will be in the UPDATING state until the changes are complete. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVlan.go.html to see an example of how to use UpdateVlan API. +func (client VirtualNetworkClient) UpdateVlan(ctx context.Context, request UpdateVlanRequest) (response UpdateVlanResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVlan, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateVlanResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateVlanResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateVlanResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVlanResponse") + } + return +} + +// updateVlan implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateVlan(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/vlans/{vlanId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateVlanResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateVlan") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vlan/UpdateVlan" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateVlan", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVnic Updates the specified VNIC. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVnic.go.html to see an example of how to use UpdateVnic API. +func (client VirtualNetworkClient) UpdateVnic(ctx context.Context, request UpdateVnicRequest) (response UpdateVnicResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVnic, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateVnicResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateVnicResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateVnicResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVnicResponse") + } + return +} + +// updateVnic implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateVnic(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/vnics/{vnicId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateVnicResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateVnic") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vnic/UpdateVnic" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateVnic", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVtap Updates the specified VTAP's display name or tags. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVtap.go.html to see an example of how to use UpdateVtap API. +func (client VirtualNetworkClient) UpdateVtap(ctx context.Context, request UpdateVtapRequest) (response UpdateVtapResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVtap, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateVtapResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateVtapResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateVtapResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVtapResponse") + } + return +} + +// updateVtap implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) updateVtap(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/vtaps/{vtapId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateVtapResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpdateVtap") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpdateVtap", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpgradeDrg Upgrades the DRG. After upgrade, you can control routing inside your DRG +// via DRG attachments, route distributions, and DRG route tables. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpgradeDrg.go.html to see an example of how to use UpgradeDrg API. +func (client VirtualNetworkClient) UpgradeDrg(ctx context.Context, request UpgradeDrgRequest) (response UpgradeDrgResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.upgradeDrg, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpgradeDrgResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpgradeDrgResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpgradeDrgResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpgradeDrgResponse") + } + return +} + +// upgradeDrg implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) upgradeDrg(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/drgs/{drgId}/actions/upgrade", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpgradeDrgResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "UpgradeDrg") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Drg/UpgradeDrg" + err = common.PostProcessServiceError(err, "VirtualNetwork", "UpgradeDrg", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ValidateByoasn Submits the BYOASN for validation. Please do not submit to Oracle for validation if the information for the BYOASN is not already modified in the Regional Internet Registry. +// See To import a BYOASN (https://docs.oracle.com/iaas/Content/Network/Concepts/BYOASN.htm) for details. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ValidateByoasn.go.html to see an example of how to use ValidateByoasn API. +// A default retry strategy applies to this operation ValidateByoasn() +func (client VirtualNetworkClient) ValidateByoasn(ctx context.Context, request ValidateByoasnRequest) (response ValidateByoasnResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.validateByoasn, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ValidateByoasnResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ValidateByoasnResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ValidateByoasnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ValidateByoasnResponse") + } + return +} + +// validateByoasn implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) validateByoasn(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/byoasns/{byoasnId}/actions/validate", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ValidateByoasnResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ValidateByoasn") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Byoasn/ValidateByoasn" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ValidateByoasn", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ValidateByoipRange Submits the BYOIP CIDR block you are importing for validation. Do not submit to Oracle for validation if you have not already +// modified the information for the BYOIP CIDR block with your Regional Internet Registry. See To import a CIDR block (https://docs.oracle.com/iaas/Content/Network/Concepts/BYOIP.htm#import_cidr) for details. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ValidateByoipRange.go.html to see an example of how to use ValidateByoipRange API. +func (client VirtualNetworkClient) ValidateByoipRange(ctx context.Context, request ValidateByoipRangeRequest) (response ValidateByoipRangeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.validateByoipRange, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ValidateByoipRangeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ValidateByoipRangeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ValidateByoipRangeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ValidateByoipRangeResponse") + } + return +} + +// validateByoipRange implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) validateByoipRange(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/byoipRanges/{byoipRangeId}/actions/validate", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ValidateByoipRangeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "ValidateByoipRange") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ByoipRange/ValidateByoipRange" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ValidateByoipRange", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// WithdrawByoipRange Withdraws BGP route advertisement for the BYOIP CIDR block. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/WithdrawByoipRange.go.html to see an example of how to use WithdrawByoipRange API. +func (client VirtualNetworkClient) WithdrawByoipRange(ctx context.Context, request WithdrawByoipRangeRequest) (response WithdrawByoipRangeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.withdrawByoipRange, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = WithdrawByoipRangeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = WithdrawByoipRangeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(WithdrawByoipRangeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into WithdrawByoipRangeResponse") + } + return +} + +// withdrawByoipRange implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) withdrawByoipRange(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/byoipRanges/{byoipRangeId}/actions/withdraw", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + common.UpdateEndpointTemplateForOptions(&client.BaseClient) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response WithdrawByoipRangeResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "virtualNetwork", "WithdrawByoipRange") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ByoipRange/WithdrawByoipRange" + err = common.PostProcessServiceError(err, "VirtualNetwork", "WithdrawByoipRange", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe.go new file mode 100644 index 000000000..5c6e63648 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Cpe An object you create when setting up a Site-to-Site VPN between your on-premises network +// and VCN. The `Cpe` is a virtual representation of your customer-premises equipment, +// which is the actual router on-premises at your site at your end of the Site-to-Site VPN IPSec connection. +// For more information, +// see Overview of the Networking Service (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type Cpe struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the CPE. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The CPE's Oracle ID (OCID). + Id *string `mandatory:"true" json:"id"` + + // The public IP address of the on-premises router. + IpAddress *string `mandatory:"true" json:"ipAddress"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the CPE's device type. + // The Networking service maintains a general list of CPE device types (for example, + // Cisco ASA). For each type, Oracle provides CPE configuration content that can help + // a network engineer configure the CPE. The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) uniquely identifies the type of + // device. To get the OCIDs for the device types on the list, see + // ListCpeDeviceShapes. + // For information about how to generate CPE configuration content for a + // CPE device type, see: + // * GetCpeDeviceConfigContent + // * GetIpsecCpeDeviceConfigContent + // * GetTunnelCpeDeviceConfigContent + // * GetTunnelCpeDeviceConfig + CpeDeviceShapeId *string `mandatory:"false" json:"cpeDeviceShapeId"` + + // The date and time the CPE was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Indicates whether this CPE is of type `private` or not. + IsPrivate *bool `mandatory:"false" json:"isPrivate"` +} + +func (m Cpe) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Cpe) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_config_answer.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_config_answer.go new file mode 100644 index 000000000..bd17384e5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_config_answer.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CpeDeviceConfigAnswer An individual answer to a CPE device question. +// The answers correlate to the questions that are specific to the CPE device type (see the +// `parameters` attribute of CpeDeviceShapeDetail). +type CpeDeviceConfigAnswer struct { + + // A string that identifies the question to be answered. See the `key` attribute in + // CpeDeviceConfigQuestion. + Key *string `mandatory:"false" json:"key"` + + // The answer to the question. + Value *string `mandatory:"false" json:"value"` +} + +func (m CpeDeviceConfigAnswer) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CpeDeviceConfigAnswer) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_config_question.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_config_question.go new file mode 100644 index 000000000..2dcb0be10 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_config_question.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CpeDeviceConfigQuestion An individual question that the customer can answer about the CPE device. +// The customer provides answers to these questions in +// UpdateTunnelCpeDeviceConfig. +type CpeDeviceConfigQuestion struct { + + // A string that identifies the question. + Key *string `mandatory:"false" json:"key"` + + // A descriptive label for the question (for example, to display in a form in a graphical interface). + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // A description or explanation of the question, to help the customer answer accurately. + Explanation *string `mandatory:"false" json:"explanation"` +} + +func (m CpeDeviceConfigQuestion) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CpeDeviceConfigQuestion) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_info.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_info.go new file mode 100644 index 000000000..f58b2468a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_info.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CpeDeviceInfo Basic information about a particular CPE device type. +type CpeDeviceInfo struct { + + // The vendor that makes the CPE device. + Vendor *string `mandatory:"false" json:"vendor"` + + // The platform or software version of the CPE device. + PlatformSoftwareVersion *string `mandatory:"false" json:"platformSoftwareVersion"` +} + +func (m CpeDeviceInfo) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CpeDeviceInfo) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_shape_detail.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_shape_detail.go new file mode 100644 index 000000000..7af7bdfd1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_shape_detail.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CpeDeviceShapeDetail The detailed information about a particular CPE device type. Compare with +// CpeDeviceShapeSummary. +type CpeDeviceShapeDetail struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the CPE device shape. + // This value uniquely identifies the type of CPE device. + CpeDeviceShapeId *string `mandatory:"false" json:"cpeDeviceShapeId"` + + CpeDeviceInfo *CpeDeviceInfo `mandatory:"false" json:"cpeDeviceInfo"` + + // For certain CPE devices types, the customer can provide answers to + // questions that are specific to the device type. This attribute contains + // a list of those questions. The Networking service merges the answers with + // other information and renders a set of CPE configuration content. To + // provide the answers, use + // UpdateTunnelCpeDeviceConfig. + Parameters []CpeDeviceConfigQuestion `mandatory:"false" json:"parameters"` + + // A template of CPE device configuration information that will be merged with the customer's + // answers to the questions to render the final CPE device configuration content. Also see: + // * GetCpeDeviceConfigContent + // * GetIpsecCpeDeviceConfigContent + // * GetTunnelCpeDeviceConfigContent + Template *string `mandatory:"false" json:"template"` +} + +func (m CpeDeviceShapeDetail) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CpeDeviceShapeDetail) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_shape_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_shape_summary.go new file mode 100644 index 000000000..9b9d21534 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cpe_device_shape_summary.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CpeDeviceShapeSummary A summary of information about a particular CPE device type. Compare with +// CpeDeviceShapeDetail. +type CpeDeviceShapeSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the CPE device shape. + // This value uniquely identifies the type of CPE device. + Id *string `mandatory:"false" json:"id"` + + CpeDeviceInfo *CpeDeviceInfo `mandatory:"false" json:"cpeDeviceInfo"` +} + +func (m CpeDeviceShapeSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CpeDeviceShapeSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_app_catalog_subscription_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_app_catalog_subscription_details.go new file mode 100644 index 000000000..db0698b6d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_app_catalog_subscription_details.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateAppCatalogSubscriptionDetails details for creating a subscription for a listing resource version. +type CreateAppCatalogSubscriptionDetails struct { + + // The compartmentID for the subscription. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the listing. + ListingId *string `mandatory:"true" json:"listingId"` + + // Listing resource version. + ListingResourceVersion *string `mandatory:"true" json:"listingResourceVersion"` + + // Oracle TOU link + OracleTermsOfUseLink *string `mandatory:"true" json:"oracleTermsOfUseLink"` + + // Date and time the agreements were retrieved, in RFC3339 (https://tools.ietf.org/html/rfc3339) format. + // Example: `2018-03-20T12:32:53.532Z` + TimeRetrieved *common.SDKTime `mandatory:"true" json:"timeRetrieved"` + + // A generated signature for this listing resource version retrieved the agreements API. + Signature *string `mandatory:"true" json:"signature"` + + // EULA link + EulaLink *string `mandatory:"false" json:"eulaLink"` +} + +func (m CreateAppCatalogSubscriptionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateAppCatalogSubscriptionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_app_catalog_subscription_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_app_catalog_subscription_request_response.go new file mode 100644 index 000000000..540d3f9ab --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_app_catalog_subscription_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateAppCatalogSubscriptionRequest wrapper for the CreateAppCatalogSubscription operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateAppCatalogSubscription.go.html to see an example of how to use CreateAppCatalogSubscriptionRequest. +type CreateAppCatalogSubscriptionRequest struct { + + // Request for the creation of a subscription for listing resource version for a compartment. + CreateAppCatalogSubscriptionDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateAppCatalogSubscriptionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateAppCatalogSubscriptionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateAppCatalogSubscriptionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateAppCatalogSubscriptionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateAppCatalogSubscriptionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateAppCatalogSubscriptionResponse wrapper for the CreateAppCatalogSubscription operation +type CreateAppCatalogSubscriptionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The AppCatalogSubscription instance + AppCatalogSubscription `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateAppCatalogSubscriptionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateAppCatalogSubscriptionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_backup_details.go new file mode 100644 index 000000000..2f11983a9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_backup_details.go @@ -0,0 +1,113 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateBootVolumeBackupDetails The representation of CreateBootVolumeBackupDetails +type CreateBootVolumeBackupDetails struct { + + // The OCID of the boot volume that needs to be backed up. + BootVolumeId *string `mandatory:"true" json:"bootVolumeId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The type of backup to create. If omitted, defaults to incremental. + Type CreateBootVolumeBackupDetailsTypeEnum `mandatory:"false" json:"type,omitempty"` + + // The OCID of the Vault service key which is the master encryption key for the volume backup. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m CreateBootVolumeBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateBootVolumeBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCreateBootVolumeBackupDetailsTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetCreateBootVolumeBackupDetailsTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateBootVolumeBackupDetailsTypeEnum Enum with underlying type: string +type CreateBootVolumeBackupDetailsTypeEnum string + +// Set of constants representing the allowable values for CreateBootVolumeBackupDetailsTypeEnum +const ( + CreateBootVolumeBackupDetailsTypeFull CreateBootVolumeBackupDetailsTypeEnum = "FULL" + CreateBootVolumeBackupDetailsTypeIncremental CreateBootVolumeBackupDetailsTypeEnum = "INCREMENTAL" +) + +var mappingCreateBootVolumeBackupDetailsTypeEnum = map[string]CreateBootVolumeBackupDetailsTypeEnum{ + "FULL": CreateBootVolumeBackupDetailsTypeFull, + "INCREMENTAL": CreateBootVolumeBackupDetailsTypeIncremental, +} + +var mappingCreateBootVolumeBackupDetailsTypeEnumLowerCase = map[string]CreateBootVolumeBackupDetailsTypeEnum{ + "full": CreateBootVolumeBackupDetailsTypeFull, + "incremental": CreateBootVolumeBackupDetailsTypeIncremental, +} + +// GetCreateBootVolumeBackupDetailsTypeEnumValues Enumerates the set of values for CreateBootVolumeBackupDetailsTypeEnum +func GetCreateBootVolumeBackupDetailsTypeEnumValues() []CreateBootVolumeBackupDetailsTypeEnum { + values := make([]CreateBootVolumeBackupDetailsTypeEnum, 0) + for _, v := range mappingCreateBootVolumeBackupDetailsTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateBootVolumeBackupDetailsTypeEnumStringValues Enumerates the set of values in String for CreateBootVolumeBackupDetailsTypeEnum +func GetCreateBootVolumeBackupDetailsTypeEnumStringValues() []string { + return []string{ + "FULL", + "INCREMENTAL", + } +} + +// GetMappingCreateBootVolumeBackupDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateBootVolumeBackupDetailsTypeEnum(val string) (CreateBootVolumeBackupDetailsTypeEnum, bool) { + enum, ok := mappingCreateBootVolumeBackupDetailsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_backup_request_response.go new file mode 100644 index 000000000..4e0a3368e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_backup_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateBootVolumeBackupRequest wrapper for the CreateBootVolumeBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateBootVolumeBackup.go.html to see an example of how to use CreateBootVolumeBackupRequest. +type CreateBootVolumeBackupRequest struct { + + // Request to create a new backup of given boot volume. + CreateBootVolumeBackupDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateBootVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateBootVolumeBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateBootVolumeBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateBootVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateBootVolumeBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateBootVolumeBackupResponse wrapper for the CreateBootVolumeBackup operation +type CreateBootVolumeBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolumeBackup instance + BootVolumeBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateBootVolumeBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateBootVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_details.go new file mode 100644 index 000000000..e0857eeee --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_details.go @@ -0,0 +1,183 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateBootVolumeDetails The representation of CreateBootVolumeDetails +type CreateBootVolumeDetails struct { + + // The OCID of the compartment that contains the boot volume. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + SourceDetails BootVolumeSourceDetails `mandatory:"true" json:"sourceDetails"` + + // The availability domain of the volume. Omissible for cloning a volume. The new volume will be created in the availability domain of the source volume. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // If provided, specifies the ID of the boot volume backup policy to assign to the newly + // created boot volume. If omitted, no policy will be assigned. + BackupPolicyId *string `mandatory:"false" json:"backupPolicyId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID of the Vault service key to assign as the master encryption key + // for the boot volume. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // The size of the volume in GBs. + SizeInGBs *int64 `mandatory:"false" json:"sizeInGBs"` + + // The clusterPlacementGroup Id of the volume for volume placement. + ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` + + // The number of volume performance units (VPUs) that will be applied to this volume per GB, + // representing the Block Volume service's elastic performance options. + // See Block Volume Performance Levels (https://docs.oracle.com/iaas/Content/Block/Concepts/blockvolumeperformance.htm#perf_levels) for more information. + // Allowed values: + // * `10`: Represents the Balanced option. + // * `20`: Represents the Higher Performance option. + // * `30`-`120`: Represents the Ultra High Performance option. + // For performance autotune enabled volumes, it would be the Default(Minimum) VPUs/GB. + VpusPerGB *int64 `mandatory:"false" json:"vpusPerGB"` + + // Specifies whether the auto-tune performance is enabled for this boot volume. This field is deprecated. + // Use the `DetachedVolumeAutotunePolicy` instead to enable the volume for detached autotune. + IsAutoTuneEnabled *bool `mandatory:"false" json:"isAutoTuneEnabled"` + + // The list of boot volume replicas to be enabled for this boot volume + // in the specified destination availability domains. + BootVolumeReplicas []BootVolumeReplicaDetails `mandatory:"false" json:"bootVolumeReplicas"` + + // The list of autotune policies to be enabled for this volume. + AutotunePolicies []AutotunePolicy `mandatory:"false" json:"autotunePolicies"` + + // The OCID of the Vault service key which is the master encryption key for the boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + XrcKmsKeyId *string `mandatory:"false" json:"xrcKmsKeyId"` +} + +func (m CreateBootVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateBootVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateBootVolumeDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + AvailabilityDomain *string `json:"availabilityDomain"` + BackupPolicyId *string `json:"backupPolicyId"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + KmsKeyId *string `json:"kmsKeyId"` + SizeInGBs *int64 `json:"sizeInGBs"` + ClusterPlacementGroupId *string `json:"clusterPlacementGroupId"` + VpusPerGB *int64 `json:"vpusPerGB"` + IsAutoTuneEnabled *bool `json:"isAutoTuneEnabled"` + BootVolumeReplicas []BootVolumeReplicaDetails `json:"bootVolumeReplicas"` + AutotunePolicies []autotunepolicy `json:"autotunePolicies"` + XrcKmsKeyId *string `json:"xrcKmsKeyId"` + CompartmentId *string `json:"compartmentId"` + SourceDetails bootvolumesourcedetails `json:"sourceDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.AvailabilityDomain = model.AvailabilityDomain + + m.BackupPolicyId = model.BackupPolicyId + + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.KmsKeyId = model.KmsKeyId + + m.SizeInGBs = model.SizeInGBs + + m.ClusterPlacementGroupId = model.ClusterPlacementGroupId + + m.VpusPerGB = model.VpusPerGB + + m.IsAutoTuneEnabled = model.IsAutoTuneEnabled + + m.BootVolumeReplicas = make([]BootVolumeReplicaDetails, len(model.BootVolumeReplicas)) + copy(m.BootVolumeReplicas, model.BootVolumeReplicas) + m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) + for i, n := range model.AutotunePolicies { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.AutotunePolicies[i] = nn.(AutotunePolicy) + } else { + m.AutotunePolicies[i] = nil + } + } + m.XrcKmsKeyId = model.XrcKmsKeyId + + m.CompartmentId = model.CompartmentId + + nn, e = model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.SourceDetails = nn.(BootVolumeSourceDetails) + } else { + m.SourceDetails = nil + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_request_response.go new file mode 100644 index 000000000..6ef4d0bb1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_boot_volume_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateBootVolumeRequest wrapper for the CreateBootVolume operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateBootVolume.go.html to see an example of how to use CreateBootVolumeRequest. +type CreateBootVolumeRequest struct { + + // Request to create a new boot volume. + CreateBootVolumeDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateBootVolumeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateBootVolumeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateBootVolumeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateBootVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateBootVolumeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateBootVolumeResponse wrapper for the CreateBootVolume operation +type CreateBootVolumeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolume instance + BootVolume `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateBootVolumeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateBootVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoasn_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoasn_details.go new file mode 100644 index 000000000..af62dbb49 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoasn_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateByoasnDetails The information used to create a `Byoasn` resource. +type CreateByoasnDetails struct { + + // The Autonomous System Number (ASN) you are importing to the Oracle cloud. + Asn *int64 `mandatory:"true" json:"asn"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the BYOASN Resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateByoasnDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateByoasnDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoasn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoasn_request_response.go new file mode 100644 index 000000000..6949b9e99 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoasn_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateByoasnRequest wrapper for the CreateByoasn operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateByoasn.go.html to see an example of how to use CreateByoasnRequest. +type CreateByoasnRequest struct { + + // Details needed to create a BYOASN Resource. + CreateByoasnDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateByoasnRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateByoasnRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateByoasnRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateByoasnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateByoasnRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateByoasnResponse wrapper for the CreateByoasn operation +type CreateByoasnResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Byoasn instance + Byoasn `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateByoasnResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateByoasnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoip_range_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoip_range_details.go new file mode 100644 index 000000000..92a0a5919 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoip_range_details.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateByoipRangeDetails The information used to create a `ByoipRange` resource. +type CreateByoipRangeDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the BYOIP CIDR block. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The BYOIP CIDR block. You can assign some or all of it to a public IP pool after it is validated. + // Example: `10.0.1.0/24` + CidrBlock *string `mandatory:"false" json:"cidrBlock"` + + // The BYOIPv6 prefix. You can assign some or all of it to a VCN after it is validated. + Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateByoipRangeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateByoipRangeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoip_range_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoip_range_request_response.go new file mode 100644 index 000000000..5830de878 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_byoip_range_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateByoipRangeRequest wrapper for the CreateByoipRange operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateByoipRange.go.html to see an example of how to use CreateByoipRangeRequest. +type CreateByoipRangeRequest struct { + + // Details needed to create a BYOIP CIDR block subrange. + CreateByoipRangeDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateByoipRangeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateByoipRangeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateByoipRangeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateByoipRangeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateByoipRangeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateByoipRangeResponse wrapper for the CreateByoipRange operation +type CreateByoipRangeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ByoipRange instance + ByoipRange `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateByoipRangeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateByoipRangeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capacity_report_shape_availability_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capacity_report_shape_availability_details.go new file mode 100644 index 000000000..9211e117f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capacity_report_shape_availability_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateCapacityReportShapeAvailabilityDetails Information about the shapes in a capacity report. +type CreateCapacityReportShapeAvailabilityDetails struct { + + // The shape that you want to request a capacity report for. You can enumerate all available shapes by calling + // ListShapes. + InstanceShape *string `mandatory:"true" json:"instanceShape"` + + // The fault domain for the capacity report. + // If you do not specify a fault domain, the capacity report includes information about all fault domains. + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + InstanceShapeConfig *CapacityReportInstanceShapeConfig `mandatory:"false" json:"instanceShapeConfig"` +} + +func (m CreateCapacityReportShapeAvailabilityDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateCapacityReportShapeAvailabilityDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capacity_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capacity_source_details.go new file mode 100644 index 000000000..d17cce23a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capacity_source_details.go @@ -0,0 +1,83 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateCapacitySourceDetails A capacity source of bare metal hosts. +type CreateCapacitySourceDetails interface { +} + +type createcapacitysourcedetails struct { + JsonData []byte + CapacityType string `json:"capacityType"` +} + +// UnmarshalJSON unmarshals json +func (m *createcapacitysourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercreatecapacitysourcedetails createcapacitysourcedetails + s := struct { + Model Unmarshalercreatecapacitysourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CapacityType = s.Model.CapacityType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *createcapacitysourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.CapacityType { + case "DEDICATED": + mm := CreateDedicatedCapacitySourceDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for CreateCapacitySourceDetails: %s.", m.CapacityType) + return *m, nil + } +} + +func (m createcapacitysourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m createcapacitysourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capture_filter_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capture_filter_details.go new file mode 100644 index 000000000..e0edb4a70 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capture_filter_details.go @@ -0,0 +1,113 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateCaptureFilterDetails A capture filter contains a set of rules governing what traffic a VTAP mirrors or a VCN flow log collects. +type CreateCaptureFilterDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the capture filter. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Indicates which service will use this capture filter + FilterType CreateCaptureFilterDetailsFilterTypeEnum `mandatory:"true" json:"filterType"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The set of rules governing what traffic a VTAP mirrors. + VtapCaptureFilterRules []VtapCaptureFilterRuleDetails `mandatory:"false" json:"vtapCaptureFilterRules"` + + // The set of rules governing what traffic the VCN flow log collects. + FlowLogCaptureFilterRules []FlowLogCaptureFilterRuleDetails `mandatory:"false" json:"flowLogCaptureFilterRules"` +} + +func (m CreateCaptureFilterDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateCaptureFilterDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCreateCaptureFilterDetailsFilterTypeEnum(string(m.FilterType)); !ok && m.FilterType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FilterType: %s. Supported values are: %s.", m.FilterType, strings.Join(GetCreateCaptureFilterDetailsFilterTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateCaptureFilterDetailsFilterTypeEnum Enum with underlying type: string +type CreateCaptureFilterDetailsFilterTypeEnum string + +// Set of constants representing the allowable values for CreateCaptureFilterDetailsFilterTypeEnum +const ( + CreateCaptureFilterDetailsFilterTypeVtap CreateCaptureFilterDetailsFilterTypeEnum = "VTAP" + CreateCaptureFilterDetailsFilterTypeFlowlog CreateCaptureFilterDetailsFilterTypeEnum = "FLOWLOG" +) + +var mappingCreateCaptureFilterDetailsFilterTypeEnum = map[string]CreateCaptureFilterDetailsFilterTypeEnum{ + "VTAP": CreateCaptureFilterDetailsFilterTypeVtap, + "FLOWLOG": CreateCaptureFilterDetailsFilterTypeFlowlog, +} + +var mappingCreateCaptureFilterDetailsFilterTypeEnumLowerCase = map[string]CreateCaptureFilterDetailsFilterTypeEnum{ + "vtap": CreateCaptureFilterDetailsFilterTypeVtap, + "flowlog": CreateCaptureFilterDetailsFilterTypeFlowlog, +} + +// GetCreateCaptureFilterDetailsFilterTypeEnumValues Enumerates the set of values for CreateCaptureFilterDetailsFilterTypeEnum +func GetCreateCaptureFilterDetailsFilterTypeEnumValues() []CreateCaptureFilterDetailsFilterTypeEnum { + values := make([]CreateCaptureFilterDetailsFilterTypeEnum, 0) + for _, v := range mappingCreateCaptureFilterDetailsFilterTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateCaptureFilterDetailsFilterTypeEnumStringValues Enumerates the set of values in String for CreateCaptureFilterDetailsFilterTypeEnum +func GetCreateCaptureFilterDetailsFilterTypeEnumStringValues() []string { + return []string{ + "VTAP", + "FLOWLOG", + } +} + +// GetMappingCreateCaptureFilterDetailsFilterTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateCaptureFilterDetailsFilterTypeEnum(val string) (CreateCaptureFilterDetailsFilterTypeEnum, bool) { + enum, ok := mappingCreateCaptureFilterDetailsFilterTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capture_filter_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capture_filter_request_response.go new file mode 100644 index 000000000..b449e8019 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_capture_filter_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateCaptureFilterRequest wrapper for the CreateCaptureFilter operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateCaptureFilter.go.html to see an example of how to use CreateCaptureFilterRequest. +type CreateCaptureFilterRequest struct { + + // Details for creating a capture filter. + CreateCaptureFilterDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateCaptureFilterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateCaptureFilterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateCaptureFilterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateCaptureFilterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateCaptureFilterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateCaptureFilterResponse wrapper for the CreateCaptureFilter operation +type CreateCaptureFilterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CaptureFilter instance + CaptureFilter `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateCaptureFilterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateCaptureFilterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cluster_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cluster_network_details.go new file mode 100644 index 000000000..2a2ae5120 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cluster_network_details.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateClusterNetworkDetails The data to create a cluster network with instance pools (https://docs.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). +// Use cluster networks with instance pools when you want predictable capacity for a specific number of identical +// instances that are managed as a group. +// For details about creating compute clusters, which let you manage instances in the RDMA network independently +// of each other or use different types of instances in the network group, +// see CreateComputeClusterDetails. +type CreateClusterNetworkDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + // containing the cluster network. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The data to create the instance pools in the cluster network. + // Each cluster network can have one instance pool. + InstancePools []CreateClusterNetworkInstancePoolDetails `mandatory:"true" json:"instancePools"` + + PlacementConfiguration *ClusterNetworkPlacementConfigurationDetails `mandatory:"true" json:"placementConfiguration"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + ClusterConfiguration *ClusterConfigurationDetails `mandatory:"false" json:"clusterConfiguration"` +} + +func (m CreateClusterNetworkDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateClusterNetworkDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cluster_network_instance_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cluster_network_instance_pool_details.go new file mode 100644 index 000000000..a699acd92 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cluster_network_instance_pool_details.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateClusterNetworkInstancePoolDetails The data to create an instance pool in a cluster network. +type CreateClusterNetworkInstancePoolDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance configuration + // associated with the instance pool. + InstanceConfigurationId *string `mandatory:"true" json:"instanceConfigurationId"` + + // The number of instances that should be in the instance pool. + Size *int `mandatory:"true" json:"size"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateClusterNetworkInstancePoolDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateClusterNetworkInstancePoolDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cluster_network_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cluster_network_request_response.go new file mode 100644 index 000000000..eaca47247 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cluster_network_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateClusterNetworkRequest wrapper for the CreateClusterNetwork operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateClusterNetwork.go.html to see an example of how to use CreateClusterNetworkRequest. +type CreateClusterNetworkRequest struct { + + // Cluster network creation details + CreateClusterNetworkDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateClusterNetworkRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateClusterNetworkRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateClusterNetworkRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateClusterNetworkRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateClusterNetworkRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateClusterNetworkResponse wrapper for the CreateClusterNetwork operation +type CreateClusterNetworkResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ClusterNetwork instance + ClusterNetwork `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateClusterNetworkResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateClusterNetworkResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_report_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_report_details.go new file mode 100644 index 000000000..c6295f5b9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_report_details.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateComputeCapacityReportDetails The data to create a report of available Compute capacity. +type CreateComputeCapacityReportDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the compartment. This should always be the root + // compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The availability domain for the capacity report. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // Information about the shapes in the capacity report. + ShapeAvailabilities []CreateCapacityReportShapeAvailabilityDetails `mandatory:"true" json:"shapeAvailabilities"` +} + +func (m CreateComputeCapacityReportDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateComputeCapacityReportDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_report_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_report_request_response.go new file mode 100644 index 000000000..f6621ee0e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_report_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateComputeCapacityReportRequest wrapper for the CreateComputeCapacityReport operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeCapacityReport.go.html to see an example of how to use CreateComputeCapacityReportRequest. +type CreateComputeCapacityReportRequest struct { + + // Details for creating a new compute capacity report. + CreateComputeCapacityReportDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateComputeCapacityReportRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateComputeCapacityReportRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateComputeCapacityReportRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateComputeCapacityReportRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateComputeCapacityReportRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateComputeCapacityReportResponse wrapper for the CreateComputeCapacityReport operation +type CreateComputeCapacityReportResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeCapacityReport instance + ComputeCapacityReport `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateComputeCapacityReportResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateComputeCapacityReportResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_reservation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_reservation_details.go new file mode 100644 index 000000000..b39d0e626 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_reservation_details.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateComputeCapacityReservationDetails The details for creating a new compute capacity reservation. +type CreateComputeCapacityReservationDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the capacity reservation. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The availability domain of this compute capacity reservation. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Whether this capacity reservation is the default. + // For more information, see Capacity Reservations (https://docs.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm#default). + IsDefaultReservation *bool `mandatory:"false" json:"isDefaultReservation"` + + // The capacity configurations for the capacity reservation. + // To use the reservation for the desired shape, specify the shape, count, and + // optionally the fault domain where you want this configuration. + InstanceReservationConfigs []InstanceReservationConfigDetails `mandatory:"false" json:"instanceReservationConfigs"` +} + +func (m CreateComputeCapacityReservationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateComputeCapacityReservationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_reservation_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_reservation_request_response.go new file mode 100644 index 000000000..95e8a0792 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_reservation_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateComputeCapacityReservationRequest wrapper for the CreateComputeCapacityReservation operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeCapacityReservation.go.html to see an example of how to use CreateComputeCapacityReservationRequest. +type CreateComputeCapacityReservationRequest struct { + + // Details for creating a new compute capacity reservation. + // **Caution:** Avoid using any confidential information when you use the API to supply string values. + CreateComputeCapacityReservationDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateComputeCapacityReservationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateComputeCapacityReservationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateComputeCapacityReservationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateComputeCapacityReservationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateComputeCapacityReservationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateComputeCapacityReservationResponse wrapper for the CreateComputeCapacityReservation operation +type CreateComputeCapacityReservationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeCapacityReservation instance + ComputeCapacityReservation `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Location of the resource. + Location *string `presentIn:"header" name:"location"` +} + +func (response CreateComputeCapacityReservationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateComputeCapacityReservationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_topology_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_topology_details.go new file mode 100644 index 000000000..185e3140e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_topology_details.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateComputeCapacityTopologyDetails The details for creating a new compute capacity topology. +type CreateComputeCapacityTopologyDetails struct { + + // The availability domain of this compute capacity topology. + // Example: `Uocm:US-CHICAGO-1-AD-2` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + CapacitySource CreateCapacitySourceDetails `mandatory:"true" json:"capacitySource"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains this compute capacity topology. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateComputeCapacityTopologyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateComputeCapacityTopologyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateComputeCapacityTopologyDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + AvailabilityDomain *string `json:"availabilityDomain"` + CapacitySource createcapacitysourcedetails `json:"capacitySource"` + CompartmentId *string `json:"compartmentId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.AvailabilityDomain = model.AvailabilityDomain + + nn, e = model.CapacitySource.UnmarshalPolymorphicJSON(model.CapacitySource.JsonData) + if e != nil { + return + } + if nn != nil { + m.CapacitySource = nn.(CreateCapacitySourceDetails) + } else { + m.CapacitySource = nil + } + + m.CompartmentId = model.CompartmentId + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_topology_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_topology_request_response.go new file mode 100644 index 000000000..63c6b8513 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_capacity_topology_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateComputeCapacityTopologyRequest wrapper for the CreateComputeCapacityTopology operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeCapacityTopology.go.html to see an example of how to use CreateComputeCapacityTopologyRequest. +type CreateComputeCapacityTopologyRequest struct { + + // Details for creating a new compute capacity topology. + CreateComputeCapacityTopologyDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateComputeCapacityTopologyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateComputeCapacityTopologyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateComputeCapacityTopologyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateComputeCapacityTopologyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateComputeCapacityTopologyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateComputeCapacityTopologyResponse wrapper for the CreateComputeCapacityTopology operation +type CreateComputeCapacityTopologyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeCapacityTopology instance + ComputeCapacityTopology `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Location of the resource. + Location *string `presentIn:"header" name:"location"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateComputeCapacityTopologyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateComputeCapacityTopologyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_cluster_details.go new file mode 100644 index 000000000..c0c533bc5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_cluster_details.go @@ -0,0 +1,70 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateComputeClusterDetails The data for creating a compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). A compute cluster +// is an empty remote direct memory access (RDMA) network group +// After the compute cluster is created, you can use the compute cluster's OCID with the +// LaunchInstance operation to create instances in the compute cluster. +// The instances must be created in the same compartment and availability domain as the cluster. +// Use compute clusters when you want to manage instances in the cluster individually in the RDMA network group. +// For details about creating a cluster network that uses instance pools to manage groups of identical instances, +// see CreateClusterNetworkDetails. +type CreateComputeClusterDetails struct { + + // The availability domain to place the compute cluster in. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateComputeClusterDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateComputeClusterDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_cluster_request_response.go new file mode 100644 index 000000000..153596ba8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_cluster_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateComputeClusterRequest wrapper for the CreateComputeCluster operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeCluster.go.html to see an example of how to use CreateComputeClusterRequest. +type CreateComputeClusterRequest struct { + + // The data for creating a compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). A compute cluster + // is an empty remote direct memory access (RDMA) network group. + // After the compute cluster is created, you can use the compute cluster's OCID with the + // LaunchInstance operation to create instances in the compute cluster. + // The instances must be created in the same compartment and availability domain as the cluster. + // Use compute clusters when you want to manage instances in the cluster individually in the RDMA network group. + // For details about creating a cluster network that uses instance pools to manage groups of identical instances, + // see CreateClusterNetworkDetails. + CreateComputeClusterDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateComputeClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateComputeClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateComputeClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateComputeClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateComputeClusterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateComputeClusterResponse wrapper for the CreateComputeCluster operation +type CreateComputeClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeCluster instance + ComputeCluster `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateComputeClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateComputeClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_gpu_memory_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_gpu_memory_cluster_details.go new file mode 100644 index 000000000..70b468144 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_gpu_memory_cluster_details.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateComputeGpuMemoryClusterDetails The customer facing object includes GPU Memory Cluster details. +type CreateComputeGpuMemoryClusterDetails struct { + + // The availability domain of the GPU Memory Cluster. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the compute GPU Memory Cluster. + // compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + ComputeClusterId *string `mandatory:"true" json:"computeClusterId"` + + // Instance Configuration to be used for this GPU Memory Cluster + InstanceConfigurationId *string `mandatory:"true" json:"instanceConfigurationId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the GPU memory fabric. + GpuMemoryFabricId *string `mandatory:"false" json:"gpuMemoryFabricId"` + + // The desired number of instances for the GPU Memory Cluster. + Size *int64 `mandatory:"false" json:"size"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + GpuMemoryClusterScaleConfig *CreateComputeGpuMemoryClusterScaleConfig `mandatory:"false" json:"gpuMemoryClusterScaleConfig"` + + // Unique list of OCIDs for private IPs (IPv4/IPv6) associated with the GPU Memory Cluster + PrivateIpIds []string `mandatory:"false" json:"privateIpIds"` +} + +func (m CreateComputeGpuMemoryClusterDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateComputeGpuMemoryClusterDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_gpu_memory_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_gpu_memory_cluster_request_response.go new file mode 100644 index 000000000..72be3f84d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_gpu_memory_cluster_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateComputeGpuMemoryClusterRequest wrapper for the CreateComputeGpuMemoryCluster operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeGpuMemoryCluster.go.html to see an example of how to use CreateComputeGpuMemoryClusterRequest. +type CreateComputeGpuMemoryClusterRequest struct { + + // The configuration details of a GPU memory cluster + CreateComputeGpuMemoryClusterDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateComputeGpuMemoryClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateComputeGpuMemoryClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateComputeGpuMemoryClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateComputeGpuMemoryClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateComputeGpuMemoryClusterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateComputeGpuMemoryClusterResponse wrapper for the CreateComputeGpuMemoryCluster operation +type CreateComputeGpuMemoryClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeGpuMemoryCluster instance + ComputeGpuMemoryCluster `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateComputeGpuMemoryClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateComputeGpuMemoryClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_gpu_memory_cluster_scale_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_gpu_memory_cluster_scale_config.go new file mode 100644 index 000000000..77cd785c3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_gpu_memory_cluster_scale_config.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateComputeGpuMemoryClusterScaleConfig Configuration settings for GPU Memory Cluster scaling. +type CreateComputeGpuMemoryClusterScaleConfig struct { + + // Enables upsizing towards the target size. + IsUpsizeEnabled *bool `mandatory:"true" json:"isUpsizeEnabled"` + + // Enables downsizing towards the target size. + IsDownsizeEnabled *bool `mandatory:"false" json:"isDownsizeEnabled"` + + // The configured target size for the GPU Memory Cluster. + TargetSize *int64 `mandatory:"false" json:"targetSize"` +} + +func (m CreateComputeGpuMemoryClusterScaleConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateComputeGpuMemoryClusterScaleConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_host_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_host_group_details.go new file mode 100644 index 000000000..0c6c7a2f9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_host_group_details.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateComputeHostGroupDetails Detail information for a compute host group. +type CreateComputeHostGroupDetails struct { + + // The availability domain of a host group. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the compartment that contains host group. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A flag that allows customers to restrict placement for hosts attached to the group. If true, the only way to place on hosts is to target the specific host group. + IsTargetedPlacementRequired *bool `mandatory:"true" json:"isTargetedPlacementRequired"` + + // A list of HostGroupConfiguration objects + Configurations []HostGroupConfiguration `mandatory:"false" json:"configurations"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateComputeHostGroupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateComputeHostGroupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_host_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_host_group_request_response.go new file mode 100644 index 000000000..520bc7da5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_host_group_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateComputeHostGroupRequest wrapper for the CreateComputeHostGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeHostGroup.go.html to see an example of how to use CreateComputeHostGroupRequest. +type CreateComputeHostGroupRequest struct { + + // Details for creating a new host group. + CreateComputeHostGroupDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateComputeHostGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateComputeHostGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateComputeHostGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateComputeHostGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateComputeHostGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateComputeHostGroupResponse wrapper for the CreateComputeHostGroup operation +type CreateComputeHostGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeHostGroup instance + ComputeHostGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Location of the resource. + Location *string `presentIn:"header" name:"location"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateComputeHostGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateComputeHostGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_image_capability_schema_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_image_capability_schema_details.go new file mode 100644 index 000000000..86c8b43a2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_image_capability_schema_details.go @@ -0,0 +1,114 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateComputeImageCapabilitySchemaDetails Create Image Capability Schema for an image. +type CreateComputeImageCapabilitySchemaDetails struct { + + // The OCID of the compartment that contains the resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name of the compute global image capability schema version + ComputeGlobalImageCapabilitySchemaVersionName *string `mandatory:"true" json:"computeGlobalImageCapabilitySchemaVersionName"` + + // The ocid of the image + ImageId *string `mandatory:"true" json:"imageId"` + + // The map of each capability name to its ImageCapabilitySchemaDescriptor. + SchemaData map[string]ImageCapabilitySchemaDescriptor `mandatory:"true" json:"schemaData"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateComputeImageCapabilitySchemaDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateComputeImageCapabilitySchemaDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateComputeImageCapabilitySchemaDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + FreeformTags map[string]string `json:"freeformTags"` + DisplayName *string `json:"displayName"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + CompartmentId *string `json:"compartmentId"` + ComputeGlobalImageCapabilitySchemaVersionName *string `json:"computeGlobalImageCapabilitySchemaVersionName"` + ImageId *string `json:"imageId"` + SchemaData map[string]imagecapabilityschemadescriptor `json:"schemaData"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.FreeformTags = model.FreeformTags + + m.DisplayName = model.DisplayName + + m.DefinedTags = model.DefinedTags + + m.CompartmentId = model.CompartmentId + + m.ComputeGlobalImageCapabilitySchemaVersionName = model.ComputeGlobalImageCapabilitySchemaVersionName + + m.ImageId = model.ImageId + + m.SchemaData = make(map[string]ImageCapabilitySchemaDescriptor) + for k, v := range model.SchemaData { + nn, e = v.UnmarshalPolymorphicJSON(v.JsonData) + if e != nil { + return e + } + if nn != nil { + m.SchemaData[k] = nn.(ImageCapabilitySchemaDescriptor) + } else { + m.SchemaData[k] = nil + } + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_image_capability_schema_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_image_capability_schema_request_response.go new file mode 100644 index 000000000..03908a003 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_compute_image_capability_schema_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateComputeImageCapabilitySchemaRequest wrapper for the CreateComputeImageCapabilitySchema operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeImageCapabilitySchema.go.html to see an example of how to use CreateComputeImageCapabilitySchemaRequest. +type CreateComputeImageCapabilitySchemaRequest struct { + + // Compute Image Capability Schema creation details + CreateComputeImageCapabilitySchemaDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateComputeImageCapabilitySchemaRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateComputeImageCapabilitySchemaRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateComputeImageCapabilitySchemaRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateComputeImageCapabilitySchemaRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateComputeImageCapabilitySchemaRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateComputeImageCapabilitySchemaResponse wrapper for the CreateComputeImageCapabilitySchema operation +type CreateComputeImageCapabilitySchemaResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeImageCapabilitySchema instance + ComputeImageCapabilitySchema `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateComputeImageCapabilitySchemaResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateComputeImageCapabilitySchemaResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cpe_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cpe_details.go new file mode 100644 index 000000000..9fe137f89 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cpe_details.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateCpeDetails The representation of CreateCpeDetails +type CreateCpeDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the CPE. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The public IP address of the on-premises router. + // Example: `203.0.113.2` + IpAddress *string `mandatory:"true" json:"ipAddress"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the CPE device type. You can provide + // a value if you want to later generate CPE device configuration content for IPSec connections + // that use this CPE. You can also call UpdateCpe later to + // provide a value. For a list of possible values, see + // ListCpeDeviceShapes. + // For more information about generating CPE device configuration content, see: + // * GetCpeDeviceConfigContent + // * GetIpsecCpeDeviceConfigContent + // * GetTunnelCpeDeviceConfigContent + // * GetTunnelCpeDeviceConfig + CpeDeviceShapeId *string `mandatory:"false" json:"cpeDeviceShapeId"` + + // Indicates whether this CPE is of type `private` or not. + IsPrivate *bool `mandatory:"false" json:"isPrivate"` +} + +func (m CreateCpeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateCpeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cpe_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cpe_request_response.go new file mode 100644 index 000000000..dd73cbd7a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cpe_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateCpeRequest wrapper for the CreateCpe operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateCpe.go.html to see an example of how to use CreateCpeRequest. +type CreateCpeRequest struct { + + // Details for creating a CPE. + CreateCpeDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateCpeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateCpeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateCpeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateCpeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateCpeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateCpeResponse wrapper for the CreateCpe operation +type CreateCpeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Cpe instance + Cpe `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateCpeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateCpeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cross_connect_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cross_connect_details.go new file mode 100644 index 000000000..fd599605d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cross_connect_details.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateCrossConnectDetails The representation of CreateCrossConnectDetails +type CreateCrossConnectDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the cross-connect. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name of the FastConnect location where this cross-connect will be installed. + // To get a list of the available locations, see + // ListCrossConnectLocations. + // Example: `CyrusOne, Chandler, AZ` + LocationName *string `mandatory:"true" json:"locationName"` + + // The port speed for this cross-connect. To get a list of the available port speeds, see + // ListCrossconnectPortSpeedShapes. + // Example: `10 Gbps` + PortSpeedShapeName *string `mandatory:"true" json:"portSpeedShapeName"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect group to put this cross-connect in. + CrossConnectGroupId *string `mandatory:"false" json:"crossConnectGroupId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // If you already have an existing cross-connect or cross-connect group at this FastConnect + // location, and you want this new cross-connect to be on a different router (for the + // purposes of redundancy), provide the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of that existing cross-connect or + // cross-connect group. + FarCrossConnectOrCrossConnectGroupId *string `mandatory:"false" json:"farCrossConnectOrCrossConnectGroupId"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // If you already have an existing cross-connect or cross-connect group at this FastConnect + // location, and you want this new cross-connect to be on the same router, provide the + // OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of that existing cross-connect or cross-connect group. + NearCrossConnectOrCrossConnectGroupId *string `mandatory:"false" json:"nearCrossConnectOrCrossConnectGroupId"` + + // A reference name or identifier for the physical fiber connection that this cross-connect + // uses. + CustomerReferenceName *string `mandatory:"false" json:"customerReferenceName"` + + MacsecProperties *CreateMacsecProperties `mandatory:"false" json:"macsecProperties"` + + // The name of the FastConnect device where this cross-connect is installed. + OciPhysicalDeviceName *string `mandatory:"false" json:"ociPhysicalDeviceName"` + + // The name of the FastConnect interface where this cross-connect is installed. + InterfaceName *string `mandatory:"false" json:"interfaceName"` +} + +func (m CreateCrossConnectDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateCrossConnectDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cross_connect_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cross_connect_group_details.go new file mode 100644 index 000000000..dd9e47237 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cross_connect_group_details.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateCrossConnectGroupDetails The representation of CreateCrossConnectGroupDetails +type CreateCrossConnectGroupDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the cross-connect group. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // A reference name or identifier for the physical fiber connection that this cross-connect + // group uses. + CustomerReferenceName *string `mandatory:"false" json:"customerReferenceName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + MacsecProperties *CreateMacsecProperties `mandatory:"false" json:"macsecProperties"` +} + +func (m CreateCrossConnectGroupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateCrossConnectGroupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cross_connect_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cross_connect_group_request_response.go new file mode 100644 index 000000000..21b3b5c94 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cross_connect_group_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateCrossConnectGroupRequest wrapper for the CreateCrossConnectGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateCrossConnectGroup.go.html to see an example of how to use CreateCrossConnectGroupRequest. +type CreateCrossConnectGroupRequest struct { + + // Details to create a CrossConnectGroup + CreateCrossConnectGroupDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateCrossConnectGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateCrossConnectGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateCrossConnectGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateCrossConnectGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateCrossConnectGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateCrossConnectGroupResponse wrapper for the CreateCrossConnectGroup operation +type CreateCrossConnectGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CrossConnectGroup instance + CrossConnectGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateCrossConnectGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateCrossConnectGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cross_connect_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cross_connect_request_response.go new file mode 100644 index 000000000..0f65f0cfe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_cross_connect_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateCrossConnectRequest wrapper for the CreateCrossConnect operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateCrossConnect.go.html to see an example of how to use CreateCrossConnectRequest. +type CreateCrossConnectRequest struct { + + // Details to create a CrossConnect + CreateCrossConnectDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateCrossConnectRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateCrossConnectRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateCrossConnectRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateCrossConnectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateCrossConnectRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateCrossConnectResponse wrapper for the CreateCrossConnect operation +type CreateCrossConnectResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CrossConnect instance + CrossConnect `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateCrossConnectResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateCrossConnectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dedicated_capacity_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dedicated_capacity_source_details.go new file mode 100644 index 000000000..503dfa67c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dedicated_capacity_source_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDedicatedCapacitySourceDetails A capacity source of bare metal hosts that is dedicated to a customer. +type CreateDedicatedCapacitySourceDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment of this capacity source. + CompartmentId *string `mandatory:"false" json:"compartmentId"` +} + +func (m CreateDedicatedCapacitySourceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDedicatedCapacitySourceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateDedicatedCapacitySourceDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateDedicatedCapacitySourceDetails CreateDedicatedCapacitySourceDetails + s := struct { + DiscriminatorParam string `json:"capacityType"` + MarshalTypeCreateDedicatedCapacitySourceDetails + }{ + "DEDICATED", + (MarshalTypeCreateDedicatedCapacitySourceDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dedicated_vm_host_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dedicated_vm_host_details.go new file mode 100644 index 000000000..b2564a52d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dedicated_vm_host_details.go @@ -0,0 +1,137 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDedicatedVmHostDetails The details for creating a new dedicated virtual machine host. +type CreateDedicatedVmHostDetails struct { + + // The availability domain of the dedicated virtual machine host. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The dedicated virtual machine host shape. The shape determines the number of CPUs and + // other resources available for VM instances launched on the dedicated virtual machine host. + DedicatedVmHostShape *string `mandatory:"true" json:"dedicatedVmHostShape"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The fault domain for the dedicated virtual machine host's assigned instances. + // For more information, see Fault Domains (https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm#fault). + // If you do not specify the fault domain, the system selects one for you. To change the fault domain for a dedicated virtual machine host, + // delete it and create a new dedicated virtual machine host in the preferred fault domain. + // To get a list of fault domains, use the `ListFaultDomains` operation in + // the Identity and Access Management Service API (https://docs.oracle.com/iaas/api/#/en/identity/20160918/). + // Example: `FAULT-DOMAIN-1` + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + PlacementConstraintDetails PlacementConstraintDetails `mandatory:"false" json:"placementConstraintDetails"` + + // The capacity configuration selected to be configured for the Dedicated Virtual Machine host. + // Run ListDedicatedVmHostShapes API first to see the capacity configuration options. + CapacityConfig *string `mandatory:"false" json:"capacityConfig"` + + // Specifies if the Dedicated Virtual Machine Host (DVMH) is restricted to running only Confidential VMs. If `true`, only Confidential VMs can be launched. If `false`, Confidential VMs cannot be launched. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` +} + +func (m CreateDedicatedVmHostDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDedicatedVmHostDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateDedicatedVmHostDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FaultDomain *string `json:"faultDomain"` + FreeformTags map[string]string `json:"freeformTags"` + PlacementConstraintDetails placementconstraintdetails `json:"placementConstraintDetails"` + CapacityConfig *string `json:"capacityConfig"` + IsMemoryEncryptionEnabled *bool `json:"isMemoryEncryptionEnabled"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + DedicatedVmHostShape *string `json:"dedicatedVmHostShape"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FaultDomain = model.FaultDomain + + m.FreeformTags = model.FreeformTags + + nn, e = model.PlacementConstraintDetails.UnmarshalPolymorphicJSON(model.PlacementConstraintDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.PlacementConstraintDetails = nn.(PlacementConstraintDetails) + } else { + m.PlacementConstraintDetails = nil + } + + m.CapacityConfig = model.CapacityConfig + + m.IsMemoryEncryptionEnabled = model.IsMemoryEncryptionEnabled + + m.AvailabilityDomain = model.AvailabilityDomain + + m.CompartmentId = model.CompartmentId + + m.DedicatedVmHostShape = model.DedicatedVmHostShape + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dedicated_vm_host_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dedicated_vm_host_request_response.go new file mode 100644 index 000000000..9bf749f7a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dedicated_vm_host_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateDedicatedVmHostRequest wrapper for the CreateDedicatedVmHost operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDedicatedVmHost.go.html to see an example of how to use CreateDedicatedVmHostRequest. +type CreateDedicatedVmHostRequest struct { + + // The details for creating a new dedicated virtual machine host. + CreateDedicatedVmHostDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateDedicatedVmHostRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateDedicatedVmHostRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateDedicatedVmHostRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateDedicatedVmHostRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateDedicatedVmHostRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateDedicatedVmHostResponse wrapper for the CreateDedicatedVmHost operation +type CreateDedicatedVmHostResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DedicatedVmHost instance + DedicatedVmHost `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateDedicatedVmHostResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateDedicatedVmHostResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dhcp_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dhcp_details.go new file mode 100644 index 000000000..0a5fd39e5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dhcp_details.go @@ -0,0 +1,162 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDhcpDetails The representation of CreateDhcpDetails +type CreateDhcpDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the set of DHCP options. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A set of DHCP options. + Options []DhcpOption `mandatory:"true" json:"options"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN the set of DHCP options belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The search domain name type of DHCP options + DomainNameType CreateDhcpDetailsDomainNameTypeEnum `mandatory:"false" json:"domainNameType,omitempty"` +} + +func (m CreateDhcpDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDhcpDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCreateDhcpDetailsDomainNameTypeEnum(string(m.DomainNameType)); !ok && m.DomainNameType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DomainNameType: %s. Supported values are: %s.", m.DomainNameType, strings.Join(GetCreateDhcpDetailsDomainNameTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateDhcpDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + DomainNameType CreateDhcpDetailsDomainNameTypeEnum `json:"domainNameType"` + CompartmentId *string `json:"compartmentId"` + Options []dhcpoption `json:"options"` + VcnId *string `json:"vcnId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.DomainNameType = model.DomainNameType + + m.CompartmentId = model.CompartmentId + + m.Options = make([]DhcpOption, len(model.Options)) + for i, n := range model.Options { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Options[i] = nn.(DhcpOption) + } else { + m.Options[i] = nil + } + } + m.VcnId = model.VcnId + + return +} + +// CreateDhcpDetailsDomainNameTypeEnum Enum with underlying type: string +type CreateDhcpDetailsDomainNameTypeEnum string + +// Set of constants representing the allowable values for CreateDhcpDetailsDomainNameTypeEnum +const ( + CreateDhcpDetailsDomainNameTypeSubnetDomain CreateDhcpDetailsDomainNameTypeEnum = "SUBNET_DOMAIN" + CreateDhcpDetailsDomainNameTypeVcnDomain CreateDhcpDetailsDomainNameTypeEnum = "VCN_DOMAIN" + CreateDhcpDetailsDomainNameTypeCustomDomain CreateDhcpDetailsDomainNameTypeEnum = "CUSTOM_DOMAIN" +) + +var mappingCreateDhcpDetailsDomainNameTypeEnum = map[string]CreateDhcpDetailsDomainNameTypeEnum{ + "SUBNET_DOMAIN": CreateDhcpDetailsDomainNameTypeSubnetDomain, + "VCN_DOMAIN": CreateDhcpDetailsDomainNameTypeVcnDomain, + "CUSTOM_DOMAIN": CreateDhcpDetailsDomainNameTypeCustomDomain, +} + +var mappingCreateDhcpDetailsDomainNameTypeEnumLowerCase = map[string]CreateDhcpDetailsDomainNameTypeEnum{ + "subnet_domain": CreateDhcpDetailsDomainNameTypeSubnetDomain, + "vcn_domain": CreateDhcpDetailsDomainNameTypeVcnDomain, + "custom_domain": CreateDhcpDetailsDomainNameTypeCustomDomain, +} + +// GetCreateDhcpDetailsDomainNameTypeEnumValues Enumerates the set of values for CreateDhcpDetailsDomainNameTypeEnum +func GetCreateDhcpDetailsDomainNameTypeEnumValues() []CreateDhcpDetailsDomainNameTypeEnum { + values := make([]CreateDhcpDetailsDomainNameTypeEnum, 0) + for _, v := range mappingCreateDhcpDetailsDomainNameTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateDhcpDetailsDomainNameTypeEnumStringValues Enumerates the set of values in String for CreateDhcpDetailsDomainNameTypeEnum +func GetCreateDhcpDetailsDomainNameTypeEnumStringValues() []string { + return []string{ + "SUBNET_DOMAIN", + "VCN_DOMAIN", + "CUSTOM_DOMAIN", + } +} + +// GetMappingCreateDhcpDetailsDomainNameTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateDhcpDetailsDomainNameTypeEnum(val string) (CreateDhcpDetailsDomainNameTypeEnum, bool) { + enum, ok := mappingCreateDhcpDetailsDomainNameTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dhcp_options_request_response.go new file mode 100644 index 000000000..567e26484 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_dhcp_options_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateDhcpOptionsRequest wrapper for the CreateDhcpOptions operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDhcpOptions.go.html to see an example of how to use CreateDhcpOptionsRequest. +type CreateDhcpOptionsRequest struct { + + // Request object for creating a new set of DHCP options. + CreateDhcpDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateDhcpOptionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateDhcpOptionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateDhcpOptionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateDhcpOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateDhcpOptionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateDhcpOptionsResponse wrapper for the CreateDhcpOptions operation +type CreateDhcpOptionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DhcpOptions instance + DhcpOptions `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateDhcpOptionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateDhcpOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_attachment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_attachment_details.go new file mode 100644 index 000000000..3d5847e5a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_attachment_details.go @@ -0,0 +1,125 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDrgAttachmentDetails The representation of CreateDrgAttachmentDetails +type CreateDrgAttachmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"true" json:"drgId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table that is assigned to this attachment. + // The DRG route table manages traffic inside the DRG. + DrgRouteTableId *string `mandatory:"false" json:"drgRouteTableId"` + + NetworkDetails DrgAttachmentNetworkCreateDetails `mandatory:"false" json:"networkDetails"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table used by the DRG attachment. + // If you don't specify a route table here, the DRG attachment is created without an associated route + // table. The Networking service does NOT automatically associate the attached VCN's default route table + // with the DRG attachment. + // For information about why you would associate a route table with a DRG attachment, see: + // * Transit Routing: Access to Multiple VCNs in Same Region (https://docs.oracle.com/iaas/Content/Network/Tasks/transitrouting.htm) + // * Transit Routing: Private Access to Oracle Services (https://docs.oracle.com/iaas/Content/Network/Tasks/transitroutingoracleservices.htm) + // This field is deprecated. Instead, use the networkDetails field to specify the VCN route table for this attachment. + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + // This field is deprecated. Instead, use the `networkDetails` field to specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the attached resource. + VcnId *string `mandatory:"false" json:"vcnId"` +} + +func (m CreateDrgAttachmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDrgAttachmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateDrgAttachmentDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + DrgRouteTableId *string `json:"drgRouteTableId"` + NetworkDetails drgattachmentnetworkcreatedetails `json:"networkDetails"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + FreeformTags map[string]string `json:"freeformTags"` + RouteTableId *string `json:"routeTableId"` + VcnId *string `json:"vcnId"` + DrgId *string `json:"drgId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DisplayName = model.DisplayName + + m.DrgRouteTableId = model.DrgRouteTableId + + nn, e = model.NetworkDetails.UnmarshalPolymorphicJSON(model.NetworkDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.NetworkDetails = nn.(DrgAttachmentNetworkCreateDetails) + } else { + m.NetworkDetails = nil + } + + m.DefinedTags = model.DefinedTags + + m.FreeformTags = model.FreeformTags + + m.RouteTableId = model.RouteTableId + + m.VcnId = model.VcnId + + m.DrgId = model.DrgId + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_attachment_request_response.go new file mode 100644 index 000000000..8b75999c7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_attachment_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateDrgAttachmentRequest wrapper for the CreateDrgAttachment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDrgAttachment.go.html to see an example of how to use CreateDrgAttachmentRequest. +type CreateDrgAttachmentRequest struct { + + // Details for creating a `DrgAttachment`. + CreateDrgAttachmentDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateDrgAttachmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateDrgAttachmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateDrgAttachmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateDrgAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateDrgAttachmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateDrgAttachmentResponse wrapper for the CreateDrgAttachment operation +type CreateDrgAttachmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DrgAttachment instance + DrgAttachment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateDrgAttachmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateDrgAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_details.go new file mode 100644 index 000000000..c65d46b19 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_details.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDrgDetails The representation of CreateDrgDetails +type CreateDrgDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the DRG. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateDrgDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDrgDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_request_response.go new file mode 100644 index 000000000..fb3ba3406 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateDrgRequest wrapper for the CreateDrg operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDrg.go.html to see an example of how to use CreateDrgRequest. +type CreateDrgRequest struct { + + // Details for creating a DRG. + CreateDrgDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateDrgRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateDrgRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateDrgRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateDrgRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateDrgRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateDrgResponse wrapper for the CreateDrg operation +type CreateDrgResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Drg instance + Drg `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateDrgResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateDrgResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_route_distribution_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_route_distribution_details.go new file mode 100644 index 000000000..6ad3da576 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_route_distribution_details.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDrgRouteDistributionDetails Details used to create an import route distribution. You can't create a new export route distribution. +type CreateDrgRouteDistributionDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG the DRG route table belongs to. + DrgId *string `mandatory:"true" json:"drgId"` + + // States that this distribution defines how routes get imported into route tables. + DistributionType CreateDrgRouteDistributionDetailsDistributionTypeEnum `mandatory:"true" json:"distributionType"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateDrgRouteDistributionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDrgRouteDistributionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCreateDrgRouteDistributionDetailsDistributionTypeEnum(string(m.DistributionType)); !ok && m.DistributionType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DistributionType: %s. Supported values are: %s.", m.DistributionType, strings.Join(GetCreateDrgRouteDistributionDetailsDistributionTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateDrgRouteDistributionDetailsDistributionTypeEnum Enum with underlying type: string +type CreateDrgRouteDistributionDetailsDistributionTypeEnum string + +// Set of constants representing the allowable values for CreateDrgRouteDistributionDetailsDistributionTypeEnum +const ( + CreateDrgRouteDistributionDetailsDistributionTypeImport CreateDrgRouteDistributionDetailsDistributionTypeEnum = "IMPORT" +) + +var mappingCreateDrgRouteDistributionDetailsDistributionTypeEnum = map[string]CreateDrgRouteDistributionDetailsDistributionTypeEnum{ + "IMPORT": CreateDrgRouteDistributionDetailsDistributionTypeImport, +} + +var mappingCreateDrgRouteDistributionDetailsDistributionTypeEnumLowerCase = map[string]CreateDrgRouteDistributionDetailsDistributionTypeEnum{ + "import": CreateDrgRouteDistributionDetailsDistributionTypeImport, +} + +// GetCreateDrgRouteDistributionDetailsDistributionTypeEnumValues Enumerates the set of values for CreateDrgRouteDistributionDetailsDistributionTypeEnum +func GetCreateDrgRouteDistributionDetailsDistributionTypeEnumValues() []CreateDrgRouteDistributionDetailsDistributionTypeEnum { + values := make([]CreateDrgRouteDistributionDetailsDistributionTypeEnum, 0) + for _, v := range mappingCreateDrgRouteDistributionDetailsDistributionTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateDrgRouteDistributionDetailsDistributionTypeEnumStringValues Enumerates the set of values in String for CreateDrgRouteDistributionDetailsDistributionTypeEnum +func GetCreateDrgRouteDistributionDetailsDistributionTypeEnumStringValues() []string { + return []string{ + "IMPORT", + } +} + +// GetMappingCreateDrgRouteDistributionDetailsDistributionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateDrgRouteDistributionDetailsDistributionTypeEnum(val string) (CreateDrgRouteDistributionDetailsDistributionTypeEnum, bool) { + enum, ok := mappingCreateDrgRouteDistributionDetailsDistributionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_route_distribution_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_route_distribution_request_response.go new file mode 100644 index 000000000..70abe10b3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_route_distribution_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateDrgRouteDistributionRequest wrapper for the CreateDrgRouteDistribution operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDrgRouteDistribution.go.html to see an example of how to use CreateDrgRouteDistributionRequest. +type CreateDrgRouteDistributionRequest struct { + + // Details for creating a route distribution. + CreateDrgRouteDistributionDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateDrgRouteDistributionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateDrgRouteDistributionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateDrgRouteDistributionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateDrgRouteDistributionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateDrgRouteDistributionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateDrgRouteDistributionResponse wrapper for the CreateDrgRouteDistribution operation +type CreateDrgRouteDistributionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DrgRouteDistribution instance + DrgRouteDistribution `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateDrgRouteDistributionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateDrgRouteDistributionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_route_table_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_route_table_details.go new file mode 100644 index 000000000..2abfed926 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_route_table_details.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDrgRouteTableDetails Details used in a request to create a DRG route table. +type CreateDrgRouteTableDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG the DRG route table belongs to. + DrgId *string `mandatory:"true" json:"drgId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the import route distribution used to specify how incoming route advertisements through + // referenced attachments are inserted into the DRG route table. + ImportDrgRouteDistributionId *string `mandatory:"false" json:"importDrgRouteDistributionId"` + + // If you want traffic to be routed using ECMP across your virtual circuits or IPSec tunnels to + // your on-premises networks, enable ECMP on the DRG route table. + IsEcmpEnabled *bool `mandatory:"false" json:"isEcmpEnabled"` +} + +func (m CreateDrgRouteTableDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDrgRouteTableDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_route_table_request_response.go new file mode 100644 index 000000000..59cfa8738 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_drg_route_table_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateDrgRouteTableRequest wrapper for the CreateDrgRouteTable operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateDrgRouteTable.go.html to see an example of how to use CreateDrgRouteTableRequest. +type CreateDrgRouteTableRequest struct { + + // Details for creating a DRG route table. + CreateDrgRouteTableDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateDrgRouteTableRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateDrgRouteTableRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateDrgRouteTableRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateDrgRouteTableRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateDrgRouteTableRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateDrgRouteTableResponse wrapper for the CreateDrgRouteTable operation +type CreateDrgRouteTableResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DrgRouteTable instance + DrgRouteTable `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateDrgRouteTableResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateDrgRouteTableResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_i_p_sec_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_i_p_sec_connection_request_response.go new file mode 100644 index 000000000..3fb696e92 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_i_p_sec_connection_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateIPSecConnectionRequest wrapper for the CreateIPSecConnection operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateIPSecConnection.go.html to see an example of how to use CreateIPSecConnectionRequest. +type CreateIPSecConnectionRequest struct { + + // Details for creating an `IPSecConnection`. + CreateIpSecConnectionDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateIPSecConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateIPSecConnectionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateIPSecConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateIPSecConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateIPSecConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateIPSecConnectionResponse wrapper for the CreateIPSecConnection operation +type CreateIPSecConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpSecConnection instance + IpSecConnection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateIPSecConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateIPSecConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_image_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_image_details.go new file mode 100644 index 000000000..89c47a9a1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_image_details.go @@ -0,0 +1,174 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateImageDetails Either instanceId or imageSourceDetails must be provided in addition to other required parameters. +type CreateImageDetails struct { + + // The OCID of the compartment you want the image to be created in. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name for the image. It does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // You cannot use a platform image name as a custom image name. + // Example: `My Oracle Linux image` + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + ImageSourceDetails ImageSourceDetails `mandatory:"false" json:"imageSourceDetails"` + + // The OCID of the instance you want to use as the basis for the image. + InstanceId *string `mandatory:"false" json:"instanceId"` + + // Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: + // * `NATIVE` - VM instances launch with iSCSI boot and VFIO devices. The default value for platform images. + // * `EMULATED` - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. + // * `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using VirtIO drivers. + // * `ACCELERATEDPV` - VM instances launch with accelerated paravirtualized networking type. + // * `CUSTOM` - VM instances launch with custom configuration settings specified in the `LaunchOptions` parameter. + LaunchMode CreateImageDetailsLaunchModeEnum `mandatory:"false" json:"launchMode,omitempty"` +} + +func (m CreateImageDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateImageDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCreateImageDetailsLaunchModeEnum(string(m.LaunchMode)); !ok && m.LaunchMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LaunchMode: %s. Supported values are: %s.", m.LaunchMode, strings.Join(GetCreateImageDetailsLaunchModeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateImageDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + ImageSourceDetails imagesourcedetails `json:"imageSourceDetails"` + InstanceId *string `json:"instanceId"` + LaunchMode CreateImageDetailsLaunchModeEnum `json:"launchMode"` + CompartmentId *string `json:"compartmentId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + nn, e = model.ImageSourceDetails.UnmarshalPolymorphicJSON(model.ImageSourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ImageSourceDetails = nn.(ImageSourceDetails) + } else { + m.ImageSourceDetails = nil + } + + m.InstanceId = model.InstanceId + + m.LaunchMode = model.LaunchMode + + m.CompartmentId = model.CompartmentId + + return +} + +// CreateImageDetailsLaunchModeEnum Enum with underlying type: string +type CreateImageDetailsLaunchModeEnum string + +// Set of constants representing the allowable values for CreateImageDetailsLaunchModeEnum +const ( + CreateImageDetailsLaunchModeNative CreateImageDetailsLaunchModeEnum = "NATIVE" + CreateImageDetailsLaunchModeEmulated CreateImageDetailsLaunchModeEnum = "EMULATED" + CreateImageDetailsLaunchModeParavirtualized CreateImageDetailsLaunchModeEnum = "PARAVIRTUALIZED" + CreateImageDetailsLaunchModeAcceleratedpv CreateImageDetailsLaunchModeEnum = "ACCELERATEDPV" + CreateImageDetailsLaunchModeCustom CreateImageDetailsLaunchModeEnum = "CUSTOM" +) + +var mappingCreateImageDetailsLaunchModeEnum = map[string]CreateImageDetailsLaunchModeEnum{ + "NATIVE": CreateImageDetailsLaunchModeNative, + "EMULATED": CreateImageDetailsLaunchModeEmulated, + "PARAVIRTUALIZED": CreateImageDetailsLaunchModeParavirtualized, + "ACCELERATEDPV": CreateImageDetailsLaunchModeAcceleratedpv, + "CUSTOM": CreateImageDetailsLaunchModeCustom, +} + +var mappingCreateImageDetailsLaunchModeEnumLowerCase = map[string]CreateImageDetailsLaunchModeEnum{ + "native": CreateImageDetailsLaunchModeNative, + "emulated": CreateImageDetailsLaunchModeEmulated, + "paravirtualized": CreateImageDetailsLaunchModeParavirtualized, + "acceleratedpv": CreateImageDetailsLaunchModeAcceleratedpv, + "custom": CreateImageDetailsLaunchModeCustom, +} + +// GetCreateImageDetailsLaunchModeEnumValues Enumerates the set of values for CreateImageDetailsLaunchModeEnum +func GetCreateImageDetailsLaunchModeEnumValues() []CreateImageDetailsLaunchModeEnum { + values := make([]CreateImageDetailsLaunchModeEnum, 0) + for _, v := range mappingCreateImageDetailsLaunchModeEnum { + values = append(values, v) + } + return values +} + +// GetCreateImageDetailsLaunchModeEnumStringValues Enumerates the set of values in String for CreateImageDetailsLaunchModeEnum +func GetCreateImageDetailsLaunchModeEnumStringValues() []string { + return []string{ + "NATIVE", + "EMULATED", + "PARAVIRTUALIZED", + "ACCELERATEDPV", + "CUSTOM", + } +} + +// GetMappingCreateImageDetailsLaunchModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateImageDetailsLaunchModeEnum(val string) (CreateImageDetailsLaunchModeEnum, bool) { + enum, ok := mappingCreateImageDetailsLaunchModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_image_request_response.go new file mode 100644 index 000000000..ce89a92d8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_image_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateImageRequest wrapper for the CreateImage operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateImage.go.html to see an example of how to use CreateImageRequest. +type CreateImageRequest struct { + + // Image creation details + CreateImageDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateImageRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateImageRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateImageRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateImageRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateImageRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateImageResponse wrapper for the CreateImage operation +type CreateImageResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Image instance + Image `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateImageResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateImageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_base.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_base.go new file mode 100644 index 000000000..f9666678d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_base.go @@ -0,0 +1,175 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateInstanceConfigurationBase Creation details for an instance configuration. +type CreateInstanceConfigurationBase interface { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + // containing the instance configuration. + GetCompartmentId() *string + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + GetDefinedTags() map[string]map[string]interface{} + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + GetDisplayName() *string + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + GetFreeformTags() map[string]string +} + +type createinstanceconfigurationbase struct { + JsonData []byte + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + DisplayName *string `mandatory:"false" json:"displayName"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + Source string `json:"source"` +} + +// UnmarshalJSON unmarshals json +func (m *createinstanceconfigurationbase) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercreateinstanceconfigurationbase createinstanceconfigurationbase + s := struct { + Model Unmarshalercreateinstanceconfigurationbase + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CompartmentId = s.Model.CompartmentId + m.DefinedTags = s.Model.DefinedTags + m.DisplayName = s.Model.DisplayName + m.FreeformTags = s.Model.FreeformTags + m.Source = s.Model.Source + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *createinstanceconfigurationbase) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Source { + case "NONE": + mm := CreateInstanceConfigurationDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INSTANCE": + mm := CreateInstanceConfigurationFromInstanceDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for CreateInstanceConfigurationBase: %s.", m.Source) + return *m, nil + } +} + +// GetDefinedTags returns DefinedTags +func (m createinstanceconfigurationbase) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetDisplayName returns DisplayName +func (m createinstanceconfigurationbase) GetDisplayName() *string { + return m.DisplayName +} + +// GetFreeformTags returns FreeformTags +func (m createinstanceconfigurationbase) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetCompartmentId returns CompartmentId +func (m createinstanceconfigurationbase) GetCompartmentId() *string { + return m.CompartmentId +} + +func (m createinstanceconfigurationbase) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m createinstanceconfigurationbase) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateInstanceConfigurationBaseSourceEnum Enum with underlying type: string +type CreateInstanceConfigurationBaseSourceEnum string + +// Set of constants representing the allowable values for CreateInstanceConfigurationBaseSourceEnum +const ( + CreateInstanceConfigurationBaseSourceNone CreateInstanceConfigurationBaseSourceEnum = "NONE" + CreateInstanceConfigurationBaseSourceInstance CreateInstanceConfigurationBaseSourceEnum = "INSTANCE" +) + +var mappingCreateInstanceConfigurationBaseSourceEnum = map[string]CreateInstanceConfigurationBaseSourceEnum{ + "NONE": CreateInstanceConfigurationBaseSourceNone, + "INSTANCE": CreateInstanceConfigurationBaseSourceInstance, +} + +var mappingCreateInstanceConfigurationBaseSourceEnumLowerCase = map[string]CreateInstanceConfigurationBaseSourceEnum{ + "none": CreateInstanceConfigurationBaseSourceNone, + "instance": CreateInstanceConfigurationBaseSourceInstance, +} + +// GetCreateInstanceConfigurationBaseSourceEnumValues Enumerates the set of values for CreateInstanceConfigurationBaseSourceEnum +func GetCreateInstanceConfigurationBaseSourceEnumValues() []CreateInstanceConfigurationBaseSourceEnum { + values := make([]CreateInstanceConfigurationBaseSourceEnum, 0) + for _, v := range mappingCreateInstanceConfigurationBaseSourceEnum { + values = append(values, v) + } + return values +} + +// GetCreateInstanceConfigurationBaseSourceEnumStringValues Enumerates the set of values in String for CreateInstanceConfigurationBaseSourceEnum +func GetCreateInstanceConfigurationBaseSourceEnumStringValues() []string { + return []string{ + "NONE", + "INSTANCE", + } +} + +// GetMappingCreateInstanceConfigurationBaseSourceEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateInstanceConfigurationBaseSourceEnum(val string) (CreateInstanceConfigurationBaseSourceEnum, bool) { + enum, ok := mappingCreateInstanceConfigurationBaseSourceEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_details.go new file mode 100644 index 000000000..4607e11d8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_details.go @@ -0,0 +1,133 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateInstanceConfigurationDetails Details for creating an instance configuration by providing a list of configuration settings. +type CreateInstanceConfigurationDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + // containing the instance configuration. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + InstanceDetails InstanceConfigurationInstanceDetails `mandatory:"true" json:"instanceDetails"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +// GetCompartmentId returns CompartmentId +func (m CreateInstanceConfigurationDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDefinedTags returns DefinedTags +func (m CreateInstanceConfigurationDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetDisplayName returns DisplayName +func (m CreateInstanceConfigurationDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetFreeformTags returns FreeformTags +func (m CreateInstanceConfigurationDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +func (m CreateInstanceConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateInstanceConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateInstanceConfigurationDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateInstanceConfigurationDetails CreateInstanceConfigurationDetails + s := struct { + DiscriminatorParam string `json:"source"` + MarshalTypeCreateInstanceConfigurationDetails + }{ + "NONE", + (MarshalTypeCreateInstanceConfigurationDetails)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *CreateInstanceConfigurationDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + CompartmentId *string `json:"compartmentId"` + InstanceDetails instanceconfigurationinstancedetails `json:"instanceDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.CompartmentId = model.CompartmentId + + nn, e = model.InstanceDetails.UnmarshalPolymorphicJSON(model.InstanceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.InstanceDetails = nn.(InstanceConfigurationInstanceDetails) + } else { + m.InstanceDetails = nil + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_from_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_from_instance_details.go new file mode 100644 index 000000000..a897b60c9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_from_instance_details.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateInstanceConfigurationFromInstanceDetails Details for creating an instance configuration using an existing instance as a template. +type CreateInstanceConfigurationFromInstanceDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + // containing the instance configuration. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance to use to create the + // instance configuration. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +// GetCompartmentId returns CompartmentId +func (m CreateInstanceConfigurationFromInstanceDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDefinedTags returns DefinedTags +func (m CreateInstanceConfigurationFromInstanceDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetDisplayName returns DisplayName +func (m CreateInstanceConfigurationFromInstanceDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetFreeformTags returns FreeformTags +func (m CreateInstanceConfigurationFromInstanceDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +func (m CreateInstanceConfigurationFromInstanceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateInstanceConfigurationFromInstanceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateInstanceConfigurationFromInstanceDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateInstanceConfigurationFromInstanceDetails CreateInstanceConfigurationFromInstanceDetails + s := struct { + DiscriminatorParam string `json:"source"` + MarshalTypeCreateInstanceConfigurationFromInstanceDetails + }{ + "INSTANCE", + (MarshalTypeCreateInstanceConfigurationFromInstanceDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_request_response.go new file mode 100644 index 000000000..30d25c27a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_configuration_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateInstanceConfigurationRequest wrapper for the CreateInstanceConfiguration operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateInstanceConfiguration.go.html to see an example of how to use CreateInstanceConfigurationRequest. +type CreateInstanceConfigurationRequest struct { + + // Instance configuration creation details + CreateInstanceConfiguration CreateInstanceConfigurationBase `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateInstanceConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateInstanceConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateInstanceConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateInstanceConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateInstanceConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateInstanceConfigurationResponse wrapper for the CreateInstanceConfiguration operation +type CreateInstanceConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstanceConfiguration instance + InstanceConfiguration `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateInstanceConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateInstanceConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_console_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_console_connection_details.go new file mode 100644 index 000000000..8cc441613 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_console_connection_details.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateInstanceConsoleConnectionDetails The details for creating a instance console connection. +// The instance console connection is created in the same compartment as the instance. +type CreateInstanceConsoleConnectionDetails struct { + + // The OCID of the instance to create the console connection to. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The SSH public key used to authenticate the console connection. + PublicKey *string `mandatory:"true" json:"publicKey"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateInstanceConsoleConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateInstanceConsoleConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_console_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_console_connection_request_response.go new file mode 100644 index 000000000..537f8263a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_console_connection_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateInstanceConsoleConnectionRequest wrapper for the CreateInstanceConsoleConnection operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateInstanceConsoleConnection.go.html to see an example of how to use CreateInstanceConsoleConnectionRequest. +type CreateInstanceConsoleConnectionRequest struct { + + // Request object for creating an InstanceConsoleConnection + CreateInstanceConsoleConnectionDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateInstanceConsoleConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateInstanceConsoleConnectionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateInstanceConsoleConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateInstanceConsoleConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateInstanceConsoleConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateInstanceConsoleConnectionResponse wrapper for the CreateInstanceConsoleConnection operation +type CreateInstanceConsoleConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstanceConsoleConnection instance + InstanceConsoleConnection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateInstanceConsoleConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateInstanceConsoleConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_details.go new file mode 100644 index 000000000..f6284e758 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_details.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateInstancePoolDetails The data to create an instance pool. +type CreateInstancePoolDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the instance pool. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance configuration associated + // with the instance pool. + InstanceConfigurationId *string `mandatory:"true" json:"instanceConfigurationId"` + + // The placement configurations for the instance pool. Provide one placement configuration for + // each availability domain. + // To use the instance pool with a regional subnet, provide a placement configuration for + // each availability domain, and include the regional subnet in each placement + // configuration. + // To use compute cluster with instance pool, provide a single placement configuration. + PlacementConfigurations []CreateInstancePoolPlacementConfigurationDetails `mandatory:"true" json:"placementConfigurations"` + + // The number of instances that should be in the instance pool. + Size *int `mandatory:"true" json:"size"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The load balancers to attach to the instance pool. + LoadBalancers []AttachLoadBalancerDetails `mandatory:"false" json:"loadBalancers"` + + // A user-friendly formatter for the instance pool's instances. Instance displaynames follow the format. + // The formatter does not retroactively change instance's displaynames, only instance displaynames in the future follow the format + InstanceDisplayNameFormatter *string `mandatory:"false" json:"instanceDisplayNameFormatter"` + + // A user-friendly formatter for the instance pool's instances. Instance hostnames follow the format. + // The formatter does not retroactively change instance's hostnames, only instance hostnames in the future follow the format + InstanceHostnameFormatter *string `mandatory:"false" json:"instanceHostnameFormatter"` + + LifecycleManagement *InstancePoolLifecycleManagementDetails `mandatory:"false" json:"lifecycleManagement"` +} + +func (m CreateInstancePoolDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateInstancePoolDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_placement_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_placement_configuration_details.go new file mode 100644 index 000000000..a1940f5d8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_placement_configuration_details.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateInstancePoolPlacementConfigurationDetails The location for where an instance pool will place instances. +type CreateInstancePoolPlacementConfigurationDetails struct { + + // The availability domain to place instances. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the + // compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) that the instance will be created in. + // Make sure the compute cluster belongs to the same availability domain as specified in placement configuration otherwise the request will be rejected with 400. + // Once this field is set, it cannot be updated. Also any update to the availability domain in placement configuration will be blocked. + ComputeClusterId *string `mandatory:"false" json:"computeClusterId"` + + // The fault domains to place instances. + // If you don't provide any values, the system makes a best effort to distribute + // instances across all fault domains based on capacity. + // To distribute the instances evenly across selected fault domains, provide a + // set of fault domains. For example, you might want instances to be evenly + // distributed if your applications require high availability. + // To get a list of fault domains, use the + // ListFaultDomains operation + // in the Identity and Access Management Service API. + // Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` + FaultDomains []string `mandatory:"false" json:"faultDomains"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. This field is deprecated. + // Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. + PrimarySubnetId *string `mandatory:"false" json:"primarySubnetId"` + + PrimaryVnicSubnets *InstancePoolPlacementPrimarySubnet `mandatory:"false" json:"primaryVnicSubnets"` + + // The set of secondary VNIC data for instances in the pool. + SecondaryVnicSubnets []InstancePoolPlacementSecondaryVnicSubnet `mandatory:"false" json:"secondaryVnicSubnets"` +} + +func (m CreateInstancePoolPlacementConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateInstancePoolPlacementConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_request_response.go new file mode 100644 index 000000000..b9afacc06 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_instance_pool_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateInstancePoolRequest wrapper for the CreateInstancePool operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateInstancePool.go.html to see an example of how to use CreateInstancePoolRequest. +type CreateInstancePoolRequest struct { + + // Instance pool creation details + CreateInstancePoolDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateInstancePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateInstancePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateInstancePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateInstancePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateInstancePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateInstancePoolResponse wrapper for the CreateInstancePool operation +type CreateInstancePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstancePool instance + InstancePool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateInstancePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateInstancePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_internet_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_internet_gateway_details.go new file mode 100644 index 000000000..ce9fa592d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_internet_gateway_details.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateInternetGatewayDetails The representation of CreateInternetGatewayDetails +type CreateInternetGatewayDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the internet gateway. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Whether the gateway is enabled upon creation. + IsEnabled *bool `mandatory:"true" json:"isEnabled"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN the Internet Gateway is attached to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the Internet Gateway is using. + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m CreateInternetGatewayDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateInternetGatewayDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_internet_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_internet_gateway_request_response.go new file mode 100644 index 000000000..f4e56d88e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_internet_gateway_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateInternetGatewayRequest wrapper for the CreateInternetGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateInternetGateway.go.html to see an example of how to use CreateInternetGatewayRequest. +type CreateInternetGatewayRequest struct { + + // Details for creating a new internet gateway. + CreateInternetGatewayDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateInternetGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateInternetGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateInternetGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateInternetGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateInternetGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateInternetGatewayResponse wrapper for the CreateInternetGateway operation +type CreateInternetGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InternetGateway instance + InternetGateway `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateInternetGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateInternetGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_connection_details.go new file mode 100644 index 000000000..6e1155fbe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_connection_details.go @@ -0,0 +1,143 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateIpSecConnectionDetails The representation of CreateIpSecConnectionDetails +type CreateIpSecConnectionDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the IPSec connection. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cpe object. + CpeId *string `mandatory:"true" json:"cpeId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"true" json:"drgId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Your identifier for your CPE device. Can be either an IP address or a hostname (specifically, the + // fully qualified domain name (FQDN)). The type of identifier you provide here must correspond + // to the value for `cpeLocalIdentifierType`. + // If you don't provide a value, the `ipAddress` attribute for the Cpe + // object specified by `cpeId` is used as the `cpeLocalIdentifier`. + // For information about why you'd provide this value, see + // If Your CPE Is Behind a NAT Device (https://docs.oracle.com/iaas/Content/Network/Tasks/overviewIPsec.htm#nat). + // Example IP address: `10.0.3.3` + // Example hostname: `cpe.example.com` + CpeLocalIdentifier *string `mandatory:"false" json:"cpeLocalIdentifier"` + + // The type of identifier for your CPE device. The value you provide here must correspond to the value + // for `cpeLocalIdentifier`. + CpeLocalIdentifierType CreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum `mandatory:"false" json:"cpeLocalIdentifierType,omitempty"` + + // Static routes to the CPE. A static route's CIDR must not be a + // multicast address or class E address. + // Used for routing a given IPSec tunnel's traffic only if the tunnel + // is using static routing. If you configure at least one tunnel to use static routing, then + // you must provide at least one valid static route. If you configure both + // tunnels to use BGP dynamic routing, you can provide an empty list for the static routes. + // For more information, see the important note in IPSecConnection. + // The CIDR can be either IPv4 or IPv6. IPv6 addressing is supported for all commercial and government regions. + // See IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // Example: `10.0.1.0/24` + // Example: `2001:db8::/32` + StaticRoutes []string `mandatory:"false" json:"staticRoutes"` + + // Information for creating the individual tunnels in the IPSec connection. You can provide a + // maximum of 2 `tunnelConfiguration` objects in the array (one for each of the + // two tunnels). + TunnelConfiguration []CreateIpSecConnectionTunnelDetails `mandatory:"false" json:"tunnelConfiguration"` +} + +func (m CreateIpSecConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateIpSecConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum(string(m.CpeLocalIdentifierType)); !ok && m.CpeLocalIdentifierType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CpeLocalIdentifierType: %s. Supported values are: %s.", m.CpeLocalIdentifierType, strings.Join(GetCreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum Enum with underlying type: string +type CreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum string + +// Set of constants representing the allowable values for CreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum +const ( + CreateIpSecConnectionDetailsCpeLocalIdentifierTypeIpAddress CreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum = "IP_ADDRESS" + CreateIpSecConnectionDetailsCpeLocalIdentifierTypeHostname CreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum = "HOSTNAME" +) + +var mappingCreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum = map[string]CreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum{ + "IP_ADDRESS": CreateIpSecConnectionDetailsCpeLocalIdentifierTypeIpAddress, + "HOSTNAME": CreateIpSecConnectionDetailsCpeLocalIdentifierTypeHostname, +} + +var mappingCreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnumLowerCase = map[string]CreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum{ + "ip_address": CreateIpSecConnectionDetailsCpeLocalIdentifierTypeIpAddress, + "hostname": CreateIpSecConnectionDetailsCpeLocalIdentifierTypeHostname, +} + +// GetCreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnumValues Enumerates the set of values for CreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum +func GetCreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnumValues() []CreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum { + values := make([]CreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum, 0) + for _, v := range mappingCreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnumStringValues Enumerates the set of values in String for CreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum +func GetCreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnumStringValues() []string { + return []string{ + "IP_ADDRESS", + "HOSTNAME", + } +} + +// GetMappingCreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum(val string) (CreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum, bool) { + enum, ok := mappingCreateIpSecConnectionDetailsCpeLocalIdentifierTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_connection_tunnel_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_connection_tunnel_details.go new file mode 100644 index 000000000..fd5c3b768 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_connection_tunnel_details.go @@ -0,0 +1,277 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateIpSecConnectionTunnelDetails The representation of CreateIpSecConnectionTunnelDetails +type CreateIpSecConnectionTunnelDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The type of routing to use for this tunnel (BGP dynamic routing, static routing, or policy-based routing). + Routing CreateIpSecConnectionTunnelDetailsRoutingEnum `mandatory:"false" json:"routing,omitempty"` + + // Internet Key Exchange protocol version. + IkeVersion CreateIpSecConnectionTunnelDetailsIkeVersionEnum `mandatory:"false" json:"ikeVersion,omitempty"` + + // The shared secret (pre-shared key) to use for the IPSec tunnel. Only numbers, letters, and + // spaces are allowed. If you don't provide a value, + // Oracle generates a value for you. You can specify your own shared secret later if + // you like with UpdateIPSecConnectionTunnelSharedSecret. + SharedSecret *string `mandatory:"false" json:"sharedSecret"` + + BgpSessionConfig *CreateIpSecTunnelBgpSessionDetails `mandatory:"false" json:"bgpSessionConfig"` + + // Indicates whether the Oracle end of the IPSec connection is able to initiate starting up the IPSec tunnel. + OracleInitiation CreateIpSecConnectionTunnelDetailsOracleInitiationEnum `mandatory:"false" json:"oracleInitiation,omitempty"` + + // By default (the `AUTO` setting), IKE sends packets with a source and destination port set to 500, + // and when it detects that the port used to forward packets has changed (most likely because a NAT device + // is between the CPE device and the Oracle VPN headend) it will try to negotiate the use of NAT-T. + // The `ENABLED` option sets the IKE protocol to use port 4500 instead of 500 and forces encapsulating traffic with the ESP protocol inside UDP packets. + // The `DISABLED` option directs IKE to completely refuse to negotiate NAT-T + // even if it senses there may be a NAT device in use. + NatTranslationEnabled CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum `mandatory:"false" json:"natTranslationEnabled,omitempty"` + + PhaseOneConfig *PhaseOneConfigDetails `mandatory:"false" json:"phaseOneConfig"` + + PhaseTwoConfig *PhaseTwoConfigDetails `mandatory:"false" json:"phaseTwoConfig"` + + DpdConfig *DpdConfig `mandatory:"false" json:"dpdConfig"` + + // The headend IP that you can choose on the Oracle side to terminate your private IPSec tunnel. + OracleTunnelIp *string `mandatory:"false" json:"oracleTunnelIp"` + + // The list of virtual circuit OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)s over which your network can reach this tunnel. + AssociatedVirtualCircuits []string `mandatory:"false" json:"associatedVirtualCircuits"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table assigned to this attachment. + // The DRG route table manages traffic inside the DRG. + DrgRouteTableId *string `mandatory:"false" json:"drgRouteTableId"` + + EncryptionDomainConfig *CreateIpSecTunnelEncryptionDomainDetails `mandatory:"false" json:"encryptionDomainConfig"` +} + +func (m CreateIpSecConnectionTunnelDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateIpSecConnectionTunnelDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCreateIpSecConnectionTunnelDetailsRoutingEnum(string(m.Routing)); !ok && m.Routing != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Routing: %s. Supported values are: %s.", m.Routing, strings.Join(GetCreateIpSecConnectionTunnelDetailsRoutingEnumStringValues(), ","))) + } + if _, ok := GetMappingCreateIpSecConnectionTunnelDetailsIkeVersionEnum(string(m.IkeVersion)); !ok && m.IkeVersion != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IkeVersion: %s. Supported values are: %s.", m.IkeVersion, strings.Join(GetCreateIpSecConnectionTunnelDetailsIkeVersionEnumStringValues(), ","))) + } + if _, ok := GetMappingCreateIpSecConnectionTunnelDetailsOracleInitiationEnum(string(m.OracleInitiation)); !ok && m.OracleInitiation != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OracleInitiation: %s. Supported values are: %s.", m.OracleInitiation, strings.Join(GetCreateIpSecConnectionTunnelDetailsOracleInitiationEnumStringValues(), ","))) + } + if _, ok := GetMappingCreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum(string(m.NatTranslationEnabled)); !ok && m.NatTranslationEnabled != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NatTranslationEnabled: %s. Supported values are: %s.", m.NatTranslationEnabled, strings.Join(GetCreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateIpSecConnectionTunnelDetailsRoutingEnum Enum with underlying type: string +type CreateIpSecConnectionTunnelDetailsRoutingEnum string + +// Set of constants representing the allowable values for CreateIpSecConnectionTunnelDetailsRoutingEnum +const ( + CreateIpSecConnectionTunnelDetailsRoutingBgp CreateIpSecConnectionTunnelDetailsRoutingEnum = "BGP" + CreateIpSecConnectionTunnelDetailsRoutingStatic CreateIpSecConnectionTunnelDetailsRoutingEnum = "STATIC" + CreateIpSecConnectionTunnelDetailsRoutingPolicy CreateIpSecConnectionTunnelDetailsRoutingEnum = "POLICY" +) + +var mappingCreateIpSecConnectionTunnelDetailsRoutingEnum = map[string]CreateIpSecConnectionTunnelDetailsRoutingEnum{ + "BGP": CreateIpSecConnectionTunnelDetailsRoutingBgp, + "STATIC": CreateIpSecConnectionTunnelDetailsRoutingStatic, + "POLICY": CreateIpSecConnectionTunnelDetailsRoutingPolicy, +} + +var mappingCreateIpSecConnectionTunnelDetailsRoutingEnumLowerCase = map[string]CreateIpSecConnectionTunnelDetailsRoutingEnum{ + "bgp": CreateIpSecConnectionTunnelDetailsRoutingBgp, + "static": CreateIpSecConnectionTunnelDetailsRoutingStatic, + "policy": CreateIpSecConnectionTunnelDetailsRoutingPolicy, +} + +// GetCreateIpSecConnectionTunnelDetailsRoutingEnumValues Enumerates the set of values for CreateIpSecConnectionTunnelDetailsRoutingEnum +func GetCreateIpSecConnectionTunnelDetailsRoutingEnumValues() []CreateIpSecConnectionTunnelDetailsRoutingEnum { + values := make([]CreateIpSecConnectionTunnelDetailsRoutingEnum, 0) + for _, v := range mappingCreateIpSecConnectionTunnelDetailsRoutingEnum { + values = append(values, v) + } + return values +} + +// GetCreateIpSecConnectionTunnelDetailsRoutingEnumStringValues Enumerates the set of values in String for CreateIpSecConnectionTunnelDetailsRoutingEnum +func GetCreateIpSecConnectionTunnelDetailsRoutingEnumStringValues() []string { + return []string{ + "BGP", + "STATIC", + "POLICY", + } +} + +// GetMappingCreateIpSecConnectionTunnelDetailsRoutingEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateIpSecConnectionTunnelDetailsRoutingEnum(val string) (CreateIpSecConnectionTunnelDetailsRoutingEnum, bool) { + enum, ok := mappingCreateIpSecConnectionTunnelDetailsRoutingEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CreateIpSecConnectionTunnelDetailsIkeVersionEnum Enum with underlying type: string +type CreateIpSecConnectionTunnelDetailsIkeVersionEnum string + +// Set of constants representing the allowable values for CreateIpSecConnectionTunnelDetailsIkeVersionEnum +const ( + CreateIpSecConnectionTunnelDetailsIkeVersionV1 CreateIpSecConnectionTunnelDetailsIkeVersionEnum = "V1" + CreateIpSecConnectionTunnelDetailsIkeVersionV2 CreateIpSecConnectionTunnelDetailsIkeVersionEnum = "V2" +) + +var mappingCreateIpSecConnectionTunnelDetailsIkeVersionEnum = map[string]CreateIpSecConnectionTunnelDetailsIkeVersionEnum{ + "V1": CreateIpSecConnectionTunnelDetailsIkeVersionV1, + "V2": CreateIpSecConnectionTunnelDetailsIkeVersionV2, +} + +var mappingCreateIpSecConnectionTunnelDetailsIkeVersionEnumLowerCase = map[string]CreateIpSecConnectionTunnelDetailsIkeVersionEnum{ + "v1": CreateIpSecConnectionTunnelDetailsIkeVersionV1, + "v2": CreateIpSecConnectionTunnelDetailsIkeVersionV2, +} + +// GetCreateIpSecConnectionTunnelDetailsIkeVersionEnumValues Enumerates the set of values for CreateIpSecConnectionTunnelDetailsIkeVersionEnum +func GetCreateIpSecConnectionTunnelDetailsIkeVersionEnumValues() []CreateIpSecConnectionTunnelDetailsIkeVersionEnum { + values := make([]CreateIpSecConnectionTunnelDetailsIkeVersionEnum, 0) + for _, v := range mappingCreateIpSecConnectionTunnelDetailsIkeVersionEnum { + values = append(values, v) + } + return values +} + +// GetCreateIpSecConnectionTunnelDetailsIkeVersionEnumStringValues Enumerates the set of values in String for CreateIpSecConnectionTunnelDetailsIkeVersionEnum +func GetCreateIpSecConnectionTunnelDetailsIkeVersionEnumStringValues() []string { + return []string{ + "V1", + "V2", + } +} + +// GetMappingCreateIpSecConnectionTunnelDetailsIkeVersionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateIpSecConnectionTunnelDetailsIkeVersionEnum(val string) (CreateIpSecConnectionTunnelDetailsIkeVersionEnum, bool) { + enum, ok := mappingCreateIpSecConnectionTunnelDetailsIkeVersionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CreateIpSecConnectionTunnelDetailsOracleInitiationEnum Enum with underlying type: string +type CreateIpSecConnectionTunnelDetailsOracleInitiationEnum string + +// Set of constants representing the allowable values for CreateIpSecConnectionTunnelDetailsOracleInitiationEnum +const ( + CreateIpSecConnectionTunnelDetailsOracleInitiationInitiatorOrResponder CreateIpSecConnectionTunnelDetailsOracleInitiationEnum = "INITIATOR_OR_RESPONDER" + CreateIpSecConnectionTunnelDetailsOracleInitiationResponderOnly CreateIpSecConnectionTunnelDetailsOracleInitiationEnum = "RESPONDER_ONLY" +) + +var mappingCreateIpSecConnectionTunnelDetailsOracleInitiationEnum = map[string]CreateIpSecConnectionTunnelDetailsOracleInitiationEnum{ + "INITIATOR_OR_RESPONDER": CreateIpSecConnectionTunnelDetailsOracleInitiationInitiatorOrResponder, + "RESPONDER_ONLY": CreateIpSecConnectionTunnelDetailsOracleInitiationResponderOnly, +} + +var mappingCreateIpSecConnectionTunnelDetailsOracleInitiationEnumLowerCase = map[string]CreateIpSecConnectionTunnelDetailsOracleInitiationEnum{ + "initiator_or_responder": CreateIpSecConnectionTunnelDetailsOracleInitiationInitiatorOrResponder, + "responder_only": CreateIpSecConnectionTunnelDetailsOracleInitiationResponderOnly, +} + +// GetCreateIpSecConnectionTunnelDetailsOracleInitiationEnumValues Enumerates the set of values for CreateIpSecConnectionTunnelDetailsOracleInitiationEnum +func GetCreateIpSecConnectionTunnelDetailsOracleInitiationEnumValues() []CreateIpSecConnectionTunnelDetailsOracleInitiationEnum { + values := make([]CreateIpSecConnectionTunnelDetailsOracleInitiationEnum, 0) + for _, v := range mappingCreateIpSecConnectionTunnelDetailsOracleInitiationEnum { + values = append(values, v) + } + return values +} + +// GetCreateIpSecConnectionTunnelDetailsOracleInitiationEnumStringValues Enumerates the set of values in String for CreateIpSecConnectionTunnelDetailsOracleInitiationEnum +func GetCreateIpSecConnectionTunnelDetailsOracleInitiationEnumStringValues() []string { + return []string{ + "INITIATOR_OR_RESPONDER", + "RESPONDER_ONLY", + } +} + +// GetMappingCreateIpSecConnectionTunnelDetailsOracleInitiationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateIpSecConnectionTunnelDetailsOracleInitiationEnum(val string) (CreateIpSecConnectionTunnelDetailsOracleInitiationEnum, bool) { + enum, ok := mappingCreateIpSecConnectionTunnelDetailsOracleInitiationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum Enum with underlying type: string +type CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum string + +// Set of constants representing the allowable values for CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum +const ( + CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnabled CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum = "ENABLED" + CreateIpSecConnectionTunnelDetailsNatTranslationEnabledDisabled CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum = "DISABLED" + CreateIpSecConnectionTunnelDetailsNatTranslationEnabledAuto CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum = "AUTO" +) + +var mappingCreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum = map[string]CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum{ + "ENABLED": CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnabled, + "DISABLED": CreateIpSecConnectionTunnelDetailsNatTranslationEnabledDisabled, + "AUTO": CreateIpSecConnectionTunnelDetailsNatTranslationEnabledAuto, +} + +var mappingCreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnumLowerCase = map[string]CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum{ + "enabled": CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnabled, + "disabled": CreateIpSecConnectionTunnelDetailsNatTranslationEnabledDisabled, + "auto": CreateIpSecConnectionTunnelDetailsNatTranslationEnabledAuto, +} + +// GetCreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnumValues Enumerates the set of values for CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum +func GetCreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnumValues() []CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum { + values := make([]CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum, 0) + for _, v := range mappingCreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum { + values = append(values, v) + } + return values +} + +// GetCreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnumStringValues Enumerates the set of values in String for CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum +func GetCreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + "AUTO", + } +} + +// GetMappingCreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum(val string) (CreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum, bool) { + enum, ok := mappingCreateIpSecConnectionTunnelDetailsNatTranslationEnabledEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_tunnel_bgp_session_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_tunnel_bgp_session_details.go new file mode 100644 index 000000000..46917b0b4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_tunnel_bgp_session_details.go @@ -0,0 +1,90 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateIpSecTunnelBgpSessionDetails The representation of CreateIpSecTunnelBgpSessionDetails +type CreateIpSecTunnelBgpSessionDetails struct { + + // The IP address for the Oracle end of the inside tunnel interface. + // If the tunnel's `routing` attribute is set to `BGP` + // (see IPSecConnectionTunnel), this IP address + // is required and used for the tunnel's BGP session. + // If `routing` is instead set to `STATIC`, this IP address is optional. You can set this IP + // address to troubleshoot or monitor the tunnel. + // The value must be a /30 or /31. + // Example: `10.0.0.4/31` + OracleInterfaceIp *string `mandatory:"false" json:"oracleInterfaceIp"` + + // The IP address for the CPE end of the inside tunnel interface. + // If the tunnel's `routing` attribute is set to `BGP` + // (see IPSecConnectionTunnel), this IP address + // is required and used for the tunnel's BGP session. + // If `routing` is instead set to `STATIC`, this IP address is optional. You can set this IP + // address to troubleshoot or monitor the tunnel. + // The value must be a /30 or /31. + // Example: `10.0.0.5/31` + CustomerInterfaceIp *string `mandatory:"false" json:"customerInterfaceIp"` + + // The IPv6 address for the Oracle end of the inside tunnel interface. This IP address is optional. + // If the tunnel's `routing` attribute is set to `BGP` + // (see IPSecConnectionTunnel), this IP address + // is used for the tunnel's BGP session. + // If `routing` is instead set to `STATIC`, you can set this IP + // address to troubleshoot or monitor the tunnel. + // Only subnet masks from /64 up to /127 are allowed. + // Example: `2001:db8::1/64` + OracleInterfaceIpv6 *string `mandatory:"false" json:"oracleInterfaceIpv6"` + + // The IPv6 address for the CPE end of the inside tunnel interface. This IP address is optional. + // If the tunnel's `routing` attribute is set to `BGP` + // (see IPSecConnectionTunnel), this IP address + // is used for the tunnel's BGP session. + // If `routing` is instead set to `STATIC`, you can set this IP + // address to troubleshoot or monitor the tunnel. + // Only subnet masks from /64 up to /127 are allowed. + // Example: `2001:db8::1/64` + CustomerInterfaceIpv6 *string `mandatory:"false" json:"customerInterfaceIpv6"` + + // If the tunnel's `routing` attribute is set to `BGP` + // (see IPSecConnectionTunnel), this ASN + // is required and used for the tunnel's BGP session. This is the ASN of the network on the + // CPE end of the BGP session. Can be a 2-byte or 4-byte ASN. Uses "asplain" format. + // If the tunnel's `routing` attribute is set to `STATIC`, the `customerBgpAsn` must be null. + // Example: `12345` (2-byte) or `1587232876` (4-byte) + CustomerBgpAsn *string `mandatory:"false" json:"customerBgpAsn"` +} + +func (m CreateIpSecTunnelBgpSessionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateIpSecTunnelBgpSessionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_tunnel_encryption_domain_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_tunnel_encryption_domain_details.go new file mode 100644 index 000000000..2159e9c28 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ip_sec_tunnel_encryption_domain_details.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateIpSecTunnelEncryptionDomainDetails Request to enable a multi-encryption domain policy on the IPSec tunnel. +// There can't be more than 50 security associations in use at one time. See Encryption domain for policy-based +// tunnels (https://docs.oracle.com/iaas/Content/Network/Tasks/ipsecencryptiondomains.htm#spi_policy_based_tunnel) for more. +type CreateIpSecTunnelEncryptionDomainDetails struct { + + // Lists IPv4 or IPv6-enabled subnets in your Oracle tenancy. + OracleTrafficSelector []string `mandatory:"false" json:"oracleTrafficSelector"` + + // Lists IPv4 or IPv6-enabled subnets in your on-premises network. + CpeTrafficSelector []string `mandatory:"false" json:"cpeTrafficSelector"` +} + +func (m CreateIpSecTunnelEncryptionDomainDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateIpSecTunnelEncryptionDomainDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ipv6_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ipv6_details.go new file mode 100644 index 000000000..c1e145684 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ipv6_details.go @@ -0,0 +1,135 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateIpv6Details The representation of CreateIpv6Details +type CreateIpv6Details struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // An IPv6 address of your choice. Must be an available IP address within + // the subnet's CIDR. If you don't specify a value, Oracle automatically + // assigns an IPv6 address from the subnet. The subnet is the one that + // contains the VNIC you specify in `vnicId`. + // Example: `2001:DB8::` + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // Length of cidr range. Optional field to specify flexible cidr. + CidrPrefixLength *int `mandatory:"false" json:"cidrPrefixLength"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC to assign the IPv6 to. The + // IPv6 will be in the VNIC's subnet. + VnicId *string `mandatory:"false" json:"vnicId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet from which the IPv6 is to be drawn. The IP address, + // *if supplied*, must be valid for the given subnet, only valid for reserved IPs currently. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // Lifetime of the IP address. + // There are two types of IPs: + // - Ephemeral + // - Reserved + Lifetime CreateIpv6DetailsLifetimeEnum `mandatory:"false" json:"lifetime,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see + // Per-resource Routing (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing). + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // The IPv6 prefix allocated to the subnet. This is required if more than one IPv6 prefix exists on the subnet. + Ipv6SubnetCidr *string `mandatory:"false" json:"ipv6SubnetCidr"` + + // The hostname associated with the IPv6 address. Only the hostname label, not the FQDN. + Hostname *string `mandatory:"false" json:"hostname"` +} + +func (m CreateIpv6Details) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateIpv6Details) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCreateIpv6DetailsLifetimeEnum(string(m.Lifetime)); !ok && m.Lifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Lifetime: %s. Supported values are: %s.", m.Lifetime, strings.Join(GetCreateIpv6DetailsLifetimeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateIpv6DetailsLifetimeEnum Enum with underlying type: string +type CreateIpv6DetailsLifetimeEnum string + +// Set of constants representing the allowable values for CreateIpv6DetailsLifetimeEnum +const ( + CreateIpv6DetailsLifetimeEphemeral CreateIpv6DetailsLifetimeEnum = "EPHEMERAL" + CreateIpv6DetailsLifetimeReserved CreateIpv6DetailsLifetimeEnum = "RESERVED" +) + +var mappingCreateIpv6DetailsLifetimeEnum = map[string]CreateIpv6DetailsLifetimeEnum{ + "EPHEMERAL": CreateIpv6DetailsLifetimeEphemeral, + "RESERVED": CreateIpv6DetailsLifetimeReserved, +} + +var mappingCreateIpv6DetailsLifetimeEnumLowerCase = map[string]CreateIpv6DetailsLifetimeEnum{ + "ephemeral": CreateIpv6DetailsLifetimeEphemeral, + "reserved": CreateIpv6DetailsLifetimeReserved, +} + +// GetCreateIpv6DetailsLifetimeEnumValues Enumerates the set of values for CreateIpv6DetailsLifetimeEnum +func GetCreateIpv6DetailsLifetimeEnumValues() []CreateIpv6DetailsLifetimeEnum { + values := make([]CreateIpv6DetailsLifetimeEnum, 0) + for _, v := range mappingCreateIpv6DetailsLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetCreateIpv6DetailsLifetimeEnumStringValues Enumerates the set of values in String for CreateIpv6DetailsLifetimeEnum +func GetCreateIpv6DetailsLifetimeEnumStringValues() []string { + return []string{ + "EPHEMERAL", + "RESERVED", + } +} + +// GetMappingCreateIpv6DetailsLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateIpv6DetailsLifetimeEnum(val string) (CreateIpv6DetailsLifetimeEnum, bool) { + enum, ok := mappingCreateIpv6DetailsLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ipv6_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ipv6_request_response.go new file mode 100644 index 000000000..1b9ee66c8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_ipv6_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateIpv6Request wrapper for the CreateIpv6 operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateIpv6.go.html to see an example of how to use CreateIpv6Request. +type CreateIpv6Request struct { + + // Create IPv6 details. + CreateIpv6Details `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateIpv6Request) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateIpv6Request) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateIpv6Request) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateIpv6Request) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateIpv6Request) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateIpv6Response wrapper for the CreateIpv6 operation +type CreateIpv6Response struct { + + // The underlying http response + RawResponse *http.Response + + // The Ipv6 instance + Ipv6 `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateIpv6Response) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateIpv6Response) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_local_peering_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_local_peering_gateway_details.go new file mode 100644 index 000000000..a5987ee9f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_local_peering_gateway_details.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateLocalPeeringGatewayDetails The representation of CreateLocalPeeringGatewayDetails +type CreateLocalPeeringGatewayDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the local peering gateway (LPG). + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN the LPG belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Security attributes (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels + // for a resource that can be referenced in a Zero Trust Packet Routing (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) + // (ZPR) policy to control access to ZPR-supported resources. + // Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` + SecurityAttributes map[string]map[string]interface{} `mandatory:"false" json:"securityAttributes"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the LPG will use. + // If you don't specify a route table here, the LPG is created without an associated route + // table. The Networking service does NOT automatically associate the attached VCN's default route table + // with the LPG. + // For information about why you would associate a route table with an LPG, see + // Transit Routing: Access to Multiple VCNs in Same Region (https://docs.oracle.com/iaas/Content/Network/Tasks/transitrouting.htm). + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m CreateLocalPeeringGatewayDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateLocalPeeringGatewayDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_local_peering_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_local_peering_gateway_request_response.go new file mode 100644 index 000000000..fb2034633 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_local_peering_gateway_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateLocalPeeringGatewayRequest wrapper for the CreateLocalPeeringGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateLocalPeeringGateway.go.html to see an example of how to use CreateLocalPeeringGatewayRequest. +type CreateLocalPeeringGatewayRequest struct { + + // Details for creating a new local peering gateway. + CreateLocalPeeringGatewayDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateLocalPeeringGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateLocalPeeringGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateLocalPeeringGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateLocalPeeringGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateLocalPeeringGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateLocalPeeringGatewayResponse wrapper for the CreateLocalPeeringGateway operation +type CreateLocalPeeringGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The LocalPeeringGateway instance + LocalPeeringGateway `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateLocalPeeringGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateLocalPeeringGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_macsec_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_macsec_key.go new file mode 100644 index 000000000..f09e446da --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_macsec_key.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateMacsecKey Defines the secret OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)s held in Vault that represent the MACsec key. +type CreateMacsecKey struct { + + // Secret OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) containing the Connectivity association Key Name (CKN) of this MACsec key. + // NOTE: Only the latest secret version will be used. + ConnectivityAssociationNameSecretId *string `mandatory:"true" json:"connectivityAssociationNameSecretId"` + + // Secret OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) containing the Connectivity Association Key (CAK) of this MACsec key. + // NOTE: Only the latest secret version will be used. + ConnectivityAssociationKeySecretId *string `mandatory:"true" json:"connectivityAssociationKeySecretId"` +} + +func (m CreateMacsecKey) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateMacsecKey) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_macsec_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_macsec_properties.go new file mode 100644 index 000000000..635698715 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_macsec_properties.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateMacsecProperties Properties used to configure MACsec (if capable). +type CreateMacsecProperties struct { + + // Indicates whether or not MACsec is enabled. + State MacsecStateEnum `mandatory:"true" json:"state"` + + PrimaryKey *CreateMacsecKey `mandatory:"false" json:"primaryKey"` + + // Type of encryption cipher suite to use for the MACsec connection. + EncryptionCipher MacsecEncryptionCipherEnum `mandatory:"false" json:"encryptionCipher,omitempty"` + + // Indicates whether unencrypted traffic is allowed if MACsec Key Agreement protocol (MKA) fails. + IsUnprotectedTrafficAllowed *bool `mandatory:"false" json:"isUnprotectedTrafficAllowed"` +} + +func (m CreateMacsecProperties) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateMacsecProperties) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingMacsecStateEnum(string(m.State)); !ok && m.State != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for State: %s. Supported values are: %s.", m.State, strings.Join(GetMacsecStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingMacsecEncryptionCipherEnum(string(m.EncryptionCipher)); !ok && m.EncryptionCipher != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncryptionCipher: %s. Supported values are: %s.", m.EncryptionCipher, strings.Join(GetMacsecEncryptionCipherEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_nat_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_nat_gateway_details.go new file mode 100644 index 000000000..91fe8f81e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_nat_gateway_details.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateNatGatewayDetails The representation of CreateNatGatewayDetails +type CreateNatGatewayDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the + // NAT gateway. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN the gateway belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Whether the NAT gateway blocks traffic through it. The default is `false`. + // Example: `true` + BlockTraffic *bool `mandatory:"false" json:"blockTraffic"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP address associated with the NAT gateway. + PublicIpId *string `mandatory:"false" json:"publicIpId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table used by the NAT gateway. + // If you don't specify a route table here, the NAT gateway is created without an associated route + // table. The Networking service does NOT automatically associate the attached VCN's default route table + // with the NAT gateway. + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m CreateNatGatewayDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateNatGatewayDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_nat_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_nat_gateway_request_response.go new file mode 100644 index 000000000..a7cd07f7e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_nat_gateway_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateNatGatewayRequest wrapper for the CreateNatGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateNatGateway.go.html to see an example of how to use CreateNatGatewayRequest. +type CreateNatGatewayRequest struct { + + // Details for creating a NAT gateway. + CreateNatGatewayDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateNatGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateNatGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateNatGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateNatGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateNatGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateNatGatewayResponse wrapper for the CreateNatGateway operation +type CreateNatGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NatGateway instance + NatGateway `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateNatGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateNatGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_network_security_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_network_security_group_details.go new file mode 100644 index 000000000..62295de7b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_network_security_group_details.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateNetworkSecurityGroupDetails The representation of CreateNetworkSecurityGroupDetails +type CreateNetworkSecurityGroupDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the + // network security group. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN to create the network + // security group in. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateNetworkSecurityGroupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateNetworkSecurityGroupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_network_security_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_network_security_group_request_response.go new file mode 100644 index 000000000..68294add5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_network_security_group_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateNetworkSecurityGroupRequest wrapper for the CreateNetworkSecurityGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateNetworkSecurityGroup.go.html to see an example of how to use CreateNetworkSecurityGroupRequest. +type CreateNetworkSecurityGroupRequest struct { + + // Details for creating a network security group. + CreateNetworkSecurityGroupDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateNetworkSecurityGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateNetworkSecurityGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateNetworkSecurityGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateNetworkSecurityGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateNetworkSecurityGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateNetworkSecurityGroupResponse wrapper for the CreateNetworkSecurityGroup operation +type CreateNetworkSecurityGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NetworkSecurityGroup instance + NetworkSecurityGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateNetworkSecurityGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateNetworkSecurityGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_private_ip_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_private_ip_details.go new file mode 100644 index 000000000..edb012549 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_private_ip_details.go @@ -0,0 +1,152 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreatePrivateIpDetails The representation of CreatePrivateIpDetails +type CreatePrivateIpDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The hostname for the private IP. Used for DNS. The value + // is the hostname portion of the private IP's fully qualified domain name (FQDN) + // (for example, `bminstance1` in FQDN `bminstance1.subnet123.vcn1.oraclevcn.com`). + // Must be unique across all VNICs in the subnet and comply with + // RFC 952 (https://tools.ietf.org/html/rfc952) and + // RFC 1123 (https://tools.ietf.org/html/rfc1123). + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + // Example: `bminstance1` + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // A private IP address of your choice. Must be an available IP address within + // the subnet's CIDR. If you don't specify a value, Oracle automatically + // assigns a private IP address from the subnet. + // Example: `10.0.3.3` + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // An optional field that when combined with the ipAddress field, will be used to allocate secondary IPv4 CIDRs. + // The CIDR range created by this combination must be within the subnet's CIDR + // and the CIDR range should not collide with any existing IPv4 address allocation. + // The VNIC ID specified in the request object should not already been assigned more than the max IPv4 addresses. + // If you don't specify a value, this option will be ignored. + // Example: 18 + CidrPrefixLength *int `mandatory:"false" json:"cidrPrefixLength"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC to assign the private IP to. The VNIC and private IP + // must be in the same subnet. + VnicId *string `mandatory:"false" json:"vnicId"` + + // Use this attribute only with the Oracle Cloud VMware Solution. + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VLAN from which the private IP is to be drawn. The IP address, + // *if supplied*, must be valid for the given VLAN. See Vlan. + VlanId *string `mandatory:"false" json:"vlanId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet from which the private IP is to be drawn. The IP address, + // *if supplied*, must be valid for the given subnet. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // Any one of the IPv4 CIDRs allocated to the subnet. + Ipv4SubnetCidrAtCreation *string `mandatory:"false" json:"ipv4SubnetCidrAtCreation"` + + // Lifetime of the IP address. + // There are two types of IPs: + // - Ephemeral + // - Reserved + Lifetime CreatePrivateIpDetailsLifetimeEnum `mandatory:"false" json:"lifetime,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see + // Per-resource Routing (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing). + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m CreatePrivateIpDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreatePrivateIpDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCreatePrivateIpDetailsLifetimeEnum(string(m.Lifetime)); !ok && m.Lifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Lifetime: %s. Supported values are: %s.", m.Lifetime, strings.Join(GetCreatePrivateIpDetailsLifetimeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePrivateIpDetailsLifetimeEnum Enum with underlying type: string +type CreatePrivateIpDetailsLifetimeEnum string + +// Set of constants representing the allowable values for CreatePrivateIpDetailsLifetimeEnum +const ( + CreatePrivateIpDetailsLifetimeEphemeral CreatePrivateIpDetailsLifetimeEnum = "EPHEMERAL" + CreatePrivateIpDetailsLifetimeReserved CreatePrivateIpDetailsLifetimeEnum = "RESERVED" +) + +var mappingCreatePrivateIpDetailsLifetimeEnum = map[string]CreatePrivateIpDetailsLifetimeEnum{ + "EPHEMERAL": CreatePrivateIpDetailsLifetimeEphemeral, + "RESERVED": CreatePrivateIpDetailsLifetimeReserved, +} + +var mappingCreatePrivateIpDetailsLifetimeEnumLowerCase = map[string]CreatePrivateIpDetailsLifetimeEnum{ + "ephemeral": CreatePrivateIpDetailsLifetimeEphemeral, + "reserved": CreatePrivateIpDetailsLifetimeReserved, +} + +// GetCreatePrivateIpDetailsLifetimeEnumValues Enumerates the set of values for CreatePrivateIpDetailsLifetimeEnum +func GetCreatePrivateIpDetailsLifetimeEnumValues() []CreatePrivateIpDetailsLifetimeEnum { + values := make([]CreatePrivateIpDetailsLifetimeEnum, 0) + for _, v := range mappingCreatePrivateIpDetailsLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetCreatePrivateIpDetailsLifetimeEnumStringValues Enumerates the set of values in String for CreatePrivateIpDetailsLifetimeEnum +func GetCreatePrivateIpDetailsLifetimeEnumStringValues() []string { + return []string{ + "EPHEMERAL", + "RESERVED", + } +} + +// GetMappingCreatePrivateIpDetailsLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreatePrivateIpDetailsLifetimeEnum(val string) (CreatePrivateIpDetailsLifetimeEnum, bool) { + enum, ok := mappingCreatePrivateIpDetailsLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_private_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_private_ip_request_response.go new file mode 100644 index 000000000..82cc28e35 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_private_ip_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreatePrivateIpRequest wrapper for the CreatePrivateIp operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreatePrivateIp.go.html to see an example of how to use CreatePrivateIpRequest. +type CreatePrivateIpRequest struct { + + // Create private IP details. + CreatePrivateIpDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePrivateIpRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePrivateIpRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreatePrivateIpRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePrivateIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreatePrivateIpRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePrivateIpResponse wrapper for the CreatePrivateIp operation +type CreatePrivateIpResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PrivateIp instance + PrivateIp `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreatePrivateIpResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePrivateIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_public_ip_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_public_ip_details.go new file mode 100644 index 000000000..880c5a529 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_public_ip_details.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreatePublicIpDetails The representation of CreatePublicIpDetails +type CreatePublicIpDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the public IP. For ephemeral public IPs, + // you must set this to the private IP's compartment OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Defines when the public IP is deleted and released back to the Oracle Cloud + // Infrastructure public IP pool. For more information, see + // Public IP Addresses (https://docs.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm). + Lifetime CreatePublicIpDetailsLifetimeEnum `mandatory:"true" json:"lifetime"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private IP to assign the public IP to. + // Required for an ephemeral public IP because it must always be assigned to a private IP + // (specifically a *primary* private IP). + // Optional for a reserved public IP. If you don't provide it, the public IP is created but not + // assigned to a private IP. You can later assign the public IP with + // UpdatePublicIp. + PrivateIpId *string `mandatory:"false" json:"privateIpId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP pool. + PublicIpPoolId *string `mandatory:"false" json:"publicIpPoolId"` +} + +func (m CreatePublicIpDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreatePublicIpDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCreatePublicIpDetailsLifetimeEnum(string(m.Lifetime)); !ok && m.Lifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Lifetime: %s. Supported values are: %s.", m.Lifetime, strings.Join(GetCreatePublicIpDetailsLifetimeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePublicIpDetailsLifetimeEnum Enum with underlying type: string +type CreatePublicIpDetailsLifetimeEnum string + +// Set of constants representing the allowable values for CreatePublicIpDetailsLifetimeEnum +const ( + CreatePublicIpDetailsLifetimeEphemeral CreatePublicIpDetailsLifetimeEnum = "EPHEMERAL" + CreatePublicIpDetailsLifetimeReserved CreatePublicIpDetailsLifetimeEnum = "RESERVED" +) + +var mappingCreatePublicIpDetailsLifetimeEnum = map[string]CreatePublicIpDetailsLifetimeEnum{ + "EPHEMERAL": CreatePublicIpDetailsLifetimeEphemeral, + "RESERVED": CreatePublicIpDetailsLifetimeReserved, +} + +var mappingCreatePublicIpDetailsLifetimeEnumLowerCase = map[string]CreatePublicIpDetailsLifetimeEnum{ + "ephemeral": CreatePublicIpDetailsLifetimeEphemeral, + "reserved": CreatePublicIpDetailsLifetimeReserved, +} + +// GetCreatePublicIpDetailsLifetimeEnumValues Enumerates the set of values for CreatePublicIpDetailsLifetimeEnum +func GetCreatePublicIpDetailsLifetimeEnumValues() []CreatePublicIpDetailsLifetimeEnum { + values := make([]CreatePublicIpDetailsLifetimeEnum, 0) + for _, v := range mappingCreatePublicIpDetailsLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetCreatePublicIpDetailsLifetimeEnumStringValues Enumerates the set of values in String for CreatePublicIpDetailsLifetimeEnum +func GetCreatePublicIpDetailsLifetimeEnumStringValues() []string { + return []string{ + "EPHEMERAL", + "RESERVED", + } +} + +// GetMappingCreatePublicIpDetailsLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreatePublicIpDetailsLifetimeEnum(val string) (CreatePublicIpDetailsLifetimeEnum, bool) { + enum, ok := mappingCreatePublicIpDetailsLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_public_ip_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_public_ip_pool_details.go new file mode 100644 index 000000000..7dbfff86a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_public_ip_pool_details.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreatePublicIpPoolDetails The information used to create a public IP pool. +type CreatePublicIpPoolDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the public IP pool. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreatePublicIpPoolDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreatePublicIpPoolDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_public_ip_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_public_ip_pool_request_response.go new file mode 100644 index 000000000..6c035dbf6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_public_ip_pool_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreatePublicIpPoolRequest wrapper for the CreatePublicIpPool operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreatePublicIpPool.go.html to see an example of how to use CreatePublicIpPoolRequest. +type CreatePublicIpPoolRequest struct { + + // Create Public Ip Pool details + CreatePublicIpPoolDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePublicIpPoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePublicIpPoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreatePublicIpPoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePublicIpPoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreatePublicIpPoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePublicIpPoolResponse wrapper for the CreatePublicIpPool operation +type CreatePublicIpPoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIpPool instance + PublicIpPool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreatePublicIpPoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePublicIpPoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_public_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_public_ip_request_response.go new file mode 100644 index 000000000..87a4c3aaf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_public_ip_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreatePublicIpRequest wrapper for the CreatePublicIp operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreatePublicIp.go.html to see an example of how to use CreatePublicIpRequest. +type CreatePublicIpRequest struct { + + // Create public IP details. + CreatePublicIpDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePublicIpRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePublicIpRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreatePublicIpRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePublicIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreatePublicIpRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePublicIpResponse wrapper for the CreatePublicIp operation +type CreatePublicIpResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIp instance + PublicIp `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreatePublicIpResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePublicIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_remote_peering_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_remote_peering_connection_details.go new file mode 100644 index 000000000..cb70b80de --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_remote_peering_connection_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateRemotePeeringConnectionDetails The representation of CreateRemotePeeringConnectionDetails +type CreateRemotePeeringConnectionDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the RPC. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG the RPC belongs to. + DrgId *string `mandatory:"true" json:"drgId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateRemotePeeringConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateRemotePeeringConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_remote_peering_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_remote_peering_connection_request_response.go new file mode 100644 index 000000000..af9e2d8ac --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_remote_peering_connection_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateRemotePeeringConnectionRequest wrapper for the CreateRemotePeeringConnection operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateRemotePeeringConnection.go.html to see an example of how to use CreateRemotePeeringConnectionRequest. +type CreateRemotePeeringConnectionRequest struct { + + // Request to create peering connection to remote region + CreateRemotePeeringConnectionDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateRemotePeeringConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateRemotePeeringConnectionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateRemotePeeringConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateRemotePeeringConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateRemotePeeringConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateRemotePeeringConnectionResponse wrapper for the CreateRemotePeeringConnection operation +type CreateRemotePeeringConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RemotePeeringConnection instance + RemotePeeringConnection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateRemotePeeringConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateRemotePeeringConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_route_table_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_route_table_details.go new file mode 100644 index 000000000..c584304a6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_route_table_details.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateRouteTableDetails The representation of CreateRouteTableDetails +type CreateRouteTableDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the route table. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The collection of rules used for routing destination IPs to network devices. + RouteRules []RouteRule `mandatory:"true" json:"routeRules"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN the route table belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateRouteTableDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateRouteTableDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_route_table_request_response.go new file mode 100644 index 000000000..49c92e282 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_route_table_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateRouteTableRequest wrapper for the CreateRouteTable operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateRouteTable.go.html to see an example of how to use CreateRouteTableRequest. +type CreateRouteTableRequest struct { + + // Details for creating a new route table. + CreateRouteTableDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateRouteTableRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateRouteTableRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateRouteTableRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateRouteTableRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateRouteTableRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateRouteTableResponse wrapper for the CreateRouteTable operation +type CreateRouteTableResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RouteTable instance + RouteTable `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateRouteTableResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateRouteTableResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_security_list_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_security_list_details.go new file mode 100644 index 000000000..35f93e541 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_security_list_details.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateSecurityListDetails The representation of CreateSecurityListDetails +type CreateSecurityListDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the security list. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Rules for allowing egress IP packets. + EgressSecurityRules []EgressSecurityRule `mandatory:"true" json:"egressSecurityRules"` + + // Rules for allowing ingress IP packets. + IngressSecurityRules []IngressSecurityRule `mandatory:"true" json:"ingressSecurityRules"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN the security list belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateSecurityListDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateSecurityListDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_security_list_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_security_list_request_response.go new file mode 100644 index 000000000..2a0f7b994 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_security_list_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateSecurityListRequest wrapper for the CreateSecurityList operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateSecurityList.go.html to see an example of how to use CreateSecurityListRequest. +type CreateSecurityListRequest struct { + + // Details regarding the security list to create. + CreateSecurityListDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateSecurityListRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateSecurityListRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateSecurityListRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateSecurityListRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateSecurityListRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateSecurityListResponse wrapper for the CreateSecurityList operation +type CreateSecurityListResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SecurityList instance + SecurityList `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateSecurityListResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateSecurityListResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_service_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_service_gateway_details.go new file mode 100644 index 000000000..38b6ce09f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_service_gateway_details.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateServiceGatewayDetails The representation of CreateServiceGatewayDetails +type CreateServiceGatewayDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the service gateway. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // List of the OCIDs of the Service objects to + // enable for the service gateway. This list can be empty if you don't want to enable any + // `Service` objects when you create the gateway. You can enable a `Service` + // object later by using either AttachServiceId + // or UpdateServiceGateway. + // For each enabled `Service`, make sure there's a route rule with the `Service` object's `cidrBlock` + // as the rule's destination and the service gateway as the rule's target. See + // RouteTable. + Services []ServiceIdRequestDetails `mandatory:"true" json:"services"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the service gateway will use. + // If you don't specify a route table here, the service gateway is created without an associated route + // table. The Networking service does NOT automatically associate the attached VCN's default route table + // with the service gateway. + // For information about why you would associate a route table with a service gateway, see + // Transit Routing: Private Access to Oracle Services (https://docs.oracle.com/iaas/Content/Network/Tasks/transitroutingoracleservices.htm). + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m CreateServiceGatewayDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateServiceGatewayDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_service_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_service_gateway_request_response.go new file mode 100644 index 000000000..a3f48f4a6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_service_gateway_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateServiceGatewayRequest wrapper for the CreateServiceGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateServiceGateway.go.html to see an example of how to use CreateServiceGatewayRequest. +type CreateServiceGatewayRequest struct { + + // Details for creating a service gateway. + CreateServiceGatewayDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateServiceGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateServiceGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateServiceGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateServiceGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateServiceGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateServiceGatewayResponse wrapper for the CreateServiceGateway operation +type CreateServiceGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ServiceGateway instance + ServiceGateway `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateServiceGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateServiceGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_subnet_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_subnet_details.go new file mode 100644 index 000000000..eb4d1cb0e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_subnet_details.go @@ -0,0 +1,147 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateSubnetDetails The representation of CreateSubnetDetails +type CreateSubnetDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the subnet. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN to contain the subnet. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Controls whether the subnet is regional or specific to an availability domain. Oracle + // recommends creating regional subnets because they're more flexible and make it easier to + // implement failover across availability domains. Originally, AD-specific subnets were the + // only kind available to use. + // To create a regional subnet, omit this attribute. Then any resources later created in this + // subnet (such as a Compute instance) can be created in any availability domain in the region. + // To instead create an AD-specific subnet, set this attribute to the availability domain you + // want this subnet to be in. Then any resources later created in this subnet can only be + // created in that availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The CIDR IP address range of the subnet. The CIDR must maintain the following rules - + // a. The CIDR block is valid and correctly formatted. + // b. The new range is within one of the parent VCN ranges. + // Example: `10.0.1.0/24` + CidrBlock *string `mandatory:"false" json:"cidrBlock"` + + // The list of all IPv4 CIDR blocks for the subnet that meets the following criteria: + // - Ipv4 CIDR blocks must be valid. + // - Multiple Ipv4 CIDR blocks must not overlap each other or the on-premises network CIDR block. + // - The number of prefixes must not exceed the limit of IPv4 prefixes allowed to a subnet. + Ipv4CidrBlocks []string `mandatory:"false" json:"ipv4CidrBlocks"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the set of DHCP options the subnet will use. If you don't + // provide a value, the subnet uses the VCN's default set of DHCP options. + DhcpOptionsId *string `mandatory:"false" json:"dhcpOptionsId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // A DNS label for the subnet, used in conjunction with the VNIC's hostname and + // VCN's DNS label to form a fully qualified domain name (FQDN) for each VNIC + // within this subnet (for example, `bminstance1.subnet123.vcn1.oraclevcn.com`). + // Must be an alphanumeric string that begins with a letter and is unique within the VCN. + // The value cannot be changed. + // This value must be set if you want to use the Internet and VCN Resolver to resolve the + // hostnames of instances in the subnet. It can only be set if the VCN itself + // was created with a DNS label. + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + // Example: `subnet123` + DnsLabel *string `mandatory:"false" json:"dnsLabel"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Use this to enable IPv6 addressing for this subnet. The VCN must be enabled for IPv6. + // You can't change this subnet characteristic later. All subnets are /64 in size. The subnet + // portion of the IPv6 address is the fourth hextet from the left (1111 in the following example). + // For important details about IPv6 addressing in a VCN, see IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // Example: `2001:0db8:0123:1111::/64` + Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` + + // The list of all IPv6 prefixes (Oracle allocated IPv6 GUA, ULA or private IPv6 prefixes, BYOIPv6 prefixes) for the subnet that meets the following criteria: + // - The prefixes must be valid. + // - Multiple prefixes must not overlap each other or the on-premises network prefix. + // - The number of prefixes must not exceed the limit of IPv6 prefixes allowed to a subnet. + Ipv6CidrBlocks []string `mandatory:"false" json:"ipv6CidrBlocks"` + + // Whether to disallow ingress internet traffic to VNICs within this subnet. Defaults to false. + // For IPv6, if `prohibitInternetIngress` is set to `true`, internet access is not allowed for any + // IPv6s assigned to VNICs in the subnet. Otherwise, ingress internet traffic is allowed by default. + // `prohibitPublicIpOnVnic` will be set to the value of `prohibitInternetIngress` to dictate IPv4 + // behavior in this subnet. Only one or the other flag should be specified. + // Example: `true` + ProhibitInternetIngress *bool `mandatory:"false" json:"prohibitInternetIngress"` + + // Whether VNICs within this subnet can have public IP addresses. + // Defaults to false, which means VNICs created in this subnet will + // automatically be assigned public IP addresses unless specified + // otherwise during instance launch or VNIC creation (with the + // `assignPublicIp` flag in CreateVnicDetails). + // If `prohibitPublicIpOnVnic` is set to true, VNICs created in this + // subnet cannot have public IP addresses (that is, it's a private + // subnet). + // If you intend to use an IPv6 prefix, you should use the flag `prohibitInternetIngress` to + // specify ingress internet traffic behavior of the subnet. + // Example: `true` + ProhibitPublicIpOnVnic *bool `mandatory:"false" json:"prohibitPublicIpOnVnic"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the subnet will use. If you don't provide a value, + // the subnet uses the VCN's default route table. + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // The OCIDs of the security list or lists the subnet will use. If you don't + // provide a value, the subnet uses the VCN's default security list. + // Remember that security lists are associated *with the subnet*, but the + // rules are applied to the individual VNICs in the subnet. + SecurityListIds []string `mandatory:"false" json:"securityListIds"` +} + +func (m CreateSubnetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateSubnetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_subnet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_subnet_request_response.go new file mode 100644 index 000000000..d160e3677 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_subnet_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateSubnetRequest wrapper for the CreateSubnet operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateSubnet.go.html to see an example of how to use CreateSubnetRequest. +type CreateSubnetRequest struct { + + // Details for creating a subnet. + CreateSubnetDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateSubnetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateSubnetRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateSubnetRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateSubnetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateSubnetRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateSubnetResponse wrapper for the CreateSubnet operation +type CreateSubnetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Subnet instance + Subnet `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateSubnetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateSubnetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vcn_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vcn_details.go new file mode 100644 index 000000000..e8d53fe0a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vcn_details.go @@ -0,0 +1,114 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVcnDetails The representation of CreateVcnDetails +type CreateVcnDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the VCN. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // **Deprecated.** Do *not* set this value. Use `cidrBlocks` instead. + // Example: `10.0.0.0/16` + CidrBlock *string `mandatory:"false" json:"cidrBlock"` + + // The list of one or more IPv4 CIDR blocks for the VCN that meet the following criteria: + // - The CIDR blocks must be valid. + // - They must not overlap with each other or with the on-premises network CIDR block. + // - The number of CIDR blocks must not exceed the limit of CIDR blocks allowed per VCN. + // **Important:** Do *not* specify a value for `cidrBlock`. Use this parameter instead. + CidrBlocks []string `mandatory:"false" json:"cidrBlocks"` + + // The list of one or more ULA or Private IPv6 prefixes for the VCN that meets the following criteria: + // - The CIDR blocks must be valid. + // - Multiple CIDR blocks must not overlap each other or the on-premises network prefix. + // - The number of CIDR blocks must not exceed the limit of IPv6 prefixes allowed to a VCN. + // **Important:** Do *not* specify a value for `ipv6CidrBlock`. Use this parameter instead. + Ipv6PrivateCidrBlocks []string `mandatory:"false" json:"ipv6PrivateCidrBlocks"` + + // Specifies whether to skip Oracle allocated IPv6 GUA. By default, Oracle will allocate one GUA of /56 + // size for an IPv6 enabled VCN. + IsOracleGuaAllocationEnabled *bool `mandatory:"false" json:"isOracleGuaAllocationEnabled"` + + // The list of BYOIPv6 OCIDs and BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 address ranges. + Byoipv6CidrDetails []Byoipv6CidrDetails `mandatory:"false" json:"byoipv6CidrDetails"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // A DNS label for the VCN, used in conjunction with the VNIC's hostname and + // subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC + // within this subnet (for example, `bminstance1.subnet123.vcn1.oraclevcn.com`). + // Not required to be unique, but it's a best practice to set unique DNS labels + // for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. + // The value cannot be changed. + // You must set this value if you want instances to be able to use hostnames to + // resolve other instances in the VCN. Otherwise the Internet and VCN Resolver + // will not work. + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + // Example: `vcn1` + DnsLabel *string `mandatory:"false" json:"dnsLabel"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Security attributes (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels + // for a resource that can be referenced in a Zero Trust Packet Routing (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) + // (ZPR) policy to control access to ZPR-supported resources. + // Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` + SecurityAttributes map[string]map[string]interface{} `mandatory:"false" json:"securityAttributes"` + + // Whether IPv6 is enabled for the VCN. Default is `false`. + // If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. + // You may skip having Oracle allocate the VCN a IPv6 /56 CIDR block by setting isOracleGuaAllocationEnabled to `false`. + // For important details about IPv6 addressing in a VCN, see IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // Example: `true` + IsIpv6Enabled *bool `mandatory:"false" json:"isIpv6Enabled"` + + // Indicates whether ZPR Only mode is enforced. + IsZprOnly *bool `mandatory:"false" json:"isZprOnly"` +} + +func (m CreateVcnDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateVcnDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vcn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vcn_request_response.go new file mode 100644 index 000000000..f9f06db67 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vcn_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateVcnRequest wrapper for the CreateVcn operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVcn.go.html to see an example of how to use CreateVcnRequest. +type CreateVcnRequest struct { + + // Details for creating a new VCN. + CreateVcnDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVcnRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVcnRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateVcnRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVcnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateVcnRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVcnResponse wrapper for the CreateVcn operation +type CreateVcnResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Vcn instance + Vcn `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateVcnResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVcnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_virtual_circuit_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_virtual_circuit_details.go new file mode 100644 index 000000000..6bc2883d8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_virtual_circuit_details.go @@ -0,0 +1,283 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVirtualCircuitDetails The representation of CreateVirtualCircuitDetails +type CreateVirtualCircuitDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the virtual circuit. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The type of IP addresses used in this virtual circuit. PRIVATE + // means RFC 1918 (https://tools.ietf.org/html/rfc1918) addresses + // (10.0.0.0/8, 172.16/12, and 192.168/16). + Type CreateVirtualCircuitDetailsTypeEnum `mandatory:"true" json:"type"` + + // The provisioned data rate of the connection. To get a list of the + // available bandwidth levels (that is, shapes), see + // ListFastConnectProviderVirtualCircuitBandwidthShapes. + // Example: `10 Gbps` + BandwidthShapeName *string `mandatory:"false" json:"bandwidthShapeName"` + + // Create a `CrossConnectMapping` for each cross-connect or cross-connect + // group this virtual circuit will run on. + CrossConnectMappings []CrossConnectMapping `mandatory:"false" json:"crossConnectMappings"` + + // The routing policy sets how routing information about the Oracle cloud is shared over a public virtual circuit. + // Policies available are: `ORACLE_SERVICE_NETWORK`, `REGIONAL`, `MARKET_LEVEL`, and `GLOBAL`. + // See Route Filtering (https://docs.oracle.com/iaas/Content/Network/Concepts/routingonprem.htm#route_filtering) for details. + // By default, routing information is shared for all routes in the same market. + RoutingPolicy []CreateVirtualCircuitDetailsRoutingPolicyEnum `mandatory:"false" json:"routingPolicy,omitempty"` + + // Set to `ENABLED` (the default) to activate the BGP session of the virtual circuit, set to `DISABLED` to deactivate the virtual circuit. + BgpAdminState CreateVirtualCircuitDetailsBgpAdminStateEnum `mandatory:"false" json:"bgpAdminState,omitempty"` + + // Set to `true` to enable BFD for IPv4 BGP peering, or set to `false` to disable BFD. If this is not set, the default is `false`. + IsBfdEnabled *bool `mandatory:"false" json:"isBfdEnabled"` + + // Set to `true` for the virtual circuit to carry only encrypted traffic, or set to `false` for the virtual circuit to carry unencrypted traffic. If this is not set, the default is `false`. + IsTransportMode *bool `mandatory:"false" json:"isTransportMode"` + + // Deprecated. Instead use `customerAsn`. + // If you specify values for both, the request will be rejected. + CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` + + // Your BGP ASN (either public or private). Provide this value only if + // there's a BGP session that goes from your edge router to Oracle. + // Otherwise, leave this empty or null. + // Can be a 2-byte or 4-byte ASN. Uses "asplain" format. + // Example: `12345` (2-byte) or `1587232876` (4-byte) + CustomerAsn *int64 `mandatory:"false" json:"customerAsn"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // For private virtual circuits only. The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Drg + // that this virtual circuit uses. + GatewayId *string `mandatory:"false" json:"gatewayId"` + + // Deprecated. Instead use `providerServiceId`. + // To get a list of the provider names, see + // ListFastConnectProviderServices. + ProviderName *string `mandatory:"false" json:"providerName"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the service offered by the provider (if you're connecting + // via a provider). To get a list of the available service offerings, see + // ListFastConnectProviderServices. + ProviderServiceId *string `mandatory:"false" json:"providerServiceId"` + + // The service key name or activation key offered by the provider (if the customer is connecting via a provider). + ProviderServiceKeyName *string `mandatory:"false" json:"providerServiceKeyName"` + + // Deprecated. Instead use `providerServiceId`. + // To get a list of the provider names, see + // ListFastConnectProviderServices. + ProviderServiceName *string `mandatory:"false" json:"providerServiceName"` + + // For a public virtual circuit. The public IP prefixes (CIDRs) the customer wants to + // advertise across the connection. + PublicPrefixes []CreateVirtualCircuitPublicPrefixDetails `mandatory:"false" json:"publicPrefixes"` + + // The Oracle Cloud Infrastructure region where this virtual + // circuit is located. + // Example: `phx` + Region *string `mandatory:"false" json:"region"` + + // The layer 3 IP MTU to use with this virtual circuit. + IpMtu VirtualCircuitIpMtuEnum `mandatory:"false" json:"ipMtu,omitempty"` +} + +func (m CreateVirtualCircuitDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateVirtualCircuitDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCreateVirtualCircuitDetailsTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetCreateVirtualCircuitDetailsTypeEnumStringValues(), ","))) + } + + for _, val := range m.RoutingPolicy { + if _, ok := GetMappingCreateVirtualCircuitDetailsRoutingPolicyEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RoutingPolicy: %s. Supported values are: %s.", val, strings.Join(GetCreateVirtualCircuitDetailsRoutingPolicyEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingCreateVirtualCircuitDetailsBgpAdminStateEnum(string(m.BgpAdminState)); !ok && m.BgpAdminState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BgpAdminState: %s. Supported values are: %s.", m.BgpAdminState, strings.Join(GetCreateVirtualCircuitDetailsBgpAdminStateEnumStringValues(), ","))) + } + if _, ok := GetMappingVirtualCircuitIpMtuEnum(string(m.IpMtu)); !ok && m.IpMtu != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IpMtu: %s. Supported values are: %s.", m.IpMtu, strings.Join(GetVirtualCircuitIpMtuEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVirtualCircuitDetailsRoutingPolicyEnum Enum with underlying type: string +type CreateVirtualCircuitDetailsRoutingPolicyEnum string + +// Set of constants representing the allowable values for CreateVirtualCircuitDetailsRoutingPolicyEnum +const ( + CreateVirtualCircuitDetailsRoutingPolicyOracleServiceNetwork CreateVirtualCircuitDetailsRoutingPolicyEnum = "ORACLE_SERVICE_NETWORK" + CreateVirtualCircuitDetailsRoutingPolicyRegional CreateVirtualCircuitDetailsRoutingPolicyEnum = "REGIONAL" + CreateVirtualCircuitDetailsRoutingPolicyMarketLevel CreateVirtualCircuitDetailsRoutingPolicyEnum = "MARKET_LEVEL" + CreateVirtualCircuitDetailsRoutingPolicyGlobal CreateVirtualCircuitDetailsRoutingPolicyEnum = "GLOBAL" +) + +var mappingCreateVirtualCircuitDetailsRoutingPolicyEnum = map[string]CreateVirtualCircuitDetailsRoutingPolicyEnum{ + "ORACLE_SERVICE_NETWORK": CreateVirtualCircuitDetailsRoutingPolicyOracleServiceNetwork, + "REGIONAL": CreateVirtualCircuitDetailsRoutingPolicyRegional, + "MARKET_LEVEL": CreateVirtualCircuitDetailsRoutingPolicyMarketLevel, + "GLOBAL": CreateVirtualCircuitDetailsRoutingPolicyGlobal, +} + +var mappingCreateVirtualCircuitDetailsRoutingPolicyEnumLowerCase = map[string]CreateVirtualCircuitDetailsRoutingPolicyEnum{ + "oracle_service_network": CreateVirtualCircuitDetailsRoutingPolicyOracleServiceNetwork, + "regional": CreateVirtualCircuitDetailsRoutingPolicyRegional, + "market_level": CreateVirtualCircuitDetailsRoutingPolicyMarketLevel, + "global": CreateVirtualCircuitDetailsRoutingPolicyGlobal, +} + +// GetCreateVirtualCircuitDetailsRoutingPolicyEnumValues Enumerates the set of values for CreateVirtualCircuitDetailsRoutingPolicyEnum +func GetCreateVirtualCircuitDetailsRoutingPolicyEnumValues() []CreateVirtualCircuitDetailsRoutingPolicyEnum { + values := make([]CreateVirtualCircuitDetailsRoutingPolicyEnum, 0) + for _, v := range mappingCreateVirtualCircuitDetailsRoutingPolicyEnum { + values = append(values, v) + } + return values +} + +// GetCreateVirtualCircuitDetailsRoutingPolicyEnumStringValues Enumerates the set of values in String for CreateVirtualCircuitDetailsRoutingPolicyEnum +func GetCreateVirtualCircuitDetailsRoutingPolicyEnumStringValues() []string { + return []string{ + "ORACLE_SERVICE_NETWORK", + "REGIONAL", + "MARKET_LEVEL", + "GLOBAL", + } +} + +// GetMappingCreateVirtualCircuitDetailsRoutingPolicyEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateVirtualCircuitDetailsRoutingPolicyEnum(val string) (CreateVirtualCircuitDetailsRoutingPolicyEnum, bool) { + enum, ok := mappingCreateVirtualCircuitDetailsRoutingPolicyEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CreateVirtualCircuitDetailsBgpAdminStateEnum Enum with underlying type: string +type CreateVirtualCircuitDetailsBgpAdminStateEnum string + +// Set of constants representing the allowable values for CreateVirtualCircuitDetailsBgpAdminStateEnum +const ( + CreateVirtualCircuitDetailsBgpAdminStateEnabled CreateVirtualCircuitDetailsBgpAdminStateEnum = "ENABLED" + CreateVirtualCircuitDetailsBgpAdminStateDisabled CreateVirtualCircuitDetailsBgpAdminStateEnum = "DISABLED" +) + +var mappingCreateVirtualCircuitDetailsBgpAdminStateEnum = map[string]CreateVirtualCircuitDetailsBgpAdminStateEnum{ + "ENABLED": CreateVirtualCircuitDetailsBgpAdminStateEnabled, + "DISABLED": CreateVirtualCircuitDetailsBgpAdminStateDisabled, +} + +var mappingCreateVirtualCircuitDetailsBgpAdminStateEnumLowerCase = map[string]CreateVirtualCircuitDetailsBgpAdminStateEnum{ + "enabled": CreateVirtualCircuitDetailsBgpAdminStateEnabled, + "disabled": CreateVirtualCircuitDetailsBgpAdminStateDisabled, +} + +// GetCreateVirtualCircuitDetailsBgpAdminStateEnumValues Enumerates the set of values for CreateVirtualCircuitDetailsBgpAdminStateEnum +func GetCreateVirtualCircuitDetailsBgpAdminStateEnumValues() []CreateVirtualCircuitDetailsBgpAdminStateEnum { + values := make([]CreateVirtualCircuitDetailsBgpAdminStateEnum, 0) + for _, v := range mappingCreateVirtualCircuitDetailsBgpAdminStateEnum { + values = append(values, v) + } + return values +} + +// GetCreateVirtualCircuitDetailsBgpAdminStateEnumStringValues Enumerates the set of values in String for CreateVirtualCircuitDetailsBgpAdminStateEnum +func GetCreateVirtualCircuitDetailsBgpAdminStateEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + } +} + +// GetMappingCreateVirtualCircuitDetailsBgpAdminStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateVirtualCircuitDetailsBgpAdminStateEnum(val string) (CreateVirtualCircuitDetailsBgpAdminStateEnum, bool) { + enum, ok := mappingCreateVirtualCircuitDetailsBgpAdminStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CreateVirtualCircuitDetailsTypeEnum Enum with underlying type: string +type CreateVirtualCircuitDetailsTypeEnum string + +// Set of constants representing the allowable values for CreateVirtualCircuitDetailsTypeEnum +const ( + CreateVirtualCircuitDetailsTypePublic CreateVirtualCircuitDetailsTypeEnum = "PUBLIC" + CreateVirtualCircuitDetailsTypePrivate CreateVirtualCircuitDetailsTypeEnum = "PRIVATE" +) + +var mappingCreateVirtualCircuitDetailsTypeEnum = map[string]CreateVirtualCircuitDetailsTypeEnum{ + "PUBLIC": CreateVirtualCircuitDetailsTypePublic, + "PRIVATE": CreateVirtualCircuitDetailsTypePrivate, +} + +var mappingCreateVirtualCircuitDetailsTypeEnumLowerCase = map[string]CreateVirtualCircuitDetailsTypeEnum{ + "public": CreateVirtualCircuitDetailsTypePublic, + "private": CreateVirtualCircuitDetailsTypePrivate, +} + +// GetCreateVirtualCircuitDetailsTypeEnumValues Enumerates the set of values for CreateVirtualCircuitDetailsTypeEnum +func GetCreateVirtualCircuitDetailsTypeEnumValues() []CreateVirtualCircuitDetailsTypeEnum { + values := make([]CreateVirtualCircuitDetailsTypeEnum, 0) + for _, v := range mappingCreateVirtualCircuitDetailsTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateVirtualCircuitDetailsTypeEnumStringValues Enumerates the set of values in String for CreateVirtualCircuitDetailsTypeEnum +func GetCreateVirtualCircuitDetailsTypeEnumStringValues() []string { + return []string{ + "PUBLIC", + "PRIVATE", + } +} + +// GetMappingCreateVirtualCircuitDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateVirtualCircuitDetailsTypeEnum(val string) (CreateVirtualCircuitDetailsTypeEnum, bool) { + enum, ok := mappingCreateVirtualCircuitDetailsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_virtual_circuit_public_prefix_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_virtual_circuit_public_prefix_details.go new file mode 100644 index 000000000..f286213b2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_virtual_circuit_public_prefix_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVirtualCircuitPublicPrefixDetails The representation of CreateVirtualCircuitPublicPrefixDetails +type CreateVirtualCircuitPublicPrefixDetails struct { + + // An individual public IP prefix (CIDR) to add to the public virtual circuit. + // All prefix sizes are allowed. + CidrBlock *string `mandatory:"true" json:"cidrBlock"` +} + +func (m CreateVirtualCircuitPublicPrefixDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateVirtualCircuitPublicPrefixDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_virtual_circuit_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_virtual_circuit_request_response.go new file mode 100644 index 000000000..ed3609f5d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_virtual_circuit_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateVirtualCircuitRequest wrapper for the CreateVirtualCircuit operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVirtualCircuit.go.html to see an example of how to use CreateVirtualCircuitRequest. +type CreateVirtualCircuitRequest struct { + + // Details to create a VirtualCircuit. + CreateVirtualCircuitDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVirtualCircuitRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVirtualCircuitRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateVirtualCircuitRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVirtualCircuitRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateVirtualCircuitRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVirtualCircuitResponse wrapper for the CreateVirtualCircuit operation +type CreateVirtualCircuitResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VirtualCircuit instance + VirtualCircuit `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateVirtualCircuitResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVirtualCircuitResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vlan_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vlan_details.go new file mode 100644 index 000000000..abe1158f1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vlan_details.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVlanDetails The representation of CreateVlanDetails +type CreateVlanDetails struct { + + // The range of IPv4 addresses that will be used for layer 3 communication with + // hosts outside the VLAN. The CIDR must maintain the following rules - + // 1. The CIDR block is valid and correctly formatted. + // 2. The new range is within one of the parent VCN ranges. + // Example: `192.0.2.0/24` + CidrBlock *string `mandatory:"true" json:"cidrBlock"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the VLAN. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN to contain the VLAN. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Controls whether the VLAN is regional or specific to an availability domain. + // A regional VLAN has the flexibility to implement failover across availability domains. + // Previously, all VLANs were AD-specific. + // To create a regional VLAN, omit this attribute. Resources created subsequently in this + // VLAN (such as a Compute instance) can be created in any availability domain in the region. + // To create an AD-specific VLAN, use this attribute to specify the availability domain. + // Resources created in this VLAN must be in that availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // A list of the OCIDs of the network security groups (NSGs) to add all VNICs in the VLAN to. For more + // information about NSGs, see + // NetworkSecurityGroup. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the VLAN will use. If you don't provide a value, + // the VLAN uses the VCN's default route table. + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // The IEEE 802.1Q VLAN tag for this VLAN. The value must be unique across all + // VLANs in the VCN. If you don't provide a value, Oracle assigns one. + // You cannot change the value later. VLAN tag 0 is reserved for use by Oracle. + VlanTag *int `mandatory:"false" json:"vlanTag"` +} + +func (m CreateVlanDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateVlanDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vlan_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vlan_request_response.go new file mode 100644 index 000000000..2870ad24e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vlan_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateVlanRequest wrapper for the CreateVlan operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVlan.go.html to see an example of how to use CreateVlanRequest. +type CreateVlanRequest struct { + + // Details for creating a VLAN + CreateVlanDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVlanRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVlanRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateVlanRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVlanRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateVlanRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVlanResponse wrapper for the CreateVlan operation +type CreateVlanResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Vlan instance + Vlan `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateVlanResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVlanResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vnic_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vnic_details.go new file mode 100644 index 000000000..a52a00eee --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vnic_details.go @@ -0,0 +1,188 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVnicDetails Contains properties for a VNIC. You use this object when creating the +// primary VNIC during instance launch or when creating a secondary VNIC. +// For more information about VNICs, see +// Virtual Network Interface Cards (VNICs) (https://docs.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). +type CreateVnicDetails struct { + + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + AssignIpv6Ip *bool `mandatory:"false" json:"assignIpv6Ip"` + + // Whether the VNIC should be assigned a public IP address. Defaults to whether + // the subnet is public or private. If not set and the VNIC is being created + // in a private subnet (that is, where `prohibitPublicIpOnVnic` = true in the + // Subnet), then no public IP address is assigned. + // If not set and the subnet is public (`prohibitPublicIpOnVnic` = false), then + // a public IP address is assigned. If set to true and + // `prohibitPublicIpOnVnic` = true, an error is returned. + // **Note:** This public IP address is associated with the primary private IP + // on the VNIC. For more information, see + // IP Addresses (https://docs.oracle.com/iaas/Content/Network/Tasks/managingIPaddresses.htm). + // **Note:** There's a limit to the number of PublicIp + // a VNIC or instance can have. If you try to create a secondary VNIC + // with an assigned public IP for an instance that has already + // reached its public IP limit, an error is returned. For information + // about the public IP limits, see + // Public IP Addresses (https://docs.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm). + // Example: `false` + // If you specify a `vlanId`, then `assignPublicIp` must be set to false. See + // Vlan. + AssignPublicIp *bool `mandatory:"false" json:"assignPublicIp"` + + // Whether the VNIC should be assigned a DNS record. If set to false, there will be no DNS record + // registration for the VNIC. If set to true, the DNS record will be registered. The default + // value is true. + // If you specify a `hostnameLabel`, then `assignPrivateDnsRecord` must be set to true. + AssignPrivateDnsRecord *bool `mandatory:"false" json:"assignPrivateDnsRecord"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Security attributes (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels + // for a resource that can be referenced in a Zero Trust Packet Routing (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) + // (ZPR) policy to control access to ZPR-supported resources. + // Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` + SecurityAttributes map[string]map[string]interface{} `mandatory:"false" json:"securityAttributes"` + + // The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname + // portion of the primary private IP's fully qualified domain name (FQDN) + // (for example, `bminstance1` in FQDN `bminstance1.subnet123.vcn1.oraclevcn.com`). + // Must be unique across all VNICs in the subnet and comply with + // RFC 952 (https://tools.ietf.org/html/rfc952) and + // RFC 1123 (https://tools.ietf.org/html/rfc1123). + // The value appears in the Vnic object and also the + // PrivateIp object returned by + // ListPrivateIps and + // GetPrivateIp. + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + // When launching an instance, use this `hostnameLabel` instead + // of the deprecated `hostnameLabel` in + // LaunchInstanceDetails. + // If you provide both, the values must match. + // Example: `bminstance1` + // If you specify a `vlanId`, the `hostnameLabel` cannot be specified. VNICs on a VLAN + // can not be assigned a hostname. See Vlan. + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // A list of IPv6 prefix ranges from which the VNIC is assigned an IPv6 address. + // You can provide only the prefix ranges from which OCI selects an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address within that range to use. + Ipv6AddressIpv6SubnetCidrPairDetails []Ipv6AddressIpv6SubnetCidrPairDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` + + // One of the IPv4 CIDR blocks allocated to the subnet. Represents the IP range + // from which the VNIC's private IP address will be assigned if `privateIp` or + // `privateIpId` is not specified. + // Either this field or the `privateIp` (or `privateIpId`, if applicable) field + // must be provided, but not both simultaneously. + // Example: `192.168.1.0/28` + SubnetCidr *string `mandatory:"false" json:"subnetCidr"` + + // A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. For more + // information about NSGs, see + // NetworkSecurityGroup. + // If a `vlanId` is specified, the `nsgIds` cannot be specified. The `vlanId` + // indicates that the VNIC will belong to a VLAN instead of a subnet. With VLANs, + // all VNICs in the VLAN belong to the NSGs that are associated with the VLAN. + // See Vlan. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // A private IP address of your choice to assign to the VNIC. Must be an + // available IP address within the subnet's CIDR. If you don't specify a + // value, Oracle automatically assigns a private IP address from the subnet. + // This is the VNIC's *primary* private IP address. The value appears in + // the Vnic object and also the + // PrivateIp object returned by + // ListPrivateIps and + // GetPrivateIp. + // + // If you specify a `vlanId`, the `privateIp` cannot be specified. + // See Vlan. + // If you specify a 'privateIpId', the 'privateIp' cannot be specified. + // Example: `10.0.3.3` + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // An OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that specifies a previously-reserved IP address to use for this VNIC. + PrivateIpId *string `mandatory:"false" json:"privateIpId"` + + // Whether the source/destination check is disabled on the VNIC. + // Defaults to `false`, which means the check is performed. For information + // about why you would skip the source/destination check, see + // Using a Private IP as a Route Target (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#privateip). + // + // If you specify a `vlanId`, the `skipSourceDestCheck` cannot be specified because the + // source/destination check is always disabled for VNICs in a VLAN. See + // Vlan. + // Example: `true` + SkipSourceDestCheck *bool `mandatory:"false" json:"skipSourceDestCheck"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet to create the VNIC in. When launching an instance, + // use this `subnetId` instead of the deprecated `subnetId` in + // LaunchInstanceDetails. + // At least one of them is required; if you provide both, the values must match. + // If you are an Oracle Cloud VMware Solution customer and creating a secondary + // VNIC in a VLAN instead of a subnet, provide a `vlanId` instead of a `subnetId`. + // If you provide both a `vlanId` and `subnetId`, the request fails. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // Provide this attribute only if you are an Oracle Cloud VMware Solution + // customer and creating a secondary VNIC in a VLAN. The value is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VLAN. + // See Vlan. + // Provide a `vlanId` instead of a `subnetId`. If you provide both a + // `vlanId` and `subnetId`, the request fails. + VlanId *string `mandatory:"false" json:"vlanId"` +} + +func (m CreateVnicDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateVnicDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_details.go new file mode 100644 index 000000000..acc06f0ef --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_details.go @@ -0,0 +1,113 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVolumeBackupDetails The representation of CreateVolumeBackupDetails +type CreateVolumeBackupDetails struct { + + // The OCID of the volume that needs to be backed up. + VolumeId *string `mandatory:"true" json:"volumeId"` + + // The OCID of the Vault service key which is the master encryption key for the volume backup. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The type of backup to create. If omitted, defaults to INCREMENTAL. + Type CreateVolumeBackupDetailsTypeEnum `mandatory:"false" json:"type,omitempty"` +} + +func (m CreateVolumeBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateVolumeBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCreateVolumeBackupDetailsTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetCreateVolumeBackupDetailsTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVolumeBackupDetailsTypeEnum Enum with underlying type: string +type CreateVolumeBackupDetailsTypeEnum string + +// Set of constants representing the allowable values for CreateVolumeBackupDetailsTypeEnum +const ( + CreateVolumeBackupDetailsTypeFull CreateVolumeBackupDetailsTypeEnum = "FULL" + CreateVolumeBackupDetailsTypeIncremental CreateVolumeBackupDetailsTypeEnum = "INCREMENTAL" +) + +var mappingCreateVolumeBackupDetailsTypeEnum = map[string]CreateVolumeBackupDetailsTypeEnum{ + "FULL": CreateVolumeBackupDetailsTypeFull, + "INCREMENTAL": CreateVolumeBackupDetailsTypeIncremental, +} + +var mappingCreateVolumeBackupDetailsTypeEnumLowerCase = map[string]CreateVolumeBackupDetailsTypeEnum{ + "full": CreateVolumeBackupDetailsTypeFull, + "incremental": CreateVolumeBackupDetailsTypeIncremental, +} + +// GetCreateVolumeBackupDetailsTypeEnumValues Enumerates the set of values for CreateVolumeBackupDetailsTypeEnum +func GetCreateVolumeBackupDetailsTypeEnumValues() []CreateVolumeBackupDetailsTypeEnum { + values := make([]CreateVolumeBackupDetailsTypeEnum, 0) + for _, v := range mappingCreateVolumeBackupDetailsTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateVolumeBackupDetailsTypeEnumStringValues Enumerates the set of values in String for CreateVolumeBackupDetailsTypeEnum +func GetCreateVolumeBackupDetailsTypeEnumStringValues() []string { + return []string{ + "FULL", + "INCREMENTAL", + } +} + +// GetMappingCreateVolumeBackupDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateVolumeBackupDetailsTypeEnum(val string) (CreateVolumeBackupDetailsTypeEnum, bool) { + enum, ok := mappingCreateVolumeBackupDetailsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_policy_assignment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_policy_assignment_details.go new file mode 100644 index 000000000..f823df852 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_policy_assignment_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVolumeBackupPolicyAssignmentDetails The representation of CreateVolumeBackupPolicyAssignmentDetails +type CreateVolumeBackupPolicyAssignmentDetails struct { + + // The OCID of the volume to assign the policy to. + AssetId *string `mandatory:"true" json:"assetId"` + + // The OCID of the volume backup policy to assign to the volume. + PolicyId *string `mandatory:"true" json:"policyId"` + + // The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + XrcKmsKeyId *string `mandatory:"false" json:"xrcKmsKeyId"` +} + +func (m CreateVolumeBackupPolicyAssignmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateVolumeBackupPolicyAssignmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_policy_assignment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_policy_assignment_request_response.go new file mode 100644 index 000000000..91b57e818 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_policy_assignment_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateVolumeBackupPolicyAssignmentRequest wrapper for the CreateVolumeBackupPolicyAssignment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeBackupPolicyAssignment.go.html to see an example of how to use CreateVolumeBackupPolicyAssignmentRequest. +type CreateVolumeBackupPolicyAssignmentRequest struct { + + // Request to assign a specified policy to a particular volume. + CreateVolumeBackupPolicyAssignmentDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVolumeBackupPolicyAssignmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVolumeBackupPolicyAssignmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateVolumeBackupPolicyAssignmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVolumeBackupPolicyAssignmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateVolumeBackupPolicyAssignmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVolumeBackupPolicyAssignmentResponse wrapper for the CreateVolumeBackupPolicyAssignment operation +type CreateVolumeBackupPolicyAssignmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeBackupPolicyAssignment instance + VolumeBackupPolicyAssignment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateVolumeBackupPolicyAssignmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVolumeBackupPolicyAssignmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_policy_details.go new file mode 100644 index 000000000..4c05dfa0f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_policy_details.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVolumeBackupPolicyDetails Specifies the properties for creating user defined backup policy. +// For more information about user defined backup policies, +// see User Defined Policies (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#UserDefinedBackupPolicies) in +// Policy-Based Backups (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm). +type CreateVolumeBackupPolicyDetails struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The paired destination region for copying scheduled backups to. Example: `us-ashburn-1`. + // See Region Pairs (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#RegionPairs) for details about paired regions. + DestinationRegion *string `mandatory:"false" json:"destinationRegion"` + + // The collection of schedules for the volume backup policy. See + // see Schedules (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#schedules) in + // Policy-Based Backups (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm) for more information. + Schedules []VolumeBackupSchedule `mandatory:"false" json:"schedules"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateVolumeBackupPolicyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateVolumeBackupPolicyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_policy_request_response.go new file mode 100644 index 000000000..ab48a3fad --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_policy_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateVolumeBackupPolicyRequest wrapper for the CreateVolumeBackupPolicy operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeBackupPolicy.go.html to see an example of how to use CreateVolumeBackupPolicyRequest. +type CreateVolumeBackupPolicyRequest struct { + + // Request to create a new scheduled backup policy. + CreateVolumeBackupPolicyDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVolumeBackupPolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVolumeBackupPolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateVolumeBackupPolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVolumeBackupPolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateVolumeBackupPolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVolumeBackupPolicyResponse wrapper for the CreateVolumeBackupPolicy operation +type CreateVolumeBackupPolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeBackupPolicy instance + VolumeBackupPolicy `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateVolumeBackupPolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVolumeBackupPolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_request_response.go new file mode 100644 index 000000000..c20adb5ec --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_backup_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateVolumeBackupRequest wrapper for the CreateVolumeBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeBackup.go.html to see an example of how to use CreateVolumeBackupRequest. +type CreateVolumeBackupRequest struct { + + // Request to create a new backup of given volume. + CreateVolumeBackupDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVolumeBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateVolumeBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateVolumeBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVolumeBackupResponse wrapper for the CreateVolumeBackup operation +type CreateVolumeBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeBackup instance + VolumeBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateVolumeBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_details.go new file mode 100644 index 000000000..28774e394 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_details.go @@ -0,0 +1,207 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVolumeDetails The details of the volume to create. For CreateVolume operation, this field is required in the request, +// see CreateVolume. +type CreateVolumeDetails struct { + + // The OCID of the compartment that contains the volume. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The availability domain of the volume. Omissible for cloning a volume. The new volume will be created in the availability domain of the source volume. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // If provided, specifies the ID of the volume backup policy to assign to the newly + // created volume. If omitted, no policy will be assigned. + BackupPolicyId *string `mandatory:"false" json:"backupPolicyId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID of the Vault service key to assign as the master encryption key + // for the volume. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // The number of volume performance units (VPUs) that will be applied to this volume per GB, + // representing the Block Volume service's elastic performance options. + // See Block Volume Performance Levels (https://docs.oracle.com/iaas/Content/Block/Concepts/blockvolumeperformance.htm#perf_levels) for more information. + // Allowed values: + // * `0`: Represents Lower Cost option. + // * `10`: Represents Balanced option. + // * `20`: Represents Higher Performance option. + // * `30`-`120`: Represents the Ultra High Performance option. + // For performance autotune enabled volumes, it would be the Default(Minimum) VPUs/GB. + VpusPerGB *int64 `mandatory:"false" json:"vpusPerGB"` + + // The clusterPlacementGroup Id of the volume for volume placement. + ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` + + // The size of the volume in GBs. + SizeInGBs *int64 `mandatory:"false" json:"sizeInGBs"` + + // The size of the volume in MBs. The value must be a multiple of 1024. + // This field is deprecated. Use sizeInGBs instead. + SizeInMBs *int64 `mandatory:"false" json:"sizeInMBs"` + + SourceDetails VolumeSourceDetails `mandatory:"false" json:"sourceDetails"` + + // The OCID of the volume backup from which the data should be restored on the newly created volume. + // This field is deprecated. Use the sourceDetails field instead to specify the + // backup for the volume. + VolumeBackupId *string `mandatory:"false" json:"volumeBackupId"` + + // Specifies whether the auto-tune performance is enabled for this volume. This field is deprecated. + // Use the `DetachedVolumeAutotunePolicy` instead to enable the volume for detached autotune. + IsAutoTuneEnabled *bool `mandatory:"false" json:"isAutoTuneEnabled"` + + // The list of block volume replicas to be enabled for this volume + // in the specified destination availability domains. + BlockVolumeReplicas []BlockVolumeReplicaDetails `mandatory:"false" json:"blockVolumeReplicas"` + + // The list of autotune policies to be enabled for this volume. + AutotunePolicies []AutotunePolicy `mandatory:"false" json:"autotunePolicies"` + + // The OCID of the Vault service key which is the master encryption key for the block volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + XrcKmsKeyId *string `mandatory:"false" json:"xrcKmsKeyId"` + + // When set to true, enables SCSI Persistent Reservation (SCSI PR) for the volume. For more information, see + // Persistent Reservations (https://docs.oracle.com/iaas/Content/Block/Concepts/persistent-reservations.htm). + IsReservationsEnabled *bool `mandatory:"false" json:"isReservationsEnabled"` +} + +func (m CreateVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateVolumeDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + AvailabilityDomain *string `json:"availabilityDomain"` + BackupPolicyId *string `json:"backupPolicyId"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + KmsKeyId *string `json:"kmsKeyId"` + VpusPerGB *int64 `json:"vpusPerGB"` + ClusterPlacementGroupId *string `json:"clusterPlacementGroupId"` + SizeInGBs *int64 `json:"sizeInGBs"` + SizeInMBs *int64 `json:"sizeInMBs"` + SourceDetails volumesourcedetails `json:"sourceDetails"` + VolumeBackupId *string `json:"volumeBackupId"` + IsAutoTuneEnabled *bool `json:"isAutoTuneEnabled"` + BlockVolumeReplicas []BlockVolumeReplicaDetails `json:"blockVolumeReplicas"` + AutotunePolicies []autotunepolicy `json:"autotunePolicies"` + XrcKmsKeyId *string `json:"xrcKmsKeyId"` + IsReservationsEnabled *bool `json:"isReservationsEnabled"` + CompartmentId *string `json:"compartmentId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.AvailabilityDomain = model.AvailabilityDomain + + m.BackupPolicyId = model.BackupPolicyId + + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.KmsKeyId = model.KmsKeyId + + m.VpusPerGB = model.VpusPerGB + + m.ClusterPlacementGroupId = model.ClusterPlacementGroupId + + m.SizeInGBs = model.SizeInGBs + + m.SizeInMBs = model.SizeInMBs + + nn, e = model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.SourceDetails = nn.(VolumeSourceDetails) + } else { + m.SourceDetails = nil + } + + m.VolumeBackupId = model.VolumeBackupId + + m.IsAutoTuneEnabled = model.IsAutoTuneEnabled + + m.BlockVolumeReplicas = make([]BlockVolumeReplicaDetails, len(model.BlockVolumeReplicas)) + copy(m.BlockVolumeReplicas, model.BlockVolumeReplicas) + m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) + for i, n := range model.AutotunePolicies { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.AutotunePolicies[i] = nn.(AutotunePolicy) + } else { + m.AutotunePolicies[i] = nil + } + } + m.XrcKmsKeyId = model.XrcKmsKeyId + + m.IsReservationsEnabled = model.IsReservationsEnabled + + m.CompartmentId = model.CompartmentId + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_backup_details.go new file mode 100644 index 000000000..ba4887f5e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_backup_details.go @@ -0,0 +1,112 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVolumeGroupBackupDetails The representation of CreateVolumeGroupBackupDetails +type CreateVolumeGroupBackupDetails struct { + + // The OCID of the volume group that needs to be backed up. + VolumeGroupId *string `mandatory:"true" json:"volumeGroupId"` + + // The OCID of the compartment that will contain the volume group + // backup. This parameter is optional, by default backup will be created in + // the same compartment and source volume group. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The type of backup to create. If omitted, defaults to incremental. + Type CreateVolumeGroupBackupDetailsTypeEnum `mandatory:"false" json:"type,omitempty"` +} + +func (m CreateVolumeGroupBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateVolumeGroupBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCreateVolumeGroupBackupDetailsTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetCreateVolumeGroupBackupDetailsTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVolumeGroupBackupDetailsTypeEnum Enum with underlying type: string +type CreateVolumeGroupBackupDetailsTypeEnum string + +// Set of constants representing the allowable values for CreateVolumeGroupBackupDetailsTypeEnum +const ( + CreateVolumeGroupBackupDetailsTypeFull CreateVolumeGroupBackupDetailsTypeEnum = "FULL" + CreateVolumeGroupBackupDetailsTypeIncremental CreateVolumeGroupBackupDetailsTypeEnum = "INCREMENTAL" +) + +var mappingCreateVolumeGroupBackupDetailsTypeEnum = map[string]CreateVolumeGroupBackupDetailsTypeEnum{ + "FULL": CreateVolumeGroupBackupDetailsTypeFull, + "INCREMENTAL": CreateVolumeGroupBackupDetailsTypeIncremental, +} + +var mappingCreateVolumeGroupBackupDetailsTypeEnumLowerCase = map[string]CreateVolumeGroupBackupDetailsTypeEnum{ + "full": CreateVolumeGroupBackupDetailsTypeFull, + "incremental": CreateVolumeGroupBackupDetailsTypeIncremental, +} + +// GetCreateVolumeGroupBackupDetailsTypeEnumValues Enumerates the set of values for CreateVolumeGroupBackupDetailsTypeEnum +func GetCreateVolumeGroupBackupDetailsTypeEnumValues() []CreateVolumeGroupBackupDetailsTypeEnum { + values := make([]CreateVolumeGroupBackupDetailsTypeEnum, 0) + for _, v := range mappingCreateVolumeGroupBackupDetailsTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateVolumeGroupBackupDetailsTypeEnumStringValues Enumerates the set of values in String for CreateVolumeGroupBackupDetailsTypeEnum +func GetCreateVolumeGroupBackupDetailsTypeEnumStringValues() []string { + return []string{ + "FULL", + "INCREMENTAL", + } +} + +// GetMappingCreateVolumeGroupBackupDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateVolumeGroupBackupDetailsTypeEnum(val string) (CreateVolumeGroupBackupDetailsTypeEnum, bool) { + enum, ok := mappingCreateVolumeGroupBackupDetailsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_backup_request_response.go new file mode 100644 index 000000000..ffb095a3e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_backup_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateVolumeGroupBackupRequest wrapper for the CreateVolumeGroupBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeGroupBackup.go.html to see an example of how to use CreateVolumeGroupBackupRequest. +type CreateVolumeGroupBackupRequest struct { + + // Request to create a new backup group of given volume group. + CreateVolumeGroupBackupDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVolumeGroupBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVolumeGroupBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateVolumeGroupBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVolumeGroupBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateVolumeGroupBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVolumeGroupBackupResponse wrapper for the CreateVolumeGroupBackup operation +type CreateVolumeGroupBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeGroupBackup instance + VolumeGroupBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateVolumeGroupBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVolumeGroupBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_details.go new file mode 100644 index 000000000..3e42e23a5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_details.go @@ -0,0 +1,133 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVolumeGroupDetails The representation of CreateVolumeGroupDetails +type CreateVolumeGroupDetails struct { + + // The availability domain of the volume group. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the volume group. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + SourceDetails VolumeGroupSourceDetails `mandatory:"true" json:"sourceDetails"` + + // If provided, specifies the ID of the volume backup policy to assign to the newly + // created volume group. If omitted, no policy will be assigned. + BackupPolicyId *string `mandatory:"false" json:"backupPolicyId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The list of volume group replicas that this volume group will be enabled to have + // in the specified destination availability domains. + VolumeGroupReplicas []VolumeGroupReplicaDetails `mandatory:"false" json:"volumeGroupReplicas"` + + // The clusterPlacementGroup Id of the volume group for volume group placement. + ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` + + // The OCID of the Vault service key which is the master encryption key for the volume's cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + XrcKmsKeyId *string `mandatory:"false" json:"xrcKmsKeyId"` +} + +func (m CreateVolumeGroupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateVolumeGroupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateVolumeGroupDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + BackupPolicyId *string `json:"backupPolicyId"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + VolumeGroupReplicas []VolumeGroupReplicaDetails `json:"volumeGroupReplicas"` + ClusterPlacementGroupId *string `json:"clusterPlacementGroupId"` + XrcKmsKeyId *string `json:"xrcKmsKeyId"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + SourceDetails volumegroupsourcedetails `json:"sourceDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.BackupPolicyId = model.BackupPolicyId + + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.VolumeGroupReplicas = make([]VolumeGroupReplicaDetails, len(model.VolumeGroupReplicas)) + copy(m.VolumeGroupReplicas, model.VolumeGroupReplicas) + m.ClusterPlacementGroupId = model.ClusterPlacementGroupId + + m.XrcKmsKeyId = model.XrcKmsKeyId + + m.AvailabilityDomain = model.AvailabilityDomain + + m.CompartmentId = model.CompartmentId + + nn, e = model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.SourceDetails = nn.(VolumeGroupSourceDetails) + } else { + m.SourceDetails = nil + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_request_response.go new file mode 100644 index 000000000..6086ba0eb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_group_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateVolumeGroupRequest wrapper for the CreateVolumeGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolumeGroup.go.html to see an example of how to use CreateVolumeGroupRequest. +type CreateVolumeGroupRequest struct { + + // Request to create a new volume group. + CreateVolumeGroupDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVolumeGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVolumeGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateVolumeGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVolumeGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateVolumeGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVolumeGroupResponse wrapper for the CreateVolumeGroup operation +type CreateVolumeGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeGroup instance + VolumeGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateVolumeGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVolumeGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_request_response.go new file mode 100644 index 000000000..07d7f6d9c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_volume_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateVolumeRequest wrapper for the CreateVolume operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVolume.go.html to see an example of how to use CreateVolumeRequest. +type CreateVolumeRequest struct { + + // Request to create a new volume. + CreateVolumeDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVolumeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVolumeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateVolumeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateVolumeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVolumeResponse wrapper for the CreateVolume operation +type CreateVolumeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Volume instance + Volume `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateVolumeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vtap_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vtap_details.go new file mode 100644 index 000000000..d19681f9e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vtap_details.go @@ -0,0 +1,299 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVtapDetails These details are included in a request to create a virtual test access point (VTAP). +type CreateVtapDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the `Vtap` resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN containing the `Vtap` resource. + VcnId *string `mandatory:"true" json:"vcnId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the source point where packets are captured. + SourceId *string `mandatory:"true" json:"sourceId"` + + // The capture filter's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + CaptureFilterId *string `mandatory:"true" json:"captureFilterId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the destination resource where mirrored packets are sent. + TargetId *string `mandatory:"false" json:"targetId"` + + // The IP address of the destination resource where mirrored packets are sent. + TargetIp *string `mandatory:"false" json:"targetIp"` + + // Defines an encapsulation header type for the VTAP's mirrored traffic. + EncapsulationProtocol CreateVtapDetailsEncapsulationProtocolEnum `mandatory:"false" json:"encapsulationProtocol,omitempty"` + + // The virtual extensible LAN (VXLAN) network identifier (or VXLAN segment ID) that uniquely identifies the VXLAN. + VxlanNetworkIdentifier *int64 `mandatory:"false" json:"vxlanNetworkIdentifier"` + + // Used to start or stop a `Vtap` resource. + // * `TRUE` directs the VTAP to start mirroring traffic. + // * `FALSE` (Default) directs the VTAP to stop mirroring traffic. + IsVtapEnabled *bool `mandatory:"false" json:"isVtapEnabled"` + + // The source type for the VTAP. + SourceType CreateVtapDetailsSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` + + // Used to control the priority of traffic. It is an optional field. If it not passed, the value is DEFAULT + TrafficMode CreateVtapDetailsTrafficModeEnum `mandatory:"false" json:"trafficMode,omitempty"` + + // The maximum size of the packets to be included in the filter. + MaxPacketSize *int `mandatory:"false" json:"maxPacketSize"` + + // The target type for the VTAP. + TargetType CreateVtapDetailsTargetTypeEnum `mandatory:"false" json:"targetType,omitempty"` + + // The IP Address of the source private endpoint. + SourcePrivateEndpointIp *string `mandatory:"false" json:"sourcePrivateEndpointIp"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet that source private endpoint belongs to. + SourcePrivateEndpointSubnetId *string `mandatory:"false" json:"sourcePrivateEndpointSubnetId"` +} + +func (m CreateVtapDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateVtapDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCreateVtapDetailsEncapsulationProtocolEnum(string(m.EncapsulationProtocol)); !ok && m.EncapsulationProtocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncapsulationProtocol: %s. Supported values are: %s.", m.EncapsulationProtocol, strings.Join(GetCreateVtapDetailsEncapsulationProtocolEnumStringValues(), ","))) + } + if _, ok := GetMappingCreateVtapDetailsSourceTypeEnum(string(m.SourceType)); !ok && m.SourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceType: %s. Supported values are: %s.", m.SourceType, strings.Join(GetCreateVtapDetailsSourceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingCreateVtapDetailsTrafficModeEnum(string(m.TrafficMode)); !ok && m.TrafficMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TrafficMode: %s. Supported values are: %s.", m.TrafficMode, strings.Join(GetCreateVtapDetailsTrafficModeEnumStringValues(), ","))) + } + if _, ok := GetMappingCreateVtapDetailsTargetTypeEnum(string(m.TargetType)); !ok && m.TargetType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TargetType: %s. Supported values are: %s.", m.TargetType, strings.Join(GetCreateVtapDetailsTargetTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVtapDetailsEncapsulationProtocolEnum Enum with underlying type: string +type CreateVtapDetailsEncapsulationProtocolEnum string + +// Set of constants representing the allowable values for CreateVtapDetailsEncapsulationProtocolEnum +const ( + CreateVtapDetailsEncapsulationProtocolVxlan CreateVtapDetailsEncapsulationProtocolEnum = "VXLAN" +) + +var mappingCreateVtapDetailsEncapsulationProtocolEnum = map[string]CreateVtapDetailsEncapsulationProtocolEnum{ + "VXLAN": CreateVtapDetailsEncapsulationProtocolVxlan, +} + +var mappingCreateVtapDetailsEncapsulationProtocolEnumLowerCase = map[string]CreateVtapDetailsEncapsulationProtocolEnum{ + "vxlan": CreateVtapDetailsEncapsulationProtocolVxlan, +} + +// GetCreateVtapDetailsEncapsulationProtocolEnumValues Enumerates the set of values for CreateVtapDetailsEncapsulationProtocolEnum +func GetCreateVtapDetailsEncapsulationProtocolEnumValues() []CreateVtapDetailsEncapsulationProtocolEnum { + values := make([]CreateVtapDetailsEncapsulationProtocolEnum, 0) + for _, v := range mappingCreateVtapDetailsEncapsulationProtocolEnum { + values = append(values, v) + } + return values +} + +// GetCreateVtapDetailsEncapsulationProtocolEnumStringValues Enumerates the set of values in String for CreateVtapDetailsEncapsulationProtocolEnum +func GetCreateVtapDetailsEncapsulationProtocolEnumStringValues() []string { + return []string{ + "VXLAN", + } +} + +// GetMappingCreateVtapDetailsEncapsulationProtocolEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateVtapDetailsEncapsulationProtocolEnum(val string) (CreateVtapDetailsEncapsulationProtocolEnum, bool) { + enum, ok := mappingCreateVtapDetailsEncapsulationProtocolEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CreateVtapDetailsSourceTypeEnum Enum with underlying type: string +type CreateVtapDetailsSourceTypeEnum string + +// Set of constants representing the allowable values for CreateVtapDetailsSourceTypeEnum +const ( + CreateVtapDetailsSourceTypeVnic CreateVtapDetailsSourceTypeEnum = "VNIC" + CreateVtapDetailsSourceTypeSubnet CreateVtapDetailsSourceTypeEnum = "SUBNET" + CreateVtapDetailsSourceTypeLoadBalancer CreateVtapDetailsSourceTypeEnum = "LOAD_BALANCER" + CreateVtapDetailsSourceTypeDbSystem CreateVtapDetailsSourceTypeEnum = "DB_SYSTEM" + CreateVtapDetailsSourceTypeExadataVmCluster CreateVtapDetailsSourceTypeEnum = "EXADATA_VM_CLUSTER" + CreateVtapDetailsSourceTypeAutonomousDataWarehouse CreateVtapDetailsSourceTypeEnum = "AUTONOMOUS_DATA_WAREHOUSE" +) + +var mappingCreateVtapDetailsSourceTypeEnum = map[string]CreateVtapDetailsSourceTypeEnum{ + "VNIC": CreateVtapDetailsSourceTypeVnic, + "SUBNET": CreateVtapDetailsSourceTypeSubnet, + "LOAD_BALANCER": CreateVtapDetailsSourceTypeLoadBalancer, + "DB_SYSTEM": CreateVtapDetailsSourceTypeDbSystem, + "EXADATA_VM_CLUSTER": CreateVtapDetailsSourceTypeExadataVmCluster, + "AUTONOMOUS_DATA_WAREHOUSE": CreateVtapDetailsSourceTypeAutonomousDataWarehouse, +} + +var mappingCreateVtapDetailsSourceTypeEnumLowerCase = map[string]CreateVtapDetailsSourceTypeEnum{ + "vnic": CreateVtapDetailsSourceTypeVnic, + "subnet": CreateVtapDetailsSourceTypeSubnet, + "load_balancer": CreateVtapDetailsSourceTypeLoadBalancer, + "db_system": CreateVtapDetailsSourceTypeDbSystem, + "exadata_vm_cluster": CreateVtapDetailsSourceTypeExadataVmCluster, + "autonomous_data_warehouse": CreateVtapDetailsSourceTypeAutonomousDataWarehouse, +} + +// GetCreateVtapDetailsSourceTypeEnumValues Enumerates the set of values for CreateVtapDetailsSourceTypeEnum +func GetCreateVtapDetailsSourceTypeEnumValues() []CreateVtapDetailsSourceTypeEnum { + values := make([]CreateVtapDetailsSourceTypeEnum, 0) + for _, v := range mappingCreateVtapDetailsSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateVtapDetailsSourceTypeEnumStringValues Enumerates the set of values in String for CreateVtapDetailsSourceTypeEnum +func GetCreateVtapDetailsSourceTypeEnumStringValues() []string { + return []string{ + "VNIC", + "SUBNET", + "LOAD_BALANCER", + "DB_SYSTEM", + "EXADATA_VM_CLUSTER", + "AUTONOMOUS_DATA_WAREHOUSE", + } +} + +// GetMappingCreateVtapDetailsSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateVtapDetailsSourceTypeEnum(val string) (CreateVtapDetailsSourceTypeEnum, bool) { + enum, ok := mappingCreateVtapDetailsSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CreateVtapDetailsTrafficModeEnum Enum with underlying type: string +type CreateVtapDetailsTrafficModeEnum string + +// Set of constants representing the allowable values for CreateVtapDetailsTrafficModeEnum +const ( + CreateVtapDetailsTrafficModeDefault CreateVtapDetailsTrafficModeEnum = "DEFAULT" + CreateVtapDetailsTrafficModePriority CreateVtapDetailsTrafficModeEnum = "PRIORITY" +) + +var mappingCreateVtapDetailsTrafficModeEnum = map[string]CreateVtapDetailsTrafficModeEnum{ + "DEFAULT": CreateVtapDetailsTrafficModeDefault, + "PRIORITY": CreateVtapDetailsTrafficModePriority, +} + +var mappingCreateVtapDetailsTrafficModeEnumLowerCase = map[string]CreateVtapDetailsTrafficModeEnum{ + "default": CreateVtapDetailsTrafficModeDefault, + "priority": CreateVtapDetailsTrafficModePriority, +} + +// GetCreateVtapDetailsTrafficModeEnumValues Enumerates the set of values for CreateVtapDetailsTrafficModeEnum +func GetCreateVtapDetailsTrafficModeEnumValues() []CreateVtapDetailsTrafficModeEnum { + values := make([]CreateVtapDetailsTrafficModeEnum, 0) + for _, v := range mappingCreateVtapDetailsTrafficModeEnum { + values = append(values, v) + } + return values +} + +// GetCreateVtapDetailsTrafficModeEnumStringValues Enumerates the set of values in String for CreateVtapDetailsTrafficModeEnum +func GetCreateVtapDetailsTrafficModeEnumStringValues() []string { + return []string{ + "DEFAULT", + "PRIORITY", + } +} + +// GetMappingCreateVtapDetailsTrafficModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateVtapDetailsTrafficModeEnum(val string) (CreateVtapDetailsTrafficModeEnum, bool) { + enum, ok := mappingCreateVtapDetailsTrafficModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CreateVtapDetailsTargetTypeEnum Enum with underlying type: string +type CreateVtapDetailsTargetTypeEnum string + +// Set of constants representing the allowable values for CreateVtapDetailsTargetTypeEnum +const ( + CreateVtapDetailsTargetTypeVnic CreateVtapDetailsTargetTypeEnum = "VNIC" + CreateVtapDetailsTargetTypeNetworkLoadBalancer CreateVtapDetailsTargetTypeEnum = "NETWORK_LOAD_BALANCER" + CreateVtapDetailsTargetTypeIpAddress CreateVtapDetailsTargetTypeEnum = "IP_ADDRESS" +) + +var mappingCreateVtapDetailsTargetTypeEnum = map[string]CreateVtapDetailsTargetTypeEnum{ + "VNIC": CreateVtapDetailsTargetTypeVnic, + "NETWORK_LOAD_BALANCER": CreateVtapDetailsTargetTypeNetworkLoadBalancer, + "IP_ADDRESS": CreateVtapDetailsTargetTypeIpAddress, +} + +var mappingCreateVtapDetailsTargetTypeEnumLowerCase = map[string]CreateVtapDetailsTargetTypeEnum{ + "vnic": CreateVtapDetailsTargetTypeVnic, + "network_load_balancer": CreateVtapDetailsTargetTypeNetworkLoadBalancer, + "ip_address": CreateVtapDetailsTargetTypeIpAddress, +} + +// GetCreateVtapDetailsTargetTypeEnumValues Enumerates the set of values for CreateVtapDetailsTargetTypeEnum +func GetCreateVtapDetailsTargetTypeEnumValues() []CreateVtapDetailsTargetTypeEnum { + values := make([]CreateVtapDetailsTargetTypeEnum, 0) + for _, v := range mappingCreateVtapDetailsTargetTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateVtapDetailsTargetTypeEnumStringValues Enumerates the set of values in String for CreateVtapDetailsTargetTypeEnum +func GetCreateVtapDetailsTargetTypeEnumStringValues() []string { + return []string{ + "VNIC", + "NETWORK_LOAD_BALANCER", + "IP_ADDRESS", + } +} + +// GetMappingCreateVtapDetailsTargetTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateVtapDetailsTargetTypeEnum(val string) (CreateVtapDetailsTargetTypeEnum, bool) { + enum, ok := mappingCreateVtapDetailsTargetTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vtap_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vtap_request_response.go new file mode 100644 index 000000000..a9a756f42 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/create_vtap_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateVtapRequest wrapper for the CreateVtap operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateVtap.go.html to see an example of how to use CreateVtapRequest. +type CreateVtapRequest struct { + + // Details used to create a VTAP. + CreateVtapDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVtapRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVtapRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateVtapRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVtapRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateVtapRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVtapResponse wrapper for the CreateVtap operation +type CreateVtapResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Vtap instance + Vtap `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateVtapResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVtapResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect.go new file mode 100644 index 000000000..d7f900004 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect.go @@ -0,0 +1,171 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CrossConnect For use with Oracle Cloud Infrastructure FastConnect. A cross-connect represents a +// physical connection between an existing network and Oracle. Customers who are colocated +// with Oracle in a FastConnect location create and use cross-connects. For more +// information, see FastConnect Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +// Oracle recommends you create each cross-connect in a +// CrossConnectGroup so you can use link aggregation +// with the connection. +// **Note:** If you're a provider who is setting up a physical connection to Oracle so customers +// can use FastConnect over the connection, be aware that your connection is modeled the +// same way as a colocated customer's (with `CrossConnect` and `CrossConnectGroup` objects, and so on). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type CrossConnect struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the cross-connect group. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect group this cross-connect belongs to (if any). + CrossConnectGroupId *string `mandatory:"false" json:"crossConnectGroupId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The cross-connect's Oracle ID (OCID). + Id *string `mandatory:"false" json:"id"` + + // The cross-connect's current state. + LifecycleState CrossConnectLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The name of the FastConnect location where this cross-connect is installed. + LocationName *string `mandatory:"false" json:"locationName"` + + // A string identifying the meet-me room port for this cross-connect. + PortName *string `mandatory:"false" json:"portName"` + + // The port speed for this cross-connect. + // Example: `10 Gbps` + PortSpeedShapeName *string `mandatory:"false" json:"portSpeedShapeName"` + + // A reference name or identifier for the physical fiber connection that this cross-connect + // uses. + CustomerReferenceName *string `mandatory:"false" json:"customerReferenceName"` + + // The date and time the cross-connect was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + MacsecProperties *MacsecProperties `mandatory:"false" json:"macsecProperties"` + + // The FastConnect device that terminates the physical connection. + OciPhysicalDeviceName *string `mandatory:"false" json:"ociPhysicalDeviceName"` + + // The FastConnect device that terminates the logical connection. + // This device might be different than the device that terminates the physical connection. + OciLogicalDeviceName *string `mandatory:"false" json:"ociLogicalDeviceName"` + + // The name of the FastConnect interface where this cross-connect is installed. + InterfaceName *string `mandatory:"false" json:"interfaceName"` +} + +func (m CrossConnect) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CrossConnect) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCrossConnectLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetCrossConnectLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CrossConnectLifecycleStateEnum Enum with underlying type: string +type CrossConnectLifecycleStateEnum string + +// Set of constants representing the allowable values for CrossConnectLifecycleStateEnum +const ( + CrossConnectLifecycleStatePendingCustomer CrossConnectLifecycleStateEnum = "PENDING_CUSTOMER" + CrossConnectLifecycleStateProvisioning CrossConnectLifecycleStateEnum = "PROVISIONING" + CrossConnectLifecycleStateProvisioned CrossConnectLifecycleStateEnum = "PROVISIONED" + CrossConnectLifecycleStateInactive CrossConnectLifecycleStateEnum = "INACTIVE" + CrossConnectLifecycleStateTerminating CrossConnectLifecycleStateEnum = "TERMINATING" + CrossConnectLifecycleStateTerminated CrossConnectLifecycleStateEnum = "TERMINATED" +) + +var mappingCrossConnectLifecycleStateEnum = map[string]CrossConnectLifecycleStateEnum{ + "PENDING_CUSTOMER": CrossConnectLifecycleStatePendingCustomer, + "PROVISIONING": CrossConnectLifecycleStateProvisioning, + "PROVISIONED": CrossConnectLifecycleStateProvisioned, + "INACTIVE": CrossConnectLifecycleStateInactive, + "TERMINATING": CrossConnectLifecycleStateTerminating, + "TERMINATED": CrossConnectLifecycleStateTerminated, +} + +var mappingCrossConnectLifecycleStateEnumLowerCase = map[string]CrossConnectLifecycleStateEnum{ + "pending_customer": CrossConnectLifecycleStatePendingCustomer, + "provisioning": CrossConnectLifecycleStateProvisioning, + "provisioned": CrossConnectLifecycleStateProvisioned, + "inactive": CrossConnectLifecycleStateInactive, + "terminating": CrossConnectLifecycleStateTerminating, + "terminated": CrossConnectLifecycleStateTerminated, +} + +// GetCrossConnectLifecycleStateEnumValues Enumerates the set of values for CrossConnectLifecycleStateEnum +func GetCrossConnectLifecycleStateEnumValues() []CrossConnectLifecycleStateEnum { + values := make([]CrossConnectLifecycleStateEnum, 0) + for _, v := range mappingCrossConnectLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetCrossConnectLifecycleStateEnumStringValues Enumerates the set of values in String for CrossConnectLifecycleStateEnum +func GetCrossConnectLifecycleStateEnumStringValues() []string { + return []string{ + "PENDING_CUSTOMER", + "PROVISIONING", + "PROVISIONED", + "INACTIVE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingCrossConnectLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCrossConnectLifecycleStateEnum(val string) (CrossConnectLifecycleStateEnum, bool) { + enum, ok := mappingCrossConnectLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_group.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_group.go new file mode 100644 index 000000000..e8a2c5990 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_group.go @@ -0,0 +1,153 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CrossConnectGroup For use with Oracle Cloud Infrastructure FastConnect. A cross-connect group +// is a link aggregation group (LAG), which can contain one or more +// CrossConnect. Customers who are colocated with +// Oracle in a FastConnect location create and use cross-connect groups. For more +// information, see FastConnect Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +// **Note:** If you're a provider who is setting up a physical connection to Oracle so customers +// can use FastConnect over the connection, be aware that your connection is modeled the +// same way as a colocated customer's (with `CrossConnect` and `CrossConnectGroup` objects, and so on). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type CrossConnectGroup struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the cross-connect group. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The cross-connect group's Oracle ID (OCID). + Id *string `mandatory:"false" json:"id"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{ "orcl-cloud": { "free-tier-retained": "true" } }` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The cross-connect group's current state. + LifecycleState CrossConnectGroupLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // A reference name or identifier for the physical fiber connection that this cross-connect + // group uses. + CustomerReferenceName *string `mandatory:"false" json:"customerReferenceName"` + + // The date and time the cross-connect group was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + MacsecProperties *MacsecProperties `mandatory:"false" json:"macsecProperties"` + + // The FastConnect device that terminates the physical connection. + OciPhysicalDeviceName *string `mandatory:"false" json:"ociPhysicalDeviceName"` + + // The FastConnect device that terminates the logical connection. + // This device might be different than the device that terminates the physical connection. + OciLogicalDeviceName *string `mandatory:"false" json:"ociLogicalDeviceName"` +} + +func (m CrossConnectGroup) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CrossConnectGroup) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCrossConnectGroupLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetCrossConnectGroupLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CrossConnectGroupLifecycleStateEnum Enum with underlying type: string +type CrossConnectGroupLifecycleStateEnum string + +// Set of constants representing the allowable values for CrossConnectGroupLifecycleStateEnum +const ( + CrossConnectGroupLifecycleStateProvisioning CrossConnectGroupLifecycleStateEnum = "PROVISIONING" + CrossConnectGroupLifecycleStateProvisioned CrossConnectGroupLifecycleStateEnum = "PROVISIONED" + CrossConnectGroupLifecycleStateInactive CrossConnectGroupLifecycleStateEnum = "INACTIVE" + CrossConnectGroupLifecycleStateTerminating CrossConnectGroupLifecycleStateEnum = "TERMINATING" + CrossConnectGroupLifecycleStateTerminated CrossConnectGroupLifecycleStateEnum = "TERMINATED" +) + +var mappingCrossConnectGroupLifecycleStateEnum = map[string]CrossConnectGroupLifecycleStateEnum{ + "PROVISIONING": CrossConnectGroupLifecycleStateProvisioning, + "PROVISIONED": CrossConnectGroupLifecycleStateProvisioned, + "INACTIVE": CrossConnectGroupLifecycleStateInactive, + "TERMINATING": CrossConnectGroupLifecycleStateTerminating, + "TERMINATED": CrossConnectGroupLifecycleStateTerminated, +} + +var mappingCrossConnectGroupLifecycleStateEnumLowerCase = map[string]CrossConnectGroupLifecycleStateEnum{ + "provisioning": CrossConnectGroupLifecycleStateProvisioning, + "provisioned": CrossConnectGroupLifecycleStateProvisioned, + "inactive": CrossConnectGroupLifecycleStateInactive, + "terminating": CrossConnectGroupLifecycleStateTerminating, + "terminated": CrossConnectGroupLifecycleStateTerminated, +} + +// GetCrossConnectGroupLifecycleStateEnumValues Enumerates the set of values for CrossConnectGroupLifecycleStateEnum +func GetCrossConnectGroupLifecycleStateEnumValues() []CrossConnectGroupLifecycleStateEnum { + values := make([]CrossConnectGroupLifecycleStateEnum, 0) + for _, v := range mappingCrossConnectGroupLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetCrossConnectGroupLifecycleStateEnumStringValues Enumerates the set of values in String for CrossConnectGroupLifecycleStateEnum +func GetCrossConnectGroupLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "PROVISIONED", + "INACTIVE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingCrossConnectGroupLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCrossConnectGroupLifecycleStateEnum(val string) (CrossConnectGroupLifecycleStateEnum, bool) { + enum, ok := mappingCrossConnectGroupLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_location.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_location.go new file mode 100644 index 000000000..7abe74c02 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_location.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CrossConnectLocation An individual FastConnect location. +type CrossConnectLocation struct { + + // A description of the location. + Description *string `mandatory:"true" json:"description"` + + // The name of the location. + // Example: `CyrusOne, Chandler, AZ` + Name *string `mandatory:"true" json:"name"` +} + +func (m CrossConnectLocation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CrossConnectLocation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_mapping.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_mapping.go new file mode 100644 index 000000000..9ecafa08c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_mapping.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CrossConnectMapping For use with Oracle Cloud Infrastructure FastConnect. Each +// VirtualCircuit runs on one or +// more cross-connects or cross-connect groups. A `CrossConnectMapping` +// contains the properties for an individual cross-connect or cross-connect group +// associated with a given virtual circuit. +// The mapping includes information about the cross-connect or +// cross-connect group, the VLAN, and the BGP peering session. +// If you're a customer who is colocated with Oracle, that means you own both +// the virtual circuit and the physical connection it runs on (cross-connect or +// cross-connect group), so you specify all the information in the mapping. There's +// one exception: for a public virtual circuit, Oracle specifies the BGP IPv4 +// addresses. +// If you're a provider, then you own the physical connection that the customer's +// virtual circuit runs on, so you contribute information about the cross-connect +// or cross-connect group and VLAN. +// Who specifies the BGP peering information in the case of customer connection via +// provider? If the BGP session goes from Oracle to the provider's edge router, then +// the provider also specifies the BGP peering information. If the BGP session instead +// goes from Oracle to the customer's edge router, then the customer specifies the BGP +// peering information. There's one exception: for a public virtual circuit, Oracle +// specifies the BGP IPv4 addresses. +// Every `CrossConnectMapping` must have BGP IPv4 peering addresses. BGP IPv6 peering +// addresses are optional. If BGP IPv6 addresses are provided, the customer can +// exchange IPv6 routes with Oracle. +type CrossConnectMapping struct { + + // The key for BGP MD5 authentication. Only applicable if your system + // requires MD5 authentication. If empty or not set (null), that + // means you don't use BGP MD5 authentication. + BgpMd5AuthKey *string `mandatory:"false" json:"bgpMd5AuthKey"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect or cross-connect group for this mapping. + // Specified by the owner of the cross-connect or cross-connect group (the + // customer if the customer is colocated with Oracle, or the provider if the + // customer is connecting via provider). + CrossConnectOrCrossConnectGroupId *string `mandatory:"false" json:"crossConnectOrCrossConnectGroupId"` + + // The BGP IPv4 address for the router on the other end of the BGP session from + // Oracle. Specified by the owner of that router. If the session goes from Oracle + // to a customer, this is the BGP IPv4 address of the customer's edge router. If the + // session goes from Oracle to a provider, this is the BGP IPv4 address of the + // provider's edge router. Must use a subnet mask from /28 to /31. + // There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv4 addresses. + // Example: `10.0.0.18/31` + CustomerBgpPeeringIp *string `mandatory:"false" json:"customerBgpPeeringIp"` + + // The IPv4 address for Oracle's end of the BGP session. Must use a subnet mask from /28 to /31. + // If the session goes from Oracle to a customer's edge router, + // the customer specifies this information. If the session goes from Oracle to + // a provider's edge router, the provider specifies this. + // There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv4 addresses. + // Example: `10.0.0.19/31` + OracleBgpPeeringIp *string `mandatory:"false" json:"oracleBgpPeeringIp"` + + // The BGP IPv6 address for the router on the other end of the BGP session from + // Oracle. Specified by the owner of that router. If the session goes from Oracle + // to a customer, this is the BGP IPv6 address of the customer's edge router. If the + // session goes from Oracle to a provider, this is the BGP IPv6 address of the + // provider's edge router. Only subnet masks from /64 up to /127 are allowed. + // There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv6 addresses. + // IPv6 addressing is supported for all commercial and government regions. See + // IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // Example: `2001:db8::1/64` + CustomerBgpPeeringIpv6 *string `mandatory:"false" json:"customerBgpPeeringIpv6"` + + // The IPv6 address for Oracle's end of the BGP session. Only subnet masks from /64 up to /127 are allowed. + // If the session goes from Oracle to a customer's edge router, + // the customer specifies this information. If the session goes from Oracle to + // a provider's edge router, the provider specifies this. + // There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv6 addresses. + // Note that IPv6 addressing is currently supported only in certain regions. See + // IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // Example: `2001:db8::2/64` + OracleBgpPeeringIpv6 *string `mandatory:"false" json:"oracleBgpPeeringIpv6"` + + // The number of the specific VLAN (on the cross-connect or cross-connect group) + // that is assigned to this virtual circuit. Specified by the owner of the cross-connect + // or cross-connect group (the customer if the customer is colocated with Oracle, or + // the provider if the customer is connecting via provider). + // Example: `200` + Vlan *int `mandatory:"false" json:"vlan"` +} + +func (m CrossConnectMapping) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CrossConnectMapping) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_mapping_details.go new file mode 100644 index 000000000..91a13bf79 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_mapping_details.go @@ -0,0 +1,199 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CrossConnectMappingDetails For use with Oracle Cloud Infrastructure FastConnect. Each +// VirtualCircuit runs on one or +// more cross-connects or cross-connect groups. A `CrossConnectMappingDetails` +// contains the properties for an individual cross-connect or cross-connect group +// associated with a given virtual circuit. +// The details includes information about the cross-connect or +// cross-connect group, the VLAN, and the BGP peering session. +type CrossConnectMappingDetails struct { + + // The key for BGP MD5 authentication. Only applicable if your system + // requires MD5 authentication. If empty or not set (null), that + // means you don't use BGP MD5 authentication. + BgpMd5AuthKey *string `mandatory:"false" json:"bgpMd5AuthKey"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect or cross-connect group for this mapping. + // Specified by the owner of the cross-connect or cross-connect group (the + // customer if the customer is colocated with Oracle, or the provider if the + // customer is connecting via provider). + CrossConnectOrCrossConnectGroupId *string `mandatory:"false" json:"crossConnectOrCrossConnectGroupId"` + + // The BGP IPv4 address for the router on the other end of the BGP session from + // Oracle. Specified by the owner of that router. If the session goes from Oracle + // to a customer, this is the BGP IPv4 address of the customer's edge router. If the + // session goes from Oracle to a provider, this is the BGP IPv4 address of the + // provider's edge router. Must use a subnet mask from /28 to /31. + // There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv4 addresses. + // Example: `10.0.0.18/31` + CustomerBgpPeeringIp *string `mandatory:"false" json:"customerBgpPeeringIp"` + + // The IPv4 address for Oracle's end of the BGP session. Must use a subnet mask from /28 to /31. + // If the session goes from Oracle to a customer's edge router, + // the customer specifies this information. If the session goes from Oracle to + // a provider's edge router, the provider specifies this. + // There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv4 addresses. + // Example: `10.0.0.19/31` + OracleBgpPeeringIp *string `mandatory:"false" json:"oracleBgpPeeringIp"` + + // The BGP IPv6 address for the router on the other end of the BGP session from + // Oracle. Specified by the owner of that router. If the session goes from Oracle + // to a customer, this is the BGP IPv6 address of the customer's edge router. If the + // session goes from Oracle to a provider, this is the BGP IPv6 address of the + // provider's edge router. Only subnet masks from /64 up to /127 are allowed. + // There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv6 addresses. + // Example: `2001:db8::1/64` + CustomerBgpPeeringIpv6 *string `mandatory:"false" json:"customerBgpPeeringIpv6"` + + // The IPv6 address for Oracle's end of the BGP session. Only subnet masks from /64 up to /127 are allowed. + // If the session goes from Oracle to a customer's edge router, + // the customer specifies this information. If the session goes from Oracle to + // a provider's edge router, the provider specifies this. + // There's one exception: for a public virtual circuit, Oracle specifies the BGP IPv6 addresses. + // Example: `2001:db8::2/64` + OracleBgpPeeringIpv6 *string `mandatory:"false" json:"oracleBgpPeeringIpv6"` + + // The number of the specific VLAN (on the cross-connect or cross-connect group) + // that is assigned to this virtual circuit. Specified by the owner of the cross-connect + // or cross-connect group (the customer if the customer is colocated with Oracle, or + // the provider if the customer is connecting via provider). + // Example: `200` + Vlan *int `mandatory:"false" json:"vlan"` + + // The state of the Ipv4 BGP session. + Ipv4BgpStatus CrossConnectMappingDetailsIpv4BgpStatusEnum `mandatory:"false" json:"ipv4BgpStatus,omitempty"` + + // The state of the Ipv6 BGP session. + Ipv6BgpStatus CrossConnectMappingDetailsIpv6BgpStatusEnum `mandatory:"false" json:"ipv6BgpStatus,omitempty"` + + // The FastConnect device that terminates the logical connection. + OciLogicalDeviceName *string `mandatory:"false" json:"ociLogicalDeviceName"` +} + +func (m CrossConnectMappingDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CrossConnectMappingDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCrossConnectMappingDetailsIpv4BgpStatusEnum(string(m.Ipv4BgpStatus)); !ok && m.Ipv4BgpStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Ipv4BgpStatus: %s. Supported values are: %s.", m.Ipv4BgpStatus, strings.Join(GetCrossConnectMappingDetailsIpv4BgpStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingCrossConnectMappingDetailsIpv6BgpStatusEnum(string(m.Ipv6BgpStatus)); !ok && m.Ipv6BgpStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Ipv6BgpStatus: %s. Supported values are: %s.", m.Ipv6BgpStatus, strings.Join(GetCrossConnectMappingDetailsIpv6BgpStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CrossConnectMappingDetailsIpv4BgpStatusEnum Enum with underlying type: string +type CrossConnectMappingDetailsIpv4BgpStatusEnum string + +// Set of constants representing the allowable values for CrossConnectMappingDetailsIpv4BgpStatusEnum +const ( + CrossConnectMappingDetailsIpv4BgpStatusUp CrossConnectMappingDetailsIpv4BgpStatusEnum = "UP" + CrossConnectMappingDetailsIpv4BgpStatusDown CrossConnectMappingDetailsIpv4BgpStatusEnum = "DOWN" +) + +var mappingCrossConnectMappingDetailsIpv4BgpStatusEnum = map[string]CrossConnectMappingDetailsIpv4BgpStatusEnum{ + "UP": CrossConnectMappingDetailsIpv4BgpStatusUp, + "DOWN": CrossConnectMappingDetailsIpv4BgpStatusDown, +} + +var mappingCrossConnectMappingDetailsIpv4BgpStatusEnumLowerCase = map[string]CrossConnectMappingDetailsIpv4BgpStatusEnum{ + "up": CrossConnectMappingDetailsIpv4BgpStatusUp, + "down": CrossConnectMappingDetailsIpv4BgpStatusDown, +} + +// GetCrossConnectMappingDetailsIpv4BgpStatusEnumValues Enumerates the set of values for CrossConnectMappingDetailsIpv4BgpStatusEnum +func GetCrossConnectMappingDetailsIpv4BgpStatusEnumValues() []CrossConnectMappingDetailsIpv4BgpStatusEnum { + values := make([]CrossConnectMappingDetailsIpv4BgpStatusEnum, 0) + for _, v := range mappingCrossConnectMappingDetailsIpv4BgpStatusEnum { + values = append(values, v) + } + return values +} + +// GetCrossConnectMappingDetailsIpv4BgpStatusEnumStringValues Enumerates the set of values in String for CrossConnectMappingDetailsIpv4BgpStatusEnum +func GetCrossConnectMappingDetailsIpv4BgpStatusEnumStringValues() []string { + return []string{ + "UP", + "DOWN", + } +} + +// GetMappingCrossConnectMappingDetailsIpv4BgpStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCrossConnectMappingDetailsIpv4BgpStatusEnum(val string) (CrossConnectMappingDetailsIpv4BgpStatusEnum, bool) { + enum, ok := mappingCrossConnectMappingDetailsIpv4BgpStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CrossConnectMappingDetailsIpv6BgpStatusEnum Enum with underlying type: string +type CrossConnectMappingDetailsIpv6BgpStatusEnum string + +// Set of constants representing the allowable values for CrossConnectMappingDetailsIpv6BgpStatusEnum +const ( + CrossConnectMappingDetailsIpv6BgpStatusUp CrossConnectMappingDetailsIpv6BgpStatusEnum = "UP" + CrossConnectMappingDetailsIpv6BgpStatusDown CrossConnectMappingDetailsIpv6BgpStatusEnum = "DOWN" +) + +var mappingCrossConnectMappingDetailsIpv6BgpStatusEnum = map[string]CrossConnectMappingDetailsIpv6BgpStatusEnum{ + "UP": CrossConnectMappingDetailsIpv6BgpStatusUp, + "DOWN": CrossConnectMappingDetailsIpv6BgpStatusDown, +} + +var mappingCrossConnectMappingDetailsIpv6BgpStatusEnumLowerCase = map[string]CrossConnectMappingDetailsIpv6BgpStatusEnum{ + "up": CrossConnectMappingDetailsIpv6BgpStatusUp, + "down": CrossConnectMappingDetailsIpv6BgpStatusDown, +} + +// GetCrossConnectMappingDetailsIpv6BgpStatusEnumValues Enumerates the set of values for CrossConnectMappingDetailsIpv6BgpStatusEnum +func GetCrossConnectMappingDetailsIpv6BgpStatusEnumValues() []CrossConnectMappingDetailsIpv6BgpStatusEnum { + values := make([]CrossConnectMappingDetailsIpv6BgpStatusEnum, 0) + for _, v := range mappingCrossConnectMappingDetailsIpv6BgpStatusEnum { + values = append(values, v) + } + return values +} + +// GetCrossConnectMappingDetailsIpv6BgpStatusEnumStringValues Enumerates the set of values in String for CrossConnectMappingDetailsIpv6BgpStatusEnum +func GetCrossConnectMappingDetailsIpv6BgpStatusEnumStringValues() []string { + return []string{ + "UP", + "DOWN", + } +} + +// GetMappingCrossConnectMappingDetailsIpv6BgpStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCrossConnectMappingDetailsIpv6BgpStatusEnum(val string) (CrossConnectMappingDetailsIpv6BgpStatusEnum, bool) { + enum, ok := mappingCrossConnectMappingDetailsIpv6BgpStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_mapping_details_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_mapping_details_collection.go new file mode 100644 index 000000000..2043b2244 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_mapping_details_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CrossConnectMappingDetailsCollection An array of CrossConnectMappingDetails +type CrossConnectMappingDetailsCollection struct { + + // CrossConnectMappingDetails items + Items []CrossConnectMappingDetails `mandatory:"true" json:"items"` +} + +func (m CrossConnectMappingDetailsCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CrossConnectMappingDetailsCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_port_speed_shape.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_port_speed_shape.go new file mode 100644 index 000000000..7a6e92930 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_port_speed_shape.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CrossConnectPortSpeedShape An individual port speed level for cross-connects. +type CrossConnectPortSpeedShape struct { + + // The name of the port speed shape. + // Example: `10 Gbps` + Name *string `mandatory:"true" json:"name"` + + // The port speed in Gbps. + // Example: `10` + PortSpeedInGbps *int `mandatory:"true" json:"portSpeedInGbps"` +} + +func (m CrossConnectPortSpeedShape) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CrossConnectPortSpeedShape) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_status.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_status.go new file mode 100644 index 000000000..515454780 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/cross_connect_status.go @@ -0,0 +1,232 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CrossConnectStatus The status of the cross-connect. +type CrossConnectStatus struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect. + CrossConnectId *string `mandatory:"true" json:"crossConnectId"` + + // Indicates whether Oracle's side of the interface is up or down. + InterfaceState CrossConnectStatusInterfaceStateEnum `mandatory:"false" json:"interfaceState,omitempty"` + + // The light level of the cross-connect (in dBm). + // Example: `14.0` + LightLevelIndBm *float32 `mandatory:"false" json:"lightLevelIndBm"` + + // Status indicator corresponding to the light level. + // * **NO_LIGHT:** No measurable light + // * **LOW_WARN:** There's measurable light but it's too low + // * **HIGH_WARN:** Light level is too high + // * **BAD:** There's measurable light but the signal-to-noise ratio is bad + // * **GOOD:** Good light level + LightLevelIndicator CrossConnectStatusLightLevelIndicatorEnum `mandatory:"false" json:"lightLevelIndicator,omitempty"` + + // Encryption status of this cross connect. + // Possible values: + // * **UP:** Traffic is encrypted over this cross-connect + // * **DOWN:** Traffic is not encrypted over this cross-connect + // * **CIPHER_MISMATCH:** The MACsec encryption cipher doesn't match the cipher on the CPE + // * **CKN_MISMATCH:** The MACsec Connectivity association Key Name (CKN) doesn't match the CKN on the CPE + // * **CAK_MISMATCH:** The MACsec Connectivity Association Key (CAK) doesn't match the CAK on the CPE + EncryptionStatus CrossConnectStatusEncryptionStatusEnum `mandatory:"false" json:"encryptionStatus,omitempty"` + + // The light levels of the cross-connect (in dBm). + // Example: `[14.0, -14.0, 2.1, -10.1]` + LightLevelsInDBm []float32 `mandatory:"false" json:"lightLevelsInDBm"` +} + +func (m CrossConnectStatus) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CrossConnectStatus) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCrossConnectStatusInterfaceStateEnum(string(m.InterfaceState)); !ok && m.InterfaceState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for InterfaceState: %s. Supported values are: %s.", m.InterfaceState, strings.Join(GetCrossConnectStatusInterfaceStateEnumStringValues(), ","))) + } + if _, ok := GetMappingCrossConnectStatusLightLevelIndicatorEnum(string(m.LightLevelIndicator)); !ok && m.LightLevelIndicator != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LightLevelIndicator: %s. Supported values are: %s.", m.LightLevelIndicator, strings.Join(GetCrossConnectStatusLightLevelIndicatorEnumStringValues(), ","))) + } + if _, ok := GetMappingCrossConnectStatusEncryptionStatusEnum(string(m.EncryptionStatus)); !ok && m.EncryptionStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncryptionStatus: %s. Supported values are: %s.", m.EncryptionStatus, strings.Join(GetCrossConnectStatusEncryptionStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CrossConnectStatusInterfaceStateEnum Enum with underlying type: string +type CrossConnectStatusInterfaceStateEnum string + +// Set of constants representing the allowable values for CrossConnectStatusInterfaceStateEnum +const ( + CrossConnectStatusInterfaceStateUp CrossConnectStatusInterfaceStateEnum = "UP" + CrossConnectStatusInterfaceStateDown CrossConnectStatusInterfaceStateEnum = "DOWN" +) + +var mappingCrossConnectStatusInterfaceStateEnum = map[string]CrossConnectStatusInterfaceStateEnum{ + "UP": CrossConnectStatusInterfaceStateUp, + "DOWN": CrossConnectStatusInterfaceStateDown, +} + +var mappingCrossConnectStatusInterfaceStateEnumLowerCase = map[string]CrossConnectStatusInterfaceStateEnum{ + "up": CrossConnectStatusInterfaceStateUp, + "down": CrossConnectStatusInterfaceStateDown, +} + +// GetCrossConnectStatusInterfaceStateEnumValues Enumerates the set of values for CrossConnectStatusInterfaceStateEnum +func GetCrossConnectStatusInterfaceStateEnumValues() []CrossConnectStatusInterfaceStateEnum { + values := make([]CrossConnectStatusInterfaceStateEnum, 0) + for _, v := range mappingCrossConnectStatusInterfaceStateEnum { + values = append(values, v) + } + return values +} + +// GetCrossConnectStatusInterfaceStateEnumStringValues Enumerates the set of values in String for CrossConnectStatusInterfaceStateEnum +func GetCrossConnectStatusInterfaceStateEnumStringValues() []string { + return []string{ + "UP", + "DOWN", + } +} + +// GetMappingCrossConnectStatusInterfaceStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCrossConnectStatusInterfaceStateEnum(val string) (CrossConnectStatusInterfaceStateEnum, bool) { + enum, ok := mappingCrossConnectStatusInterfaceStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CrossConnectStatusLightLevelIndicatorEnum Enum with underlying type: string +type CrossConnectStatusLightLevelIndicatorEnum string + +// Set of constants representing the allowable values for CrossConnectStatusLightLevelIndicatorEnum +const ( + CrossConnectStatusLightLevelIndicatorNoLight CrossConnectStatusLightLevelIndicatorEnum = "NO_LIGHT" + CrossConnectStatusLightLevelIndicatorLowWarn CrossConnectStatusLightLevelIndicatorEnum = "LOW_WARN" + CrossConnectStatusLightLevelIndicatorHighWarn CrossConnectStatusLightLevelIndicatorEnum = "HIGH_WARN" + CrossConnectStatusLightLevelIndicatorBad CrossConnectStatusLightLevelIndicatorEnum = "BAD" + CrossConnectStatusLightLevelIndicatorGood CrossConnectStatusLightLevelIndicatorEnum = "GOOD" +) + +var mappingCrossConnectStatusLightLevelIndicatorEnum = map[string]CrossConnectStatusLightLevelIndicatorEnum{ + "NO_LIGHT": CrossConnectStatusLightLevelIndicatorNoLight, + "LOW_WARN": CrossConnectStatusLightLevelIndicatorLowWarn, + "HIGH_WARN": CrossConnectStatusLightLevelIndicatorHighWarn, + "BAD": CrossConnectStatusLightLevelIndicatorBad, + "GOOD": CrossConnectStatusLightLevelIndicatorGood, +} + +var mappingCrossConnectStatusLightLevelIndicatorEnumLowerCase = map[string]CrossConnectStatusLightLevelIndicatorEnum{ + "no_light": CrossConnectStatusLightLevelIndicatorNoLight, + "low_warn": CrossConnectStatusLightLevelIndicatorLowWarn, + "high_warn": CrossConnectStatusLightLevelIndicatorHighWarn, + "bad": CrossConnectStatusLightLevelIndicatorBad, + "good": CrossConnectStatusLightLevelIndicatorGood, +} + +// GetCrossConnectStatusLightLevelIndicatorEnumValues Enumerates the set of values for CrossConnectStatusLightLevelIndicatorEnum +func GetCrossConnectStatusLightLevelIndicatorEnumValues() []CrossConnectStatusLightLevelIndicatorEnum { + values := make([]CrossConnectStatusLightLevelIndicatorEnum, 0) + for _, v := range mappingCrossConnectStatusLightLevelIndicatorEnum { + values = append(values, v) + } + return values +} + +// GetCrossConnectStatusLightLevelIndicatorEnumStringValues Enumerates the set of values in String for CrossConnectStatusLightLevelIndicatorEnum +func GetCrossConnectStatusLightLevelIndicatorEnumStringValues() []string { + return []string{ + "NO_LIGHT", + "LOW_WARN", + "HIGH_WARN", + "BAD", + "GOOD", + } +} + +// GetMappingCrossConnectStatusLightLevelIndicatorEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCrossConnectStatusLightLevelIndicatorEnum(val string) (CrossConnectStatusLightLevelIndicatorEnum, bool) { + enum, ok := mappingCrossConnectStatusLightLevelIndicatorEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CrossConnectStatusEncryptionStatusEnum Enum with underlying type: string +type CrossConnectStatusEncryptionStatusEnum string + +// Set of constants representing the allowable values for CrossConnectStatusEncryptionStatusEnum +const ( + CrossConnectStatusEncryptionStatusUp CrossConnectStatusEncryptionStatusEnum = "UP" + CrossConnectStatusEncryptionStatusDown CrossConnectStatusEncryptionStatusEnum = "DOWN" + CrossConnectStatusEncryptionStatusCipherMismatch CrossConnectStatusEncryptionStatusEnum = "CIPHER_MISMATCH" + CrossConnectStatusEncryptionStatusCknMismatch CrossConnectStatusEncryptionStatusEnum = "CKN_MISMATCH" + CrossConnectStatusEncryptionStatusCakMismatch CrossConnectStatusEncryptionStatusEnum = "CAK_MISMATCH" +) + +var mappingCrossConnectStatusEncryptionStatusEnum = map[string]CrossConnectStatusEncryptionStatusEnum{ + "UP": CrossConnectStatusEncryptionStatusUp, + "DOWN": CrossConnectStatusEncryptionStatusDown, + "CIPHER_MISMATCH": CrossConnectStatusEncryptionStatusCipherMismatch, + "CKN_MISMATCH": CrossConnectStatusEncryptionStatusCknMismatch, + "CAK_MISMATCH": CrossConnectStatusEncryptionStatusCakMismatch, +} + +var mappingCrossConnectStatusEncryptionStatusEnumLowerCase = map[string]CrossConnectStatusEncryptionStatusEnum{ + "up": CrossConnectStatusEncryptionStatusUp, + "down": CrossConnectStatusEncryptionStatusDown, + "cipher_mismatch": CrossConnectStatusEncryptionStatusCipherMismatch, + "ckn_mismatch": CrossConnectStatusEncryptionStatusCknMismatch, + "cak_mismatch": CrossConnectStatusEncryptionStatusCakMismatch, +} + +// GetCrossConnectStatusEncryptionStatusEnumValues Enumerates the set of values for CrossConnectStatusEncryptionStatusEnum +func GetCrossConnectStatusEncryptionStatusEnumValues() []CrossConnectStatusEncryptionStatusEnum { + values := make([]CrossConnectStatusEncryptionStatusEnum, 0) + for _, v := range mappingCrossConnectStatusEncryptionStatusEnum { + values = append(values, v) + } + return values +} + +// GetCrossConnectStatusEncryptionStatusEnumStringValues Enumerates the set of values in String for CrossConnectStatusEncryptionStatusEnum +func GetCrossConnectStatusEncryptionStatusEnumStringValues() []string { + return []string{ + "UP", + "DOWN", + "CIPHER_MISMATCH", + "CKN_MISMATCH", + "CAK_MISMATCH", + } +} + +// GetMappingCrossConnectStatusEncryptionStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCrossConnectStatusEncryptionStatusEnum(val string) (CrossConnectStatusEncryptionStatusEnum, bool) { + enum, ok := mappingCrossConnectStatusEncryptionStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_capacity_source.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_capacity_source.go new file mode 100644 index 000000000..f8be77b9b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_capacity_source.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DedicatedCapacitySource A capacity source of bare metal hosts that is dedicated to a user. +type DedicatedCapacitySource struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment of this capacity source. + CompartmentId *string `mandatory:"false" json:"compartmentId"` +} + +func (m DedicatedCapacitySource) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DedicatedCapacitySource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DedicatedCapacitySource) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDedicatedCapacitySource DedicatedCapacitySource + s := struct { + DiscriminatorParam string `json:"capacityType"` + MarshalTypeDedicatedCapacitySource + }{ + "DEDICATED", + (MarshalTypeDedicatedCapacitySource)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host.go new file mode 100644 index 000000000..d267fe52f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host.go @@ -0,0 +1,265 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DedicatedVmHost A dedicated virtual machine host lets you host multiple VM instances +// on a dedicated server that is not shared with other tenancies. +type DedicatedVmHost struct { + + // The availability domain the dedicated virtual machine host is running in. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the dedicated virtual machine host. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The dedicated virtual machine host shape. The shape determines the number of CPUs and + // other resources available for VMs. + DedicatedVmHostShape *string `mandatory:"true" json:"dedicatedVmHostShape"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the dedicated VM host. + Id *string `mandatory:"true" json:"id"` + + // The current state of the dedicated VM host. + LifecycleState DedicatedVmHostLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the dedicated VM host was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The total OCPUs of the dedicated VM host. + TotalOcpus *float32 `mandatory:"true" json:"totalOcpus"` + + // The available OCPUs of the dedicated VM host. + RemainingOcpus *float32 `mandatory:"true" json:"remainingOcpus"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The fault domain for the dedicated virtual machine host's assigned instances. + // For more information, see Fault Domains (https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm#fault). + // If you do not specify the fault domain, the system selects one for you. To change the fault domain for a dedicated virtual machine host, + // delete it, and then create a new dedicated virtual machine host in the preferred fault domain. + // To get a list of fault domains, use the `ListFaultDomains` operation in the Identity and Access Management Service API (https://docs.oracle.com/iaas/api/#/en/identity/20160918/). + // Example: `FAULT-DOMAIN-1` + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + PlacementConstraintDetails PlacementConstraintDetails `mandatory:"false" json:"placementConstraintDetails"` + + // The capacity configuration selected to be configured for the Dedicated Virtual Machine host. + // Run ListDedicatedVmHostShapes API to see details of this capacity configuration. + CapacityConfig *string `mandatory:"false" json:"capacityConfig"` + + // Specifies if the Dedicated Virtual Machine Host (DVMH) is restricted to running only Confidential VMs. If `true`, only Confidential VMs can be launched. If `false`, Confidential VMs cannot be launched. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // The total memory of the dedicated VM host, in GBs. + TotalMemoryInGBs *float32 `mandatory:"false" json:"totalMemoryInGBs"` + + // The remaining memory of the dedicated VM host, in GBs. + RemainingMemoryInGBs *float32 `mandatory:"false" json:"remainingMemoryInGBs"` + + // The total local volume of the dedicated VM host, in GBs. + TotalLocalVolumeInGBs *float32 `mandatory:"false" json:"totalLocalVolumeInGBs"` + + // The remaining local volume of the dedicated VM host, in GBs. + RemainingLocalVolumeInGBs *float32 `mandatory:"false" json:"remainingLocalVolumeInGBs"` + + // A list of total and remaining CPU, memory, and local volume per capacity bucket. + CapacityBins []CapacityBin `mandatory:"false" json:"capacityBins"` + + // The compute bare metal host OCID of the dedicated virtual machine host. + ComputeBareMetalHostId *string `mandatory:"false" json:"computeBareMetalHostId"` +} + +func (m DedicatedVmHost) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DedicatedVmHost) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDedicatedVmHostLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetDedicatedVmHostLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *DedicatedVmHost) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + FaultDomain *string `json:"faultDomain"` + FreeformTags map[string]string `json:"freeformTags"` + PlacementConstraintDetails placementconstraintdetails `json:"placementConstraintDetails"` + CapacityConfig *string `json:"capacityConfig"` + IsMemoryEncryptionEnabled *bool `json:"isMemoryEncryptionEnabled"` + TotalMemoryInGBs *float32 `json:"totalMemoryInGBs"` + RemainingMemoryInGBs *float32 `json:"remainingMemoryInGBs"` + TotalLocalVolumeInGBs *float32 `json:"totalLocalVolumeInGBs"` + RemainingLocalVolumeInGBs *float32 `json:"remainingLocalVolumeInGBs"` + CapacityBins []CapacityBin `json:"capacityBins"` + ComputeBareMetalHostId *string `json:"computeBareMetalHostId"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + DedicatedVmHostShape *string `json:"dedicatedVmHostShape"` + DisplayName *string `json:"displayName"` + Id *string `json:"id"` + LifecycleState DedicatedVmHostLifecycleStateEnum `json:"lifecycleState"` + TimeCreated *common.SDKTime `json:"timeCreated"` + TotalOcpus *float32 `json:"totalOcpus"` + RemainingOcpus *float32 `json:"remainingOcpus"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.FaultDomain = model.FaultDomain + + m.FreeformTags = model.FreeformTags + + nn, e = model.PlacementConstraintDetails.UnmarshalPolymorphicJSON(model.PlacementConstraintDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.PlacementConstraintDetails = nn.(PlacementConstraintDetails) + } else { + m.PlacementConstraintDetails = nil + } + + m.CapacityConfig = model.CapacityConfig + + m.IsMemoryEncryptionEnabled = model.IsMemoryEncryptionEnabled + + m.TotalMemoryInGBs = model.TotalMemoryInGBs + + m.RemainingMemoryInGBs = model.RemainingMemoryInGBs + + m.TotalLocalVolumeInGBs = model.TotalLocalVolumeInGBs + + m.RemainingLocalVolumeInGBs = model.RemainingLocalVolumeInGBs + + m.CapacityBins = make([]CapacityBin, len(model.CapacityBins)) + copy(m.CapacityBins, model.CapacityBins) + m.ComputeBareMetalHostId = model.ComputeBareMetalHostId + + m.AvailabilityDomain = model.AvailabilityDomain + + m.CompartmentId = model.CompartmentId + + m.DedicatedVmHostShape = model.DedicatedVmHostShape + + m.DisplayName = model.DisplayName + + m.Id = model.Id + + m.LifecycleState = model.LifecycleState + + m.TimeCreated = model.TimeCreated + + m.TotalOcpus = model.TotalOcpus + + m.RemainingOcpus = model.RemainingOcpus + + return +} + +// DedicatedVmHostLifecycleStateEnum Enum with underlying type: string +type DedicatedVmHostLifecycleStateEnum string + +// Set of constants representing the allowable values for DedicatedVmHostLifecycleStateEnum +const ( + DedicatedVmHostLifecycleStateCreating DedicatedVmHostLifecycleStateEnum = "CREATING" + DedicatedVmHostLifecycleStateActive DedicatedVmHostLifecycleStateEnum = "ACTIVE" + DedicatedVmHostLifecycleStateUpdating DedicatedVmHostLifecycleStateEnum = "UPDATING" + DedicatedVmHostLifecycleStateDeleting DedicatedVmHostLifecycleStateEnum = "DELETING" + DedicatedVmHostLifecycleStateDeleted DedicatedVmHostLifecycleStateEnum = "DELETED" + DedicatedVmHostLifecycleStateFailed DedicatedVmHostLifecycleStateEnum = "FAILED" +) + +var mappingDedicatedVmHostLifecycleStateEnum = map[string]DedicatedVmHostLifecycleStateEnum{ + "CREATING": DedicatedVmHostLifecycleStateCreating, + "ACTIVE": DedicatedVmHostLifecycleStateActive, + "UPDATING": DedicatedVmHostLifecycleStateUpdating, + "DELETING": DedicatedVmHostLifecycleStateDeleting, + "DELETED": DedicatedVmHostLifecycleStateDeleted, + "FAILED": DedicatedVmHostLifecycleStateFailed, +} + +var mappingDedicatedVmHostLifecycleStateEnumLowerCase = map[string]DedicatedVmHostLifecycleStateEnum{ + "creating": DedicatedVmHostLifecycleStateCreating, + "active": DedicatedVmHostLifecycleStateActive, + "updating": DedicatedVmHostLifecycleStateUpdating, + "deleting": DedicatedVmHostLifecycleStateDeleting, + "deleted": DedicatedVmHostLifecycleStateDeleted, + "failed": DedicatedVmHostLifecycleStateFailed, +} + +// GetDedicatedVmHostLifecycleStateEnumValues Enumerates the set of values for DedicatedVmHostLifecycleStateEnum +func GetDedicatedVmHostLifecycleStateEnumValues() []DedicatedVmHostLifecycleStateEnum { + values := make([]DedicatedVmHostLifecycleStateEnum, 0) + for _, v := range mappingDedicatedVmHostLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetDedicatedVmHostLifecycleStateEnumStringValues Enumerates the set of values in String for DedicatedVmHostLifecycleStateEnum +func GetDedicatedVmHostLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingDedicatedVmHostLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDedicatedVmHostLifecycleStateEnum(val string) (DedicatedVmHostLifecycleStateEnum, bool) { + enum, ok := mappingDedicatedVmHostLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host_instance_shape_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host_instance_shape_summary.go new file mode 100644 index 000000000..f254072db --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host_instance_shape_summary.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DedicatedVmHostInstanceShapeSummary The shape used to launch instances associated with the dedicated VM host. +type DedicatedVmHostInstanceShapeSummary struct { + + // The name of the virtual machine instance shapes that can be launched on a dedicated VM host. + InstanceShapeName *string `mandatory:"true" json:"instanceShapeName"` + + // The shape's availability domain. + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + SupportedCapabilities *SupportedCapabilities `mandatory:"false" json:"supportedCapabilities"` +} + +func (m DedicatedVmHostInstanceShapeSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DedicatedVmHostInstanceShapeSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host_instance_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host_instance_summary.go new file mode 100644 index 000000000..c3ff16c56 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host_instance_summary.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DedicatedVmHostInstanceSummary Condensed instance data when listing instances on a dedicated VM host. +type DedicatedVmHostInstanceSummary struct { + + // The availability domain the virtual machine instance is running in. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the virtual machine instance. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the virtual machine instance. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The shape of the VM instance. + Shape *string `mandatory:"true" json:"shape"` + + // The date and time the virtual machine instance was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Specifies whether the VM instance is confidential. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` +} + +func (m DedicatedVmHostInstanceSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DedicatedVmHostInstanceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host_shape_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host_shape_summary.go new file mode 100644 index 000000000..b651eaf0f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host_shape_summary.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DedicatedVmHostShapeSummary The shape used to launch the dedicated virtual machine (VM) host. +type DedicatedVmHostShapeSummary struct { + + // The name of the dedicated VM host shape. You can enumerate all available shapes by calling + // ListDedicatedVmHostShapes. + DedicatedVmHostShape *string `mandatory:"true" json:"dedicatedVmHostShape"` + + // The shape's availability domain. + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // A list of capacity configs that are supported by this dedicated VM host shape. + CapacityConfigs []CapacityConfig `mandatory:"false" json:"capacityConfigs"` +} + +func (m DedicatedVmHostShapeSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DedicatedVmHostShapeSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host_summary.go new file mode 100644 index 000000000..98cb7b177 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/dedicated_vm_host_summary.go @@ -0,0 +1,156 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DedicatedVmHostSummary A dedicated virtual machine (VM) host lets you host multiple instances on a dedicated server that is not shared with other tenancies. +type DedicatedVmHostSummary struct { + + // The availability domain the dedicated VM host is running in. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the dedicated VM host. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The shape of the dedicated VM host. The shape determines the number of CPUs and + // other resources available for VMs. + DedicatedVmHostShape *string `mandatory:"true" json:"dedicatedVmHostShape"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the dedicated VM host. + Id *string `mandatory:"true" json:"id"` + + // The current state of the dedicated VM host. + LifecycleState DedicatedVmHostSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the dedicated VM host was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current available OCPUs of the dedicated VM host. + RemainingOcpus *float32 `mandatory:"true" json:"remainingOcpus"` + + // The current total OCPUs of the dedicated VM host. + TotalOcpus *float32 `mandatory:"true" json:"totalOcpus"` + + // The fault domain for the dedicated VM host's assigned instances. For more information, see Fault Domains. + // If you do not specify the fault domain, the system selects one for you. To change the fault domain for a dedicated VM host, + // delete it and create a new dedicated VM host in the preferred fault domain. + // To get a list of fault domains, use the ListFaultDomains operation in the Identity and Access Management Service API. + // Example: `FAULT-DOMAIN-1` + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + // Specifies if the Dedicated Virtual Machine Host is restricted to running only Confidential VMs. If `true`, only Confidential VMs can be launched. If `false`, Confidential VMs cannot be launched. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // The current total memory of the dedicated VM host, in GBs. + TotalMemoryInGBs *float32 `mandatory:"false" json:"totalMemoryInGBs"` + + // The current available memory of the dedicated VM host, in GBs. + RemainingMemoryInGBs *float32 `mandatory:"false" json:"remainingMemoryInGBs"` + + // The current total local volume of the dedicated VM host, in GBs. + TotalLocalVolumeInGBs *float32 `mandatory:"false" json:"totalLocalVolumeInGBs"` + + // The current available local volume of the dedicated VM host, in GBs. + RemainingLocalVolumeInGBs *float32 `mandatory:"false" json:"remainingLocalVolumeInGBs"` +} + +func (m DedicatedVmHostSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DedicatedVmHostSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDedicatedVmHostSummaryLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetDedicatedVmHostSummaryLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DedicatedVmHostSummaryLifecycleStateEnum Enum with underlying type: string +type DedicatedVmHostSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for DedicatedVmHostSummaryLifecycleStateEnum +const ( + DedicatedVmHostSummaryLifecycleStateCreating DedicatedVmHostSummaryLifecycleStateEnum = "CREATING" + DedicatedVmHostSummaryLifecycleStateActive DedicatedVmHostSummaryLifecycleStateEnum = "ACTIVE" + DedicatedVmHostSummaryLifecycleStateUpdating DedicatedVmHostSummaryLifecycleStateEnum = "UPDATING" + DedicatedVmHostSummaryLifecycleStateDeleting DedicatedVmHostSummaryLifecycleStateEnum = "DELETING" + DedicatedVmHostSummaryLifecycleStateDeleted DedicatedVmHostSummaryLifecycleStateEnum = "DELETED" + DedicatedVmHostSummaryLifecycleStateFailed DedicatedVmHostSummaryLifecycleStateEnum = "FAILED" +) + +var mappingDedicatedVmHostSummaryLifecycleStateEnum = map[string]DedicatedVmHostSummaryLifecycleStateEnum{ + "CREATING": DedicatedVmHostSummaryLifecycleStateCreating, + "ACTIVE": DedicatedVmHostSummaryLifecycleStateActive, + "UPDATING": DedicatedVmHostSummaryLifecycleStateUpdating, + "DELETING": DedicatedVmHostSummaryLifecycleStateDeleting, + "DELETED": DedicatedVmHostSummaryLifecycleStateDeleted, + "FAILED": DedicatedVmHostSummaryLifecycleStateFailed, +} + +var mappingDedicatedVmHostSummaryLifecycleStateEnumLowerCase = map[string]DedicatedVmHostSummaryLifecycleStateEnum{ + "creating": DedicatedVmHostSummaryLifecycleStateCreating, + "active": DedicatedVmHostSummaryLifecycleStateActive, + "updating": DedicatedVmHostSummaryLifecycleStateUpdating, + "deleting": DedicatedVmHostSummaryLifecycleStateDeleting, + "deleted": DedicatedVmHostSummaryLifecycleStateDeleted, + "failed": DedicatedVmHostSummaryLifecycleStateFailed, +} + +// GetDedicatedVmHostSummaryLifecycleStateEnumValues Enumerates the set of values for DedicatedVmHostSummaryLifecycleStateEnum +func GetDedicatedVmHostSummaryLifecycleStateEnumValues() []DedicatedVmHostSummaryLifecycleStateEnum { + values := make([]DedicatedVmHostSummaryLifecycleStateEnum, 0) + for _, v := range mappingDedicatedVmHostSummaryLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetDedicatedVmHostSummaryLifecycleStateEnumStringValues Enumerates the set of values in String for DedicatedVmHostSummaryLifecycleStateEnum +func GetDedicatedVmHostSummaryLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingDedicatedVmHostSummaryLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDedicatedVmHostSummaryLifecycleStateEnum(val string) (DedicatedVmHostSummaryLifecycleStateEnum, bool) { + enum, ok := mappingDedicatedVmHostSummaryLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/default_drg_route_tables.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/default_drg_route_tables.go new file mode 100644 index 000000000..d1aace2a2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/default_drg_route_tables.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DefaultDrgRouteTables The default DRG route table for this DRG. Each network type +// has a default DRG route table. +// You can update a network type to use a different DRG route table, but +// each network type must have a default DRG route table. You cannot delete +// a default DRG route table. +type DefaultDrgRouteTables struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the default DRG route table to be assigned to DRG attachments + // of type VCN on creation. + Vcn *string `mandatory:"false" json:"vcn"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the default DRG route table assigned to DRG attachments + // of type IPSEC_TUNNEL on creation. + IpsecTunnel *string `mandatory:"false" json:"ipsecTunnel"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the default DRG route table to be assigned to DRG attachments + // of type VIRTUAL_CIRCUIT on creation. + VirtualCircuit *string `mandatory:"false" json:"virtualCircuit"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the default DRG route table to be assigned to DRG attachments + // of type REMOTE_PEERING_CONNECTION on creation. + RemotePeeringConnection *string `mandatory:"false" json:"remotePeeringConnection"` +} + +func (m DefaultDrgRouteTables) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DefaultDrgRouteTables) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/default_phase_one_parameters.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/default_phase_one_parameters.go new file mode 100644 index 000000000..f1a056463 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/default_phase_one_parameters.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DefaultPhaseOneParameters Default phase one parameters. +type DefaultPhaseOneParameters struct { + + // Default phase one encryption algorithms. + DefaultEncryptionAlgorithms []string `mandatory:"false" json:"defaultEncryptionAlgorithms"` + + // Default phase one authentication algorithms. + DefaultAuthenticationAlgorithms []string `mandatory:"false" json:"defaultAuthenticationAlgorithms"` + + // Default phase one Diffie-Hellman groups. + DefaultDhGroups []string `mandatory:"false" json:"defaultDhGroups"` +} + +func (m DefaultPhaseOneParameters) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DefaultPhaseOneParameters) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/default_phase_two_parameters.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/default_phase_two_parameters.go new file mode 100644 index 000000000..e9097e199 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/default_phase_two_parameters.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DefaultPhaseTwoParameters Default phase two parameters. +type DefaultPhaseTwoParameters struct { + + // Default phase two encryption algorithms. + DefaultEncryptionAlgorithms []string `mandatory:"false" json:"defaultEncryptionAlgorithms"` + + // Default phase two authentication algorithms. + DefaultAuthenticationAlgorithms []string `mandatory:"false" json:"defaultAuthenticationAlgorithms"` + + // Default perfect forward secrecy Diffie-Hellman groups. + DefaultPfsDhGroup *string `mandatory:"false" json:"defaultPfsDhGroup"` +} + +func (m DefaultPhaseTwoParameters) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DefaultPhaseTwoParameters) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_app_catalog_subscription_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_app_catalog_subscription_request_response.go new file mode 100644 index 000000000..87908a151 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_app_catalog_subscription_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteAppCatalogSubscriptionRequest wrapper for the DeleteAppCatalogSubscription operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteAppCatalogSubscription.go.html to see an example of how to use DeleteAppCatalogSubscriptionRequest. +type DeleteAppCatalogSubscriptionRequest struct { + + // The OCID of the listing. + ListingId *string `mandatory:"true" contributesTo:"query" name:"listingId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Listing Resource Version. + ResourceVersion *string `mandatory:"true" contributesTo:"query" name:"resourceVersion"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteAppCatalogSubscriptionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteAppCatalogSubscriptionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteAppCatalogSubscriptionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteAppCatalogSubscriptionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteAppCatalogSubscriptionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteAppCatalogSubscriptionResponse wrapper for the DeleteAppCatalogSubscription operation +type DeleteAppCatalogSubscriptionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteAppCatalogSubscriptionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteAppCatalogSubscriptionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_boot_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_boot_volume_backup_request_response.go new file mode 100644 index 000000000..21ebe3204 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_boot_volume_backup_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteBootVolumeBackupRequest wrapper for the DeleteBootVolumeBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteBootVolumeBackup.go.html to see an example of how to use DeleteBootVolumeBackupRequest. +type DeleteBootVolumeBackupRequest struct { + + // The OCID of the boot volume backup. + BootVolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeBackupId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteBootVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteBootVolumeBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteBootVolumeBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteBootVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteBootVolumeBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteBootVolumeBackupResponse wrapper for the DeleteBootVolumeBackup operation +type DeleteBootVolumeBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteBootVolumeBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteBootVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_boot_volume_kms_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_boot_volume_kms_key_request_response.go new file mode 100644 index 000000000..6289c72ed --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_boot_volume_kms_key_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteBootVolumeKmsKeyRequest wrapper for the DeleteBootVolumeKmsKey operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteBootVolumeKmsKey.go.html to see an example of how to use DeleteBootVolumeKmsKeyRequest. +type DeleteBootVolumeKmsKeyRequest struct { + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteBootVolumeKmsKeyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteBootVolumeKmsKeyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteBootVolumeKmsKeyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteBootVolumeKmsKeyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteBootVolumeKmsKeyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteBootVolumeKmsKeyResponse wrapper for the DeleteBootVolumeKmsKey operation +type DeleteBootVolumeKmsKeyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteBootVolumeKmsKeyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteBootVolumeKmsKeyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_boot_volume_request_response.go new file mode 100644 index 000000000..ad66eab77 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_boot_volume_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteBootVolumeRequest wrapper for the DeleteBootVolume operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteBootVolume.go.html to see an example of how to use DeleteBootVolumeRequest. +type DeleteBootVolumeRequest struct { + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteBootVolumeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteBootVolumeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteBootVolumeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteBootVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteBootVolumeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteBootVolumeResponse wrapper for the DeleteBootVolume operation +type DeleteBootVolumeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteBootVolumeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteBootVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_byoasn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_byoasn_request_response.go new file mode 100644 index 000000000..901d517ee --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_byoasn_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteByoasnRequest wrapper for the DeleteByoasn operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteByoasn.go.html to see an example of how to use DeleteByoasnRequest. +type DeleteByoasnRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `Byoasn` resource. + ByoasnId *string `mandatory:"true" contributesTo:"path" name:"byoasnId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteByoasnRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteByoasnRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteByoasnRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteByoasnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteByoasnRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteByoasnResponse wrapper for the DeleteByoasn operation +type DeleteByoasnResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteByoasnResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteByoasnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_byoip_range_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_byoip_range_request_response.go new file mode 100644 index 000000000..565ce30b4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_byoip_range_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteByoipRangeRequest wrapper for the DeleteByoipRange operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteByoipRange.go.html to see an example of how to use DeleteByoipRangeRequest. +type DeleteByoipRangeRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource containing the BYOIP CIDR block. + ByoipRangeId *string `mandatory:"true" contributesTo:"path" name:"byoipRangeId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteByoipRangeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteByoipRangeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteByoipRangeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteByoipRangeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteByoipRangeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteByoipRangeResponse wrapper for the DeleteByoipRange operation +type DeleteByoipRangeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteByoipRangeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteByoipRangeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_capture_filter_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_capture_filter_request_response.go new file mode 100644 index 000000000..c17ef8d80 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_capture_filter_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteCaptureFilterRequest wrapper for the DeleteCaptureFilter operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteCaptureFilter.go.html to see an example of how to use DeleteCaptureFilterRequest. +type DeleteCaptureFilterRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the capture filter. + CaptureFilterId *string `mandatory:"true" contributesTo:"path" name:"captureFilterId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteCaptureFilterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteCaptureFilterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteCaptureFilterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteCaptureFilterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteCaptureFilterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteCaptureFilterResponse wrapper for the DeleteCaptureFilter operation +type DeleteCaptureFilterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteCaptureFilterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteCaptureFilterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_capacity_reservation_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_capacity_reservation_request_response.go new file mode 100644 index 000000000..21a5c60e4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_capacity_reservation_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteComputeCapacityReservationRequest wrapper for the DeleteComputeCapacityReservation operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeCapacityReservation.go.html to see an example of how to use DeleteComputeCapacityReservationRequest. +type DeleteComputeCapacityReservationRequest struct { + + // The OCID of the compute capacity reservation. + CapacityReservationId *string `mandatory:"true" contributesTo:"path" name:"capacityReservationId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteComputeCapacityReservationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteComputeCapacityReservationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteComputeCapacityReservationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteComputeCapacityReservationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteComputeCapacityReservationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteComputeCapacityReservationResponse wrapper for the DeleteComputeCapacityReservation operation +type DeleteComputeCapacityReservationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteComputeCapacityReservationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteComputeCapacityReservationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_capacity_topology_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_capacity_topology_request_response.go new file mode 100644 index 000000000..352845411 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_capacity_topology_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteComputeCapacityTopologyRequest wrapper for the DeleteComputeCapacityTopology operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeCapacityTopology.go.html to see an example of how to use DeleteComputeCapacityTopologyRequest. +type DeleteComputeCapacityTopologyRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" contributesTo:"path" name:"computeCapacityTopologyId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteComputeCapacityTopologyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteComputeCapacityTopologyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteComputeCapacityTopologyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteComputeCapacityTopologyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteComputeCapacityTopologyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteComputeCapacityTopologyResponse wrapper for the DeleteComputeCapacityTopology operation +type DeleteComputeCapacityTopologyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteComputeCapacityTopologyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteComputeCapacityTopologyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_cluster_request_response.go new file mode 100644 index 000000000..c04b2845c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_cluster_request_response.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteComputeClusterRequest wrapper for the DeleteComputeCluster operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeCluster.go.html to see an example of how to use DeleteComputeClusterRequest. +type DeleteComputeClusterRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + // A compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + // access (RDMA) network group. + ComputeClusterId *string `mandatory:"true" contributesTo:"path" name:"computeClusterId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteComputeClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteComputeClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteComputeClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteComputeClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteComputeClusterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteComputeClusterResponse wrapper for the DeleteComputeCluster operation +type DeleteComputeClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteComputeClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteComputeClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_gpu_memory_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_gpu_memory_cluster_request_response.go new file mode 100644 index 000000000..8aad614d3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_gpu_memory_cluster_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteComputeGpuMemoryClusterRequest wrapper for the DeleteComputeGpuMemoryCluster operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeGpuMemoryCluster.go.html to see an example of how to use DeleteComputeGpuMemoryClusterRequest. +type DeleteComputeGpuMemoryClusterRequest struct { + + // The OCID of the compute GPU memory cluster. + ComputeGpuMemoryClusterId *string `mandatory:"true" contributesTo:"path" name:"computeGpuMemoryClusterId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteComputeGpuMemoryClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteComputeGpuMemoryClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteComputeGpuMemoryClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteComputeGpuMemoryClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteComputeGpuMemoryClusterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteComputeGpuMemoryClusterResponse wrapper for the DeleteComputeGpuMemoryCluster operation +type DeleteComputeGpuMemoryClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteComputeGpuMemoryClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteComputeGpuMemoryClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_host_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_host_group_request_response.go new file mode 100644 index 000000000..a2ddbcd95 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_host_group_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteComputeHostGroupRequest wrapper for the DeleteComputeHostGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeHostGroup.go.html to see an example of how to use DeleteComputeHostGroupRequest. +type DeleteComputeHostGroupRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host group. + ComputeHostGroupId *string `mandatory:"true" contributesTo:"path" name:"computeHostGroupId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteComputeHostGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteComputeHostGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteComputeHostGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteComputeHostGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteComputeHostGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteComputeHostGroupResponse wrapper for the DeleteComputeHostGroup operation +type DeleteComputeHostGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteComputeHostGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteComputeHostGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_image_capability_schema_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_image_capability_schema_request_response.go new file mode 100644 index 000000000..59b3dec85 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_compute_image_capability_schema_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteComputeImageCapabilitySchemaRequest wrapper for the DeleteComputeImageCapabilitySchema operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeImageCapabilitySchema.go.html to see an example of how to use DeleteComputeImageCapabilitySchemaRequest. +type DeleteComputeImageCapabilitySchemaRequest struct { + + // The id of the compute image capability schema or the image ocid + ComputeImageCapabilitySchemaId *string `mandatory:"true" contributesTo:"path" name:"computeImageCapabilitySchemaId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteComputeImageCapabilitySchemaRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteComputeImageCapabilitySchemaRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteComputeImageCapabilitySchemaRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteComputeImageCapabilitySchemaRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteComputeImageCapabilitySchemaRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteComputeImageCapabilitySchemaResponse wrapper for the DeleteComputeImageCapabilitySchema operation +type DeleteComputeImageCapabilitySchemaResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteComputeImageCapabilitySchemaResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteComputeImageCapabilitySchemaResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_console_history_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_console_history_request_response.go new file mode 100644 index 000000000..a9752496a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_console_history_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteConsoleHistoryRequest wrapper for the DeleteConsoleHistory operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteConsoleHistory.go.html to see an example of how to use DeleteConsoleHistoryRequest. +type DeleteConsoleHistoryRequest struct { + + // The OCID of the console history. + InstanceConsoleHistoryId *string `mandatory:"true" contributesTo:"path" name:"instanceConsoleHistoryId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteConsoleHistoryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteConsoleHistoryRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteConsoleHistoryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteConsoleHistoryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteConsoleHistoryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteConsoleHistoryResponse wrapper for the DeleteConsoleHistory operation +type DeleteConsoleHistoryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteConsoleHistoryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteConsoleHistoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_cpe_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_cpe_request_response.go new file mode 100644 index 000000000..27f601315 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_cpe_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteCpeRequest wrapper for the DeleteCpe operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteCpe.go.html to see an example of how to use DeleteCpeRequest. +type DeleteCpeRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the CPE. + CpeId *string `mandatory:"true" contributesTo:"path" name:"cpeId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteCpeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteCpeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteCpeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteCpeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteCpeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteCpeResponse wrapper for the DeleteCpe operation +type DeleteCpeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteCpeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteCpeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_cross_connect_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_cross_connect_group_request_response.go new file mode 100644 index 000000000..9d918acd0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_cross_connect_group_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteCrossConnectGroupRequest wrapper for the DeleteCrossConnectGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteCrossConnectGroup.go.html to see an example of how to use DeleteCrossConnectGroupRequest. +type DeleteCrossConnectGroupRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect group. + CrossConnectGroupId *string `mandatory:"true" contributesTo:"path" name:"crossConnectGroupId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteCrossConnectGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteCrossConnectGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteCrossConnectGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteCrossConnectGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteCrossConnectGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteCrossConnectGroupResponse wrapper for the DeleteCrossConnectGroup operation +type DeleteCrossConnectGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteCrossConnectGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteCrossConnectGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_cross_connect_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_cross_connect_request_response.go new file mode 100644 index 000000000..106282a9b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_cross_connect_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteCrossConnectRequest wrapper for the DeleteCrossConnect operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteCrossConnect.go.html to see an example of how to use DeleteCrossConnectRequest. +type DeleteCrossConnectRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect. + CrossConnectId *string `mandatory:"true" contributesTo:"path" name:"crossConnectId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteCrossConnectRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteCrossConnectRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteCrossConnectRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteCrossConnectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteCrossConnectRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteCrossConnectResponse wrapper for the DeleteCrossConnect operation +type DeleteCrossConnectResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteCrossConnectResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteCrossConnectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_dedicated_vm_host_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_dedicated_vm_host_request_response.go new file mode 100644 index 000000000..112b1d72b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_dedicated_vm_host_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteDedicatedVmHostRequest wrapper for the DeleteDedicatedVmHost operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDedicatedVmHost.go.html to see an example of how to use DeleteDedicatedVmHostRequest. +type DeleteDedicatedVmHostRequest struct { + + // The OCID of the dedicated VM host. + DedicatedVmHostId *string `mandatory:"true" contributesTo:"path" name:"dedicatedVmHostId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteDedicatedVmHostRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteDedicatedVmHostRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteDedicatedVmHostRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteDedicatedVmHostRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteDedicatedVmHostRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteDedicatedVmHostResponse wrapper for the DeleteDedicatedVmHost operation +type DeleteDedicatedVmHostResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteDedicatedVmHostResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteDedicatedVmHostResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_dhcp_options_request_response.go new file mode 100644 index 000000000..b01ddf26c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_dhcp_options_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteDhcpOptionsRequest wrapper for the DeleteDhcpOptions operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDhcpOptions.go.html to see an example of how to use DeleteDhcpOptionsRequest. +type DeleteDhcpOptionsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the set of DHCP options. + DhcpId *string `mandatory:"true" contributesTo:"path" name:"dhcpId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteDhcpOptionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteDhcpOptionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteDhcpOptionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteDhcpOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteDhcpOptionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteDhcpOptionsResponse wrapper for the DeleteDhcpOptions operation +type DeleteDhcpOptionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteDhcpOptionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteDhcpOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_drg_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_drg_attachment_request_response.go new file mode 100644 index 000000000..3aef04146 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_drg_attachment_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteDrgAttachmentRequest wrapper for the DeleteDrgAttachment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDrgAttachment.go.html to see an example of how to use DeleteDrgAttachmentRequest. +type DeleteDrgAttachmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG attachment. + DrgAttachmentId *string `mandatory:"true" contributesTo:"path" name:"drgAttachmentId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteDrgAttachmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteDrgAttachmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteDrgAttachmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteDrgAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteDrgAttachmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteDrgAttachmentResponse wrapper for the DeleteDrgAttachment operation +type DeleteDrgAttachmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteDrgAttachmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteDrgAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_drg_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_drg_request_response.go new file mode 100644 index 000000000..492ef5849 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_drg_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteDrgRequest wrapper for the DeleteDrg operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDrg.go.html to see an example of how to use DeleteDrgRequest. +type DeleteDrgRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"true" contributesTo:"path" name:"drgId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteDrgRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteDrgRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteDrgRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteDrgRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteDrgRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteDrgResponse wrapper for the DeleteDrg operation +type DeleteDrgResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteDrgResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteDrgResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_drg_route_distribution_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_drg_route_distribution_request_response.go new file mode 100644 index 000000000..043e0d316 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_drg_route_distribution_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteDrgRouteDistributionRequest wrapper for the DeleteDrgRouteDistribution operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDrgRouteDistribution.go.html to see an example of how to use DeleteDrgRouteDistributionRequest. +type DeleteDrgRouteDistributionRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route distribution. + DrgRouteDistributionId *string `mandatory:"true" contributesTo:"path" name:"drgRouteDistributionId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteDrgRouteDistributionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteDrgRouteDistributionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteDrgRouteDistributionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteDrgRouteDistributionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteDrgRouteDistributionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteDrgRouteDistributionResponse wrapper for the DeleteDrgRouteDistribution operation +type DeleteDrgRouteDistributionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteDrgRouteDistributionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteDrgRouteDistributionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_drg_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_drg_route_table_request_response.go new file mode 100644 index 000000000..d824e04c4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_drg_route_table_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteDrgRouteTableRequest wrapper for the DeleteDrgRouteTable operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteDrgRouteTable.go.html to see an example of how to use DeleteDrgRouteTableRequest. +type DeleteDrgRouteTableRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table. + DrgRouteTableId *string `mandatory:"true" contributesTo:"path" name:"drgRouteTableId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteDrgRouteTableRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteDrgRouteTableRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteDrgRouteTableRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteDrgRouteTableRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteDrgRouteTableRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteDrgRouteTableResponse wrapper for the DeleteDrgRouteTable operation +type DeleteDrgRouteTableResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteDrgRouteTableResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteDrgRouteTableResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_i_p_sec_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_i_p_sec_connection_request_response.go new file mode 100644 index 000000000..7e69277d5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_i_p_sec_connection_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteIPSecConnectionRequest wrapper for the DeleteIPSecConnection operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteIPSecConnection.go.html to see an example of how to use DeleteIPSecConnectionRequest. +type DeleteIPSecConnectionRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteIPSecConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteIPSecConnectionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteIPSecConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteIPSecConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteIPSecConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteIPSecConnectionResponse wrapper for the DeleteIPSecConnection operation +type DeleteIPSecConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteIPSecConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteIPSecConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_image_request_response.go new file mode 100644 index 000000000..e70069110 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_image_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteImageRequest wrapper for the DeleteImage operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteImage.go.html to see an example of how to use DeleteImageRequest. +type DeleteImageRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. + ImageId *string `mandatory:"true" contributesTo:"path" name:"imageId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteImageRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteImageRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteImageRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteImageRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteImageRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteImageResponse wrapper for the DeleteImage operation +type DeleteImageResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteImageResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteImageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_instance_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_instance_configuration_request_response.go new file mode 100644 index 000000000..d47c9662f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_instance_configuration_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteInstanceConfigurationRequest wrapper for the DeleteInstanceConfiguration operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteInstanceConfiguration.go.html to see an example of how to use DeleteInstanceConfigurationRequest. +type DeleteInstanceConfigurationRequest struct { + + // The OCID of the instance configuration. + InstanceConfigurationId *string `mandatory:"true" contributesTo:"path" name:"instanceConfigurationId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteInstanceConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteInstanceConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteInstanceConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteInstanceConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteInstanceConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteInstanceConfigurationResponse wrapper for the DeleteInstanceConfiguration operation +type DeleteInstanceConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteInstanceConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteInstanceConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_instance_console_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_instance_console_connection_request_response.go new file mode 100644 index 000000000..be3fb43e8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_instance_console_connection_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteInstanceConsoleConnectionRequest wrapper for the DeleteInstanceConsoleConnection operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteInstanceConsoleConnection.go.html to see an example of how to use DeleteInstanceConsoleConnectionRequest. +type DeleteInstanceConsoleConnectionRequest struct { + + // The OCID of the instance console connection. + InstanceConsoleConnectionId *string `mandatory:"true" contributesTo:"path" name:"instanceConsoleConnectionId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteInstanceConsoleConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteInstanceConsoleConnectionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteInstanceConsoleConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteInstanceConsoleConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteInstanceConsoleConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteInstanceConsoleConnectionResponse wrapper for the DeleteInstanceConsoleConnection operation +type DeleteInstanceConsoleConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteInstanceConsoleConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteInstanceConsoleConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_internet_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_internet_gateway_request_response.go new file mode 100644 index 000000000..e46750d1a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_internet_gateway_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteInternetGatewayRequest wrapper for the DeleteInternetGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteInternetGateway.go.html to see an example of how to use DeleteInternetGatewayRequest. +type DeleteInternetGatewayRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the internet gateway. + IgId *string `mandatory:"true" contributesTo:"path" name:"igId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteInternetGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteInternetGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteInternetGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteInternetGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteInternetGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteInternetGatewayResponse wrapper for the DeleteInternetGateway operation +type DeleteInternetGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteInternetGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteInternetGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_ipv6_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_ipv6_request_response.go new file mode 100644 index 000000000..fda3de3ee --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_ipv6_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteIpv6Request wrapper for the DeleteIpv6 operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteIpv6.go.html to see an example of how to use DeleteIpv6Request. +type DeleteIpv6Request struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPv6. + Ipv6Id *string `mandatory:"true" contributesTo:"path" name:"ipv6Id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteIpv6Request) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteIpv6Request) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteIpv6Request) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteIpv6Request) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteIpv6Request) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteIpv6Response wrapper for the DeleteIpv6 operation +type DeleteIpv6Response struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteIpv6Response) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteIpv6Response) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_local_peering_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_local_peering_gateway_request_response.go new file mode 100644 index 000000000..7b7796227 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_local_peering_gateway_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteLocalPeeringGatewayRequest wrapper for the DeleteLocalPeeringGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteLocalPeeringGateway.go.html to see an example of how to use DeleteLocalPeeringGatewayRequest. +type DeleteLocalPeeringGatewayRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the local peering gateway. + LocalPeeringGatewayId *string `mandatory:"true" contributesTo:"path" name:"localPeeringGatewayId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteLocalPeeringGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteLocalPeeringGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteLocalPeeringGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteLocalPeeringGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteLocalPeeringGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteLocalPeeringGatewayResponse wrapper for the DeleteLocalPeeringGateway operation +type DeleteLocalPeeringGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteLocalPeeringGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteLocalPeeringGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_nat_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_nat_gateway_request_response.go new file mode 100644 index 000000000..66fb8e58b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_nat_gateway_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteNatGatewayRequest wrapper for the DeleteNatGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteNatGateway.go.html to see an example of how to use DeleteNatGatewayRequest. +type DeleteNatGatewayRequest struct { + + // The NAT gateway's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + NatGatewayId *string `mandatory:"true" contributesTo:"path" name:"natGatewayId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteNatGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteNatGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteNatGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteNatGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteNatGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteNatGatewayResponse wrapper for the DeleteNatGateway operation +type DeleteNatGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteNatGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteNatGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_network_security_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_network_security_group_request_response.go new file mode 100644 index 000000000..9fa372633 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_network_security_group_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteNetworkSecurityGroupRequest wrapper for the DeleteNetworkSecurityGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteNetworkSecurityGroup.go.html to see an example of how to use DeleteNetworkSecurityGroupRequest. +type DeleteNetworkSecurityGroupRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security group. + NetworkSecurityGroupId *string `mandatory:"true" contributesTo:"path" name:"networkSecurityGroupId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteNetworkSecurityGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteNetworkSecurityGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteNetworkSecurityGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteNetworkSecurityGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteNetworkSecurityGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteNetworkSecurityGroupResponse wrapper for the DeleteNetworkSecurityGroup operation +type DeleteNetworkSecurityGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteNetworkSecurityGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteNetworkSecurityGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_private_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_private_ip_request_response.go new file mode 100644 index 000000000..6724cfa7d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_private_ip_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePrivateIpRequest wrapper for the DeletePrivateIp operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeletePrivateIp.go.html to see an example of how to use DeletePrivateIpRequest. +type DeletePrivateIpRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private IP or IPv6. + PrivateIpId *string `mandatory:"true" contributesTo:"path" name:"privateIpId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePrivateIpRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePrivateIpRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeletePrivateIpRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePrivateIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeletePrivateIpRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePrivateIpResponse wrapper for the DeletePrivateIp operation +type DeletePrivateIpResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePrivateIpResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePrivateIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_public_ip_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_public_ip_pool_request_response.go new file mode 100644 index 000000000..110d02f4d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_public_ip_pool_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePublicIpPoolRequest wrapper for the DeletePublicIpPool operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeletePublicIpPool.go.html to see an example of how to use DeletePublicIpPoolRequest. +type DeletePublicIpPoolRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP pool. + PublicIpPoolId *string `mandatory:"true" contributesTo:"path" name:"publicIpPoolId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePublicIpPoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePublicIpPoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeletePublicIpPoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePublicIpPoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeletePublicIpPoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePublicIpPoolResponse wrapper for the DeletePublicIpPool operation +type DeletePublicIpPoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePublicIpPoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePublicIpPoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_public_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_public_ip_request_response.go new file mode 100644 index 000000000..9cb05a9c5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_public_ip_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePublicIpRequest wrapper for the DeletePublicIp operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeletePublicIp.go.html to see an example of how to use DeletePublicIpRequest. +type DeletePublicIpRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP. + PublicIpId *string `mandatory:"true" contributesTo:"path" name:"publicIpId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePublicIpRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePublicIpRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeletePublicIpRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePublicIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeletePublicIpRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePublicIpResponse wrapper for the DeletePublicIp operation +type DeletePublicIpResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePublicIpResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePublicIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_remote_peering_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_remote_peering_connection_request_response.go new file mode 100644 index 000000000..3e0a14488 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_remote_peering_connection_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteRemotePeeringConnectionRequest wrapper for the DeleteRemotePeeringConnection operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteRemotePeeringConnection.go.html to see an example of how to use DeleteRemotePeeringConnectionRequest. +type DeleteRemotePeeringConnectionRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the remote peering connection (RPC). + RemotePeeringConnectionId *string `mandatory:"true" contributesTo:"path" name:"remotePeeringConnectionId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteRemotePeeringConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteRemotePeeringConnectionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteRemotePeeringConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteRemotePeeringConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteRemotePeeringConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteRemotePeeringConnectionResponse wrapper for the DeleteRemotePeeringConnection operation +type DeleteRemotePeeringConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteRemotePeeringConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteRemotePeeringConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_route_table_request_response.go new file mode 100644 index 000000000..90ccc4a8b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_route_table_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteRouteTableRequest wrapper for the DeleteRouteTable operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteRouteTable.go.html to see an example of how to use DeleteRouteTableRequest. +type DeleteRouteTableRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table. + RtId *string `mandatory:"true" contributesTo:"path" name:"rtId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteRouteTableRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteRouteTableRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteRouteTableRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteRouteTableRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteRouteTableRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteRouteTableResponse wrapper for the DeleteRouteTable operation +type DeleteRouteTableResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteRouteTableResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteRouteTableResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_security_list_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_security_list_request_response.go new file mode 100644 index 000000000..1894317a6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_security_list_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteSecurityListRequest wrapper for the DeleteSecurityList operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteSecurityList.go.html to see an example of how to use DeleteSecurityListRequest. +type DeleteSecurityListRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the security list. + SecurityListId *string `mandatory:"true" contributesTo:"path" name:"securityListId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteSecurityListRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteSecurityListRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteSecurityListRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteSecurityListRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteSecurityListRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteSecurityListResponse wrapper for the DeleteSecurityList operation +type DeleteSecurityListResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteSecurityListResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteSecurityListResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_service_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_service_gateway_request_response.go new file mode 100644 index 000000000..a36e5b60a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_service_gateway_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteServiceGatewayRequest wrapper for the DeleteServiceGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteServiceGateway.go.html to see an example of how to use DeleteServiceGatewayRequest. +type DeleteServiceGatewayRequest struct { + + // The service gateway's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + ServiceGatewayId *string `mandatory:"true" contributesTo:"path" name:"serviceGatewayId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteServiceGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteServiceGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteServiceGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteServiceGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteServiceGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteServiceGatewayResponse wrapper for the DeleteServiceGateway operation +type DeleteServiceGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteServiceGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteServiceGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_subnet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_subnet_request_response.go new file mode 100644 index 000000000..5ccd2d32f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_subnet_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteSubnetRequest wrapper for the DeleteSubnet operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteSubnet.go.html to see an example of how to use DeleteSubnetRequest. +type DeleteSubnetRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteSubnetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteSubnetRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteSubnetRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteSubnetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteSubnetRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteSubnetResponse wrapper for the DeleteSubnet operation +type DeleteSubnetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteSubnetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteSubnetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_vcn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_vcn_request_response.go new file mode 100644 index 000000000..ec77f0631 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_vcn_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteVcnRequest wrapper for the DeleteVcn operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVcn.go.html to see an example of how to use DeleteVcnRequest. +type DeleteVcnRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVcnRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVcnRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteVcnRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVcnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteVcnRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteVcnResponse wrapper for the DeleteVcn operation +type DeleteVcnResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteVcnResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVcnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_virtual_circuit_public_prefix_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_virtual_circuit_public_prefix_details.go new file mode 100644 index 000000000..442b93762 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_virtual_circuit_public_prefix_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DeleteVirtualCircuitPublicPrefixDetails The representation of DeleteVirtualCircuitPublicPrefixDetails +type DeleteVirtualCircuitPublicPrefixDetails struct { + + // An individual public IP prefix (CIDR) to remove from the public virtual circuit. + CidrBlock *string `mandatory:"true" json:"cidrBlock"` +} + +func (m DeleteVirtualCircuitPublicPrefixDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DeleteVirtualCircuitPublicPrefixDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_virtual_circuit_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_virtual_circuit_request_response.go new file mode 100644 index 000000000..428a08676 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_virtual_circuit_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteVirtualCircuitRequest wrapper for the DeleteVirtualCircuit operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVirtualCircuit.go.html to see an example of how to use DeleteVirtualCircuitRequest. +type DeleteVirtualCircuitRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit. + VirtualCircuitId *string `mandatory:"true" contributesTo:"path" name:"virtualCircuitId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVirtualCircuitRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVirtualCircuitRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteVirtualCircuitRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVirtualCircuitRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteVirtualCircuitRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteVirtualCircuitResponse wrapper for the DeleteVirtualCircuit operation +type DeleteVirtualCircuitResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteVirtualCircuitResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVirtualCircuitResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_vlan_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_vlan_request_response.go new file mode 100644 index 000000000..8c56c63fc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_vlan_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteVlanRequest wrapper for the DeleteVlan operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVlan.go.html to see an example of how to use DeleteVlanRequest. +type DeleteVlanRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VLAN. + VlanId *string `mandatory:"true" contributesTo:"path" name:"vlanId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVlanRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVlanRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteVlanRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVlanRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteVlanRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteVlanResponse wrapper for the DeleteVlan operation +type DeleteVlanResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteVlanResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVlanResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_backup_policy_assignment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_backup_policy_assignment_request_response.go new file mode 100644 index 000000000..ca7fbba61 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_backup_policy_assignment_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteVolumeBackupPolicyAssignmentRequest wrapper for the DeleteVolumeBackupPolicyAssignment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeBackupPolicyAssignment.go.html to see an example of how to use DeleteVolumeBackupPolicyAssignmentRequest. +type DeleteVolumeBackupPolicyAssignmentRequest struct { + + // The OCID of the volume backup policy assignment. + PolicyAssignmentId *string `mandatory:"true" contributesTo:"path" name:"policyAssignmentId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVolumeBackupPolicyAssignmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVolumeBackupPolicyAssignmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteVolumeBackupPolicyAssignmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVolumeBackupPolicyAssignmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteVolumeBackupPolicyAssignmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteVolumeBackupPolicyAssignmentResponse wrapper for the DeleteVolumeBackupPolicyAssignment operation +type DeleteVolumeBackupPolicyAssignmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteVolumeBackupPolicyAssignmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVolumeBackupPolicyAssignmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_backup_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_backup_policy_request_response.go new file mode 100644 index 000000000..c52c3980b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_backup_policy_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteVolumeBackupPolicyRequest wrapper for the DeleteVolumeBackupPolicy operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeBackupPolicy.go.html to see an example of how to use DeleteVolumeBackupPolicyRequest. +type DeleteVolumeBackupPolicyRequest struct { + + // The OCID of the volume backup policy. + PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVolumeBackupPolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVolumeBackupPolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteVolumeBackupPolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVolumeBackupPolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteVolumeBackupPolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteVolumeBackupPolicyResponse wrapper for the DeleteVolumeBackupPolicy operation +type DeleteVolumeBackupPolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteVolumeBackupPolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVolumeBackupPolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_backup_request_response.go new file mode 100644 index 000000000..c53dbff42 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_backup_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteVolumeBackupRequest wrapper for the DeleteVolumeBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeBackup.go.html to see an example of how to use DeleteVolumeBackupRequest. +type DeleteVolumeBackupRequest struct { + + // The OCID of the volume backup. + VolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeBackupId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVolumeBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteVolumeBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteVolumeBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteVolumeBackupResponse wrapper for the DeleteVolumeBackup operation +type DeleteVolumeBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteVolumeBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_group_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_group_backup_request_response.go new file mode 100644 index 000000000..765cd6331 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_group_backup_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteVolumeGroupBackupRequest wrapper for the DeleteVolumeGroupBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeGroupBackup.go.html to see an example of how to use DeleteVolumeGroupBackupRequest. +type DeleteVolumeGroupBackupRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup. + VolumeGroupBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupBackupId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVolumeGroupBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVolumeGroupBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteVolumeGroupBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVolumeGroupBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteVolumeGroupBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteVolumeGroupBackupResponse wrapper for the DeleteVolumeGroupBackup operation +type DeleteVolumeGroupBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteVolumeGroupBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVolumeGroupBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_group_request_response.go new file mode 100644 index 000000000..1618d5e68 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_group_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteVolumeGroupRequest wrapper for the DeleteVolumeGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeGroup.go.html to see an example of how to use DeleteVolumeGroupRequest. +type DeleteVolumeGroupRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group. + VolumeGroupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVolumeGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVolumeGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteVolumeGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVolumeGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteVolumeGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteVolumeGroupResponse wrapper for the DeleteVolumeGroup operation +type DeleteVolumeGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteVolumeGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVolumeGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_kms_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_kms_key_request_response.go new file mode 100644 index 000000000..54a5978d9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_kms_key_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteVolumeKmsKeyRequest wrapper for the DeleteVolumeKmsKey operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolumeKmsKey.go.html to see an example of how to use DeleteVolumeKmsKeyRequest. +type DeleteVolumeKmsKeyRequest struct { + + // The OCID of the volume. + VolumeId *string `mandatory:"true" contributesTo:"path" name:"volumeId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVolumeKmsKeyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVolumeKmsKeyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteVolumeKmsKeyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVolumeKmsKeyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteVolumeKmsKeyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteVolumeKmsKeyResponse wrapper for the DeleteVolumeKmsKey operation +type DeleteVolumeKmsKeyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteVolumeKmsKeyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVolumeKmsKeyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_request_response.go new file mode 100644 index 000000000..bc1762c0d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_volume_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteVolumeRequest wrapper for the DeleteVolume operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVolume.go.html to see an example of how to use DeleteVolumeRequest. +type DeleteVolumeRequest struct { + + // The OCID of the volume. + VolumeId *string `mandatory:"true" contributesTo:"path" name:"volumeId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVolumeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVolumeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteVolumeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteVolumeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteVolumeResponse wrapper for the DeleteVolume operation +type DeleteVolumeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteVolumeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_vtap_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_vtap_request_response.go new file mode 100644 index 000000000..f15c6597e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/delete_vtap_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteVtapRequest wrapper for the DeleteVtap operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteVtap.go.html to see an example of how to use DeleteVtapRequest. +type DeleteVtapRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VTAP. + VtapId *string `mandatory:"true" contributesTo:"path" name:"vtapId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVtapRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVtapRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteVtapRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVtapRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteVtapRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteVtapResponse wrapper for the DeleteVtap operation +type DeleteVtapResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteVtapResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVtapResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_boot_volume_request_response.go new file mode 100644 index 000000000..073b09b06 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_boot_volume_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DetachBootVolumeRequest wrapper for the DetachBootVolume operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachBootVolume.go.html to see an example of how to use DetachBootVolumeRequest. +type DetachBootVolumeRequest struct { + + // The OCID of the boot volume attachment. + BootVolumeAttachmentId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeAttachmentId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DetachBootVolumeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DetachBootVolumeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DetachBootVolumeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DetachBootVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DetachBootVolumeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DetachBootVolumeResponse wrapper for the DetachBootVolume operation +type DetachBootVolumeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DetachBootVolumeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DetachBootVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_compute_host_group_host_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_compute_host_group_host_details.go new file mode 100644 index 000000000..2ff7ccc8e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_compute_host_group_host_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DetachComputeHostGroupHostDetails Specifies the host group id +type DetachComputeHostGroupHostDetails struct { + + // 'The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host group.' + ComputeHostGroupId *string `mandatory:"true" json:"computeHostGroupId"` +} + +func (m DetachComputeHostGroupHostDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DetachComputeHostGroupHostDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_compute_host_group_host_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_compute_host_group_host_request_response.go new file mode 100644 index 000000000..fba36c4cb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_compute_host_group_host_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DetachComputeHostGroupHostRequest wrapper for the DetachComputeHostGroupHost operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachComputeHostGroupHost.go.html to see an example of how to use DetachComputeHostGroupHostRequest. +type DetachComputeHostGroupHostRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + ComputeHostId *string `mandatory:"true" contributesTo:"path" name:"computeHostId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host group. + DetachComputeHostGroupHostDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DetachComputeHostGroupHostRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DetachComputeHostGroupHostRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DetachComputeHostGroupHostRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DetachComputeHostGroupHostRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DetachComputeHostGroupHostRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DetachComputeHostGroupHostResponse wrapper for the DetachComputeHostGroupHost operation +type DetachComputeHostGroupHostResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DetachComputeHostGroupHostResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DetachComputeHostGroupHostResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_instance_pool_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_instance_pool_instance_details.go new file mode 100644 index 000000000..655193bc1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_instance_pool_instance_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DetachInstancePoolInstanceDetails An instance that is to be detached from an instance pool. +type DetachInstancePoolInstanceDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // Whether to decrease the size of the instance pool when the instance is detached. If `true`, the + // pool size is decreased. If `false`, the pool will provision a new, replacement instance + // using the pool's instance configuration as a template. Default is `true`. + IsDecrementSize *bool `mandatory:"false" json:"isDecrementSize"` + + // Whether to permanently terminate (delete) the instance and its attached boot volume + // when detaching it from the instance pool. Default is `false`. + IsAutoTerminate *bool `mandatory:"false" json:"isAutoTerminate"` +} + +func (m DetachInstancePoolInstanceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DetachInstancePoolInstanceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_instance_pool_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_instance_pool_instance_request_response.go new file mode 100644 index 000000000..9e912d73f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_instance_pool_instance_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DetachInstancePoolInstanceRequest wrapper for the DetachInstancePoolInstance operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachInstancePoolInstance.go.html to see an example of how to use DetachInstancePoolInstanceRequest. +type DetachInstancePoolInstanceRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // Instance being detached + DetachInstancePoolInstanceDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DetachInstancePoolInstanceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DetachInstancePoolInstanceRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DetachInstancePoolInstanceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DetachInstancePoolInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DetachInstancePoolInstanceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DetachInstancePoolInstanceResponse wrapper for the DetachInstancePoolInstance operation +type DetachInstancePoolInstanceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DetachInstancePoolInstanceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DetachInstancePoolInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_load_balancer_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_load_balancer_details.go new file mode 100644 index 000000000..2cdb08ee8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_load_balancer_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DetachLoadBalancerDetails Represents a load balancer that is to be detached from an instance pool. +type DetachLoadBalancerDetails struct { + + // The OCID of the load balancer to detach from the instance pool. + LoadBalancerId *string `mandatory:"true" json:"loadBalancerId"` + + // The name of the backend set on the load balancer to detach from the instance pool. + BackendSetName *string `mandatory:"true" json:"backendSetName"` +} + +func (m DetachLoadBalancerDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DetachLoadBalancerDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_load_balancer_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_load_balancer_request_response.go new file mode 100644 index 000000000..ac0305b5f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_load_balancer_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DetachLoadBalancerRequest wrapper for the DetachLoadBalancer operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachLoadBalancer.go.html to see an example of how to use DetachLoadBalancerRequest. +type DetachLoadBalancerRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // Load balancer being detached + DetachLoadBalancerDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DetachLoadBalancerRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DetachLoadBalancerRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DetachLoadBalancerRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DetachLoadBalancerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DetachLoadBalancerRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DetachLoadBalancerResponse wrapper for the DetachLoadBalancer operation +type DetachLoadBalancerResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstancePool instance + InstancePool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DetachLoadBalancerResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DetachLoadBalancerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_service_id_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_service_id_request_response.go new file mode 100644 index 000000000..2567c5423 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_service_id_request_response.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DetachServiceIdRequest wrapper for the DetachServiceId operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachServiceId.go.html to see an example of how to use DetachServiceIdRequest. +type DetachServiceIdRequest struct { + + // The service gateway's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + ServiceGatewayId *string `mandatory:"true" contributesTo:"path" name:"serviceGatewayId"` + + // ServiceId of Service to be detached from a service gateway. + DetachServiceDetails ServiceIdRequestDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DetachServiceIdRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DetachServiceIdRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DetachServiceIdRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DetachServiceIdRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DetachServiceIdRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DetachServiceIdResponse wrapper for the DetachServiceId operation +type DetachServiceIdResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ServiceGateway instance + ServiceGateway `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DetachServiceIdResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DetachServiceIdResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_vnic_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_vnic_request_response.go new file mode 100644 index 000000000..8e54930ae --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_vnic_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DetachVnicRequest wrapper for the DetachVnic operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachVnic.go.html to see an example of how to use DetachVnicRequest. +type DetachVnicRequest struct { + + // The OCID of the VNIC attachment. + VnicAttachmentId *string `mandatory:"true" contributesTo:"path" name:"vnicAttachmentId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DetachVnicRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DetachVnicRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DetachVnicRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DetachVnicRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DetachVnicRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DetachVnicResponse wrapper for the DetachVnic operation +type DetachVnicResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DetachVnicResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DetachVnicResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_volume_request_response.go new file mode 100644 index 000000000..dcedd9fcd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/detach_volume_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DetachVolumeRequest wrapper for the DetachVolume operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DetachVolume.go.html to see an example of how to use DetachVolumeRequest. +type DetachVolumeRequest struct { + + // The OCID of the volume attachment. + VolumeAttachmentId *string `mandatory:"true" contributesTo:"path" name:"volumeAttachmentId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DetachVolumeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DetachVolumeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DetachVolumeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DetachVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DetachVolumeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DetachVolumeResponse wrapper for the DetachVolume operation +type DetachVolumeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DetachVolumeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DetachVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/detached_volume_autotune_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/detached_volume_autotune_policy.go new file mode 100644 index 000000000..452c556c7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/detached_volume_autotune_policy.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DetachedVolumeAutotunePolicy Volume's performace will be tuned to the lower cost settings once detached. +type DetachedVolumeAutotunePolicy struct { +} + +func (m DetachedVolumeAutotunePolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DetachedVolumeAutotunePolicy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DetachedVolumeAutotunePolicy) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDetachedVolumeAutotunePolicy DetachedVolumeAutotunePolicy + s := struct { + DiscriminatorParam string `json:"autotuneType"` + MarshalTypeDetachedVolumeAutotunePolicy + }{ + "DETACHED_VOLUME", + (MarshalTypeDetachedVolumeAutotunePolicy)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/device.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/device.go new file mode 100644 index 000000000..79cd0a3f5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/device.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Device Device Path corresponding to the block devices attached to instances having a name and isAvailable flag. +type Device struct { + + // The device name. + Name *string `mandatory:"true" json:"name"` + + // The flag denoting whether device is available. + IsAvailable *bool `mandatory:"true" json:"isAvailable"` +} + +func (m Device) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Device) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_dns_option.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_dns_option.go new file mode 100644 index 000000000..e29ce299e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_dns_option.go @@ -0,0 +1,127 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DhcpDnsOption DHCP option for specifying how DNS (hostname resolution) is handled in the subnets in the VCN. +// For more information, see +// DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). +type DhcpDnsOption struct { + + // If you set `serverType` to `CustomDnsServer`, specify the + // IP address of at least one DNS server of your choice (three maximum). + CustomDnsServers []string `mandatory:"false" json:"customDnsServers"` + + // * **VcnLocal:** Reserved for future use. + // * **VcnLocalPlusInternet:** Also referred to as "Internet and VCN Resolver". + // Instances can resolve internet hostnames (no internet gateway is required), + // and can resolve hostnames of instances in the VCN. This is the default + // value in the default set of DHCP options in the VCN. For the Internet and + // VCN Resolver to work across the VCN, there must also be a DNS label set for + // the VCN, a DNS label set for each subnet, and a hostname for each instance. + // The Internet and VCN Resolver also enables reverse DNS lookup, which lets + // you determine the hostname corresponding to the private IP address. For more + // information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + // * **CustomDnsServer:** Instances use a DNS server of your choice (three + // maximum). + ServerType DhcpDnsOptionServerTypeEnum `mandatory:"true" json:"serverType"` +} + +func (m DhcpDnsOption) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DhcpDnsOption) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDhcpDnsOptionServerTypeEnum(string(m.ServerType)); !ok && m.ServerType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ServerType: %s. Supported values are: %s.", m.ServerType, strings.Join(GetDhcpDnsOptionServerTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DhcpDnsOption) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDhcpDnsOption DhcpDnsOption + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeDhcpDnsOption + }{ + "DomainNameServer", + (MarshalTypeDhcpDnsOption)(m), + } + + return json.Marshal(&s) +} + +// DhcpDnsOptionServerTypeEnum Enum with underlying type: string +type DhcpDnsOptionServerTypeEnum string + +// Set of constants representing the allowable values for DhcpDnsOptionServerTypeEnum +const ( + DhcpDnsOptionServerTypeVcnlocal DhcpDnsOptionServerTypeEnum = "VcnLocal" + DhcpDnsOptionServerTypeVcnlocalplusinternet DhcpDnsOptionServerTypeEnum = "VcnLocalPlusInternet" + DhcpDnsOptionServerTypeCustomdnsserver DhcpDnsOptionServerTypeEnum = "CustomDnsServer" +) + +var mappingDhcpDnsOptionServerTypeEnum = map[string]DhcpDnsOptionServerTypeEnum{ + "VcnLocal": DhcpDnsOptionServerTypeVcnlocal, + "VcnLocalPlusInternet": DhcpDnsOptionServerTypeVcnlocalplusinternet, + "CustomDnsServer": DhcpDnsOptionServerTypeCustomdnsserver, +} + +var mappingDhcpDnsOptionServerTypeEnumLowerCase = map[string]DhcpDnsOptionServerTypeEnum{ + "vcnlocal": DhcpDnsOptionServerTypeVcnlocal, + "vcnlocalplusinternet": DhcpDnsOptionServerTypeVcnlocalplusinternet, + "customdnsserver": DhcpDnsOptionServerTypeCustomdnsserver, +} + +// GetDhcpDnsOptionServerTypeEnumValues Enumerates the set of values for DhcpDnsOptionServerTypeEnum +func GetDhcpDnsOptionServerTypeEnumValues() []DhcpDnsOptionServerTypeEnum { + values := make([]DhcpDnsOptionServerTypeEnum, 0) + for _, v := range mappingDhcpDnsOptionServerTypeEnum { + values = append(values, v) + } + return values +} + +// GetDhcpDnsOptionServerTypeEnumStringValues Enumerates the set of values in String for DhcpDnsOptionServerTypeEnum +func GetDhcpDnsOptionServerTypeEnumStringValues() []string { + return []string{ + "VcnLocal", + "VcnLocalPlusInternet", + "CustomDnsServer", + } +} + +// GetMappingDhcpDnsOptionServerTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDhcpDnsOptionServerTypeEnum(val string) (DhcpDnsOptionServerTypeEnum, bool) { + enum, ok := mappingDhcpDnsOptionServerTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_option.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_option.go new file mode 100644 index 000000000..a150fc025 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_option.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DhcpOption A single DHCP option according to RFC 1533 (https://tools.ietf.org/html/rfc1533). +// The two options available to use are DhcpDnsOption +// and DhcpSearchDomainOption. For more +// information, see DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm) +// and DHCP Options (https://docs.oracle.com/iaas/Content/Network/Tasks/managingDHCP.htm). +type DhcpOption interface { +} + +type dhcpoption struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *dhcpoption) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerdhcpoption dhcpoption + s := struct { + Model Unmarshalerdhcpoption + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *dhcpoption) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "DomainNameServer": + mm := DhcpDnsOption{} + err = json.Unmarshal(data, &mm) + return mm, err + case "SearchDomain": + mm := DhcpSearchDomainOption{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for DhcpOption: %s.", m.Type) + return *m, nil + } +} + +func (m dhcpoption) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m dhcpoption) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_options.go new file mode 100644 index 000000000..ba7e87656 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_options.go @@ -0,0 +1,244 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DhcpOptions A set of DHCP options. Used by the VCN to automatically provide configuration +// information to the instances when they boot up. There are two options you can set: +// - DhcpDnsOption: Lets you specify how DNS (hostname resolution) is +// handled in the subnets in your VCN. +// - DhcpSearchDomainOption: Lets you specify +// a search domain name to use for DNS queries. +// For more information, see DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm) +// and DHCP Options (https://docs.oracle.com/iaas/Content/Network/Tasks/managingDHCP.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type DhcpOptions struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the set of DHCP options. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)) for the set of DHCP options. + Id *string `mandatory:"true" json:"id"` + + // The current state of the set of DHCP options. + LifecycleState DhcpOptionsLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The collection of individual DHCP options. + Options []DhcpOption `mandatory:"true" json:"options"` + + // Date and time the set of DHCP options was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN the set of DHCP options belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The search domain name type of DHCP options + DomainNameType DhcpOptionsDomainNameTypeEnum `mandatory:"false" json:"domainNameType,omitempty"` +} + +func (m DhcpOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DhcpOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDhcpOptionsLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetDhcpOptionsLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingDhcpOptionsDomainNameTypeEnum(string(m.DomainNameType)); !ok && m.DomainNameType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DomainNameType: %s. Supported values are: %s.", m.DomainNameType, strings.Join(GetDhcpOptionsDomainNameTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *DhcpOptions) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + DomainNameType DhcpOptionsDomainNameTypeEnum `json:"domainNameType"` + CompartmentId *string `json:"compartmentId"` + Id *string `json:"id"` + LifecycleState DhcpOptionsLifecycleStateEnum `json:"lifecycleState"` + Options []dhcpoption `json:"options"` + TimeCreated *common.SDKTime `json:"timeCreated"` + VcnId *string `json:"vcnId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.DomainNameType = model.DomainNameType + + m.CompartmentId = model.CompartmentId + + m.Id = model.Id + + m.LifecycleState = model.LifecycleState + + m.Options = make([]DhcpOption, len(model.Options)) + for i, n := range model.Options { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Options[i] = nn.(DhcpOption) + } else { + m.Options[i] = nil + } + } + m.TimeCreated = model.TimeCreated + + m.VcnId = model.VcnId + + return +} + +// DhcpOptionsLifecycleStateEnum Enum with underlying type: string +type DhcpOptionsLifecycleStateEnum string + +// Set of constants representing the allowable values for DhcpOptionsLifecycleStateEnum +const ( + DhcpOptionsLifecycleStateProvisioning DhcpOptionsLifecycleStateEnum = "PROVISIONING" + DhcpOptionsLifecycleStateAvailable DhcpOptionsLifecycleStateEnum = "AVAILABLE" + DhcpOptionsLifecycleStateTerminating DhcpOptionsLifecycleStateEnum = "TERMINATING" + DhcpOptionsLifecycleStateTerminated DhcpOptionsLifecycleStateEnum = "TERMINATED" +) + +var mappingDhcpOptionsLifecycleStateEnum = map[string]DhcpOptionsLifecycleStateEnum{ + "PROVISIONING": DhcpOptionsLifecycleStateProvisioning, + "AVAILABLE": DhcpOptionsLifecycleStateAvailable, + "TERMINATING": DhcpOptionsLifecycleStateTerminating, + "TERMINATED": DhcpOptionsLifecycleStateTerminated, +} + +var mappingDhcpOptionsLifecycleStateEnumLowerCase = map[string]DhcpOptionsLifecycleStateEnum{ + "provisioning": DhcpOptionsLifecycleStateProvisioning, + "available": DhcpOptionsLifecycleStateAvailable, + "terminating": DhcpOptionsLifecycleStateTerminating, + "terminated": DhcpOptionsLifecycleStateTerminated, +} + +// GetDhcpOptionsLifecycleStateEnumValues Enumerates the set of values for DhcpOptionsLifecycleStateEnum +func GetDhcpOptionsLifecycleStateEnumValues() []DhcpOptionsLifecycleStateEnum { + values := make([]DhcpOptionsLifecycleStateEnum, 0) + for _, v := range mappingDhcpOptionsLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetDhcpOptionsLifecycleStateEnumStringValues Enumerates the set of values in String for DhcpOptionsLifecycleStateEnum +func GetDhcpOptionsLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingDhcpOptionsLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDhcpOptionsLifecycleStateEnum(val string) (DhcpOptionsLifecycleStateEnum, bool) { + enum, ok := mappingDhcpOptionsLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// DhcpOptionsDomainNameTypeEnum Enum with underlying type: string +type DhcpOptionsDomainNameTypeEnum string + +// Set of constants representing the allowable values for DhcpOptionsDomainNameTypeEnum +const ( + DhcpOptionsDomainNameTypeSubnetDomain DhcpOptionsDomainNameTypeEnum = "SUBNET_DOMAIN" + DhcpOptionsDomainNameTypeVcnDomain DhcpOptionsDomainNameTypeEnum = "VCN_DOMAIN" + DhcpOptionsDomainNameTypeCustomDomain DhcpOptionsDomainNameTypeEnum = "CUSTOM_DOMAIN" +) + +var mappingDhcpOptionsDomainNameTypeEnum = map[string]DhcpOptionsDomainNameTypeEnum{ + "SUBNET_DOMAIN": DhcpOptionsDomainNameTypeSubnetDomain, + "VCN_DOMAIN": DhcpOptionsDomainNameTypeVcnDomain, + "CUSTOM_DOMAIN": DhcpOptionsDomainNameTypeCustomDomain, +} + +var mappingDhcpOptionsDomainNameTypeEnumLowerCase = map[string]DhcpOptionsDomainNameTypeEnum{ + "subnet_domain": DhcpOptionsDomainNameTypeSubnetDomain, + "vcn_domain": DhcpOptionsDomainNameTypeVcnDomain, + "custom_domain": DhcpOptionsDomainNameTypeCustomDomain, +} + +// GetDhcpOptionsDomainNameTypeEnumValues Enumerates the set of values for DhcpOptionsDomainNameTypeEnum +func GetDhcpOptionsDomainNameTypeEnumValues() []DhcpOptionsDomainNameTypeEnum { + values := make([]DhcpOptionsDomainNameTypeEnum, 0) + for _, v := range mappingDhcpOptionsDomainNameTypeEnum { + values = append(values, v) + } + return values +} + +// GetDhcpOptionsDomainNameTypeEnumStringValues Enumerates the set of values in String for DhcpOptionsDomainNameTypeEnum +func GetDhcpOptionsDomainNameTypeEnumStringValues() []string { + return []string{ + "SUBNET_DOMAIN", + "VCN_DOMAIN", + "CUSTOM_DOMAIN", + } +} + +// GetMappingDhcpOptionsDomainNameTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDhcpOptionsDomainNameTypeEnum(val string) (DhcpOptionsDomainNameTypeEnum, bool) { + enum, ok := mappingDhcpOptionsDomainNameTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_search_domain_option.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_search_domain_option.go new file mode 100644 index 000000000..c11ef9896 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/dhcp_search_domain_option.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DhcpSearchDomainOption DHCP option for specifying a search domain name for DNS queries. For more information, see +// DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). +type DhcpSearchDomainOption struct { + + // A single search domain name according to RFC 952 (https://tools.ietf.org/html/rfc952) + // and RFC 1123 (https://tools.ietf.org/html/rfc1123). During a DNS query, + // the OS will append this search domain name to the value being queried. + // If you set DhcpDnsOption to `VcnLocalPlusInternet`, + // and you assign a DNS label to the VCN during creation, the search domain name in the + // VCN's default set of DHCP options is automatically set to the VCN domain + // (for example, `vcn1.oraclevcn.com`). + // If you don't want to use a search domain name, omit this option from the + // set of DHCP options. Do not include this option with an empty list + // of search domain names, or with an empty string as the value for any search + // domain name. + SearchDomainNames []string `mandatory:"true" json:"searchDomainNames"` +} + +func (m DhcpSearchDomainOption) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DhcpSearchDomainOption) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DhcpSearchDomainOption) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDhcpSearchDomainOption DhcpSearchDomainOption + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeDhcpSearchDomainOption + }{ + "SearchDomain", + (MarshalTypeDhcpSearchDomainOption)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/dpd_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/dpd_config.go new file mode 100644 index 000000000..929d3f6ba --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/dpd_config.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DpdConfig These configuration details are used for dead peer detection (DPD). DPD periodically checks the stability of the connection to the customer premises (CPE), and may be used to detect that the link to the CPE has gone down. +type DpdConfig struct { + + // This option defines whether DPD can be initiated from the Oracle side of the connection. + DpdMode DpdConfigDpdModeEnum `mandatory:"false" json:"dpdMode,omitempty"` + + // DPD timeout in seconds. This sets the longest interval between CPE device health messages before the IPSec connection indicates it has lost contact with the CPE. The default is 20 seconds. + DpdTimeoutInSec *int `mandatory:"false" json:"dpdTimeoutInSec"` +} + +func (m DpdConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DpdConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingDpdConfigDpdModeEnum(string(m.DpdMode)); !ok && m.DpdMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DpdMode: %s. Supported values are: %s.", m.DpdMode, strings.Join(GetDpdConfigDpdModeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DpdConfigDpdModeEnum Enum with underlying type: string +type DpdConfigDpdModeEnum string + +// Set of constants representing the allowable values for DpdConfigDpdModeEnum +const ( + DpdConfigDpdModeInitiateAndRespond DpdConfigDpdModeEnum = "INITIATE_AND_RESPOND" + DpdConfigDpdModeRespondOnly DpdConfigDpdModeEnum = "RESPOND_ONLY" +) + +var mappingDpdConfigDpdModeEnum = map[string]DpdConfigDpdModeEnum{ + "INITIATE_AND_RESPOND": DpdConfigDpdModeInitiateAndRespond, + "RESPOND_ONLY": DpdConfigDpdModeRespondOnly, +} + +var mappingDpdConfigDpdModeEnumLowerCase = map[string]DpdConfigDpdModeEnum{ + "initiate_and_respond": DpdConfigDpdModeInitiateAndRespond, + "respond_only": DpdConfigDpdModeRespondOnly, +} + +// GetDpdConfigDpdModeEnumValues Enumerates the set of values for DpdConfigDpdModeEnum +func GetDpdConfigDpdModeEnumValues() []DpdConfigDpdModeEnum { + values := make([]DpdConfigDpdModeEnum, 0) + for _, v := range mappingDpdConfigDpdModeEnum { + values = append(values, v) + } + return values +} + +// GetDpdConfigDpdModeEnumStringValues Enumerates the set of values in String for DpdConfigDpdModeEnum +func GetDpdConfigDpdModeEnumStringValues() []string { + return []string{ + "INITIATE_AND_RESPOND", + "RESPOND_ONLY", + } +} + +// GetMappingDpdConfigDpdModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDpdConfigDpdModeEnum(val string) (DpdConfigDpdModeEnum, bool) { + enum, ok := mappingDpdConfigDpdModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg.go new file mode 100644 index 000000000..90aef5e1c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg.go @@ -0,0 +1,134 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Drg A dynamic routing gateway (DRG) is a virtual router that provides a path for private +// network traffic between networks. You use it with other Networking +// Service components to create a connection to your on-premises network using Site-to-Site VPN (https://docs.oracle.com/iaas/Content/Network/Tasks/managingIPsec.htm) or a connection that uses +// FastConnect (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). For more information, see +// Networking Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type Drg struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the DRG. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The DRG's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // The DRG's current state. + LifecycleState DrgLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The date and time the DRG was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + DefaultDrgRouteTables *DefaultDrgRouteTables `mandatory:"false" json:"defaultDrgRouteTables"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of this DRG's default export route distribution for the DRG attachments. + DefaultExportDrgRouteDistributionId *string `mandatory:"false" json:"defaultExportDrgRouteDistributionId"` +} + +func (m Drg) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Drg) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDrgLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetDrgLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DrgLifecycleStateEnum Enum with underlying type: string +type DrgLifecycleStateEnum string + +// Set of constants representing the allowable values for DrgLifecycleStateEnum +const ( + DrgLifecycleStateProvisioning DrgLifecycleStateEnum = "PROVISIONING" + DrgLifecycleStateAvailable DrgLifecycleStateEnum = "AVAILABLE" + DrgLifecycleStateTerminating DrgLifecycleStateEnum = "TERMINATING" + DrgLifecycleStateTerminated DrgLifecycleStateEnum = "TERMINATED" +) + +var mappingDrgLifecycleStateEnum = map[string]DrgLifecycleStateEnum{ + "PROVISIONING": DrgLifecycleStateProvisioning, + "AVAILABLE": DrgLifecycleStateAvailable, + "TERMINATING": DrgLifecycleStateTerminating, + "TERMINATED": DrgLifecycleStateTerminated, +} + +var mappingDrgLifecycleStateEnumLowerCase = map[string]DrgLifecycleStateEnum{ + "provisioning": DrgLifecycleStateProvisioning, + "available": DrgLifecycleStateAvailable, + "terminating": DrgLifecycleStateTerminating, + "terminated": DrgLifecycleStateTerminated, +} + +// GetDrgLifecycleStateEnumValues Enumerates the set of values for DrgLifecycleStateEnum +func GetDrgLifecycleStateEnumValues() []DrgLifecycleStateEnum { + values := make([]DrgLifecycleStateEnum, 0) + for _, v := range mappingDrgLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetDrgLifecycleStateEnumStringValues Enumerates the set of values in String for DrgLifecycleStateEnum +func GetDrgLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingDrgLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgLifecycleStateEnum(val string) (DrgLifecycleStateEnum, bool) { + enum, ok := mappingDrgLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment.go new file mode 100644 index 000000000..278292c75 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment.go @@ -0,0 +1,217 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgAttachment A DRG attachment serves as a link between a DRG and a network resource. A DRG can be attached to a VCN, +// IPSec tunnel, remote peering connection, or virtual circuit. +// For more information, see Overview of the Networking Service (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm). +type DrgAttachment struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the DRG attachment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"true" json:"drgId"` + + // The DRG attachment's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // The DRG attachment's current state. + LifecycleState DrgAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The date and time the DRG attachment was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table that is assigned to this attachment. + // The DRG route table manages traffic inside the DRG. + DrgRouteTableId *string `mandatory:"false" json:"drgRouteTableId"` + + NetworkDetails DrgAttachmentNetworkDetails `mandatory:"false" json:"networkDetails"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the DRG attachment is using. + // For information about why you would associate a route table with a DRG attachment, see: + // * Transit Routing: Access to Multiple VCNs in Same Region (https://docs.oracle.com/iaas/Content/Network/Tasks/transitrouting.htm) + // * Transit Routing: Private Access to Oracle Services (https://docs.oracle.com/iaas/Content/Network/Tasks/transitroutingoracleservices.htm) + // This field is deprecated. Instead, use the `networkDetails` field to view the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the attached resource. + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + // This field is deprecated. Instead, use the `networkDetails` field to view the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the attached resource. + VcnId *string `mandatory:"false" json:"vcnId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the export route distribution used to specify how routes in the assigned DRG route table + // are advertised to the attachment. + // If this value is null, no routes are advertised through this attachment. + ExportDrgRouteDistributionId *string `mandatory:"false" json:"exportDrgRouteDistributionId"` + + // Indicates whether the DRG attachment and attached network live in a different tenancy than the DRG. + // Example: `false` + IsCrossTenancy *bool `mandatory:"false" json:"isCrossTenancy"` +} + +func (m DrgAttachment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrgAttachment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDrgAttachmentLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetDrgAttachmentLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *DrgAttachment) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + TimeCreated *common.SDKTime `json:"timeCreated"` + DrgRouteTableId *string `json:"drgRouteTableId"` + NetworkDetails drgattachmentnetworkdetails `json:"networkDetails"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + FreeformTags map[string]string `json:"freeformTags"` + RouteTableId *string `json:"routeTableId"` + VcnId *string `json:"vcnId"` + ExportDrgRouteDistributionId *string `json:"exportDrgRouteDistributionId"` + IsCrossTenancy *bool `json:"isCrossTenancy"` + CompartmentId *string `json:"compartmentId"` + DrgId *string `json:"drgId"` + Id *string `json:"id"` + LifecycleState DrgAttachmentLifecycleStateEnum `json:"lifecycleState"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DisplayName = model.DisplayName + + m.TimeCreated = model.TimeCreated + + m.DrgRouteTableId = model.DrgRouteTableId + + nn, e = model.NetworkDetails.UnmarshalPolymorphicJSON(model.NetworkDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.NetworkDetails = nn.(DrgAttachmentNetworkDetails) + } else { + m.NetworkDetails = nil + } + + m.DefinedTags = model.DefinedTags + + m.FreeformTags = model.FreeformTags + + m.RouteTableId = model.RouteTableId + + m.VcnId = model.VcnId + + m.ExportDrgRouteDistributionId = model.ExportDrgRouteDistributionId + + m.IsCrossTenancy = model.IsCrossTenancy + + m.CompartmentId = model.CompartmentId + + m.DrgId = model.DrgId + + m.Id = model.Id + + m.LifecycleState = model.LifecycleState + + return +} + +// DrgAttachmentLifecycleStateEnum Enum with underlying type: string +type DrgAttachmentLifecycleStateEnum string + +// Set of constants representing the allowable values for DrgAttachmentLifecycleStateEnum +const ( + DrgAttachmentLifecycleStateAttaching DrgAttachmentLifecycleStateEnum = "ATTACHING" + DrgAttachmentLifecycleStateAttached DrgAttachmentLifecycleStateEnum = "ATTACHED" + DrgAttachmentLifecycleStateDetaching DrgAttachmentLifecycleStateEnum = "DETACHING" + DrgAttachmentLifecycleStateDetached DrgAttachmentLifecycleStateEnum = "DETACHED" +) + +var mappingDrgAttachmentLifecycleStateEnum = map[string]DrgAttachmentLifecycleStateEnum{ + "ATTACHING": DrgAttachmentLifecycleStateAttaching, + "ATTACHED": DrgAttachmentLifecycleStateAttached, + "DETACHING": DrgAttachmentLifecycleStateDetaching, + "DETACHED": DrgAttachmentLifecycleStateDetached, +} + +var mappingDrgAttachmentLifecycleStateEnumLowerCase = map[string]DrgAttachmentLifecycleStateEnum{ + "attaching": DrgAttachmentLifecycleStateAttaching, + "attached": DrgAttachmentLifecycleStateAttached, + "detaching": DrgAttachmentLifecycleStateDetaching, + "detached": DrgAttachmentLifecycleStateDetached, +} + +// GetDrgAttachmentLifecycleStateEnumValues Enumerates the set of values for DrgAttachmentLifecycleStateEnum +func GetDrgAttachmentLifecycleStateEnumValues() []DrgAttachmentLifecycleStateEnum { + values := make([]DrgAttachmentLifecycleStateEnum, 0) + for _, v := range mappingDrgAttachmentLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetDrgAttachmentLifecycleStateEnumStringValues Enumerates the set of values in String for DrgAttachmentLifecycleStateEnum +func GetDrgAttachmentLifecycleStateEnumStringValues() []string { + return []string{ + "ATTACHING", + "ATTACHED", + "DETACHING", + "DETACHED", + } +} + +// GetMappingDrgAttachmentLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgAttachmentLifecycleStateEnum(val string) (DrgAttachmentLifecycleStateEnum, bool) { + enum, ok := mappingDrgAttachmentLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_id_drg_route_distribution_match_criteria.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_id_drg_route_distribution_match_criteria.go new file mode 100644 index 000000000..cc4efa849 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_id_drg_route_distribution_match_criteria.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgAttachmentIdDrgRouteDistributionMatchCriteria The criteria by which a specific attachment will import routes to the DRG. +type DrgAttachmentIdDrgRouteDistributionMatchCriteria struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG attachment. + DrgAttachmentId *string `mandatory:"true" json:"drgAttachmentId"` +} + +func (m DrgAttachmentIdDrgRouteDistributionMatchCriteria) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrgAttachmentIdDrgRouteDistributionMatchCriteria) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DrgAttachmentIdDrgRouteDistributionMatchCriteria) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDrgAttachmentIdDrgRouteDistributionMatchCriteria DrgAttachmentIdDrgRouteDistributionMatchCriteria + s := struct { + DiscriminatorParam string `json:"matchType"` + MarshalTypeDrgAttachmentIdDrgRouteDistributionMatchCriteria + }{ + "DRG_ATTACHMENT_ID", + (MarshalTypeDrgAttachmentIdDrgRouteDistributionMatchCriteria)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_info.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_info.go new file mode 100644 index 000000000..c084ef2d5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_info.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgAttachmentInfo The `DrgAttachmentInfo` resource contains the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG attachment. +type DrgAttachmentInfo struct { + + // The Oracle-assigned ID of the DRG attachment + Id *string `mandatory:"true" json:"id"` +} + +func (m DrgAttachmentInfo) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrgAttachmentInfo) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_match_all_drg_route_distribution_match_criteria.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_match_all_drg_route_distribution_match_criteria.go new file mode 100644 index 000000000..f76f98cc2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_match_all_drg_route_distribution_match_criteria.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgAttachmentMatchAllDrgRouteDistributionMatchCriteria All routes are imported or exported. +type DrgAttachmentMatchAllDrgRouteDistributionMatchCriteria struct { +} + +func (m DrgAttachmentMatchAllDrgRouteDistributionMatchCriteria) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrgAttachmentMatchAllDrgRouteDistributionMatchCriteria) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DrgAttachmentMatchAllDrgRouteDistributionMatchCriteria) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDrgAttachmentMatchAllDrgRouteDistributionMatchCriteria DrgAttachmentMatchAllDrgRouteDistributionMatchCriteria + s := struct { + DiscriminatorParam string `json:"matchType"` + MarshalTypeDrgAttachmentMatchAllDrgRouteDistributionMatchCriteria + }{ + "MATCH_ALL", + (MarshalTypeDrgAttachmentMatchAllDrgRouteDistributionMatchCriteria)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_create_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_create_details.go new file mode 100644 index 000000000..d14493d0d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_create_details.go @@ -0,0 +1,131 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgAttachmentNetworkCreateDetails The representation of DrgAttachmentNetworkCreateDetails +type DrgAttachmentNetworkCreateDetails interface { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. + GetId() *string +} + +type drgattachmentnetworkcreatedetails struct { + JsonData []byte + Id *string `mandatory:"false" json:"id"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *drgattachmentnetworkcreatedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerdrgattachmentnetworkcreatedetails drgattachmentnetworkcreatedetails + s := struct { + Model Unmarshalerdrgattachmentnetworkcreatedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Id = s.Model.Id + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *drgattachmentnetworkcreatedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "VCN": + mm := VcnDrgAttachmentNetworkCreateDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for DrgAttachmentNetworkCreateDetails: %s.", m.Type) + return *m, nil + } +} + +// GetId returns Id +func (m drgattachmentnetworkcreatedetails) GetId() *string { + return m.Id +} + +func (m drgattachmentnetworkcreatedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m drgattachmentnetworkcreatedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DrgAttachmentNetworkCreateDetailsTypeEnum Enum with underlying type: string +type DrgAttachmentNetworkCreateDetailsTypeEnum string + +// Set of constants representing the allowable values for DrgAttachmentNetworkCreateDetailsTypeEnum +const ( + DrgAttachmentNetworkCreateDetailsTypeVcn DrgAttachmentNetworkCreateDetailsTypeEnum = "VCN" +) + +var mappingDrgAttachmentNetworkCreateDetailsTypeEnum = map[string]DrgAttachmentNetworkCreateDetailsTypeEnum{ + "VCN": DrgAttachmentNetworkCreateDetailsTypeVcn, +} + +var mappingDrgAttachmentNetworkCreateDetailsTypeEnumLowerCase = map[string]DrgAttachmentNetworkCreateDetailsTypeEnum{ + "vcn": DrgAttachmentNetworkCreateDetailsTypeVcn, +} + +// GetDrgAttachmentNetworkCreateDetailsTypeEnumValues Enumerates the set of values for DrgAttachmentNetworkCreateDetailsTypeEnum +func GetDrgAttachmentNetworkCreateDetailsTypeEnumValues() []DrgAttachmentNetworkCreateDetailsTypeEnum { + values := make([]DrgAttachmentNetworkCreateDetailsTypeEnum, 0) + for _, v := range mappingDrgAttachmentNetworkCreateDetailsTypeEnum { + values = append(values, v) + } + return values +} + +// GetDrgAttachmentNetworkCreateDetailsTypeEnumStringValues Enumerates the set of values in String for DrgAttachmentNetworkCreateDetailsTypeEnum +func GetDrgAttachmentNetworkCreateDetailsTypeEnumStringValues() []string { + return []string{ + "VCN", + } +} + +// GetMappingDrgAttachmentNetworkCreateDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgAttachmentNetworkCreateDetailsTypeEnum(val string) (DrgAttachmentNetworkCreateDetailsTypeEnum, bool) { + enum, ok := mappingDrgAttachmentNetworkCreateDetailsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_details.go new file mode 100644 index 000000000..2d2490e0f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_details.go @@ -0,0 +1,159 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgAttachmentNetworkDetails The representation of DrgAttachmentNetworkDetails +type DrgAttachmentNetworkDetails interface { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. + GetId() *string +} + +type drgattachmentnetworkdetails struct { + JsonData []byte + Id *string `mandatory:"false" json:"id"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *drgattachmentnetworkdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerdrgattachmentnetworkdetails drgattachmentnetworkdetails + s := struct { + Model Unmarshalerdrgattachmentnetworkdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Id = s.Model.Id + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *drgattachmentnetworkdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "VCN": + mm := VcnDrgAttachmentNetworkDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "LOOPBACK": + mm := LoopBackDrgAttachmentNetworkDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "IPSEC_TUNNEL": + mm := IpsecTunnelDrgAttachmentNetworkDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "VIRTUAL_CIRCUIT": + mm := VirtualCircuitDrgAttachmentNetworkDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "REMOTE_PEERING_CONNECTION": + mm := RemotePeeringConnectionDrgAttachmentNetworkDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for DrgAttachmentNetworkDetails: %s.", m.Type) + return *m, nil + } +} + +// GetId returns Id +func (m drgattachmentnetworkdetails) GetId() *string { + return m.Id +} + +func (m drgattachmentnetworkdetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m drgattachmentnetworkdetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DrgAttachmentNetworkDetailsTypeEnum Enum with underlying type: string +type DrgAttachmentNetworkDetailsTypeEnum string + +// Set of constants representing the allowable values for DrgAttachmentNetworkDetailsTypeEnum +const ( + DrgAttachmentNetworkDetailsTypeVcn DrgAttachmentNetworkDetailsTypeEnum = "VCN" + DrgAttachmentNetworkDetailsTypeIpsecTunnel DrgAttachmentNetworkDetailsTypeEnum = "IPSEC_TUNNEL" + DrgAttachmentNetworkDetailsTypeVirtualCircuit DrgAttachmentNetworkDetailsTypeEnum = "VIRTUAL_CIRCUIT" + DrgAttachmentNetworkDetailsTypeRemotePeeringConnection DrgAttachmentNetworkDetailsTypeEnum = "REMOTE_PEERING_CONNECTION" +) + +var mappingDrgAttachmentNetworkDetailsTypeEnum = map[string]DrgAttachmentNetworkDetailsTypeEnum{ + "VCN": DrgAttachmentNetworkDetailsTypeVcn, + "IPSEC_TUNNEL": DrgAttachmentNetworkDetailsTypeIpsecTunnel, + "VIRTUAL_CIRCUIT": DrgAttachmentNetworkDetailsTypeVirtualCircuit, + "REMOTE_PEERING_CONNECTION": DrgAttachmentNetworkDetailsTypeRemotePeeringConnection, +} + +var mappingDrgAttachmentNetworkDetailsTypeEnumLowerCase = map[string]DrgAttachmentNetworkDetailsTypeEnum{ + "vcn": DrgAttachmentNetworkDetailsTypeVcn, + "ipsec_tunnel": DrgAttachmentNetworkDetailsTypeIpsecTunnel, + "virtual_circuit": DrgAttachmentNetworkDetailsTypeVirtualCircuit, + "remote_peering_connection": DrgAttachmentNetworkDetailsTypeRemotePeeringConnection, +} + +// GetDrgAttachmentNetworkDetailsTypeEnumValues Enumerates the set of values for DrgAttachmentNetworkDetailsTypeEnum +func GetDrgAttachmentNetworkDetailsTypeEnumValues() []DrgAttachmentNetworkDetailsTypeEnum { + values := make([]DrgAttachmentNetworkDetailsTypeEnum, 0) + for _, v := range mappingDrgAttachmentNetworkDetailsTypeEnum { + values = append(values, v) + } + return values +} + +// GetDrgAttachmentNetworkDetailsTypeEnumStringValues Enumerates the set of values in String for DrgAttachmentNetworkDetailsTypeEnum +func GetDrgAttachmentNetworkDetailsTypeEnumStringValues() []string { + return []string{ + "VCN", + "IPSEC_TUNNEL", + "VIRTUAL_CIRCUIT", + "REMOTE_PEERING_CONNECTION", + } +} + +// GetMappingDrgAttachmentNetworkDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgAttachmentNetworkDetailsTypeEnum(val string) (DrgAttachmentNetworkDetailsTypeEnum, bool) { + enum, ok := mappingDrgAttachmentNetworkDetailsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_update_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_update_details.go new file mode 100644 index 000000000..6cd5ab2af --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_network_update_details.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgAttachmentNetworkUpdateDetails The representation of DrgAttachmentNetworkUpdateDetails +type DrgAttachmentNetworkUpdateDetails interface { +} + +type drgattachmentnetworkupdatedetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *drgattachmentnetworkupdatedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerdrgattachmentnetworkupdatedetails drgattachmentnetworkupdatedetails + s := struct { + Model Unmarshalerdrgattachmentnetworkupdatedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *drgattachmentnetworkupdatedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "VCN": + mm := VcnDrgAttachmentNetworkUpdateDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for DrgAttachmentNetworkUpdateDetails: %s.", m.Type) + return *m, nil + } +} + +func (m drgattachmentnetworkupdatedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m drgattachmentnetworkupdatedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DrgAttachmentNetworkUpdateDetailsTypeEnum Enum with underlying type: string +type DrgAttachmentNetworkUpdateDetailsTypeEnum string + +// Set of constants representing the allowable values for DrgAttachmentNetworkUpdateDetailsTypeEnum +const ( + DrgAttachmentNetworkUpdateDetailsTypeVcn DrgAttachmentNetworkUpdateDetailsTypeEnum = "VCN" +) + +var mappingDrgAttachmentNetworkUpdateDetailsTypeEnum = map[string]DrgAttachmentNetworkUpdateDetailsTypeEnum{ + "VCN": DrgAttachmentNetworkUpdateDetailsTypeVcn, +} + +var mappingDrgAttachmentNetworkUpdateDetailsTypeEnumLowerCase = map[string]DrgAttachmentNetworkUpdateDetailsTypeEnum{ + "vcn": DrgAttachmentNetworkUpdateDetailsTypeVcn, +} + +// GetDrgAttachmentNetworkUpdateDetailsTypeEnumValues Enumerates the set of values for DrgAttachmentNetworkUpdateDetailsTypeEnum +func GetDrgAttachmentNetworkUpdateDetailsTypeEnumValues() []DrgAttachmentNetworkUpdateDetailsTypeEnum { + values := make([]DrgAttachmentNetworkUpdateDetailsTypeEnum, 0) + for _, v := range mappingDrgAttachmentNetworkUpdateDetailsTypeEnum { + values = append(values, v) + } + return values +} + +// GetDrgAttachmentNetworkUpdateDetailsTypeEnumStringValues Enumerates the set of values in String for DrgAttachmentNetworkUpdateDetailsTypeEnum +func GetDrgAttachmentNetworkUpdateDetailsTypeEnumStringValues() []string { + return []string{ + "VCN", + } +} + +// GetMappingDrgAttachmentNetworkUpdateDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgAttachmentNetworkUpdateDetailsTypeEnum(val string) (DrgAttachmentNetworkUpdateDetailsTypeEnum, bool) { + enum, ok := mappingDrgAttachmentNetworkUpdateDetailsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_type_drg_route_distribution_match_criteria.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_type_drg_route_distribution_match_criteria.go new file mode 100644 index 000000000..602feb6ed --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_attachment_type_drg_route_distribution_match_criteria.go @@ -0,0 +1,115 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgAttachmentTypeDrgRouteDistributionMatchCriteria The attachment type from which the DRG will import routes. Routes will be imported from +// all attachments of this type. +type DrgAttachmentTypeDrgRouteDistributionMatchCriteria struct { + + // The type of the network resource to be included in this match. A match for a network type implies that all + // DRG attachments of that type insert routes into the table. + AttachmentType DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum `mandatory:"true" json:"attachmentType"` +} + +func (m DrgAttachmentTypeDrgRouteDistributionMatchCriteria) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrgAttachmentTypeDrgRouteDistributionMatchCriteria) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum(string(m.AttachmentType)); !ok && m.AttachmentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttachmentType: %s. Supported values are: %s.", m.AttachmentType, strings.Join(GetDrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DrgAttachmentTypeDrgRouteDistributionMatchCriteria) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDrgAttachmentTypeDrgRouteDistributionMatchCriteria DrgAttachmentTypeDrgRouteDistributionMatchCriteria + s := struct { + DiscriminatorParam string `json:"matchType"` + MarshalTypeDrgAttachmentTypeDrgRouteDistributionMatchCriteria + }{ + "DRG_ATTACHMENT_TYPE", + (MarshalTypeDrgAttachmentTypeDrgRouteDistributionMatchCriteria)(m), + } + + return json.Marshal(&s) +} + +// DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum Enum with underlying type: string +type DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum string + +// Set of constants representing the allowable values for DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum +const ( + DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeVcn DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum = "VCN" + DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeVirtualCircuit DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum = "VIRTUAL_CIRCUIT" + DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeRemotePeeringConnection DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum = "REMOTE_PEERING_CONNECTION" + DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeIpsecTunnel DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum = "IPSEC_TUNNEL" +) + +var mappingDrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum = map[string]DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum{ + "VCN": DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeVcn, + "VIRTUAL_CIRCUIT": DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeVirtualCircuit, + "REMOTE_PEERING_CONNECTION": DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeRemotePeeringConnection, + "IPSEC_TUNNEL": DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeIpsecTunnel, +} + +var mappingDrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnumLowerCase = map[string]DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum{ + "vcn": DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeVcn, + "virtual_circuit": DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeVirtualCircuit, + "remote_peering_connection": DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeRemotePeeringConnection, + "ipsec_tunnel": DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeIpsecTunnel, +} + +// GetDrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnumValues Enumerates the set of values for DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum +func GetDrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnumValues() []DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum { + values := make([]DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum, 0) + for _, v := range mappingDrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum { + values = append(values, v) + } + return values +} + +// GetDrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnumStringValues Enumerates the set of values in String for DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum +func GetDrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnumStringValues() []string { + return []string{ + "VCN", + "VIRTUAL_CIRCUIT", + "REMOTE_PEERING_CONNECTION", + "IPSEC_TUNNEL", + } +} + +// GetMappingDrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum(val string) (DrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnum, bool) { + enum, ok := mappingDrgAttachmentTypeDrgRouteDistributionMatchCriteriaAttachmentTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_customer.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_customer.go new file mode 100644 index 000000000..49e2f17bf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_customer.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgCustomer The list of IPSEC / FC / RPC info for a given DRG +type DrgCustomer struct { + + // OCID of the DRG + DrgId *string `mandatory:"true" json:"drgId"` + + // A List of the RPC connections on this DRG + RemotePeeringConnections []DrgCustomerResource `mandatory:"false" json:"remotePeeringConnections"` + + // A List of the VCs on this DRG + VirtualCircuits []DrgCustomerResource `mandatory:"false" json:"virtualCircuits"` + + // A List of the IPSec connections on this DRG + IpsecConnections []DrgCustomerResource `mandatory:"false" json:"ipsecConnections"` +} + +func (m DrgCustomer) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrgCustomer) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_customer_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_customer_resource.go new file mode 100644 index 000000000..cf96acba1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_customer_resource.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgCustomerResource The IPSEC / FC / RPC info returned in DrgCustomerResponse +type DrgCustomerResource struct { + + // OCID of the IPSEC / FC / RPC + Id *string `mandatory:"false" json:"id"` + + // The friendly name of the node. + DisplayName *string `mandatory:"false" json:"displayName"` + + // the compartment id of the DRG + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // the lifeCycleState of the IPSEC / FC / RPC + State *string `mandatory:"false" json:"state"` +} + +func (m DrgCustomerResource) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrgCustomerResource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_promotion_status_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_promotion_status_response.go new file mode 100644 index 000000000..50dc0382c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_promotion_status_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgPromotionStatusResponse The promotion/unpromotion status of a DRG +type DrgPromotionStatusResponse struct { + + // OCID of the DRG + DrgId *string `mandatory:"true" json:"drgId"` + + // The promotion status of the DRG + DrgPromotionStatus DrgPromotionStatusResponseDrgPromotionStatusEnum `mandatory:"false" json:"drgPromotionStatus,omitempty"` + + // A map of the promotion status of each RPC connection on this DRG {conn_id -> promo_status} + RpcPromotionStatus map[string]string `mandatory:"false" json:"rpcPromotionStatus"` + + // A map of the promotion status of each VC on this DRG {conn_id -> promo_status} + VcPromotionStatus map[string]string `mandatory:"false" json:"vcPromotionStatus"` + + // A map of the promotion status of each IPSec connection on this DRG {conn_id -> promo_status} + IpsecPromotionStatus map[string]string `mandatory:"false" json:"ipsecPromotionStatus"` +} + +func (m DrgPromotionStatusResponse) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrgPromotionStatusResponse) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingDrgPromotionStatusResponseDrgPromotionStatusEnum(string(m.DrgPromotionStatus)); !ok && m.DrgPromotionStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DrgPromotionStatus: %s. Supported values are: %s.", m.DrgPromotionStatus, strings.Join(GetDrgPromotionStatusResponseDrgPromotionStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DrgPromotionStatusResponseDrgPromotionStatusEnum Enum with underlying type: string +type DrgPromotionStatusResponseDrgPromotionStatusEnum string + +// Set of constants representing the allowable values for DrgPromotionStatusResponseDrgPromotionStatusEnum +const ( + DrgPromotionStatusResponseDrgPromotionStatusUnpromoted DrgPromotionStatusResponseDrgPromotionStatusEnum = "UNPROMOTED" + DrgPromotionStatusResponseDrgPromotionStatusPromoting DrgPromotionStatusResponseDrgPromotionStatusEnum = "PROMOTING" + DrgPromotionStatusResponseDrgPromotionStatusPromoted DrgPromotionStatusResponseDrgPromotionStatusEnum = "PROMOTED" + DrgPromotionStatusResponseDrgPromotionStatusUnpromoting DrgPromotionStatusResponseDrgPromotionStatusEnum = "UNPROMOTING" +) + +var mappingDrgPromotionStatusResponseDrgPromotionStatusEnum = map[string]DrgPromotionStatusResponseDrgPromotionStatusEnum{ + "UNPROMOTED": DrgPromotionStatusResponseDrgPromotionStatusUnpromoted, + "PROMOTING": DrgPromotionStatusResponseDrgPromotionStatusPromoting, + "PROMOTED": DrgPromotionStatusResponseDrgPromotionStatusPromoted, + "UNPROMOTING": DrgPromotionStatusResponseDrgPromotionStatusUnpromoting, +} + +var mappingDrgPromotionStatusResponseDrgPromotionStatusEnumLowerCase = map[string]DrgPromotionStatusResponseDrgPromotionStatusEnum{ + "unpromoted": DrgPromotionStatusResponseDrgPromotionStatusUnpromoted, + "promoting": DrgPromotionStatusResponseDrgPromotionStatusPromoting, + "promoted": DrgPromotionStatusResponseDrgPromotionStatusPromoted, + "unpromoting": DrgPromotionStatusResponseDrgPromotionStatusUnpromoting, +} + +// GetDrgPromotionStatusResponseDrgPromotionStatusEnumValues Enumerates the set of values for DrgPromotionStatusResponseDrgPromotionStatusEnum +func GetDrgPromotionStatusResponseDrgPromotionStatusEnumValues() []DrgPromotionStatusResponseDrgPromotionStatusEnum { + values := make([]DrgPromotionStatusResponseDrgPromotionStatusEnum, 0) + for _, v := range mappingDrgPromotionStatusResponseDrgPromotionStatusEnum { + values = append(values, v) + } + return values +} + +// GetDrgPromotionStatusResponseDrgPromotionStatusEnumStringValues Enumerates the set of values in String for DrgPromotionStatusResponseDrgPromotionStatusEnum +func GetDrgPromotionStatusResponseDrgPromotionStatusEnumStringValues() []string { + return []string{ + "UNPROMOTED", + "PROMOTING", + "PROMOTED", + "UNPROMOTING", + } +} + +// GetMappingDrgPromotionStatusResponseDrgPromotionStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgPromotionStatusResponseDrgPromotionStatusEnum(val string) (DrgPromotionStatusResponseDrgPromotionStatusEnum, bool) { + enum, ok := mappingDrgPromotionStatusResponseDrgPromotionStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_redundancy_status.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_redundancy_status.go new file mode 100644 index 000000000..d99b17a32 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_redundancy_status.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgRedundancyStatus The redundancy status of the DRG. For more information, see +// Redundancy Remedies (https://docs.oracle.com/iaas/Content/Network/Troubleshoot/drgredundancy.htm). +type DrgRedundancyStatus struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + Id *string `mandatory:"false" json:"id"` + + // The redundancy status of the DRG. + Status DrgRedundancyStatusStatusEnum `mandatory:"false" json:"status,omitempty"` +} + +func (m DrgRedundancyStatus) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrgRedundancyStatus) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingDrgRedundancyStatusStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetDrgRedundancyStatusStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DrgRedundancyStatusStatusEnum Enum with underlying type: string +type DrgRedundancyStatusStatusEnum string + +// Set of constants representing the allowable values for DrgRedundancyStatusStatusEnum +const ( + DrgRedundancyStatusStatusNotAvailable DrgRedundancyStatusStatusEnum = "NOT_AVAILABLE" + DrgRedundancyStatusStatusRedundant DrgRedundancyStatusStatusEnum = "REDUNDANT" + DrgRedundancyStatusStatusNotRedundantSingleIpsec DrgRedundancyStatusStatusEnum = "NOT_REDUNDANT_SINGLE_IPSEC" + DrgRedundancyStatusStatusNotRedundantSingleVirtualcircuit DrgRedundancyStatusStatusEnum = "NOT_REDUNDANT_SINGLE_VIRTUALCIRCUIT" + DrgRedundancyStatusStatusNotRedundantMultipleIpsecs DrgRedundancyStatusStatusEnum = "NOT_REDUNDANT_MULTIPLE_IPSECS" + DrgRedundancyStatusStatusNotRedundantMultipleVirtualcircuits DrgRedundancyStatusStatusEnum = "NOT_REDUNDANT_MULTIPLE_VIRTUALCIRCUITS" + DrgRedundancyStatusStatusNotRedundantMixConnections DrgRedundancyStatusStatusEnum = "NOT_REDUNDANT_MIX_CONNECTIONS" + DrgRedundancyStatusStatusNotRedundantNoConnection DrgRedundancyStatusStatusEnum = "NOT_REDUNDANT_NO_CONNECTION" +) + +var mappingDrgRedundancyStatusStatusEnum = map[string]DrgRedundancyStatusStatusEnum{ + "NOT_AVAILABLE": DrgRedundancyStatusStatusNotAvailable, + "REDUNDANT": DrgRedundancyStatusStatusRedundant, + "NOT_REDUNDANT_SINGLE_IPSEC": DrgRedundancyStatusStatusNotRedundantSingleIpsec, + "NOT_REDUNDANT_SINGLE_VIRTUALCIRCUIT": DrgRedundancyStatusStatusNotRedundantSingleVirtualcircuit, + "NOT_REDUNDANT_MULTIPLE_IPSECS": DrgRedundancyStatusStatusNotRedundantMultipleIpsecs, + "NOT_REDUNDANT_MULTIPLE_VIRTUALCIRCUITS": DrgRedundancyStatusStatusNotRedundantMultipleVirtualcircuits, + "NOT_REDUNDANT_MIX_CONNECTIONS": DrgRedundancyStatusStatusNotRedundantMixConnections, + "NOT_REDUNDANT_NO_CONNECTION": DrgRedundancyStatusStatusNotRedundantNoConnection, +} + +var mappingDrgRedundancyStatusStatusEnumLowerCase = map[string]DrgRedundancyStatusStatusEnum{ + "not_available": DrgRedundancyStatusStatusNotAvailable, + "redundant": DrgRedundancyStatusStatusRedundant, + "not_redundant_single_ipsec": DrgRedundancyStatusStatusNotRedundantSingleIpsec, + "not_redundant_single_virtualcircuit": DrgRedundancyStatusStatusNotRedundantSingleVirtualcircuit, + "not_redundant_multiple_ipsecs": DrgRedundancyStatusStatusNotRedundantMultipleIpsecs, + "not_redundant_multiple_virtualcircuits": DrgRedundancyStatusStatusNotRedundantMultipleVirtualcircuits, + "not_redundant_mix_connections": DrgRedundancyStatusStatusNotRedundantMixConnections, + "not_redundant_no_connection": DrgRedundancyStatusStatusNotRedundantNoConnection, +} + +// GetDrgRedundancyStatusStatusEnumValues Enumerates the set of values for DrgRedundancyStatusStatusEnum +func GetDrgRedundancyStatusStatusEnumValues() []DrgRedundancyStatusStatusEnum { + values := make([]DrgRedundancyStatusStatusEnum, 0) + for _, v := range mappingDrgRedundancyStatusStatusEnum { + values = append(values, v) + } + return values +} + +// GetDrgRedundancyStatusStatusEnumStringValues Enumerates the set of values in String for DrgRedundancyStatusStatusEnum +func GetDrgRedundancyStatusStatusEnumStringValues() []string { + return []string{ + "NOT_AVAILABLE", + "REDUNDANT", + "NOT_REDUNDANT_SINGLE_IPSEC", + "NOT_REDUNDANT_SINGLE_VIRTUALCIRCUIT", + "NOT_REDUNDANT_MULTIPLE_IPSECS", + "NOT_REDUNDANT_MULTIPLE_VIRTUALCIRCUITS", + "NOT_REDUNDANT_MIX_CONNECTIONS", + "NOT_REDUNDANT_NO_CONNECTION", + } +} + +// GetMappingDrgRedundancyStatusStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgRedundancyStatusStatusEnum(val string) (DrgRedundancyStatusStatusEnum, bool) { + enum, ok := mappingDrgRedundancyStatusStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_distribution.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_distribution.go new file mode 100644 index 000000000..994ab812e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_distribution.go @@ -0,0 +1,187 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgRouteDistribution A route distribution establishes how routes get imported into DRG route tables and exported through the DRG attachments. +// A route distribution is a list of statements. Each statement consists of a set of matches, all of which must be `True` for the statement's action to take place. Each statement determines which routes are propagated. +// You can assign a route distribution as a route table's import distribution. The statements in an import +// route distribution specify how how incoming route advertisements through a referenced attachment or all attachments of a certain type are inserted into the route table. +// You can assign a route distribution as a DRG attachment's export distribution unless the +// attachment has the type `VCN`. Exporting routes through a VCN attachment is unsupported. Export +// route distribution statements specify how routes in a DRG attachment's assigned table are +// advertised out through the attachment. When a DRG is created, a route distribution is created +// with a single ACCEPT statement with match criteria MATCH_ALL. By default, all DRG attachments +// (except for those of type VCN), are assigned this distribution. You can't create a new export route distribution, one is created for you when the DRG is created. +// +// The two auto-generated DRG route tables (one as the default for VCN attachments, and the other for all other types of attachments) +// are each assigned an auto generated import route distribution. The default VCN table's import distribution has a single statement with match criteria MATCH_ALL to import routes from +// each DRG attachment type. The other table's import distribution has a statement to import routes from attachments with the VCN type. +// The route distribution is always in the same compartment as the DRG. +type DrgRouteDistribution struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG that contains this route distribution. + DrgId *string `mandatory:"true" json:"drgId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the route distribution. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The route distribution's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // The route distribution's current state. + LifecycleState DrgRouteDistributionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the route distribution was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Whether this distribution defines how routes get imported into route tables or exported through DRG attachments. + DistributionType DrgRouteDistributionDistributionTypeEnum `mandatory:"true" json:"distributionType"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m DrgRouteDistribution) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrgRouteDistribution) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDrgRouteDistributionLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetDrgRouteDistributionLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingDrgRouteDistributionDistributionTypeEnum(string(m.DistributionType)); !ok && m.DistributionType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DistributionType: %s. Supported values are: %s.", m.DistributionType, strings.Join(GetDrgRouteDistributionDistributionTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DrgRouteDistributionLifecycleStateEnum Enum with underlying type: string +type DrgRouteDistributionLifecycleStateEnum string + +// Set of constants representing the allowable values for DrgRouteDistributionLifecycleStateEnum +const ( + DrgRouteDistributionLifecycleStateProvisioning DrgRouteDistributionLifecycleStateEnum = "PROVISIONING" + DrgRouteDistributionLifecycleStateAvailable DrgRouteDistributionLifecycleStateEnum = "AVAILABLE" + DrgRouteDistributionLifecycleStateTerminating DrgRouteDistributionLifecycleStateEnum = "TERMINATING" + DrgRouteDistributionLifecycleStateTerminated DrgRouteDistributionLifecycleStateEnum = "TERMINATED" +) + +var mappingDrgRouteDistributionLifecycleStateEnum = map[string]DrgRouteDistributionLifecycleStateEnum{ + "PROVISIONING": DrgRouteDistributionLifecycleStateProvisioning, + "AVAILABLE": DrgRouteDistributionLifecycleStateAvailable, + "TERMINATING": DrgRouteDistributionLifecycleStateTerminating, + "TERMINATED": DrgRouteDistributionLifecycleStateTerminated, +} + +var mappingDrgRouteDistributionLifecycleStateEnumLowerCase = map[string]DrgRouteDistributionLifecycleStateEnum{ + "provisioning": DrgRouteDistributionLifecycleStateProvisioning, + "available": DrgRouteDistributionLifecycleStateAvailable, + "terminating": DrgRouteDistributionLifecycleStateTerminating, + "terminated": DrgRouteDistributionLifecycleStateTerminated, +} + +// GetDrgRouteDistributionLifecycleStateEnumValues Enumerates the set of values for DrgRouteDistributionLifecycleStateEnum +func GetDrgRouteDistributionLifecycleStateEnumValues() []DrgRouteDistributionLifecycleStateEnum { + values := make([]DrgRouteDistributionLifecycleStateEnum, 0) + for _, v := range mappingDrgRouteDistributionLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetDrgRouteDistributionLifecycleStateEnumStringValues Enumerates the set of values in String for DrgRouteDistributionLifecycleStateEnum +func GetDrgRouteDistributionLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingDrgRouteDistributionLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgRouteDistributionLifecycleStateEnum(val string) (DrgRouteDistributionLifecycleStateEnum, bool) { + enum, ok := mappingDrgRouteDistributionLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// DrgRouteDistributionDistributionTypeEnum Enum with underlying type: string +type DrgRouteDistributionDistributionTypeEnum string + +// Set of constants representing the allowable values for DrgRouteDistributionDistributionTypeEnum +const ( + DrgRouteDistributionDistributionTypeImport DrgRouteDistributionDistributionTypeEnum = "IMPORT" + DrgRouteDistributionDistributionTypeExport DrgRouteDistributionDistributionTypeEnum = "EXPORT" +) + +var mappingDrgRouteDistributionDistributionTypeEnum = map[string]DrgRouteDistributionDistributionTypeEnum{ + "IMPORT": DrgRouteDistributionDistributionTypeImport, + "EXPORT": DrgRouteDistributionDistributionTypeExport, +} + +var mappingDrgRouteDistributionDistributionTypeEnumLowerCase = map[string]DrgRouteDistributionDistributionTypeEnum{ + "import": DrgRouteDistributionDistributionTypeImport, + "export": DrgRouteDistributionDistributionTypeExport, +} + +// GetDrgRouteDistributionDistributionTypeEnumValues Enumerates the set of values for DrgRouteDistributionDistributionTypeEnum +func GetDrgRouteDistributionDistributionTypeEnumValues() []DrgRouteDistributionDistributionTypeEnum { + values := make([]DrgRouteDistributionDistributionTypeEnum, 0) + for _, v := range mappingDrgRouteDistributionDistributionTypeEnum { + values = append(values, v) + } + return values +} + +// GetDrgRouteDistributionDistributionTypeEnumStringValues Enumerates the set of values in String for DrgRouteDistributionDistributionTypeEnum +func GetDrgRouteDistributionDistributionTypeEnumStringValues() []string { + return []string{ + "IMPORT", + "EXPORT", + } +} + +// GetMappingDrgRouteDistributionDistributionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgRouteDistributionDistributionTypeEnum(val string) (DrgRouteDistributionDistributionTypeEnum, bool) { + enum, ok := mappingDrgRouteDistributionDistributionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_distribution_match_criteria.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_distribution_match_criteria.go new file mode 100644 index 000000000..d6a5d6b42 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_distribution_match_criteria.go @@ -0,0 +1,138 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgRouteDistributionMatchCriteria The match criteria in a route distribution statement. The match criteria outlines which routes +// should be imported or exported. +type DrgRouteDistributionMatchCriteria interface { +} + +type drgroutedistributionmatchcriteria struct { + JsonData []byte + MatchType string `json:"matchType"` +} + +// UnmarshalJSON unmarshals json +func (m *drgroutedistributionmatchcriteria) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerdrgroutedistributionmatchcriteria drgroutedistributionmatchcriteria + s := struct { + Model Unmarshalerdrgroutedistributionmatchcriteria + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.MatchType = s.Model.MatchType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *drgroutedistributionmatchcriteria) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.MatchType { + case "DRG_ATTACHMENT_ID": + mm := DrgAttachmentIdDrgRouteDistributionMatchCriteria{} + err = json.Unmarshal(data, &mm) + return mm, err + case "DRG_ATTACHMENT_TYPE": + mm := DrgAttachmentTypeDrgRouteDistributionMatchCriteria{} + err = json.Unmarshal(data, &mm) + return mm, err + case "MATCH_ALL": + mm := DrgAttachmentMatchAllDrgRouteDistributionMatchCriteria{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for DrgRouteDistributionMatchCriteria: %s.", m.MatchType) + return *m, nil + } +} + +func (m drgroutedistributionmatchcriteria) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m drgroutedistributionmatchcriteria) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DrgRouteDistributionMatchCriteriaMatchTypeEnum Enum with underlying type: string +type DrgRouteDistributionMatchCriteriaMatchTypeEnum string + +// Set of constants representing the allowable values for DrgRouteDistributionMatchCriteriaMatchTypeEnum +const ( + DrgRouteDistributionMatchCriteriaMatchTypeDrgAttachmentType DrgRouteDistributionMatchCriteriaMatchTypeEnum = "DRG_ATTACHMENT_TYPE" + DrgRouteDistributionMatchCriteriaMatchTypeDrgAttachmentId DrgRouteDistributionMatchCriteriaMatchTypeEnum = "DRG_ATTACHMENT_ID" + DrgRouteDistributionMatchCriteriaMatchTypeMatchAll DrgRouteDistributionMatchCriteriaMatchTypeEnum = "MATCH_ALL" +) + +var mappingDrgRouteDistributionMatchCriteriaMatchTypeEnum = map[string]DrgRouteDistributionMatchCriteriaMatchTypeEnum{ + "DRG_ATTACHMENT_TYPE": DrgRouteDistributionMatchCriteriaMatchTypeDrgAttachmentType, + "DRG_ATTACHMENT_ID": DrgRouteDistributionMatchCriteriaMatchTypeDrgAttachmentId, + "MATCH_ALL": DrgRouteDistributionMatchCriteriaMatchTypeMatchAll, +} + +var mappingDrgRouteDistributionMatchCriteriaMatchTypeEnumLowerCase = map[string]DrgRouteDistributionMatchCriteriaMatchTypeEnum{ + "drg_attachment_type": DrgRouteDistributionMatchCriteriaMatchTypeDrgAttachmentType, + "drg_attachment_id": DrgRouteDistributionMatchCriteriaMatchTypeDrgAttachmentId, + "match_all": DrgRouteDistributionMatchCriteriaMatchTypeMatchAll, +} + +// GetDrgRouteDistributionMatchCriteriaMatchTypeEnumValues Enumerates the set of values for DrgRouteDistributionMatchCriteriaMatchTypeEnum +func GetDrgRouteDistributionMatchCriteriaMatchTypeEnumValues() []DrgRouteDistributionMatchCriteriaMatchTypeEnum { + values := make([]DrgRouteDistributionMatchCriteriaMatchTypeEnum, 0) + for _, v := range mappingDrgRouteDistributionMatchCriteriaMatchTypeEnum { + values = append(values, v) + } + return values +} + +// GetDrgRouteDistributionMatchCriteriaMatchTypeEnumStringValues Enumerates the set of values in String for DrgRouteDistributionMatchCriteriaMatchTypeEnum +func GetDrgRouteDistributionMatchCriteriaMatchTypeEnumStringValues() []string { + return []string{ + "DRG_ATTACHMENT_TYPE", + "DRG_ATTACHMENT_ID", + "MATCH_ALL", + } +} + +// GetMappingDrgRouteDistributionMatchCriteriaMatchTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgRouteDistributionMatchCriteriaMatchTypeEnum(val string) (DrgRouteDistributionMatchCriteriaMatchTypeEnum, bool) { + enum, ok := mappingDrgRouteDistributionMatchCriteriaMatchTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_distribution_statement.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_distribution_statement.go new file mode 100644 index 000000000..da2f8e316 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_distribution_statement.go @@ -0,0 +1,138 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgRouteDistributionStatement A single statement within a route distribution. All match criteria in a statement must be met +// for the action to take place. +type DrgRouteDistributionStatement struct { + + // The action is applied only if all of the match criteria is met. + // If there are no match criteria in a statement, any input is considered a match and the action is applied. + MatchCriteria []DrgRouteDistributionMatchCriteria `mandatory:"true" json:"matchCriteria"` + + // `ACCEPT` indicates the route should be imported or exported as-is. + Action DrgRouteDistributionStatementActionEnum `mandatory:"true" json:"action"` + + // This field specifies the priority of each statement in a route distribution. + // Priorities must be unique within a particular route distribution. + // The priority will be represented as a number between 0 and 65535 where a lower number + // indicates a higher priority. When a route is processed, statements are applied in the order + // defined by their priority. The first matching rule dictates the action that will be taken + // on the route. + Priority *int `mandatory:"true" json:"priority"` + + // The Oracle-assigned ID of the route distribution statement. + Id *string `mandatory:"true" json:"id"` +} + +func (m DrgRouteDistributionStatement) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrgRouteDistributionStatement) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDrgRouteDistributionStatementActionEnum(string(m.Action)); !ok && m.Action != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Action: %s. Supported values are: %s.", m.Action, strings.Join(GetDrgRouteDistributionStatementActionEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *DrgRouteDistributionStatement) UnmarshalJSON(data []byte) (e error) { + model := struct { + MatchCriteria []drgroutedistributionmatchcriteria `json:"matchCriteria"` + Action DrgRouteDistributionStatementActionEnum `json:"action"` + Priority *int `json:"priority"` + Id *string `json:"id"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.MatchCriteria = make([]DrgRouteDistributionMatchCriteria, len(model.MatchCriteria)) + for i, n := range model.MatchCriteria { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.MatchCriteria[i] = nn.(DrgRouteDistributionMatchCriteria) + } else { + m.MatchCriteria[i] = nil + } + } + m.Action = model.Action + + m.Priority = model.Priority + + m.Id = model.Id + + return +} + +// DrgRouteDistributionStatementActionEnum Enum with underlying type: string +type DrgRouteDistributionStatementActionEnum string + +// Set of constants representing the allowable values for DrgRouteDistributionStatementActionEnum +const ( + DrgRouteDistributionStatementActionAccept DrgRouteDistributionStatementActionEnum = "ACCEPT" +) + +var mappingDrgRouteDistributionStatementActionEnum = map[string]DrgRouteDistributionStatementActionEnum{ + "ACCEPT": DrgRouteDistributionStatementActionAccept, +} + +var mappingDrgRouteDistributionStatementActionEnumLowerCase = map[string]DrgRouteDistributionStatementActionEnum{ + "accept": DrgRouteDistributionStatementActionAccept, +} + +// GetDrgRouteDistributionStatementActionEnumValues Enumerates the set of values for DrgRouteDistributionStatementActionEnum +func GetDrgRouteDistributionStatementActionEnumValues() []DrgRouteDistributionStatementActionEnum { + values := make([]DrgRouteDistributionStatementActionEnum, 0) + for _, v := range mappingDrgRouteDistributionStatementActionEnum { + values = append(values, v) + } + return values +} + +// GetDrgRouteDistributionStatementActionEnumStringValues Enumerates the set of values in String for DrgRouteDistributionStatementActionEnum +func GetDrgRouteDistributionStatementActionEnumStringValues() []string { + return []string{ + "ACCEPT", + } +} + +// GetMappingDrgRouteDistributionStatementActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgRouteDistributionStatementActionEnum(val string) (DrgRouteDistributionStatementActionEnum, bool) { + enum, ok := mappingDrgRouteDistributionStatementActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_rule.go new file mode 100644 index 000000000..32ccb084d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_rule.go @@ -0,0 +1,231 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgRouteRule A DRG route rule is a mapping between a destination IP address range and a DRG attachment. +// The map is used to route matching packets. Traffic will be routed across the attachments using Equal-cost multi-path routing (ECMP) +// if there are multiple rules with identical destinations and none of the rules conflict. +type DrgRouteRule struct { + + // Represents the range of IP addresses to match against when routing traffic. + // Potential values: + // * An IP address range (IPv4 or IPv6) in CIDR notation. For example: `192.168.1.0/24` + // or `2001:0db8:0123:45::/56`. + // * When you're setting up a security rule for traffic destined for a particular `Service` through + // a service gateway, this is the `cidrBlock` value associated with that Service. For example: `oci-phx-objectstorage`. + Destination *string `mandatory:"true" json:"destination"` + + // The type of destination for the rule. + // Allowed values: + // * `CIDR_BLOCK`: If the rule's `destination` is an IP address range in CIDR notation. + // * `SERVICE_CIDR_BLOCK`: If the rule's `destination` is the `cidrBlock` value for a + // Service (the rule is for traffic destined for a + // particular `Service` through a service gateway). + DestinationType DrgRouteRuleDestinationTypeEnum `mandatory:"true" json:"destinationType"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the next hop DRG attachment responsible + // for reaching the network destination. + // A value of `BLACKHOLE` means traffic for this route is discarded without notification. + NextHopDrgAttachmentId *string `mandatory:"true" json:"nextHopDrgAttachmentId"` + + // The Oracle-assigned ID of the DRG route rule. + Id *string `mandatory:"true" json:"id"` + + // The earliest origin of a route. If a route is advertised to a DRG through an IPsec tunnel attachment, + // and is propagated to peered DRGs via RPC attachments, the route's provenance in the peered DRGs remains `IPSEC_TUNNEL`, + // because that is the earliest origin. + // No routes with a provenance `IPSEC_TUNNEL` or `VIRTUAL_CIRCUIT` will be exported to IPsec tunnel or virtual circuit attachments, + // regardless of the attachment's export distribution. + RouteProvenance DrgRouteRuleRouteProvenanceEnum `mandatory:"true" json:"routeProvenance"` + + // You can specify static routes for the DRG route table using the API. + // The DRG learns dynamic routes from the DRG attachments using various routing protocols. + RouteType DrgRouteRuleRouteTypeEnum `mandatory:"false" json:"routeType,omitempty"` + + // Indicates that the route was not imported due to a conflict between route rules. + IsConflict *bool `mandatory:"false" json:"isConflict"` + + // Indicates that if the next hop attachment does not exist, so traffic for this route is discarded without notification. + IsBlackhole *bool `mandatory:"false" json:"isBlackhole"` + + // Additional properties for the route, computed by the service. + Attributes *interface{} `mandatory:"false" json:"attributes"` +} + +func (m DrgRouteRule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrgRouteRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDrgRouteRuleDestinationTypeEnum(string(m.DestinationType)); !ok && m.DestinationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DestinationType: %s. Supported values are: %s.", m.DestinationType, strings.Join(GetDrgRouteRuleDestinationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDrgRouteRuleRouteProvenanceEnum(string(m.RouteProvenance)); !ok && m.RouteProvenance != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RouteProvenance: %s. Supported values are: %s.", m.RouteProvenance, strings.Join(GetDrgRouteRuleRouteProvenanceEnumStringValues(), ","))) + } + + if _, ok := GetMappingDrgRouteRuleRouteTypeEnum(string(m.RouteType)); !ok && m.RouteType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RouteType: %s. Supported values are: %s.", m.RouteType, strings.Join(GetDrgRouteRuleRouteTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DrgRouteRuleDestinationTypeEnum Enum with underlying type: string +type DrgRouteRuleDestinationTypeEnum string + +// Set of constants representing the allowable values for DrgRouteRuleDestinationTypeEnum +const ( + DrgRouteRuleDestinationTypeCidrBlock DrgRouteRuleDestinationTypeEnum = "CIDR_BLOCK" + DrgRouteRuleDestinationTypeServiceCidrBlock DrgRouteRuleDestinationTypeEnum = "SERVICE_CIDR_BLOCK" +) + +var mappingDrgRouteRuleDestinationTypeEnum = map[string]DrgRouteRuleDestinationTypeEnum{ + "CIDR_BLOCK": DrgRouteRuleDestinationTypeCidrBlock, + "SERVICE_CIDR_BLOCK": DrgRouteRuleDestinationTypeServiceCidrBlock, +} + +var mappingDrgRouteRuleDestinationTypeEnumLowerCase = map[string]DrgRouteRuleDestinationTypeEnum{ + "cidr_block": DrgRouteRuleDestinationTypeCidrBlock, + "service_cidr_block": DrgRouteRuleDestinationTypeServiceCidrBlock, +} + +// GetDrgRouteRuleDestinationTypeEnumValues Enumerates the set of values for DrgRouteRuleDestinationTypeEnum +func GetDrgRouteRuleDestinationTypeEnumValues() []DrgRouteRuleDestinationTypeEnum { + values := make([]DrgRouteRuleDestinationTypeEnum, 0) + for _, v := range mappingDrgRouteRuleDestinationTypeEnum { + values = append(values, v) + } + return values +} + +// GetDrgRouteRuleDestinationTypeEnumStringValues Enumerates the set of values in String for DrgRouteRuleDestinationTypeEnum +func GetDrgRouteRuleDestinationTypeEnumStringValues() []string { + return []string{ + "CIDR_BLOCK", + "SERVICE_CIDR_BLOCK", + } +} + +// GetMappingDrgRouteRuleDestinationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgRouteRuleDestinationTypeEnum(val string) (DrgRouteRuleDestinationTypeEnum, bool) { + enum, ok := mappingDrgRouteRuleDestinationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// DrgRouteRuleRouteTypeEnum Enum with underlying type: string +type DrgRouteRuleRouteTypeEnum string + +// Set of constants representing the allowable values for DrgRouteRuleRouteTypeEnum +const ( + DrgRouteRuleRouteTypeStatic DrgRouteRuleRouteTypeEnum = "STATIC" + DrgRouteRuleRouteTypeDynamic DrgRouteRuleRouteTypeEnum = "DYNAMIC" +) + +var mappingDrgRouteRuleRouteTypeEnum = map[string]DrgRouteRuleRouteTypeEnum{ + "STATIC": DrgRouteRuleRouteTypeStatic, + "DYNAMIC": DrgRouteRuleRouteTypeDynamic, +} + +var mappingDrgRouteRuleRouteTypeEnumLowerCase = map[string]DrgRouteRuleRouteTypeEnum{ + "static": DrgRouteRuleRouteTypeStatic, + "dynamic": DrgRouteRuleRouteTypeDynamic, +} + +// GetDrgRouteRuleRouteTypeEnumValues Enumerates the set of values for DrgRouteRuleRouteTypeEnum +func GetDrgRouteRuleRouteTypeEnumValues() []DrgRouteRuleRouteTypeEnum { + values := make([]DrgRouteRuleRouteTypeEnum, 0) + for _, v := range mappingDrgRouteRuleRouteTypeEnum { + values = append(values, v) + } + return values +} + +// GetDrgRouteRuleRouteTypeEnumStringValues Enumerates the set of values in String for DrgRouteRuleRouteTypeEnum +func GetDrgRouteRuleRouteTypeEnumStringValues() []string { + return []string{ + "STATIC", + "DYNAMIC", + } +} + +// GetMappingDrgRouteRuleRouteTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgRouteRuleRouteTypeEnum(val string) (DrgRouteRuleRouteTypeEnum, bool) { + enum, ok := mappingDrgRouteRuleRouteTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// DrgRouteRuleRouteProvenanceEnum Enum with underlying type: string +type DrgRouteRuleRouteProvenanceEnum string + +// Set of constants representing the allowable values for DrgRouteRuleRouteProvenanceEnum +const ( + DrgRouteRuleRouteProvenanceStatic DrgRouteRuleRouteProvenanceEnum = "STATIC" + DrgRouteRuleRouteProvenanceVcn DrgRouteRuleRouteProvenanceEnum = "VCN" + DrgRouteRuleRouteProvenanceVirtualCircuit DrgRouteRuleRouteProvenanceEnum = "VIRTUAL_CIRCUIT" + DrgRouteRuleRouteProvenanceIpsecTunnel DrgRouteRuleRouteProvenanceEnum = "IPSEC_TUNNEL" +) + +var mappingDrgRouteRuleRouteProvenanceEnum = map[string]DrgRouteRuleRouteProvenanceEnum{ + "STATIC": DrgRouteRuleRouteProvenanceStatic, + "VCN": DrgRouteRuleRouteProvenanceVcn, + "VIRTUAL_CIRCUIT": DrgRouteRuleRouteProvenanceVirtualCircuit, + "IPSEC_TUNNEL": DrgRouteRuleRouteProvenanceIpsecTunnel, +} + +var mappingDrgRouteRuleRouteProvenanceEnumLowerCase = map[string]DrgRouteRuleRouteProvenanceEnum{ + "static": DrgRouteRuleRouteProvenanceStatic, + "vcn": DrgRouteRuleRouteProvenanceVcn, + "virtual_circuit": DrgRouteRuleRouteProvenanceVirtualCircuit, + "ipsec_tunnel": DrgRouteRuleRouteProvenanceIpsecTunnel, +} + +// GetDrgRouteRuleRouteProvenanceEnumValues Enumerates the set of values for DrgRouteRuleRouteProvenanceEnum +func GetDrgRouteRuleRouteProvenanceEnumValues() []DrgRouteRuleRouteProvenanceEnum { + values := make([]DrgRouteRuleRouteProvenanceEnum, 0) + for _, v := range mappingDrgRouteRuleRouteProvenanceEnum { + values = append(values, v) + } + return values +} + +// GetDrgRouteRuleRouteProvenanceEnumStringValues Enumerates the set of values in String for DrgRouteRuleRouteProvenanceEnum +func GetDrgRouteRuleRouteProvenanceEnumStringValues() []string { + return []string{ + "STATIC", + "VCN", + "VIRTUAL_CIRCUIT", + "IPSEC_TUNNEL", + } +} + +// GetMappingDrgRouteRuleRouteProvenanceEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgRouteRuleRouteProvenanceEnum(val string) (DrgRouteRuleRouteProvenanceEnum, bool) { + enum, ok := mappingDrgRouteRuleRouteProvenanceEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_table.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_table.go new file mode 100644 index 000000000..49aa18bf1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/drg_route_table.go @@ -0,0 +1,144 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrgRouteTable All routing inside the DRG is driven by the contents of DRG route tables. +// DRG route tables contain rules which route packets to a particular network destination, +// represented as a DRG attachment. +// The routing decision for a packet entering a DRG is determined by the rules in the DRG route table +// assigned to the attachment-of-entry. +// Each DRG attachment can inject routes in any DRG route table, provided there is a statement corresponding to the attachment in the route table's `importDrgRouteDistribution`. +// You can also insert static routes into the DRG route tables. +// The DRG route table is always in the same compartment as the DRG. There must always be a default +// DRG route table for each attachment type. +type DrgRouteTable struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the + // DRG route table. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment the DRG is in. The DRG route table + // is always in the same compartment as the DRG. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG the DRG that contains this route table. + DrgId *string `mandatory:"true" json:"drgId"` + + // The date and time the DRG route table was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The DRG route table's current state. + LifecycleState DrgRouteTableLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // If you want traffic to be routed using ECMP across your virtual circuits or IPSec tunnels to + // your on-premises network, enable ECMP on the DRG route table to which these attachments + // import routes. + IsEcmpEnabled *bool `mandatory:"true" json:"isEcmpEnabled"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the import route distribution used to specify how incoming route advertisements from + // referenced attachments are inserted into the DRG route table. + ImportDrgRouteDistributionId *string `mandatory:"false" json:"importDrgRouteDistributionId"` +} + +func (m DrgRouteTable) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DrgRouteTable) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDrgRouteTableLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetDrgRouteTableLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DrgRouteTableLifecycleStateEnum Enum with underlying type: string +type DrgRouteTableLifecycleStateEnum string + +// Set of constants representing the allowable values for DrgRouteTableLifecycleStateEnum +const ( + DrgRouteTableLifecycleStateProvisioning DrgRouteTableLifecycleStateEnum = "PROVISIONING" + DrgRouteTableLifecycleStateAvailable DrgRouteTableLifecycleStateEnum = "AVAILABLE" + DrgRouteTableLifecycleStateTerminating DrgRouteTableLifecycleStateEnum = "TERMINATING" + DrgRouteTableLifecycleStateTerminated DrgRouteTableLifecycleStateEnum = "TERMINATED" +) + +var mappingDrgRouteTableLifecycleStateEnum = map[string]DrgRouteTableLifecycleStateEnum{ + "PROVISIONING": DrgRouteTableLifecycleStateProvisioning, + "AVAILABLE": DrgRouteTableLifecycleStateAvailable, + "TERMINATING": DrgRouteTableLifecycleStateTerminating, + "TERMINATED": DrgRouteTableLifecycleStateTerminated, +} + +var mappingDrgRouteTableLifecycleStateEnumLowerCase = map[string]DrgRouteTableLifecycleStateEnum{ + "provisioning": DrgRouteTableLifecycleStateProvisioning, + "available": DrgRouteTableLifecycleStateAvailable, + "terminating": DrgRouteTableLifecycleStateTerminating, + "terminated": DrgRouteTableLifecycleStateTerminated, +} + +// GetDrgRouteTableLifecycleStateEnumValues Enumerates the set of values for DrgRouteTableLifecycleStateEnum +func GetDrgRouteTableLifecycleStateEnumValues() []DrgRouteTableLifecycleStateEnum { + values := make([]DrgRouteTableLifecycleStateEnum, 0) + for _, v := range mappingDrgRouteTableLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetDrgRouteTableLifecycleStateEnumStringValues Enumerates the set of values in String for DrgRouteTableLifecycleStateEnum +func GetDrgRouteTableLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingDrgRouteTableLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDrgRouteTableLifecycleStateEnum(val string) (DrgRouteTableLifecycleStateEnum, bool) { + enum, ok := mappingDrgRouteTableLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/egress_security_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/egress_security_rule.go new file mode 100644 index 000000000..e61247bd3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/egress_security_rule.go @@ -0,0 +1,128 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EgressSecurityRule A rule for allowing outbound IP packets. +type EgressSecurityRule struct { + + // Conceptually, this is the range of IP addresses that a packet originating from the instance + // can go to. + // Allowed values: + // * IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + // Note that IPv6 addressing is currently supported only in certain regions. See + // IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // * The `cidrBlock` value for a Service, if you're + // setting up a security list rule for traffic destined for a particular `Service` through + // a service gateway. For example: `oci-phx-objectstorage`. + Destination *string `mandatory:"true" json:"destination"` + + // The transport protocol. Specify either `all` or an IPv4 protocol number as + // defined in + // Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). + // Options are supported only for ICMP ("1"), TCP ("6"), UDP ("17"), and ICMPv6 ("58"). + Protocol *string `mandatory:"true" json:"protocol"` + + // Type of destination for the rule. The default is `CIDR_BLOCK`. + // Allowed values: + // * `CIDR_BLOCK`: If the rule's `destination` is an IP address range in CIDR notation. + // * `SERVICE_CIDR_BLOCK`: If the rule's `destination` is the `cidrBlock` value for a + // Service (the rule is for traffic destined for a + // particular `Service` through a service gateway). + DestinationType EgressSecurityRuleDestinationTypeEnum `mandatory:"false" json:"destinationType,omitempty"` + + IcmpOptions *IcmpOptions `mandatory:"false" json:"icmpOptions"` + + // A stateless rule allows traffic in one direction. Remember to add a corresponding + // stateless rule in the other direction if you need to support bidirectional traffic. For + // example, if egress traffic allows TCP destination port 80, there should be an ingress + // rule to allow TCP source port 80. Defaults to false, which means the rule is stateful + // and a corresponding rule is not necessary for bidirectional traffic. + IsStateless *bool `mandatory:"false" json:"isStateless"` + + TcpOptions *TcpOptions `mandatory:"false" json:"tcpOptions"` + + UdpOptions *UdpOptions `mandatory:"false" json:"udpOptions"` + + // An optional description of your choice for the rule. + Description *string `mandatory:"false" json:"description"` +} + +func (m EgressSecurityRule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m EgressSecurityRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingEgressSecurityRuleDestinationTypeEnum(string(m.DestinationType)); !ok && m.DestinationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DestinationType: %s. Supported values are: %s.", m.DestinationType, strings.Join(GetEgressSecurityRuleDestinationTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// EgressSecurityRuleDestinationTypeEnum Enum with underlying type: string +type EgressSecurityRuleDestinationTypeEnum string + +// Set of constants representing the allowable values for EgressSecurityRuleDestinationTypeEnum +const ( + EgressSecurityRuleDestinationTypeCidrBlock EgressSecurityRuleDestinationTypeEnum = "CIDR_BLOCK" + EgressSecurityRuleDestinationTypeServiceCidrBlock EgressSecurityRuleDestinationTypeEnum = "SERVICE_CIDR_BLOCK" +) + +var mappingEgressSecurityRuleDestinationTypeEnum = map[string]EgressSecurityRuleDestinationTypeEnum{ + "CIDR_BLOCK": EgressSecurityRuleDestinationTypeCidrBlock, + "SERVICE_CIDR_BLOCK": EgressSecurityRuleDestinationTypeServiceCidrBlock, +} + +var mappingEgressSecurityRuleDestinationTypeEnumLowerCase = map[string]EgressSecurityRuleDestinationTypeEnum{ + "cidr_block": EgressSecurityRuleDestinationTypeCidrBlock, + "service_cidr_block": EgressSecurityRuleDestinationTypeServiceCidrBlock, +} + +// GetEgressSecurityRuleDestinationTypeEnumValues Enumerates the set of values for EgressSecurityRuleDestinationTypeEnum +func GetEgressSecurityRuleDestinationTypeEnumValues() []EgressSecurityRuleDestinationTypeEnum { + values := make([]EgressSecurityRuleDestinationTypeEnum, 0) + for _, v := range mappingEgressSecurityRuleDestinationTypeEnum { + values = append(values, v) + } + return values +} + +// GetEgressSecurityRuleDestinationTypeEnumStringValues Enumerates the set of values in String for EgressSecurityRuleDestinationTypeEnum +func GetEgressSecurityRuleDestinationTypeEnumStringValues() []string { + return []string{ + "CIDR_BLOCK", + "SERVICE_CIDR_BLOCK", + } +} + +// GetMappingEgressSecurityRuleDestinationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingEgressSecurityRuleDestinationTypeEnum(val string) (EgressSecurityRuleDestinationTypeEnum, bool) { + enum, ok := mappingEgressSecurityRuleDestinationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/emulated_volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/emulated_volume_attachment.go new file mode 100644 index 000000000..31e817ed8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/emulated_volume_attachment.go @@ -0,0 +1,191 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EmulatedVolumeAttachment An Emulated volume attachment. +type EmulatedVolumeAttachment struct { + + // The availability domain of an instance. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the volume attachment. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the instance the volume is attached to. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The date and time the volume was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the volume. + VolumeId *string `mandatory:"true" json:"volumeId"` + + // The device name. + Device *string `mandatory:"false" json:"device"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether the attachment was created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + IsShareable *bool `mandatory:"false" json:"isShareable"` + + // Whether in-transit encryption for the data volume's paravirtualized attachment is enabled or not. + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` + + // Whether the Iscsi or Paravirtualized attachment is multipath or not, it is not applicable to NVMe attachment. + IsMultipath *bool `mandatory:"false" json:"isMultipath"` + + // Flag indicating if this volume was created for the customer as part of a simplified launch. + // Used to determine whether the volume requires deletion on instance termination. + IsVolumeCreatedDuringLaunch *bool `mandatory:"false" json:"isVolumeCreatedDuringLaunch"` + + // The current state of the volume attachment. + LifecycleState VolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The iscsi login state of the volume attachment. For a Iscsi volume attachment, + // all iscsi sessions need to be all logged-in or logged-out to be in logged-in or logged-out state. + IscsiLoginState VolumeAttachmentIscsiLoginStateEnum `mandatory:"false" json:"iscsiLoginState,omitempty"` +} + +// GetAvailabilityDomain returns AvailabilityDomain +func (m EmulatedVolumeAttachment) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetCompartmentId returns CompartmentId +func (m EmulatedVolumeAttachment) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDevice returns Device +func (m EmulatedVolumeAttachment) GetDevice() *string { + return m.Device +} + +// GetDisplayName returns DisplayName +func (m EmulatedVolumeAttachment) GetDisplayName() *string { + return m.DisplayName +} + +// GetId returns Id +func (m EmulatedVolumeAttachment) GetId() *string { + return m.Id +} + +// GetInstanceId returns InstanceId +func (m EmulatedVolumeAttachment) GetInstanceId() *string { + return m.InstanceId +} + +// GetIsReadOnly returns IsReadOnly +func (m EmulatedVolumeAttachment) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetIsShareable returns IsShareable +func (m EmulatedVolumeAttachment) GetIsShareable() *bool { + return m.IsShareable +} + +// GetLifecycleState returns LifecycleState +func (m EmulatedVolumeAttachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum { + return m.LifecycleState +} + +// GetTimeCreated returns TimeCreated +func (m EmulatedVolumeAttachment) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetVolumeId returns VolumeId +func (m EmulatedVolumeAttachment) GetVolumeId() *string { + return m.VolumeId +} + +// GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled +func (m EmulatedVolumeAttachment) GetIsPvEncryptionInTransitEnabled() *bool { + return m.IsPvEncryptionInTransitEnabled +} + +// GetIsMultipath returns IsMultipath +func (m EmulatedVolumeAttachment) GetIsMultipath() *bool { + return m.IsMultipath +} + +// GetIscsiLoginState returns IscsiLoginState +func (m EmulatedVolumeAttachment) GetIscsiLoginState() VolumeAttachmentIscsiLoginStateEnum { + return m.IscsiLoginState +} + +// GetIsVolumeCreatedDuringLaunch returns IsVolumeCreatedDuringLaunch +func (m EmulatedVolumeAttachment) GetIsVolumeCreatedDuringLaunch() *bool { + return m.IsVolumeCreatedDuringLaunch +} + +func (m EmulatedVolumeAttachment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m EmulatedVolumeAttachment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingVolumeAttachmentLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVolumeAttachmentLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingVolumeAttachmentIscsiLoginStateEnum(string(m.IscsiLoginState)); !ok && m.IscsiLoginState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IscsiLoginState: %s. Supported values are: %s.", m.IscsiLoginState, strings.Join(GetVolumeAttachmentIscsiLoginStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m EmulatedVolumeAttachment) MarshalJSON() (buff []byte, e error) { + type MarshalTypeEmulatedVolumeAttachment EmulatedVolumeAttachment + s := struct { + DiscriminatorParam string `json:"attachmentType"` + MarshalTypeEmulatedVolumeAttachment + }{ + "emulated", + (MarshalTypeEmulatedVolumeAttachment)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/encryption_domain_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/encryption_domain_config.go new file mode 100644 index 000000000..5b4803811 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/encryption_domain_config.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EncryptionDomainConfig Configuration information used by the encryption domain policy. +type EncryptionDomainConfig struct { + + // Lists IPv4 or IPv6-enabled subnets in your Oracle tenancy. + OracleTrafficSelector []string `mandatory:"false" json:"oracleTrafficSelector"` + + // Lists IPv4 or IPv6-enabled subnets in your on-premises network. + CpeTrafficSelector []string `mandatory:"false" json:"cpeTrafficSelector"` +} + +func (m EncryptionDomainConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m EncryptionDomainConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/encryption_in_transit_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/encryption_in_transit_type.go new file mode 100644 index 000000000..0e7e27ae0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/encryption_in_transit_type.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "strings" +) + +// EncryptionInTransitTypeEnum Enum with underlying type: string +type EncryptionInTransitTypeEnum string + +// Set of constants representing the allowable values for EncryptionInTransitTypeEnum +const ( + EncryptionInTransitTypeNone EncryptionInTransitTypeEnum = "NONE" + EncryptionInTransitTypeBmEncryptionInTransit EncryptionInTransitTypeEnum = "BM_ENCRYPTION_IN_TRANSIT" +) + +var mappingEncryptionInTransitTypeEnum = map[string]EncryptionInTransitTypeEnum{ + "NONE": EncryptionInTransitTypeNone, + "BM_ENCRYPTION_IN_TRANSIT": EncryptionInTransitTypeBmEncryptionInTransit, +} + +var mappingEncryptionInTransitTypeEnumLowerCase = map[string]EncryptionInTransitTypeEnum{ + "none": EncryptionInTransitTypeNone, + "bm_encryption_in_transit": EncryptionInTransitTypeBmEncryptionInTransit, +} + +// GetEncryptionInTransitTypeEnumValues Enumerates the set of values for EncryptionInTransitTypeEnum +func GetEncryptionInTransitTypeEnumValues() []EncryptionInTransitTypeEnum { + values := make([]EncryptionInTransitTypeEnum, 0) + for _, v := range mappingEncryptionInTransitTypeEnum { + values = append(values, v) + } + return values +} + +// GetEncryptionInTransitTypeEnumStringValues Enumerates the set of values in String for EncryptionInTransitTypeEnum +func GetEncryptionInTransitTypeEnumStringValues() []string { + return []string{ + "NONE", + "BM_ENCRYPTION_IN_TRANSIT", + } +} + +// GetMappingEncryptionInTransitTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingEncryptionInTransitTypeEnum(val string) (EncryptionInTransitTypeEnum, bool) { + enum, ok := mappingEncryptionInTransitTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/enum_integer_image_capability_descriptor.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/enum_integer_image_capability_descriptor.go new file mode 100644 index 000000000..a09b56d37 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/enum_integer_image_capability_descriptor.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EnumIntegerImageCapabilityDescriptor Enum Integer type CapabilityDescriptor +type EnumIntegerImageCapabilityDescriptor struct { + + // the list of values for the enum + Values []int `mandatory:"true" json:"values"` + + // the default value + DefaultValue *int `mandatory:"false" json:"defaultValue"` + + Source ImageCapabilitySchemaDescriptorSourceEnum `mandatory:"true" json:"source"` +} + +// GetSource returns Source +func (m EnumIntegerImageCapabilityDescriptor) GetSource() ImageCapabilitySchemaDescriptorSourceEnum { + return m.Source +} + +func (m EnumIntegerImageCapabilityDescriptor) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m EnumIntegerImageCapabilityDescriptor) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingImageCapabilitySchemaDescriptorSourceEnum(string(m.Source)); !ok && m.Source != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Source: %s. Supported values are: %s.", m.Source, strings.Join(GetImageCapabilitySchemaDescriptorSourceEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m EnumIntegerImageCapabilityDescriptor) MarshalJSON() (buff []byte, e error) { + type MarshalTypeEnumIntegerImageCapabilityDescriptor EnumIntegerImageCapabilityDescriptor + s := struct { + DiscriminatorParam string `json:"descriptorType"` + MarshalTypeEnumIntegerImageCapabilityDescriptor + }{ + "enuminteger", + (MarshalTypeEnumIntegerImageCapabilityDescriptor)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/enum_string_image_capability_schema_descriptor.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/enum_string_image_capability_schema_descriptor.go new file mode 100644 index 000000000..e96e73ace --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/enum_string_image_capability_schema_descriptor.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EnumStringImageCapabilitySchemaDescriptor Enum String type of ImageCapabilitySchemaDescriptor +type EnumStringImageCapabilitySchemaDescriptor struct { + + // the list of values for the enum + Values []string `mandatory:"true" json:"values"` + + // the default value + DefaultValue *string `mandatory:"false" json:"defaultValue"` + + Source ImageCapabilitySchemaDescriptorSourceEnum `mandatory:"true" json:"source"` +} + +// GetSource returns Source +func (m EnumStringImageCapabilitySchemaDescriptor) GetSource() ImageCapabilitySchemaDescriptorSourceEnum { + return m.Source +} + +func (m EnumStringImageCapabilitySchemaDescriptor) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m EnumStringImageCapabilitySchemaDescriptor) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingImageCapabilitySchemaDescriptorSourceEnum(string(m.Source)); !ok && m.Source != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Source: %s. Supported values are: %s.", m.Source, strings.Join(GetImageCapabilitySchemaDescriptorSourceEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m EnumStringImageCapabilitySchemaDescriptor) MarshalJSON() (buff []byte, e error) { + type MarshalTypeEnumStringImageCapabilitySchemaDescriptor EnumStringImageCapabilitySchemaDescriptor + s := struct { + DiscriminatorParam string `json:"descriptorType"` + MarshalTypeEnumStringImageCapabilitySchemaDescriptor + }{ + "enumstring", + (MarshalTypeEnumStringImageCapabilitySchemaDescriptor)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_details.go new file mode 100644 index 000000000..d4a3e2a6d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_details.go @@ -0,0 +1,167 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExportImageDetails The destination details for the image export. +// Set `destinationType` to `objectStorageTuple` +// and use ExportImageViaObjectStorageTupleDetails +// when specifying the namespace, bucket name, and object name. +// Set `destinationType` to `objectStorageUri` and +// use ExportImageViaObjectStorageUriDetails +// when specifying the Object Storage URL. +type ExportImageDetails interface { + + // The format to export the image to. The default value is `OCI`. + // The following image formats are available: + // - `OCI` - Oracle Cloud Infrastructure file with a QCOW2 image and Oracle Cloud Infrastructure metadata (.oci). + // Use this format to export a custom image that you want to import into other tenancies or regions. + // - `QCOW2` - QEMU Copy On Write (.qcow2) + // - `VDI` - Virtual Disk Image (.vdi) for Oracle VM VirtualBox + // - `VHD` - Virtual Hard Disk (.vhd) for Hyper-V + // - `VMDK` - Virtual Machine Disk (.vmdk) + GetExportFormat() ExportImageDetailsExportFormatEnum +} + +type exportimagedetails struct { + JsonData []byte + ExportFormat ExportImageDetailsExportFormatEnum `mandatory:"false" json:"exportFormat,omitempty"` + DestinationType string `json:"destinationType"` +} + +// UnmarshalJSON unmarshals json +func (m *exportimagedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerexportimagedetails exportimagedetails + s := struct { + Model Unmarshalerexportimagedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.ExportFormat = s.Model.ExportFormat + m.DestinationType = s.Model.DestinationType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *exportimagedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.DestinationType { + case "objectStorageUri": + mm := ExportImageViaObjectStorageUriDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "objectStorageTuple": + mm := ExportImageViaObjectStorageTupleDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for ExportImageDetails: %s.", m.DestinationType) + return *m, nil + } +} + +// GetExportFormat returns ExportFormat +func (m exportimagedetails) GetExportFormat() ExportImageDetailsExportFormatEnum { + return m.ExportFormat +} + +func (m exportimagedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m exportimagedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingExportImageDetailsExportFormatEnum(string(m.ExportFormat)); !ok && m.ExportFormat != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ExportFormat: %s. Supported values are: %s.", m.ExportFormat, strings.Join(GetExportImageDetailsExportFormatEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ExportImageDetailsExportFormatEnum Enum with underlying type: string +type ExportImageDetailsExportFormatEnum string + +// Set of constants representing the allowable values for ExportImageDetailsExportFormatEnum +const ( + ExportImageDetailsExportFormatQcow2 ExportImageDetailsExportFormatEnum = "QCOW2" + ExportImageDetailsExportFormatVmdk ExportImageDetailsExportFormatEnum = "VMDK" + ExportImageDetailsExportFormatOci ExportImageDetailsExportFormatEnum = "OCI" + ExportImageDetailsExportFormatVhd ExportImageDetailsExportFormatEnum = "VHD" + ExportImageDetailsExportFormatVdi ExportImageDetailsExportFormatEnum = "VDI" +) + +var mappingExportImageDetailsExportFormatEnum = map[string]ExportImageDetailsExportFormatEnum{ + "QCOW2": ExportImageDetailsExportFormatQcow2, + "VMDK": ExportImageDetailsExportFormatVmdk, + "OCI": ExportImageDetailsExportFormatOci, + "VHD": ExportImageDetailsExportFormatVhd, + "VDI": ExportImageDetailsExportFormatVdi, +} + +var mappingExportImageDetailsExportFormatEnumLowerCase = map[string]ExportImageDetailsExportFormatEnum{ + "qcow2": ExportImageDetailsExportFormatQcow2, + "vmdk": ExportImageDetailsExportFormatVmdk, + "oci": ExportImageDetailsExportFormatOci, + "vhd": ExportImageDetailsExportFormatVhd, + "vdi": ExportImageDetailsExportFormatVdi, +} + +// GetExportImageDetailsExportFormatEnumValues Enumerates the set of values for ExportImageDetailsExportFormatEnum +func GetExportImageDetailsExportFormatEnumValues() []ExportImageDetailsExportFormatEnum { + values := make([]ExportImageDetailsExportFormatEnum, 0) + for _, v := range mappingExportImageDetailsExportFormatEnum { + values = append(values, v) + } + return values +} + +// GetExportImageDetailsExportFormatEnumStringValues Enumerates the set of values in String for ExportImageDetailsExportFormatEnum +func GetExportImageDetailsExportFormatEnumStringValues() []string { + return []string{ + "QCOW2", + "VMDK", + "OCI", + "VHD", + "VDI", + } +} + +// GetMappingExportImageDetailsExportFormatEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExportImageDetailsExportFormatEnum(val string) (ExportImageDetailsExportFormatEnum, bool) { + enum, ok := mappingExportImageDetailsExportFormatEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_request_response.go new file mode 100644 index 000000000..747923b51 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_request_response.go @@ -0,0 +1,114 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ExportImageRequest wrapper for the ExportImage operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ExportImage.go.html to see an example of how to use ExportImageRequest. +type ExportImageRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. + ImageId *string `mandatory:"true" contributesTo:"path" name:"imageId"` + + // Details for the image export. + ExportImageDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ExportImageRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ExportImageRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ExportImageRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ExportImageRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ExportImageRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ExportImageResponse wrapper for the ExportImage operation +type ExportImageResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Image instance + Image `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ExportImageResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ExportImageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_via_object_storage_tuple_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_via_object_storage_tuple_details.go new file mode 100644 index 000000000..c7a53ddbb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_via_object_storage_tuple_details.go @@ -0,0 +1,84 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExportImageViaObjectStorageTupleDetails The representation of ExportImageViaObjectStorageTupleDetails +type ExportImageViaObjectStorageTupleDetails struct { + + // The Object Storage bucket to export the image to. + BucketName *string `mandatory:"true" json:"bucketName"` + + // The Object Storage namespace to export the image to. + NamespaceName *string `mandatory:"true" json:"namespaceName"` + + // The Object Storage object name for the exported image. + ObjectName *string `mandatory:"true" json:"objectName"` + + // The format to export the image to. The default value is `OCI`. + // The following image formats are available: + // - `OCI` - Oracle Cloud Infrastructure file with a QCOW2 image and Oracle Cloud Infrastructure metadata (.oci). + // Use this format to export a custom image that you want to import into other tenancies or regions. + // - `QCOW2` - QEMU Copy On Write (.qcow2) + // - `VDI` - Virtual Disk Image (.vdi) for Oracle VM VirtualBox + // - `VHD` - Virtual Hard Disk (.vhd) for Hyper-V + // - `VMDK` - Virtual Machine Disk (.vmdk) + ExportFormat ExportImageDetailsExportFormatEnum `mandatory:"false" json:"exportFormat,omitempty"` +} + +// GetExportFormat returns ExportFormat +func (m ExportImageViaObjectStorageTupleDetails) GetExportFormat() ExportImageDetailsExportFormatEnum { + return m.ExportFormat +} + +func (m ExportImageViaObjectStorageTupleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ExportImageViaObjectStorageTupleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingExportImageDetailsExportFormatEnum(string(m.ExportFormat)); !ok && m.ExportFormat != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ExportFormat: %s. Supported values are: %s.", m.ExportFormat, strings.Join(GetExportImageDetailsExportFormatEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ExportImageViaObjectStorageTupleDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeExportImageViaObjectStorageTupleDetails ExportImageViaObjectStorageTupleDetails + s := struct { + DiscriminatorParam string `json:"destinationType"` + MarshalTypeExportImageViaObjectStorageTupleDetails + }{ + "objectStorageTuple", + (MarshalTypeExportImageViaObjectStorageTupleDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_via_object_storage_uri_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_via_object_storage_uri_details.go new file mode 100644 index 000000000..24196ac86 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/export_image_via_object_storage_uri_details.go @@ -0,0 +1,81 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExportImageViaObjectStorageUriDetails The representation of ExportImageViaObjectStorageUriDetails +type ExportImageViaObjectStorageUriDetails struct { + + // The Object Storage URL to export the image to. See Object + // Storage URLs (https://docs.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm#URLs) + // and Using Pre-Authenticated Requests (https://docs.oracle.com/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm) + // for constructing URLs for image import/export. + DestinationUri *string `mandatory:"true" json:"destinationUri"` + + // The format to export the image to. The default value is `OCI`. + // The following image formats are available: + // - `OCI` - Oracle Cloud Infrastructure file with a QCOW2 image and Oracle Cloud Infrastructure metadata (.oci). + // Use this format to export a custom image that you want to import into other tenancies or regions. + // - `QCOW2` - QEMU Copy On Write (.qcow2) + // - `VDI` - Virtual Disk Image (.vdi) for Oracle VM VirtualBox + // - `VHD` - Virtual Hard Disk (.vhd) for Hyper-V + // - `VMDK` - Virtual Machine Disk (.vmdk) + ExportFormat ExportImageDetailsExportFormatEnum `mandatory:"false" json:"exportFormat,omitempty"` +} + +// GetExportFormat returns ExportFormat +func (m ExportImageViaObjectStorageUriDetails) GetExportFormat() ExportImageDetailsExportFormatEnum { + return m.ExportFormat +} + +func (m ExportImageViaObjectStorageUriDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ExportImageViaObjectStorageUriDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingExportImageDetailsExportFormatEnum(string(m.ExportFormat)); !ok && m.ExportFormat != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ExportFormat: %s. Supported values are: %s.", m.ExportFormat, strings.Join(GetExportImageDetailsExportFormatEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ExportImageViaObjectStorageUriDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeExportImageViaObjectStorageUriDetails ExportImageViaObjectStorageUriDetails + s := struct { + DiscriminatorParam string `json:"destinationType"` + MarshalTypeExportImageViaObjectStorageUriDetails + }{ + "objectStorageUri", + (MarshalTypeExportImageViaObjectStorageUriDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/fast_connect_provider_service.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/fast_connect_provider_service.go new file mode 100644 index 000000000..a10805ec2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/fast_connect_provider_service.go @@ -0,0 +1,421 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FastConnectProviderService A service offering from a supported provider. For more information, +// see FastConnect Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +type FastConnectProviderService struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the service offered by the provider. + Id *string `mandatory:"true" json:"id"` + + // Who is responsible for managing the private peering BGP information. + PrivatePeeringBgpManagement FastConnectProviderServicePrivatePeeringBgpManagementEnum `mandatory:"true" json:"privatePeeringBgpManagement"` + + // The name of the provider. + ProviderName *string `mandatory:"true" json:"providerName"` + + // The name of the service offered by the provider. + ProviderServiceName *string `mandatory:"true" json:"providerServiceName"` + + // Who is responsible for managing the public peering BGP information. + PublicPeeringBgpManagement FastConnectProviderServicePublicPeeringBgpManagementEnum `mandatory:"true" json:"publicPeeringBgpManagement"` + + // Who is responsible for managing the ASN information for the network at the other end + // of the connection from Oracle. + CustomerAsnManagement FastConnectProviderServiceCustomerAsnManagementEnum `mandatory:"true" json:"customerAsnManagement"` + + // Who is responsible for managing the provider service key. + ProviderServiceKeyManagement FastConnectProviderServiceProviderServiceKeyManagementEnum `mandatory:"true" json:"providerServiceKeyManagement"` + + // Who is responsible for managing the virtual circuit bandwidth. + BandwithShapeManagement FastConnectProviderServiceBandwithShapeManagementEnum `mandatory:"true" json:"bandwithShapeManagement"` + + // Total number of cross-connect or cross-connect groups required for the virtual circuit. + RequiredTotalCrossConnects *int `mandatory:"true" json:"requiredTotalCrossConnects"` + + // Provider service type. + Type FastConnectProviderServiceTypeEnum `mandatory:"true" json:"type"` + + // The location of the provider's website or portal. This portal is where you can get information + // about the provider service, create a virtual circuit connection from the provider to Oracle + // Cloud Infrastructure, and retrieve your provider service key for that virtual circuit connection. + // Example: `https://example.com` + Description *string `mandatory:"false" json:"description"` + + // An array of virtual circuit types supported by this service. + SupportedVirtualCircuitTypes []FastConnectProviderServiceSupportedVirtualCircuitTypesEnum `mandatory:"false" json:"supportedVirtualCircuitTypes,omitempty"` +} + +func (m FastConnectProviderService) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FastConnectProviderService) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingFastConnectProviderServicePrivatePeeringBgpManagementEnum(string(m.PrivatePeeringBgpManagement)); !ok && m.PrivatePeeringBgpManagement != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PrivatePeeringBgpManagement: %s. Supported values are: %s.", m.PrivatePeeringBgpManagement, strings.Join(GetFastConnectProviderServicePrivatePeeringBgpManagementEnumStringValues(), ","))) + } + if _, ok := GetMappingFastConnectProviderServicePublicPeeringBgpManagementEnum(string(m.PublicPeeringBgpManagement)); !ok && m.PublicPeeringBgpManagement != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PublicPeeringBgpManagement: %s. Supported values are: %s.", m.PublicPeeringBgpManagement, strings.Join(GetFastConnectProviderServicePublicPeeringBgpManagementEnumStringValues(), ","))) + } + if _, ok := GetMappingFastConnectProviderServiceCustomerAsnManagementEnum(string(m.CustomerAsnManagement)); !ok && m.CustomerAsnManagement != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CustomerAsnManagement: %s. Supported values are: %s.", m.CustomerAsnManagement, strings.Join(GetFastConnectProviderServiceCustomerAsnManagementEnumStringValues(), ","))) + } + if _, ok := GetMappingFastConnectProviderServiceProviderServiceKeyManagementEnum(string(m.ProviderServiceKeyManagement)); !ok && m.ProviderServiceKeyManagement != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProviderServiceKeyManagement: %s. Supported values are: %s.", m.ProviderServiceKeyManagement, strings.Join(GetFastConnectProviderServiceProviderServiceKeyManagementEnumStringValues(), ","))) + } + if _, ok := GetMappingFastConnectProviderServiceBandwithShapeManagementEnum(string(m.BandwithShapeManagement)); !ok && m.BandwithShapeManagement != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BandwithShapeManagement: %s. Supported values are: %s.", m.BandwithShapeManagement, strings.Join(GetFastConnectProviderServiceBandwithShapeManagementEnumStringValues(), ","))) + } + if _, ok := GetMappingFastConnectProviderServiceTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetFastConnectProviderServiceTypeEnumStringValues(), ","))) + } + + for _, val := range m.SupportedVirtualCircuitTypes { + if _, ok := GetMappingFastConnectProviderServiceSupportedVirtualCircuitTypesEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SupportedVirtualCircuitTypes: %s. Supported values are: %s.", val, strings.Join(GetFastConnectProviderServiceSupportedVirtualCircuitTypesEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// FastConnectProviderServicePrivatePeeringBgpManagementEnum Enum with underlying type: string +type FastConnectProviderServicePrivatePeeringBgpManagementEnum string + +// Set of constants representing the allowable values for FastConnectProviderServicePrivatePeeringBgpManagementEnum +const ( + FastConnectProviderServicePrivatePeeringBgpManagementCustomerManaged FastConnectProviderServicePrivatePeeringBgpManagementEnum = "CUSTOMER_MANAGED" + FastConnectProviderServicePrivatePeeringBgpManagementProviderManaged FastConnectProviderServicePrivatePeeringBgpManagementEnum = "PROVIDER_MANAGED" + FastConnectProviderServicePrivatePeeringBgpManagementOracleManaged FastConnectProviderServicePrivatePeeringBgpManagementEnum = "ORACLE_MANAGED" +) + +var mappingFastConnectProviderServicePrivatePeeringBgpManagementEnum = map[string]FastConnectProviderServicePrivatePeeringBgpManagementEnum{ + "CUSTOMER_MANAGED": FastConnectProviderServicePrivatePeeringBgpManagementCustomerManaged, + "PROVIDER_MANAGED": FastConnectProviderServicePrivatePeeringBgpManagementProviderManaged, + "ORACLE_MANAGED": FastConnectProviderServicePrivatePeeringBgpManagementOracleManaged, +} + +var mappingFastConnectProviderServicePrivatePeeringBgpManagementEnumLowerCase = map[string]FastConnectProviderServicePrivatePeeringBgpManagementEnum{ + "customer_managed": FastConnectProviderServicePrivatePeeringBgpManagementCustomerManaged, + "provider_managed": FastConnectProviderServicePrivatePeeringBgpManagementProviderManaged, + "oracle_managed": FastConnectProviderServicePrivatePeeringBgpManagementOracleManaged, +} + +// GetFastConnectProviderServicePrivatePeeringBgpManagementEnumValues Enumerates the set of values for FastConnectProviderServicePrivatePeeringBgpManagementEnum +func GetFastConnectProviderServicePrivatePeeringBgpManagementEnumValues() []FastConnectProviderServicePrivatePeeringBgpManagementEnum { + values := make([]FastConnectProviderServicePrivatePeeringBgpManagementEnum, 0) + for _, v := range mappingFastConnectProviderServicePrivatePeeringBgpManagementEnum { + values = append(values, v) + } + return values +} + +// GetFastConnectProviderServicePrivatePeeringBgpManagementEnumStringValues Enumerates the set of values in String for FastConnectProviderServicePrivatePeeringBgpManagementEnum +func GetFastConnectProviderServicePrivatePeeringBgpManagementEnumStringValues() []string { + return []string{ + "CUSTOMER_MANAGED", + "PROVIDER_MANAGED", + "ORACLE_MANAGED", + } +} + +// GetMappingFastConnectProviderServicePrivatePeeringBgpManagementEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFastConnectProviderServicePrivatePeeringBgpManagementEnum(val string) (FastConnectProviderServicePrivatePeeringBgpManagementEnum, bool) { + enum, ok := mappingFastConnectProviderServicePrivatePeeringBgpManagementEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// FastConnectProviderServicePublicPeeringBgpManagementEnum Enum with underlying type: string +type FastConnectProviderServicePublicPeeringBgpManagementEnum string + +// Set of constants representing the allowable values for FastConnectProviderServicePublicPeeringBgpManagementEnum +const ( + FastConnectProviderServicePublicPeeringBgpManagementCustomerManaged FastConnectProviderServicePublicPeeringBgpManagementEnum = "CUSTOMER_MANAGED" + FastConnectProviderServicePublicPeeringBgpManagementProviderManaged FastConnectProviderServicePublicPeeringBgpManagementEnum = "PROVIDER_MANAGED" + FastConnectProviderServicePublicPeeringBgpManagementOracleManaged FastConnectProviderServicePublicPeeringBgpManagementEnum = "ORACLE_MANAGED" +) + +var mappingFastConnectProviderServicePublicPeeringBgpManagementEnum = map[string]FastConnectProviderServicePublicPeeringBgpManagementEnum{ + "CUSTOMER_MANAGED": FastConnectProviderServicePublicPeeringBgpManagementCustomerManaged, + "PROVIDER_MANAGED": FastConnectProviderServicePublicPeeringBgpManagementProviderManaged, + "ORACLE_MANAGED": FastConnectProviderServicePublicPeeringBgpManagementOracleManaged, +} + +var mappingFastConnectProviderServicePublicPeeringBgpManagementEnumLowerCase = map[string]FastConnectProviderServicePublicPeeringBgpManagementEnum{ + "customer_managed": FastConnectProviderServicePublicPeeringBgpManagementCustomerManaged, + "provider_managed": FastConnectProviderServicePublicPeeringBgpManagementProviderManaged, + "oracle_managed": FastConnectProviderServicePublicPeeringBgpManagementOracleManaged, +} + +// GetFastConnectProviderServicePublicPeeringBgpManagementEnumValues Enumerates the set of values for FastConnectProviderServicePublicPeeringBgpManagementEnum +func GetFastConnectProviderServicePublicPeeringBgpManagementEnumValues() []FastConnectProviderServicePublicPeeringBgpManagementEnum { + values := make([]FastConnectProviderServicePublicPeeringBgpManagementEnum, 0) + for _, v := range mappingFastConnectProviderServicePublicPeeringBgpManagementEnum { + values = append(values, v) + } + return values +} + +// GetFastConnectProviderServicePublicPeeringBgpManagementEnumStringValues Enumerates the set of values in String for FastConnectProviderServicePublicPeeringBgpManagementEnum +func GetFastConnectProviderServicePublicPeeringBgpManagementEnumStringValues() []string { + return []string{ + "CUSTOMER_MANAGED", + "PROVIDER_MANAGED", + "ORACLE_MANAGED", + } +} + +// GetMappingFastConnectProviderServicePublicPeeringBgpManagementEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFastConnectProviderServicePublicPeeringBgpManagementEnum(val string) (FastConnectProviderServicePublicPeeringBgpManagementEnum, bool) { + enum, ok := mappingFastConnectProviderServicePublicPeeringBgpManagementEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// FastConnectProviderServiceSupportedVirtualCircuitTypesEnum Enum with underlying type: string +type FastConnectProviderServiceSupportedVirtualCircuitTypesEnum string + +// Set of constants representing the allowable values for FastConnectProviderServiceSupportedVirtualCircuitTypesEnum +const ( + FastConnectProviderServiceSupportedVirtualCircuitTypesPublic FastConnectProviderServiceSupportedVirtualCircuitTypesEnum = "PUBLIC" + FastConnectProviderServiceSupportedVirtualCircuitTypesPrivate FastConnectProviderServiceSupportedVirtualCircuitTypesEnum = "PRIVATE" +) + +var mappingFastConnectProviderServiceSupportedVirtualCircuitTypesEnum = map[string]FastConnectProviderServiceSupportedVirtualCircuitTypesEnum{ + "PUBLIC": FastConnectProviderServiceSupportedVirtualCircuitTypesPublic, + "PRIVATE": FastConnectProviderServiceSupportedVirtualCircuitTypesPrivate, +} + +var mappingFastConnectProviderServiceSupportedVirtualCircuitTypesEnumLowerCase = map[string]FastConnectProviderServiceSupportedVirtualCircuitTypesEnum{ + "public": FastConnectProviderServiceSupportedVirtualCircuitTypesPublic, + "private": FastConnectProviderServiceSupportedVirtualCircuitTypesPrivate, +} + +// GetFastConnectProviderServiceSupportedVirtualCircuitTypesEnumValues Enumerates the set of values for FastConnectProviderServiceSupportedVirtualCircuitTypesEnum +func GetFastConnectProviderServiceSupportedVirtualCircuitTypesEnumValues() []FastConnectProviderServiceSupportedVirtualCircuitTypesEnum { + values := make([]FastConnectProviderServiceSupportedVirtualCircuitTypesEnum, 0) + for _, v := range mappingFastConnectProviderServiceSupportedVirtualCircuitTypesEnum { + values = append(values, v) + } + return values +} + +// GetFastConnectProviderServiceSupportedVirtualCircuitTypesEnumStringValues Enumerates the set of values in String for FastConnectProviderServiceSupportedVirtualCircuitTypesEnum +func GetFastConnectProviderServiceSupportedVirtualCircuitTypesEnumStringValues() []string { + return []string{ + "PUBLIC", + "PRIVATE", + } +} + +// GetMappingFastConnectProviderServiceSupportedVirtualCircuitTypesEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFastConnectProviderServiceSupportedVirtualCircuitTypesEnum(val string) (FastConnectProviderServiceSupportedVirtualCircuitTypesEnum, bool) { + enum, ok := mappingFastConnectProviderServiceSupportedVirtualCircuitTypesEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// FastConnectProviderServiceCustomerAsnManagementEnum Enum with underlying type: string +type FastConnectProviderServiceCustomerAsnManagementEnum string + +// Set of constants representing the allowable values for FastConnectProviderServiceCustomerAsnManagementEnum +const ( + FastConnectProviderServiceCustomerAsnManagementCustomerManaged FastConnectProviderServiceCustomerAsnManagementEnum = "CUSTOMER_MANAGED" + FastConnectProviderServiceCustomerAsnManagementProviderManaged FastConnectProviderServiceCustomerAsnManagementEnum = "PROVIDER_MANAGED" + FastConnectProviderServiceCustomerAsnManagementOracleManaged FastConnectProviderServiceCustomerAsnManagementEnum = "ORACLE_MANAGED" +) + +var mappingFastConnectProviderServiceCustomerAsnManagementEnum = map[string]FastConnectProviderServiceCustomerAsnManagementEnum{ + "CUSTOMER_MANAGED": FastConnectProviderServiceCustomerAsnManagementCustomerManaged, + "PROVIDER_MANAGED": FastConnectProviderServiceCustomerAsnManagementProviderManaged, + "ORACLE_MANAGED": FastConnectProviderServiceCustomerAsnManagementOracleManaged, +} + +var mappingFastConnectProviderServiceCustomerAsnManagementEnumLowerCase = map[string]FastConnectProviderServiceCustomerAsnManagementEnum{ + "customer_managed": FastConnectProviderServiceCustomerAsnManagementCustomerManaged, + "provider_managed": FastConnectProviderServiceCustomerAsnManagementProviderManaged, + "oracle_managed": FastConnectProviderServiceCustomerAsnManagementOracleManaged, +} + +// GetFastConnectProviderServiceCustomerAsnManagementEnumValues Enumerates the set of values for FastConnectProviderServiceCustomerAsnManagementEnum +func GetFastConnectProviderServiceCustomerAsnManagementEnumValues() []FastConnectProviderServiceCustomerAsnManagementEnum { + values := make([]FastConnectProviderServiceCustomerAsnManagementEnum, 0) + for _, v := range mappingFastConnectProviderServiceCustomerAsnManagementEnum { + values = append(values, v) + } + return values +} + +// GetFastConnectProviderServiceCustomerAsnManagementEnumStringValues Enumerates the set of values in String for FastConnectProviderServiceCustomerAsnManagementEnum +func GetFastConnectProviderServiceCustomerAsnManagementEnumStringValues() []string { + return []string{ + "CUSTOMER_MANAGED", + "PROVIDER_MANAGED", + "ORACLE_MANAGED", + } +} + +// GetMappingFastConnectProviderServiceCustomerAsnManagementEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFastConnectProviderServiceCustomerAsnManagementEnum(val string) (FastConnectProviderServiceCustomerAsnManagementEnum, bool) { + enum, ok := mappingFastConnectProviderServiceCustomerAsnManagementEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// FastConnectProviderServiceProviderServiceKeyManagementEnum Enum with underlying type: string +type FastConnectProviderServiceProviderServiceKeyManagementEnum string + +// Set of constants representing the allowable values for FastConnectProviderServiceProviderServiceKeyManagementEnum +const ( + FastConnectProviderServiceProviderServiceKeyManagementCustomerManaged FastConnectProviderServiceProviderServiceKeyManagementEnum = "CUSTOMER_MANAGED" + FastConnectProviderServiceProviderServiceKeyManagementProviderManaged FastConnectProviderServiceProviderServiceKeyManagementEnum = "PROVIDER_MANAGED" + FastConnectProviderServiceProviderServiceKeyManagementOracleManaged FastConnectProviderServiceProviderServiceKeyManagementEnum = "ORACLE_MANAGED" +) + +var mappingFastConnectProviderServiceProviderServiceKeyManagementEnum = map[string]FastConnectProviderServiceProviderServiceKeyManagementEnum{ + "CUSTOMER_MANAGED": FastConnectProviderServiceProviderServiceKeyManagementCustomerManaged, + "PROVIDER_MANAGED": FastConnectProviderServiceProviderServiceKeyManagementProviderManaged, + "ORACLE_MANAGED": FastConnectProviderServiceProviderServiceKeyManagementOracleManaged, +} + +var mappingFastConnectProviderServiceProviderServiceKeyManagementEnumLowerCase = map[string]FastConnectProviderServiceProviderServiceKeyManagementEnum{ + "customer_managed": FastConnectProviderServiceProviderServiceKeyManagementCustomerManaged, + "provider_managed": FastConnectProviderServiceProviderServiceKeyManagementProviderManaged, + "oracle_managed": FastConnectProviderServiceProviderServiceKeyManagementOracleManaged, +} + +// GetFastConnectProviderServiceProviderServiceKeyManagementEnumValues Enumerates the set of values for FastConnectProviderServiceProviderServiceKeyManagementEnum +func GetFastConnectProviderServiceProviderServiceKeyManagementEnumValues() []FastConnectProviderServiceProviderServiceKeyManagementEnum { + values := make([]FastConnectProviderServiceProviderServiceKeyManagementEnum, 0) + for _, v := range mappingFastConnectProviderServiceProviderServiceKeyManagementEnum { + values = append(values, v) + } + return values +} + +// GetFastConnectProviderServiceProviderServiceKeyManagementEnumStringValues Enumerates the set of values in String for FastConnectProviderServiceProviderServiceKeyManagementEnum +func GetFastConnectProviderServiceProviderServiceKeyManagementEnumStringValues() []string { + return []string{ + "CUSTOMER_MANAGED", + "PROVIDER_MANAGED", + "ORACLE_MANAGED", + } +} + +// GetMappingFastConnectProviderServiceProviderServiceKeyManagementEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFastConnectProviderServiceProviderServiceKeyManagementEnum(val string) (FastConnectProviderServiceProviderServiceKeyManagementEnum, bool) { + enum, ok := mappingFastConnectProviderServiceProviderServiceKeyManagementEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// FastConnectProviderServiceBandwithShapeManagementEnum Enum with underlying type: string +type FastConnectProviderServiceBandwithShapeManagementEnum string + +// Set of constants representing the allowable values for FastConnectProviderServiceBandwithShapeManagementEnum +const ( + FastConnectProviderServiceBandwithShapeManagementCustomerManaged FastConnectProviderServiceBandwithShapeManagementEnum = "CUSTOMER_MANAGED" + FastConnectProviderServiceBandwithShapeManagementProviderManaged FastConnectProviderServiceBandwithShapeManagementEnum = "PROVIDER_MANAGED" + FastConnectProviderServiceBandwithShapeManagementOracleManaged FastConnectProviderServiceBandwithShapeManagementEnum = "ORACLE_MANAGED" +) + +var mappingFastConnectProviderServiceBandwithShapeManagementEnum = map[string]FastConnectProviderServiceBandwithShapeManagementEnum{ + "CUSTOMER_MANAGED": FastConnectProviderServiceBandwithShapeManagementCustomerManaged, + "PROVIDER_MANAGED": FastConnectProviderServiceBandwithShapeManagementProviderManaged, + "ORACLE_MANAGED": FastConnectProviderServiceBandwithShapeManagementOracleManaged, +} + +var mappingFastConnectProviderServiceBandwithShapeManagementEnumLowerCase = map[string]FastConnectProviderServiceBandwithShapeManagementEnum{ + "customer_managed": FastConnectProviderServiceBandwithShapeManagementCustomerManaged, + "provider_managed": FastConnectProviderServiceBandwithShapeManagementProviderManaged, + "oracle_managed": FastConnectProviderServiceBandwithShapeManagementOracleManaged, +} + +// GetFastConnectProviderServiceBandwithShapeManagementEnumValues Enumerates the set of values for FastConnectProviderServiceBandwithShapeManagementEnum +func GetFastConnectProviderServiceBandwithShapeManagementEnumValues() []FastConnectProviderServiceBandwithShapeManagementEnum { + values := make([]FastConnectProviderServiceBandwithShapeManagementEnum, 0) + for _, v := range mappingFastConnectProviderServiceBandwithShapeManagementEnum { + values = append(values, v) + } + return values +} + +// GetFastConnectProviderServiceBandwithShapeManagementEnumStringValues Enumerates the set of values in String for FastConnectProviderServiceBandwithShapeManagementEnum +func GetFastConnectProviderServiceBandwithShapeManagementEnumStringValues() []string { + return []string{ + "CUSTOMER_MANAGED", + "PROVIDER_MANAGED", + "ORACLE_MANAGED", + } +} + +// GetMappingFastConnectProviderServiceBandwithShapeManagementEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFastConnectProviderServiceBandwithShapeManagementEnum(val string) (FastConnectProviderServiceBandwithShapeManagementEnum, bool) { + enum, ok := mappingFastConnectProviderServiceBandwithShapeManagementEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// FastConnectProviderServiceTypeEnum Enum with underlying type: string +type FastConnectProviderServiceTypeEnum string + +// Set of constants representing the allowable values for FastConnectProviderServiceTypeEnum +const ( + FastConnectProviderServiceTypeLayer2 FastConnectProviderServiceTypeEnum = "LAYER2" + FastConnectProviderServiceTypeLayer3 FastConnectProviderServiceTypeEnum = "LAYER3" +) + +var mappingFastConnectProviderServiceTypeEnum = map[string]FastConnectProviderServiceTypeEnum{ + "LAYER2": FastConnectProviderServiceTypeLayer2, + "LAYER3": FastConnectProviderServiceTypeLayer3, +} + +var mappingFastConnectProviderServiceTypeEnumLowerCase = map[string]FastConnectProviderServiceTypeEnum{ + "layer2": FastConnectProviderServiceTypeLayer2, + "layer3": FastConnectProviderServiceTypeLayer3, +} + +// GetFastConnectProviderServiceTypeEnumValues Enumerates the set of values for FastConnectProviderServiceTypeEnum +func GetFastConnectProviderServiceTypeEnumValues() []FastConnectProviderServiceTypeEnum { + values := make([]FastConnectProviderServiceTypeEnum, 0) + for _, v := range mappingFastConnectProviderServiceTypeEnum { + values = append(values, v) + } + return values +} + +// GetFastConnectProviderServiceTypeEnumStringValues Enumerates the set of values in String for FastConnectProviderServiceTypeEnum +func GetFastConnectProviderServiceTypeEnumStringValues() []string { + return []string{ + "LAYER2", + "LAYER3", + } +} + +// GetMappingFastConnectProviderServiceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFastConnectProviderServiceTypeEnum(val string) (FastConnectProviderServiceTypeEnum, bool) { + enum, ok := mappingFastConnectProviderServiceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/fast_connect_provider_service_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/fast_connect_provider_service_key.go new file mode 100644 index 000000000..468a53dbf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/fast_connect_provider_service_key.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FastConnectProviderServiceKey A provider service key and its details. A provider service key is an identifier for a provider's +// virtual circuit. +type FastConnectProviderServiceKey struct { + + // The service key that the provider gives you when you set up a virtual circuit connection + // from the provider to Oracle Cloud Infrastructure. Use this value as the `providerServiceKeyName` + // query parameter for + // GetFastConnectProviderServiceKey. + Name *string `mandatory:"true" json:"name"` + + // The provisioned data rate of the connection. To get a list of the + // available bandwidth levels (that is, shapes), see + // ListFastConnectProviderVirtualCircuitBandwidthShapes. + // Example: `10 Gbps` + BandwidthShapeName *string `mandatory:"false" json:"bandwidthShapeName"` + + // The provider's peering location. + PeeringLocation *string `mandatory:"false" json:"peeringLocation"` +} + +func (m FastConnectProviderServiceKey) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FastConnectProviderServiceKey) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/firmware_bundle.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/firmware_bundle.go new file mode 100644 index 000000000..5173a76e5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/firmware_bundle.go @@ -0,0 +1,119 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FirmwareBundle A collection of pinned component firmware versions organized by platform. +type FirmwareBundle struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of this firmware bundle. + Id *string `mandatory:"true" json:"id"` + + // The user-friendly name of this firmware bundle. + DisplayName *string `mandatory:"true" json:"displayName"` + + // A brief description or metadata about this firmware bundle. + Description *string `mandatory:"true" json:"description"` + + // A map of platforms to pinned firmware versions. + Platforms []PlatformVersions `mandatory:"true" json:"platforms"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment of this firmware bundle. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The date and time the firmware bundle was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time the firmware bundle was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The current state of the firmware bundle. + LifecycleState FirmwareBundleLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + AllowableTransitions *FirmwareBundleTransitions `mandatory:"false" json:"allowableTransitions"` +} + +func (m FirmwareBundle) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FirmwareBundle) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingFirmwareBundleLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetFirmwareBundleLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// FirmwareBundleLifecycleStateEnum Enum with underlying type: string +type FirmwareBundleLifecycleStateEnum string + +// Set of constants representing the allowable values for FirmwareBundleLifecycleStateEnum +const ( + FirmwareBundleLifecycleStateActive FirmwareBundleLifecycleStateEnum = "ACTIVE" + FirmwareBundleLifecycleStateInactive FirmwareBundleLifecycleStateEnum = "INACTIVE" + FirmwareBundleLifecycleStateDeleteScheduled FirmwareBundleLifecycleStateEnum = "DELETE_SCHEDULED" +) + +var mappingFirmwareBundleLifecycleStateEnum = map[string]FirmwareBundleLifecycleStateEnum{ + "ACTIVE": FirmwareBundleLifecycleStateActive, + "INACTIVE": FirmwareBundleLifecycleStateInactive, + "DELETE_SCHEDULED": FirmwareBundleLifecycleStateDeleteScheduled, +} + +var mappingFirmwareBundleLifecycleStateEnumLowerCase = map[string]FirmwareBundleLifecycleStateEnum{ + "active": FirmwareBundleLifecycleStateActive, + "inactive": FirmwareBundleLifecycleStateInactive, + "delete_scheduled": FirmwareBundleLifecycleStateDeleteScheduled, +} + +// GetFirmwareBundleLifecycleStateEnumValues Enumerates the set of values for FirmwareBundleLifecycleStateEnum +func GetFirmwareBundleLifecycleStateEnumValues() []FirmwareBundleLifecycleStateEnum { + values := make([]FirmwareBundleLifecycleStateEnum, 0) + for _, v := range mappingFirmwareBundleLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetFirmwareBundleLifecycleStateEnumStringValues Enumerates the set of values in String for FirmwareBundleLifecycleStateEnum +func GetFirmwareBundleLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + "DELETE_SCHEDULED", + } +} + +// GetMappingFirmwareBundleLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFirmwareBundleLifecycleStateEnum(val string) (FirmwareBundleLifecycleStateEnum, bool) { + enum, ok := mappingFirmwareBundleLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/firmware_bundle_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/firmware_bundle_summary.go new file mode 100644 index 000000000..088ab4c58 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/firmware_bundle_summary.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FirmwareBundleSummary Summary of a firmware bundle, returned in list operations. +type FirmwareBundleSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of this firmware bundle. + Id *string `mandatory:"true" json:"id"` + + // The user-friendly name of this firmware bundle. + DisplayName *string `mandatory:"true" json:"displayName"` + + // A map of platforms to pinned firmware versions. + Platforms []PlatformVersions `mandatory:"true" json:"platforms"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment of this firmware bundle. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The date and time the firmware bundle was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time the firmware bundle was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The current state of the firmware bundle. + LifecycleState FirmwareBundleLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // A brief description or metadata about this firmware bundle. + Description *string `mandatory:"false" json:"description"` + + AllowableTransitions *FirmwareBundleTransitions `mandatory:"false" json:"allowableTransitions"` +} + +func (m FirmwareBundleSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FirmwareBundleSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingFirmwareBundleLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetFirmwareBundleLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/firmware_bundle_transitions.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/firmware_bundle_transitions.go new file mode 100644 index 000000000..ebe517222 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/firmware_bundle_transitions.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FirmwareBundleTransitions A map of firmware bundle upgrades/downgrades validated by OCI. +type FirmwareBundleTransitions struct { + + // An array of OCIDs (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of validated firmware bundle upgrades. + Upgrades []string `mandatory:"false" json:"upgrades"` + + // An array of OCIDs (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of validated firmware bundle downgrades. + Downgrades []string `mandatory:"false" json:"downgrades"` +} + +func (m FirmwareBundleTransitions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FirmwareBundleTransitions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/firmware_bundles_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/firmware_bundles_collection.go new file mode 100644 index 000000000..acc03f78b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/firmware_bundles_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FirmwareBundlesCollection Results of a firmwareBundles search. Contains FirmwareBundleSummary items. +type FirmwareBundlesCollection struct { + + // List of firmwareBundleSummary objects. + Items []FirmwareBundleSummary `mandatory:"true" json:"items"` +} + +func (m FirmwareBundlesCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FirmwareBundlesCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/flow_log_capture_filter_rule_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/flow_log_capture_filter_rule_details.go new file mode 100644 index 000000000..86cdbcbd9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/flow_log_capture_filter_rule_details.go @@ -0,0 +1,167 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FlowLogCaptureFilterRuleDetails The set of rules governing what traffic the VCN flow log collects. +type FlowLogCaptureFilterRuleDetails struct { + + // Indicates whether a VCN flow log capture filter rule is enabled. + IsEnabled *bool `mandatory:"false" json:"isEnabled"` + + // A lower number indicates a higher priority, range 0-9. Each rule must have a distinct priority. + Priority *int `mandatory:"false" json:"priority"` + + // Sampling interval as `1` of `X`, where `X` is an integer not greater than `100000`. + SamplingRate *int `mandatory:"false" json:"samplingRate"` + + // Traffic from this CIDR will be captured in the VCN flow log. + SourceCidr *string `mandatory:"false" json:"sourceCidr"` + + // Traffic to this CIDR will be captured in the VCN flow log. + DestinationCidr *string `mandatory:"false" json:"destinationCidr"` + + // The transport protocol the filter uses. + Protocol *string `mandatory:"false" json:"protocol"` + + IcmpOptions *IcmpOptions `mandatory:"false" json:"icmpOptions"` + + TcpOptions *TcpOptions `mandatory:"false" json:"tcpOptions"` + + UdpOptions *UdpOptions `mandatory:"false" json:"udpOptions"` + + // Type or types of VCN flow logs to store. `ALL` includes records for both accepted traffic and + // rejected traffic. + FlowLogType FlowLogCaptureFilterRuleDetailsFlowLogTypeEnum `mandatory:"false" json:"flowLogType,omitempty"` + + // Include or exclude a `ruleAction` object. + RuleAction FlowLogCaptureFilterRuleDetailsRuleActionEnum `mandatory:"false" json:"ruleAction,omitempty"` +} + +func (m FlowLogCaptureFilterRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FlowLogCaptureFilterRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingFlowLogCaptureFilterRuleDetailsFlowLogTypeEnum(string(m.FlowLogType)); !ok && m.FlowLogType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FlowLogType: %s. Supported values are: %s.", m.FlowLogType, strings.Join(GetFlowLogCaptureFilterRuleDetailsFlowLogTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingFlowLogCaptureFilterRuleDetailsRuleActionEnum(string(m.RuleAction)); !ok && m.RuleAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RuleAction: %s. Supported values are: %s.", m.RuleAction, strings.Join(GetFlowLogCaptureFilterRuleDetailsRuleActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// FlowLogCaptureFilterRuleDetailsFlowLogTypeEnum Enum with underlying type: string +type FlowLogCaptureFilterRuleDetailsFlowLogTypeEnum string + +// Set of constants representing the allowable values for FlowLogCaptureFilterRuleDetailsFlowLogTypeEnum +const ( + FlowLogCaptureFilterRuleDetailsFlowLogTypeAll FlowLogCaptureFilterRuleDetailsFlowLogTypeEnum = "ALL" + FlowLogCaptureFilterRuleDetailsFlowLogTypeReject FlowLogCaptureFilterRuleDetailsFlowLogTypeEnum = "REJECT" + FlowLogCaptureFilterRuleDetailsFlowLogTypeAccept FlowLogCaptureFilterRuleDetailsFlowLogTypeEnum = "ACCEPT" +) + +var mappingFlowLogCaptureFilterRuleDetailsFlowLogTypeEnum = map[string]FlowLogCaptureFilterRuleDetailsFlowLogTypeEnum{ + "ALL": FlowLogCaptureFilterRuleDetailsFlowLogTypeAll, + "REJECT": FlowLogCaptureFilterRuleDetailsFlowLogTypeReject, + "ACCEPT": FlowLogCaptureFilterRuleDetailsFlowLogTypeAccept, +} + +var mappingFlowLogCaptureFilterRuleDetailsFlowLogTypeEnumLowerCase = map[string]FlowLogCaptureFilterRuleDetailsFlowLogTypeEnum{ + "all": FlowLogCaptureFilterRuleDetailsFlowLogTypeAll, + "reject": FlowLogCaptureFilterRuleDetailsFlowLogTypeReject, + "accept": FlowLogCaptureFilterRuleDetailsFlowLogTypeAccept, +} + +// GetFlowLogCaptureFilterRuleDetailsFlowLogTypeEnumValues Enumerates the set of values for FlowLogCaptureFilterRuleDetailsFlowLogTypeEnum +func GetFlowLogCaptureFilterRuleDetailsFlowLogTypeEnumValues() []FlowLogCaptureFilterRuleDetailsFlowLogTypeEnum { + values := make([]FlowLogCaptureFilterRuleDetailsFlowLogTypeEnum, 0) + for _, v := range mappingFlowLogCaptureFilterRuleDetailsFlowLogTypeEnum { + values = append(values, v) + } + return values +} + +// GetFlowLogCaptureFilterRuleDetailsFlowLogTypeEnumStringValues Enumerates the set of values in String for FlowLogCaptureFilterRuleDetailsFlowLogTypeEnum +func GetFlowLogCaptureFilterRuleDetailsFlowLogTypeEnumStringValues() []string { + return []string{ + "ALL", + "REJECT", + "ACCEPT", + } +} + +// GetMappingFlowLogCaptureFilterRuleDetailsFlowLogTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFlowLogCaptureFilterRuleDetailsFlowLogTypeEnum(val string) (FlowLogCaptureFilterRuleDetailsFlowLogTypeEnum, bool) { + enum, ok := mappingFlowLogCaptureFilterRuleDetailsFlowLogTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// FlowLogCaptureFilterRuleDetailsRuleActionEnum Enum with underlying type: string +type FlowLogCaptureFilterRuleDetailsRuleActionEnum string + +// Set of constants representing the allowable values for FlowLogCaptureFilterRuleDetailsRuleActionEnum +const ( + FlowLogCaptureFilterRuleDetailsRuleActionInclude FlowLogCaptureFilterRuleDetailsRuleActionEnum = "INCLUDE" + FlowLogCaptureFilterRuleDetailsRuleActionExclude FlowLogCaptureFilterRuleDetailsRuleActionEnum = "EXCLUDE" +) + +var mappingFlowLogCaptureFilterRuleDetailsRuleActionEnum = map[string]FlowLogCaptureFilterRuleDetailsRuleActionEnum{ + "INCLUDE": FlowLogCaptureFilterRuleDetailsRuleActionInclude, + "EXCLUDE": FlowLogCaptureFilterRuleDetailsRuleActionExclude, +} + +var mappingFlowLogCaptureFilterRuleDetailsRuleActionEnumLowerCase = map[string]FlowLogCaptureFilterRuleDetailsRuleActionEnum{ + "include": FlowLogCaptureFilterRuleDetailsRuleActionInclude, + "exclude": FlowLogCaptureFilterRuleDetailsRuleActionExclude, +} + +// GetFlowLogCaptureFilterRuleDetailsRuleActionEnumValues Enumerates the set of values for FlowLogCaptureFilterRuleDetailsRuleActionEnum +func GetFlowLogCaptureFilterRuleDetailsRuleActionEnumValues() []FlowLogCaptureFilterRuleDetailsRuleActionEnum { + values := make([]FlowLogCaptureFilterRuleDetailsRuleActionEnum, 0) + for _, v := range mappingFlowLogCaptureFilterRuleDetailsRuleActionEnum { + values = append(values, v) + } + return values +} + +// GetFlowLogCaptureFilterRuleDetailsRuleActionEnumStringValues Enumerates the set of values in String for FlowLogCaptureFilterRuleDetailsRuleActionEnum +func GetFlowLogCaptureFilterRuleDetailsRuleActionEnumStringValues() []string { + return []string{ + "INCLUDE", + "EXCLUDE", + } +} + +// GetMappingFlowLogCaptureFilterRuleDetailsRuleActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFlowLogCaptureFilterRuleDetailsRuleActionEnum(val string) (FlowLogCaptureFilterRuleDetailsRuleActionEnum, bool) { + enum, ok := mappingFlowLogCaptureFilterRuleDetailsRuleActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/generic_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/generic_bm_launch_instance_platform_config.go new file mode 100644 index 000000000..f3a85346c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/generic_bm_launch_instance_platform_config.go @@ -0,0 +1,179 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenericBmLaunchInstancePlatformConfig The standard platform configuration to be used when launching a bare metal instance. +type GenericBmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m GenericBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m GenericBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m GenericBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m GenericBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m GenericBmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GenericBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m GenericBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeGenericBmLaunchInstancePlatformConfig GenericBmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeGenericBmLaunchInstancePlatformConfig + }{ + "GENERIC_BM", + (MarshalTypeGenericBmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0 GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS0" + GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" + GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4 GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS4" + GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6 GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS0": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "NPS1": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "NPS4": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "NPS6": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +var mappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps0": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "nps1": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "nps4": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "nps6": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +// GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/generic_bm_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/generic_bm_platform_config.go new file mode 100644 index 000000000..c18b94a5c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/generic_bm_platform_config.go @@ -0,0 +1,179 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenericBmPlatformConfig The standard platform configuration of a bare metal instance. +type GenericBmPlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket GenericBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m GenericBmPlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m GenericBmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m GenericBmPlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m GenericBmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m GenericBmPlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GenericBmPlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGenericBmPlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetGenericBmPlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m GenericBmPlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeGenericBmPlatformConfig GenericBmPlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeGenericBmPlatformConfig + }{ + "GENERIC_BM", + (MarshalTypeGenericBmPlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// GenericBmPlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type GenericBmPlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for GenericBmPlatformConfigNumaNodesPerSocketEnum +const ( + GenericBmPlatformConfigNumaNodesPerSocketNps0 GenericBmPlatformConfigNumaNodesPerSocketEnum = "NPS0" + GenericBmPlatformConfigNumaNodesPerSocketNps1 GenericBmPlatformConfigNumaNodesPerSocketEnum = "NPS1" + GenericBmPlatformConfigNumaNodesPerSocketNps2 GenericBmPlatformConfigNumaNodesPerSocketEnum = "NPS2" + GenericBmPlatformConfigNumaNodesPerSocketNps4 GenericBmPlatformConfigNumaNodesPerSocketEnum = "NPS4" + GenericBmPlatformConfigNumaNodesPerSocketNps6 GenericBmPlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingGenericBmPlatformConfigNumaNodesPerSocketEnum = map[string]GenericBmPlatformConfigNumaNodesPerSocketEnum{ + "NPS0": GenericBmPlatformConfigNumaNodesPerSocketNps0, + "NPS1": GenericBmPlatformConfigNumaNodesPerSocketNps1, + "NPS2": GenericBmPlatformConfigNumaNodesPerSocketNps2, + "NPS4": GenericBmPlatformConfigNumaNodesPerSocketNps4, + "NPS6": GenericBmPlatformConfigNumaNodesPerSocketNps6, +} + +var mappingGenericBmPlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]GenericBmPlatformConfigNumaNodesPerSocketEnum{ + "nps0": GenericBmPlatformConfigNumaNodesPerSocketNps0, + "nps1": GenericBmPlatformConfigNumaNodesPerSocketNps1, + "nps2": GenericBmPlatformConfigNumaNodesPerSocketNps2, + "nps4": GenericBmPlatformConfigNumaNodesPerSocketNps4, + "nps6": GenericBmPlatformConfigNumaNodesPerSocketNps6, +} + +// GetGenericBmPlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for GenericBmPlatformConfigNumaNodesPerSocketEnum +func GetGenericBmPlatformConfigNumaNodesPerSocketEnumValues() []GenericBmPlatformConfigNumaNodesPerSocketEnum { + values := make([]GenericBmPlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingGenericBmPlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetGenericBmPlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for GenericBmPlatformConfigNumaNodesPerSocketEnum +func GetGenericBmPlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingGenericBmPlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGenericBmPlatformConfigNumaNodesPerSocketEnum(val string) (GenericBmPlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingGenericBmPlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_all_drg_attachments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_all_drg_attachments_request_response.go new file mode 100644 index 000000000..842103e8a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_all_drg_attachments_request_response.go @@ -0,0 +1,170 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetAllDrgAttachmentsRequest wrapper for the GetAllDrgAttachments operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAllDrgAttachments.go.html to see an example of how to use GetAllDrgAttachmentsRequest. +type GetAllDrgAttachmentsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"true" contributesTo:"path" name:"drgId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The type for the network resource attached to the DRG. + AttachmentType GetAllDrgAttachmentsAttachmentTypeEnum `mandatory:"false" contributesTo:"query" name:"attachmentType" omitEmpty:"true"` + + // Whether the DRG attachment lives in a different tenancy than the DRG. + IsCrossTenancy *bool `mandatory:"false" contributesTo:"query" name:"isCrossTenancy"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetAllDrgAttachmentsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetAllDrgAttachmentsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetAllDrgAttachmentsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetAllDrgAttachmentsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetAllDrgAttachmentsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGetAllDrgAttachmentsAttachmentTypeEnum(string(request.AttachmentType)); !ok && request.AttachmentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttachmentType: %s. Supported values are: %s.", request.AttachmentType, strings.Join(GetGetAllDrgAttachmentsAttachmentTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetAllDrgAttachmentsResponse wrapper for the GetAllDrgAttachments operation +type GetAllDrgAttachmentsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []DrgAttachmentInfo instances + Items []DrgAttachmentInfo `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetAllDrgAttachmentsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetAllDrgAttachmentsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetAllDrgAttachmentsAttachmentTypeEnum Enum with underlying type: string +type GetAllDrgAttachmentsAttachmentTypeEnum string + +// Set of constants representing the allowable values for GetAllDrgAttachmentsAttachmentTypeEnum +const ( + GetAllDrgAttachmentsAttachmentTypeVcn GetAllDrgAttachmentsAttachmentTypeEnum = "VCN" + GetAllDrgAttachmentsAttachmentTypeVirtualCircuit GetAllDrgAttachmentsAttachmentTypeEnum = "VIRTUAL_CIRCUIT" + GetAllDrgAttachmentsAttachmentTypeRemotePeeringConnection GetAllDrgAttachmentsAttachmentTypeEnum = "REMOTE_PEERING_CONNECTION" + GetAllDrgAttachmentsAttachmentTypeIpsecTunnel GetAllDrgAttachmentsAttachmentTypeEnum = "IPSEC_TUNNEL" + GetAllDrgAttachmentsAttachmentTypeAll GetAllDrgAttachmentsAttachmentTypeEnum = "ALL" +) + +var mappingGetAllDrgAttachmentsAttachmentTypeEnum = map[string]GetAllDrgAttachmentsAttachmentTypeEnum{ + "VCN": GetAllDrgAttachmentsAttachmentTypeVcn, + "VIRTUAL_CIRCUIT": GetAllDrgAttachmentsAttachmentTypeVirtualCircuit, + "REMOTE_PEERING_CONNECTION": GetAllDrgAttachmentsAttachmentTypeRemotePeeringConnection, + "IPSEC_TUNNEL": GetAllDrgAttachmentsAttachmentTypeIpsecTunnel, + "ALL": GetAllDrgAttachmentsAttachmentTypeAll, +} + +var mappingGetAllDrgAttachmentsAttachmentTypeEnumLowerCase = map[string]GetAllDrgAttachmentsAttachmentTypeEnum{ + "vcn": GetAllDrgAttachmentsAttachmentTypeVcn, + "virtual_circuit": GetAllDrgAttachmentsAttachmentTypeVirtualCircuit, + "remote_peering_connection": GetAllDrgAttachmentsAttachmentTypeRemotePeeringConnection, + "ipsec_tunnel": GetAllDrgAttachmentsAttachmentTypeIpsecTunnel, + "all": GetAllDrgAttachmentsAttachmentTypeAll, +} + +// GetGetAllDrgAttachmentsAttachmentTypeEnumValues Enumerates the set of values for GetAllDrgAttachmentsAttachmentTypeEnum +func GetGetAllDrgAttachmentsAttachmentTypeEnumValues() []GetAllDrgAttachmentsAttachmentTypeEnum { + values := make([]GetAllDrgAttachmentsAttachmentTypeEnum, 0) + for _, v := range mappingGetAllDrgAttachmentsAttachmentTypeEnum { + values = append(values, v) + } + return values +} + +// GetGetAllDrgAttachmentsAttachmentTypeEnumStringValues Enumerates the set of values in String for GetAllDrgAttachmentsAttachmentTypeEnum +func GetGetAllDrgAttachmentsAttachmentTypeEnumStringValues() []string { + return []string{ + "VCN", + "VIRTUAL_CIRCUIT", + "REMOTE_PEERING_CONNECTION", + "IPSEC_TUNNEL", + "ALL", + } +} + +// GetMappingGetAllDrgAttachmentsAttachmentTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetAllDrgAttachmentsAttachmentTypeEnum(val string) (GetAllDrgAttachmentsAttachmentTypeEnum, bool) { + enum, ok := mappingGetAllDrgAttachmentsAttachmentTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_allowed_ike_i_p_sec_parameters_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_allowed_ike_i_p_sec_parameters_request_response.go new file mode 100644 index 000000000..801b943c9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_allowed_ike_i_p_sec_parameters_request_response.go @@ -0,0 +1,88 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetAllowedIkeIPSecParametersRequest wrapper for the GetAllowedIkeIPSecParameters operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAllowedIkeIPSecParameters.go.html to see an example of how to use GetAllowedIkeIPSecParametersRequest. +type GetAllowedIkeIPSecParametersRequest struct { + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetAllowedIkeIPSecParametersRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetAllowedIkeIPSecParametersRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetAllowedIkeIPSecParametersRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetAllowedIkeIPSecParametersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetAllowedIkeIPSecParametersRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetAllowedIkeIPSecParametersResponse wrapper for the GetAllowedIkeIPSecParameters operation +type GetAllowedIkeIPSecParametersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The AllowedIkeIpSecParameters instance + AllowedIkeIpSecParameters `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetAllowedIkeIPSecParametersResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetAllowedIkeIPSecParametersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_app_catalog_listing_agreements_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_app_catalog_listing_agreements_request_response.go new file mode 100644 index 000000000..81cae9496 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_app_catalog_listing_agreements_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetAppCatalogListingAgreementsRequest wrapper for the GetAppCatalogListingAgreements operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAppCatalogListingAgreements.go.html to see an example of how to use GetAppCatalogListingAgreementsRequest. +type GetAppCatalogListingAgreementsRequest struct { + + // The OCID of the listing. + ListingId *string `mandatory:"true" contributesTo:"path" name:"listingId"` + + // Listing Resource Version. + ResourceVersion *string `mandatory:"true" contributesTo:"path" name:"resourceVersion"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetAppCatalogListingAgreementsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetAppCatalogListingAgreementsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetAppCatalogListingAgreementsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetAppCatalogListingAgreementsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetAppCatalogListingAgreementsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetAppCatalogListingAgreementsResponse wrapper for the GetAppCatalogListingAgreements operation +type GetAppCatalogListingAgreementsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The AppCatalogListingResourceVersionAgreements instance + AppCatalogListingResourceVersionAgreements `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetAppCatalogListingAgreementsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetAppCatalogListingAgreementsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_app_catalog_listing_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_app_catalog_listing_request_response.go new file mode 100644 index 000000000..1f3d68049 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_app_catalog_listing_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetAppCatalogListingRequest wrapper for the GetAppCatalogListing operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAppCatalogListing.go.html to see an example of how to use GetAppCatalogListingRequest. +type GetAppCatalogListingRequest struct { + + // The OCID of the listing. + ListingId *string `mandatory:"true" contributesTo:"path" name:"listingId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetAppCatalogListingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetAppCatalogListingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetAppCatalogListingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetAppCatalogListingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetAppCatalogListingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetAppCatalogListingResponse wrapper for the GetAppCatalogListing operation +type GetAppCatalogListingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The AppCatalogListing instance + AppCatalogListing `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetAppCatalogListingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetAppCatalogListingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_app_catalog_listing_resource_version_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_app_catalog_listing_resource_version_request_response.go new file mode 100644 index 000000000..6e6c1cbc2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_app_catalog_listing_resource_version_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetAppCatalogListingResourceVersionRequest wrapper for the GetAppCatalogListingResourceVersion operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetAppCatalogListingResourceVersion.go.html to see an example of how to use GetAppCatalogListingResourceVersionRequest. +type GetAppCatalogListingResourceVersionRequest struct { + + // The OCID of the listing. + ListingId *string `mandatory:"true" contributesTo:"path" name:"listingId"` + + // Listing Resource Version. + ResourceVersion *string `mandatory:"true" contributesTo:"path" name:"resourceVersion"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetAppCatalogListingResourceVersionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetAppCatalogListingResourceVersionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetAppCatalogListingResourceVersionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetAppCatalogListingResourceVersionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetAppCatalogListingResourceVersionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetAppCatalogListingResourceVersionResponse wrapper for the GetAppCatalogListingResourceVersion operation +type GetAppCatalogListingResourceVersionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The AppCatalogListingResourceVersion instance + AppCatalogListingResourceVersion `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetAppCatalogListingResourceVersionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetAppCatalogListingResourceVersionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_block_volume_replica_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_block_volume_replica_request_response.go new file mode 100644 index 000000000..2fdbca720 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_block_volume_replica_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetBlockVolumeReplicaRequest wrapper for the GetBlockVolumeReplica operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBlockVolumeReplica.go.html to see an example of how to use GetBlockVolumeReplicaRequest. +type GetBlockVolumeReplicaRequest struct { + + // The OCID of the block volume replica. + BlockVolumeReplicaId *string `mandatory:"true" contributesTo:"path" name:"blockVolumeReplicaId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetBlockVolumeReplicaRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetBlockVolumeReplicaRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetBlockVolumeReplicaRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBlockVolumeReplicaRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetBlockVolumeReplicaRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetBlockVolumeReplicaResponse wrapper for the GetBlockVolumeReplica operation +type GetBlockVolumeReplicaResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BlockVolumeReplica instance + BlockVolumeReplica `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetBlockVolumeReplicaResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetBlockVolumeReplicaResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_attachment_request_response.go new file mode 100644 index 000000000..04a1e5cc3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_attachment_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetBootVolumeAttachmentRequest wrapper for the GetBootVolumeAttachment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolumeAttachment.go.html to see an example of how to use GetBootVolumeAttachmentRequest. +type GetBootVolumeAttachmentRequest struct { + + // The OCID of the boot volume attachment. + BootVolumeAttachmentId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeAttachmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetBootVolumeAttachmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetBootVolumeAttachmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetBootVolumeAttachmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBootVolumeAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetBootVolumeAttachmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetBootVolumeAttachmentResponse wrapper for the GetBootVolumeAttachment operation +type GetBootVolumeAttachmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolumeAttachment instance + BootVolumeAttachment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetBootVolumeAttachmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetBootVolumeAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_backup_request_response.go new file mode 100644 index 000000000..15a394b53 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_backup_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetBootVolumeBackupRequest wrapper for the GetBootVolumeBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolumeBackup.go.html to see an example of how to use GetBootVolumeBackupRequest. +type GetBootVolumeBackupRequest struct { + + // The OCID of the boot volume backup. + BootVolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeBackupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetBootVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetBootVolumeBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetBootVolumeBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBootVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetBootVolumeBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetBootVolumeBackupResponse wrapper for the GetBootVolumeBackup operation +type GetBootVolumeBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolumeBackup instance + BootVolumeBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetBootVolumeBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetBootVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_kms_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_kms_key_request_response.go new file mode 100644 index 000000000..6358054c0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_kms_key_request_response.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetBootVolumeKmsKeyRequest wrapper for the GetBootVolumeKmsKey operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolumeKmsKey.go.html to see an example of how to use GetBootVolumeKmsKeyRequest. +type GetBootVolumeKmsKeyRequest struct { + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetBootVolumeKmsKeyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetBootVolumeKmsKeyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetBootVolumeKmsKeyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBootVolumeKmsKeyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetBootVolumeKmsKeyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetBootVolumeKmsKeyResponse wrapper for the GetBootVolumeKmsKey operation +type GetBootVolumeKmsKeyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolumeKmsKey instance + BootVolumeKmsKey `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetBootVolumeKmsKeyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetBootVolumeKmsKeyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_replica_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_replica_request_response.go new file mode 100644 index 000000000..d453d9948 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_replica_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetBootVolumeReplicaRequest wrapper for the GetBootVolumeReplica operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolumeReplica.go.html to see an example of how to use GetBootVolumeReplicaRequest. +type GetBootVolumeReplicaRequest struct { + + // The OCID of the boot volume replica. + BootVolumeReplicaId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeReplicaId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetBootVolumeReplicaRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetBootVolumeReplicaRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetBootVolumeReplicaRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBootVolumeReplicaRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetBootVolumeReplicaRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetBootVolumeReplicaResponse wrapper for the GetBootVolumeReplica operation +type GetBootVolumeReplicaResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolumeReplica instance + BootVolumeReplica `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetBootVolumeReplicaResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetBootVolumeReplicaResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_request_response.go new file mode 100644 index 000000000..83f74d744 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_boot_volume_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetBootVolumeRequest wrapper for the GetBootVolume operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetBootVolume.go.html to see an example of how to use GetBootVolumeRequest. +type GetBootVolumeRequest struct { + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetBootVolumeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetBootVolumeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetBootVolumeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBootVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetBootVolumeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetBootVolumeResponse wrapper for the GetBootVolume operation +type GetBootVolumeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolume instance + BootVolume `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetBootVolumeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetBootVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_byoasn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_byoasn_request_response.go new file mode 100644 index 000000000..03a2777a8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_byoasn_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetByoasnRequest wrapper for the GetByoasn operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetByoasn.go.html to see an example of how to use GetByoasnRequest. +type GetByoasnRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `Byoasn` resource. + ByoasnId *string `mandatory:"true" contributesTo:"path" name:"byoasnId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetByoasnRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetByoasnRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetByoasnRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetByoasnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetByoasnRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetByoasnResponse wrapper for the GetByoasn operation +type GetByoasnResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Byoasn instance + Byoasn `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetByoasnResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetByoasnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_byoip_range_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_byoip_range_request_response.go new file mode 100644 index 000000000..4d096df31 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_byoip_range_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetByoipRangeRequest wrapper for the GetByoipRange operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetByoipRange.go.html to see an example of how to use GetByoipRangeRequest. +type GetByoipRangeRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource containing the BYOIP CIDR block. + ByoipRangeId *string `mandatory:"true" contributesTo:"path" name:"byoipRangeId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetByoipRangeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetByoipRangeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetByoipRangeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetByoipRangeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetByoipRangeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetByoipRangeResponse wrapper for the GetByoipRange operation +type GetByoipRangeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ByoipRange instance + ByoipRange `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetByoipRangeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetByoipRangeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_capture_filter_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_capture_filter_request_response.go new file mode 100644 index 000000000..8dddae6a6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_capture_filter_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetCaptureFilterRequest wrapper for the GetCaptureFilter operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCaptureFilter.go.html to see an example of how to use GetCaptureFilterRequest. +type GetCaptureFilterRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the capture filter. + CaptureFilterId *string `mandatory:"true" contributesTo:"path" name:"captureFilterId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCaptureFilterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCaptureFilterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetCaptureFilterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCaptureFilterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetCaptureFilterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCaptureFilterResponse wrapper for the GetCaptureFilter operation +type GetCaptureFilterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CaptureFilter instance + CaptureFilter `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetCaptureFilterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCaptureFilterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cluster_network_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cluster_network_request_response.go new file mode 100644 index 000000000..e8021623c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cluster_network_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetClusterNetworkRequest wrapper for the GetClusterNetwork operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetClusterNetwork.go.html to see an example of how to use GetClusterNetworkRequest. +type GetClusterNetworkRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster network. + ClusterNetworkId *string `mandatory:"true" contributesTo:"path" name:"clusterNetworkId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetClusterNetworkRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetClusterNetworkRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetClusterNetworkRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetClusterNetworkRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetClusterNetworkRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetClusterNetworkResponse wrapper for the GetClusterNetwork operation +type GetClusterNetworkResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ClusterNetwork instance + ClusterNetwork `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetClusterNetworkResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetClusterNetworkResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_capacity_reservation_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_capacity_reservation_request_response.go new file mode 100644 index 000000000..21b8e8144 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_capacity_reservation_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetComputeCapacityReservationRequest wrapper for the GetComputeCapacityReservation operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeCapacityReservation.go.html to see an example of how to use GetComputeCapacityReservationRequest. +type GetComputeCapacityReservationRequest struct { + + // The OCID of the compute capacity reservation. + CapacityReservationId *string `mandatory:"true" contributesTo:"path" name:"capacityReservationId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetComputeCapacityReservationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetComputeCapacityReservationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetComputeCapacityReservationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetComputeCapacityReservationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetComputeCapacityReservationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetComputeCapacityReservationResponse wrapper for the GetComputeCapacityReservation operation +type GetComputeCapacityReservationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeCapacityReservation instance + ComputeCapacityReservation `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetComputeCapacityReservationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetComputeCapacityReservationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_capacity_topology_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_capacity_topology_request_response.go new file mode 100644 index 000000000..ee576be2f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_capacity_topology_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetComputeCapacityTopologyRequest wrapper for the GetComputeCapacityTopology operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeCapacityTopology.go.html to see an example of how to use GetComputeCapacityTopologyRequest. +type GetComputeCapacityTopologyRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" contributesTo:"path" name:"computeCapacityTopologyId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetComputeCapacityTopologyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetComputeCapacityTopologyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetComputeCapacityTopologyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetComputeCapacityTopologyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetComputeCapacityTopologyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetComputeCapacityTopologyResponse wrapper for the GetComputeCapacityTopology operation +type GetComputeCapacityTopologyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeCapacityTopology instance + ComputeCapacityTopology `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetComputeCapacityTopologyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetComputeCapacityTopologyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_cluster_request_response.go new file mode 100644 index 000000000..9bba9b5de --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_cluster_request_response.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetComputeClusterRequest wrapper for the GetComputeCluster operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeCluster.go.html to see an example of how to use GetComputeClusterRequest. +type GetComputeClusterRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + // A compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + // access (RDMA) network group. + ComputeClusterId *string `mandatory:"true" contributesTo:"path" name:"computeClusterId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetComputeClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetComputeClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetComputeClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetComputeClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetComputeClusterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetComputeClusterResponse wrapper for the GetComputeCluster operation +type GetComputeClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeCluster instance + ComputeCluster `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetComputeClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetComputeClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_global_image_capability_schema_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_global_image_capability_schema_request_response.go new file mode 100644 index 000000000..67e014df9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_global_image_capability_schema_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetComputeGlobalImageCapabilitySchemaRequest wrapper for the GetComputeGlobalImageCapabilitySchema operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeGlobalImageCapabilitySchema.go.html to see an example of how to use GetComputeGlobalImageCapabilitySchemaRequest. +type GetComputeGlobalImageCapabilitySchemaRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute global image capability schema + ComputeGlobalImageCapabilitySchemaId *string `mandatory:"true" contributesTo:"path" name:"computeGlobalImageCapabilitySchemaId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetComputeGlobalImageCapabilitySchemaRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetComputeGlobalImageCapabilitySchemaRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetComputeGlobalImageCapabilitySchemaRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetComputeGlobalImageCapabilitySchemaRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetComputeGlobalImageCapabilitySchemaRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetComputeGlobalImageCapabilitySchemaResponse wrapper for the GetComputeGlobalImageCapabilitySchema operation +type GetComputeGlobalImageCapabilitySchemaResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeGlobalImageCapabilitySchema instance + ComputeGlobalImageCapabilitySchema `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetComputeGlobalImageCapabilitySchemaResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetComputeGlobalImageCapabilitySchemaResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_global_image_capability_schema_version_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_global_image_capability_schema_version_request_response.go new file mode 100644 index 000000000..21e6b067b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_global_image_capability_schema_version_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetComputeGlobalImageCapabilitySchemaVersionRequest wrapper for the GetComputeGlobalImageCapabilitySchemaVersion operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeGlobalImageCapabilitySchemaVersion.go.html to see an example of how to use GetComputeGlobalImageCapabilitySchemaVersionRequest. +type GetComputeGlobalImageCapabilitySchemaVersionRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute global image capability schema + ComputeGlobalImageCapabilitySchemaId *string `mandatory:"true" contributesTo:"path" name:"computeGlobalImageCapabilitySchemaId"` + + // The name of the compute global image capability schema version + ComputeGlobalImageCapabilitySchemaVersionName *string `mandatory:"true" contributesTo:"path" name:"computeGlobalImageCapabilitySchemaVersionName"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetComputeGlobalImageCapabilitySchemaVersionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetComputeGlobalImageCapabilitySchemaVersionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetComputeGlobalImageCapabilitySchemaVersionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetComputeGlobalImageCapabilitySchemaVersionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetComputeGlobalImageCapabilitySchemaVersionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetComputeGlobalImageCapabilitySchemaVersionResponse wrapper for the GetComputeGlobalImageCapabilitySchemaVersion operation +type GetComputeGlobalImageCapabilitySchemaVersionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeGlobalImageCapabilitySchemaVersion instance + ComputeGlobalImageCapabilitySchemaVersion `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetComputeGlobalImageCapabilitySchemaVersionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetComputeGlobalImageCapabilitySchemaVersionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_gpu_memory_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_gpu_memory_cluster_request_response.go new file mode 100644 index 000000000..b373065e9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_gpu_memory_cluster_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetComputeGpuMemoryClusterRequest wrapper for the GetComputeGpuMemoryCluster operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeGpuMemoryCluster.go.html to see an example of how to use GetComputeGpuMemoryClusterRequest. +type GetComputeGpuMemoryClusterRequest struct { + + // The OCID of the compute GPU memory cluster. + ComputeGpuMemoryClusterId *string `mandatory:"true" contributesTo:"path" name:"computeGpuMemoryClusterId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetComputeGpuMemoryClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetComputeGpuMemoryClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetComputeGpuMemoryClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetComputeGpuMemoryClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetComputeGpuMemoryClusterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetComputeGpuMemoryClusterResponse wrapper for the GetComputeGpuMemoryCluster operation +type GetComputeGpuMemoryClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeGpuMemoryCluster instance + ComputeGpuMemoryCluster `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetComputeGpuMemoryClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetComputeGpuMemoryClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_gpu_memory_fabric_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_gpu_memory_fabric_request_response.go new file mode 100644 index 000000000..67bd6a892 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_gpu_memory_fabric_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetComputeGpuMemoryFabricRequest wrapper for the GetComputeGpuMemoryFabric operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeGpuMemoryFabric.go.html to see an example of how to use GetComputeGpuMemoryFabricRequest. +type GetComputeGpuMemoryFabricRequest struct { + + // The OCID of the compute GPU memory fabric. + ComputeGpuMemoryFabricId *string `mandatory:"true" contributesTo:"path" name:"computeGpuMemoryFabricId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetComputeGpuMemoryFabricRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetComputeGpuMemoryFabricRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetComputeGpuMemoryFabricRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetComputeGpuMemoryFabricRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetComputeGpuMemoryFabricRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetComputeGpuMemoryFabricResponse wrapper for the GetComputeGpuMemoryFabric operation +type GetComputeGpuMemoryFabricResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeGpuMemoryFabric instance + ComputeGpuMemoryFabric `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetComputeGpuMemoryFabricResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetComputeGpuMemoryFabricResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_host_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_host_group_request_response.go new file mode 100644 index 000000000..7f7ebdfef --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_host_group_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetComputeHostGroupRequest wrapper for the GetComputeHostGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeHostGroup.go.html to see an example of how to use GetComputeHostGroupRequest. +type GetComputeHostGroupRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host group. + ComputeHostGroupId *string `mandatory:"true" contributesTo:"path" name:"computeHostGroupId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetComputeHostGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetComputeHostGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetComputeHostGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetComputeHostGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetComputeHostGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetComputeHostGroupResponse wrapper for the GetComputeHostGroup operation +type GetComputeHostGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeHostGroup instance + ComputeHostGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetComputeHostGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetComputeHostGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_host_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_host_request_response.go new file mode 100644 index 000000000..270a5f983 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_host_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetComputeHostRequest wrapper for the GetComputeHost operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeHost.go.html to see an example of how to use GetComputeHostRequest. +type GetComputeHostRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + ComputeHostId *string `mandatory:"true" contributesTo:"path" name:"computeHostId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetComputeHostRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetComputeHostRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetComputeHostRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetComputeHostRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetComputeHostRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetComputeHostResponse wrapper for the GetComputeHost operation +type GetComputeHostResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeHost instance + ComputeHost `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetComputeHostResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetComputeHostResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_image_capability_schema_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_image_capability_schema_request_response.go new file mode 100644 index 000000000..b7bd661d0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_compute_image_capability_schema_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetComputeImageCapabilitySchemaRequest wrapper for the GetComputeImageCapabilitySchema operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeImageCapabilitySchema.go.html to see an example of how to use GetComputeImageCapabilitySchemaRequest. +type GetComputeImageCapabilitySchemaRequest struct { + + // The id of the compute image capability schema or the image ocid + ComputeImageCapabilitySchemaId *string `mandatory:"true" contributesTo:"path" name:"computeImageCapabilitySchemaId"` + + // Merge the image capability schema with the global image capability schema + IsMergeEnabled *bool `mandatory:"false" contributesTo:"query" name:"isMergeEnabled"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetComputeImageCapabilitySchemaRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetComputeImageCapabilitySchemaRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetComputeImageCapabilitySchemaRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetComputeImageCapabilitySchemaRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetComputeImageCapabilitySchemaRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetComputeImageCapabilitySchemaResponse wrapper for the GetComputeImageCapabilitySchema operation +type GetComputeImageCapabilitySchemaResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeImageCapabilitySchema instance + ComputeImageCapabilitySchema `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetComputeImageCapabilitySchemaResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetComputeImageCapabilitySchemaResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_console_history_content_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_console_history_content_request_response.go new file mode 100644 index 000000000..efd1be1a7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_console_history_content_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetConsoleHistoryContentRequest wrapper for the GetConsoleHistoryContent operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetConsoleHistoryContent.go.html to see an example of how to use GetConsoleHistoryContentRequest. +type GetConsoleHistoryContentRequest struct { + + // The OCID of the console history. + InstanceConsoleHistoryId *string `mandatory:"true" contributesTo:"path" name:"instanceConsoleHistoryId"` + + // Offset of the snapshot data to retrieve. + Offset *int `mandatory:"false" contributesTo:"query" name:"offset"` + + // Length of the snapshot data to retrieve. + Length *int `mandatory:"false" contributesTo:"query" name:"length"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetConsoleHistoryContentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetConsoleHistoryContentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetConsoleHistoryContentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetConsoleHistoryContentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetConsoleHistoryContentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetConsoleHistoryContentResponse wrapper for the GetConsoleHistoryContent operation +type GetConsoleHistoryContentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The string instance + Value *string `presentIn:"body" encoding:"plain-text"` + + // The number of bytes remaining in the snapshot. + OpcBytesRemaining *int `presentIn:"header" name:"opc-bytes-remaining"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetConsoleHistoryContentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetConsoleHistoryContentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_console_history_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_console_history_request_response.go new file mode 100644 index 000000000..870225d3d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_console_history_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetConsoleHistoryRequest wrapper for the GetConsoleHistory operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetConsoleHistory.go.html to see an example of how to use GetConsoleHistoryRequest. +type GetConsoleHistoryRequest struct { + + // The OCID of the console history. + InstanceConsoleHistoryId *string `mandatory:"true" contributesTo:"path" name:"instanceConsoleHistoryId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetConsoleHistoryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetConsoleHistoryRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetConsoleHistoryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetConsoleHistoryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetConsoleHistoryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetConsoleHistoryResponse wrapper for the GetConsoleHistory operation +type GetConsoleHistoryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ConsoleHistory instance + ConsoleHistory `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetConsoleHistoryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetConsoleHistoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cpe_device_config_content_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cpe_device_config_content_request_response.go new file mode 100644 index 000000000..1a9b24abe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cpe_device_config_content_request_response.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// GetCpeDeviceConfigContentRequest wrapper for the GetCpeDeviceConfigContent operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCpeDeviceConfigContent.go.html to see an example of how to use GetCpeDeviceConfigContentRequest. +type GetCpeDeviceConfigContentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the CPE. + CpeId *string `mandatory:"true" contributesTo:"path" name:"cpeId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCpeDeviceConfigContentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCpeDeviceConfigContentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetCpeDeviceConfigContentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCpeDeviceConfigContentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetCpeDeviceConfigContentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCpeDeviceConfigContentResponse wrapper for the GetCpeDeviceConfigContent operation +type GetCpeDeviceConfigContentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The io.ReadCloser instance + Content io.ReadCloser `presentIn:"body" encoding:"binary"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetCpeDeviceConfigContentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCpeDeviceConfigContentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cpe_device_shape_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cpe_device_shape_request_response.go new file mode 100644 index 000000000..e42abf549 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cpe_device_shape_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetCpeDeviceShapeRequest wrapper for the GetCpeDeviceShape operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCpeDeviceShape.go.html to see an example of how to use GetCpeDeviceShapeRequest. +type GetCpeDeviceShapeRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the CPE device shape. + CpeDeviceShapeId *string `mandatory:"true" contributesTo:"path" name:"cpeDeviceShapeId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCpeDeviceShapeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCpeDeviceShapeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetCpeDeviceShapeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCpeDeviceShapeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetCpeDeviceShapeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCpeDeviceShapeResponse wrapper for the GetCpeDeviceShape operation +type GetCpeDeviceShapeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CpeDeviceShapeDetail instance + CpeDeviceShapeDetail `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetCpeDeviceShapeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCpeDeviceShapeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cpe_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cpe_request_response.go new file mode 100644 index 000000000..dbb5520e8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cpe_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetCpeRequest wrapper for the GetCpe operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCpe.go.html to see an example of how to use GetCpeRequest. +type GetCpeRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the CPE. + CpeId *string `mandatory:"true" contributesTo:"path" name:"cpeId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCpeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCpeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetCpeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCpeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetCpeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCpeResponse wrapper for the GetCpe operation +type GetCpeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Cpe instance + Cpe `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetCpeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCpeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cross_connect_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cross_connect_group_request_response.go new file mode 100644 index 000000000..0fe7934b9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cross_connect_group_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetCrossConnectGroupRequest wrapper for the GetCrossConnectGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCrossConnectGroup.go.html to see an example of how to use GetCrossConnectGroupRequest. +type GetCrossConnectGroupRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect group. + CrossConnectGroupId *string `mandatory:"true" contributesTo:"path" name:"crossConnectGroupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCrossConnectGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCrossConnectGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetCrossConnectGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCrossConnectGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetCrossConnectGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCrossConnectGroupResponse wrapper for the GetCrossConnectGroup operation +type GetCrossConnectGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CrossConnectGroup instance + CrossConnectGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetCrossConnectGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCrossConnectGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cross_connect_letter_of_authority_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cross_connect_letter_of_authority_request_response.go new file mode 100644 index 000000000..f641813d6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cross_connect_letter_of_authority_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetCrossConnectLetterOfAuthorityRequest wrapper for the GetCrossConnectLetterOfAuthority operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCrossConnectLetterOfAuthority.go.html to see an example of how to use GetCrossConnectLetterOfAuthorityRequest. +type GetCrossConnectLetterOfAuthorityRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect. + CrossConnectId *string `mandatory:"true" contributesTo:"path" name:"crossConnectId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCrossConnectLetterOfAuthorityRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCrossConnectLetterOfAuthorityRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetCrossConnectLetterOfAuthorityRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCrossConnectLetterOfAuthorityRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetCrossConnectLetterOfAuthorityRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCrossConnectLetterOfAuthorityResponse wrapper for the GetCrossConnectLetterOfAuthority operation +type GetCrossConnectLetterOfAuthorityResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The LetterOfAuthority instance + LetterOfAuthority `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetCrossConnectLetterOfAuthorityResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCrossConnectLetterOfAuthorityResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cross_connect_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cross_connect_request_response.go new file mode 100644 index 000000000..10e5d2584 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cross_connect_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetCrossConnectRequest wrapper for the GetCrossConnect operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCrossConnect.go.html to see an example of how to use GetCrossConnectRequest. +type GetCrossConnectRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect. + CrossConnectId *string `mandatory:"true" contributesTo:"path" name:"crossConnectId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCrossConnectRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCrossConnectRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetCrossConnectRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCrossConnectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetCrossConnectRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCrossConnectResponse wrapper for the GetCrossConnect operation +type GetCrossConnectResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CrossConnect instance + CrossConnect `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetCrossConnectResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCrossConnectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cross_connect_status_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cross_connect_status_request_response.go new file mode 100644 index 000000000..c82ebc26c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_cross_connect_status_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetCrossConnectStatusRequest wrapper for the GetCrossConnectStatus operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetCrossConnectStatus.go.html to see an example of how to use GetCrossConnectStatusRequest. +type GetCrossConnectStatusRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect. + CrossConnectId *string `mandatory:"true" contributesTo:"path" name:"crossConnectId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCrossConnectStatusRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCrossConnectStatusRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetCrossConnectStatusRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCrossConnectStatusRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetCrossConnectStatusRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCrossConnectStatusResponse wrapper for the GetCrossConnectStatus operation +type GetCrossConnectStatusResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CrossConnectStatus instance + CrossConnectStatus `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetCrossConnectStatusResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCrossConnectStatusResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_dedicated_vm_host_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_dedicated_vm_host_request_response.go new file mode 100644 index 000000000..74fef2325 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_dedicated_vm_host_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDedicatedVmHostRequest wrapper for the GetDedicatedVmHost operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDedicatedVmHost.go.html to see an example of how to use GetDedicatedVmHostRequest. +type GetDedicatedVmHostRequest struct { + + // The OCID of the dedicated VM host. + DedicatedVmHostId *string `mandatory:"true" contributesTo:"path" name:"dedicatedVmHostId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetDedicatedVmHostRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDedicatedVmHostRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetDedicatedVmHostRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDedicatedVmHostRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetDedicatedVmHostRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDedicatedVmHostResponse wrapper for the GetDedicatedVmHost operation +type GetDedicatedVmHostResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DedicatedVmHost instance + DedicatedVmHost `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetDedicatedVmHostResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDedicatedVmHostResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_dhcp_options_request_response.go new file mode 100644 index 000000000..a10428b8f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_dhcp_options_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDhcpOptionsRequest wrapper for the GetDhcpOptions operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDhcpOptions.go.html to see an example of how to use GetDhcpOptionsRequest. +type GetDhcpOptionsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the set of DHCP options. + DhcpId *string `mandatory:"true" contributesTo:"path" name:"dhcpId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetDhcpOptionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDhcpOptionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetDhcpOptionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDhcpOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetDhcpOptionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDhcpOptionsResponse wrapper for the GetDhcpOptions operation +type GetDhcpOptionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DhcpOptions instance + DhcpOptions `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetDhcpOptionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDhcpOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_attachment_request_response.go new file mode 100644 index 000000000..f6fb4f002 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_attachment_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDrgAttachmentRequest wrapper for the GetDrgAttachment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrgAttachment.go.html to see an example of how to use GetDrgAttachmentRequest. +type GetDrgAttachmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG attachment. + DrgAttachmentId *string `mandatory:"true" contributesTo:"path" name:"drgAttachmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetDrgAttachmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDrgAttachmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetDrgAttachmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDrgAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetDrgAttachmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDrgAttachmentResponse wrapper for the GetDrgAttachment operation +type GetDrgAttachmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DrgAttachment instance + DrgAttachment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetDrgAttachmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDrgAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_redundancy_status_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_redundancy_status_request_response.go new file mode 100644 index 000000000..eed18d3fc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_redundancy_status_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDrgRedundancyStatusRequest wrapper for the GetDrgRedundancyStatus operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrgRedundancyStatus.go.html to see an example of how to use GetDrgRedundancyStatusRequest. +type GetDrgRedundancyStatusRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"true" contributesTo:"path" name:"drgId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetDrgRedundancyStatusRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDrgRedundancyStatusRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetDrgRedundancyStatusRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDrgRedundancyStatusRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetDrgRedundancyStatusRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDrgRedundancyStatusResponse wrapper for the GetDrgRedundancyStatus operation +type GetDrgRedundancyStatusResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DrgRedundancyStatus instance + DrgRedundancyStatus `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetDrgRedundancyStatusResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDrgRedundancyStatusResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_request_response.go new file mode 100644 index 000000000..551be425d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDrgRequest wrapper for the GetDrg operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrg.go.html to see an example of how to use GetDrgRequest. +type GetDrgRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"true" contributesTo:"path" name:"drgId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetDrgRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDrgRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetDrgRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDrgRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetDrgRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDrgResponse wrapper for the GetDrg operation +type GetDrgResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Drg instance + Drg `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetDrgResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDrgResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_route_distribution_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_route_distribution_request_response.go new file mode 100644 index 000000000..5ef47afda --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_route_distribution_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDrgRouteDistributionRequest wrapper for the GetDrgRouteDistribution operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrgRouteDistribution.go.html to see an example of how to use GetDrgRouteDistributionRequest. +type GetDrgRouteDistributionRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route distribution. + DrgRouteDistributionId *string `mandatory:"true" contributesTo:"path" name:"drgRouteDistributionId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetDrgRouteDistributionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDrgRouteDistributionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetDrgRouteDistributionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDrgRouteDistributionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetDrgRouteDistributionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDrgRouteDistributionResponse wrapper for the GetDrgRouteDistribution operation +type GetDrgRouteDistributionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DrgRouteDistribution instance + DrgRouteDistribution `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetDrgRouteDistributionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDrgRouteDistributionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_route_table_request_response.go new file mode 100644 index 000000000..63a6161cc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_drg_route_table_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDrgRouteTableRequest wrapper for the GetDrgRouteTable operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetDrgRouteTable.go.html to see an example of how to use GetDrgRouteTableRequest. +type GetDrgRouteTableRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table. + DrgRouteTableId *string `mandatory:"true" contributesTo:"path" name:"drgRouteTableId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetDrgRouteTableRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDrgRouteTableRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetDrgRouteTableRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDrgRouteTableRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetDrgRouteTableRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDrgRouteTableResponse wrapper for the GetDrgRouteTable operation +type GetDrgRouteTableResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DrgRouteTable instance + DrgRouteTable `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetDrgRouteTableResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDrgRouteTableResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_fast_connect_provider_service_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_fast_connect_provider_service_key_request_response.go new file mode 100644 index 000000000..634ffa1be --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_fast_connect_provider_service_key_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetFastConnectProviderServiceKeyRequest wrapper for the GetFastConnectProviderServiceKey operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetFastConnectProviderServiceKey.go.html to see an example of how to use GetFastConnectProviderServiceKeyRequest. +type GetFastConnectProviderServiceKeyRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the provider service. + ProviderServiceId *string `mandatory:"true" contributesTo:"path" name:"providerServiceId"` + + // The provider service key that the provider gives you when you set up a virtual circuit connection + // from the provider to Oracle Cloud Infrastructure. You can set up that connection and get your + // provider service key at the provider's website or portal. For the portal location, see the `description` + // attribute of the FastConnectProviderService. + ProviderServiceKeyName *string `mandatory:"true" contributesTo:"path" name:"providerServiceKeyName"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetFastConnectProviderServiceKeyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetFastConnectProviderServiceKeyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetFastConnectProviderServiceKeyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetFastConnectProviderServiceKeyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetFastConnectProviderServiceKeyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetFastConnectProviderServiceKeyResponse wrapper for the GetFastConnectProviderServiceKey operation +type GetFastConnectProviderServiceKeyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FastConnectProviderServiceKey instance + FastConnectProviderServiceKey `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetFastConnectProviderServiceKeyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetFastConnectProviderServiceKeyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_fast_connect_provider_service_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_fast_connect_provider_service_request_response.go new file mode 100644 index 000000000..d47363609 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_fast_connect_provider_service_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetFastConnectProviderServiceRequest wrapper for the GetFastConnectProviderService operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetFastConnectProviderService.go.html to see an example of how to use GetFastConnectProviderServiceRequest. +type GetFastConnectProviderServiceRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the provider service. + ProviderServiceId *string `mandatory:"true" contributesTo:"path" name:"providerServiceId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetFastConnectProviderServiceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetFastConnectProviderServiceRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetFastConnectProviderServiceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetFastConnectProviderServiceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetFastConnectProviderServiceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetFastConnectProviderServiceResponse wrapper for the GetFastConnectProviderService operation +type GetFastConnectProviderServiceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FastConnectProviderService instance + FastConnectProviderService `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetFastConnectProviderServiceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetFastConnectProviderServiceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_firmware_bundle_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_firmware_bundle_request_response.go new file mode 100644 index 000000000..c85f45c4d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_firmware_bundle_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetFirmwareBundleRequest wrapper for the GetFirmwareBundle operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetFirmwareBundle.go.html to see an example of how to use GetFirmwareBundleRequest. +type GetFirmwareBundleRequest struct { + + // Unique identifier for the firmware bundle. + FirmwareBundleId *string `mandatory:"true" contributesTo:"path" name:"firmwareBundleId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetFirmwareBundleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetFirmwareBundleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetFirmwareBundleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetFirmwareBundleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetFirmwareBundleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetFirmwareBundleResponse wrapper for the GetFirmwareBundle operation +type GetFirmwareBundleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FirmwareBundle instance + FirmwareBundle `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetFirmwareBundleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetFirmwareBundleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_device_config_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_device_config_request_response.go new file mode 100644 index 000000000..fe618c471 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_device_config_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetIPSecConnectionDeviceConfigRequest wrapper for the GetIPSecConnectionDeviceConfig operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionDeviceConfig.go.html to see an example of how to use GetIPSecConnectionDeviceConfigRequest. +type GetIPSecConnectionDeviceConfigRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetIPSecConnectionDeviceConfigRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetIPSecConnectionDeviceConfigRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetIPSecConnectionDeviceConfigRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIPSecConnectionDeviceConfigRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetIPSecConnectionDeviceConfigRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetIPSecConnectionDeviceConfigResponse wrapper for the GetIPSecConnectionDeviceConfig operation +type GetIPSecConnectionDeviceConfigResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpSecConnectionDeviceConfig instance + IpSecConnectionDeviceConfig `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetIPSecConnectionDeviceConfigResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetIPSecConnectionDeviceConfigResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_device_status_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_device_status_request_response.go new file mode 100644 index 000000000..467e5029c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_device_status_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetIPSecConnectionDeviceStatusRequest wrapper for the GetIPSecConnectionDeviceStatus operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionDeviceStatus.go.html to see an example of how to use GetIPSecConnectionDeviceStatusRequest. +type GetIPSecConnectionDeviceStatusRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetIPSecConnectionDeviceStatusRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetIPSecConnectionDeviceStatusRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetIPSecConnectionDeviceStatusRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIPSecConnectionDeviceStatusRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetIPSecConnectionDeviceStatusRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetIPSecConnectionDeviceStatusResponse wrapper for the GetIPSecConnectionDeviceStatus operation +type GetIPSecConnectionDeviceStatusResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpSecConnectionDeviceStatus instance + IpSecConnectionDeviceStatus `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetIPSecConnectionDeviceStatusResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetIPSecConnectionDeviceStatusResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_request_response.go new file mode 100644 index 000000000..415467702 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetIPSecConnectionRequest wrapper for the GetIPSecConnection operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnection.go.html to see an example of how to use GetIPSecConnectionRequest. +type GetIPSecConnectionRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetIPSecConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetIPSecConnectionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetIPSecConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIPSecConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetIPSecConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetIPSecConnectionResponse wrapper for the GetIPSecConnection operation +type GetIPSecConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpSecConnection instance + IpSecConnection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetIPSecConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetIPSecConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_tunnel_error_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_tunnel_error_request_response.go new file mode 100644 index 000000000..fbc3806bb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_tunnel_error_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetIPSecConnectionTunnelErrorRequest wrapper for the GetIPSecConnectionTunnelError operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionTunnelError.go.html to see an example of how to use GetIPSecConnectionTunnelErrorRequest. +type GetIPSecConnectionTunnelErrorRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tunnel. + TunnelId *string `mandatory:"true" contributesTo:"path" name:"tunnelId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetIPSecConnectionTunnelErrorRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetIPSecConnectionTunnelErrorRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetIPSecConnectionTunnelErrorRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIPSecConnectionTunnelErrorRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetIPSecConnectionTunnelErrorRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetIPSecConnectionTunnelErrorResponse wrapper for the GetIPSecConnectionTunnelError operation +type GetIPSecConnectionTunnelErrorResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpSecConnectionTunnelErrorDetails instance + IpSecConnectionTunnelErrorDetails `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetIPSecConnectionTunnelErrorResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetIPSecConnectionTunnelErrorResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_tunnel_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_tunnel_request_response.go new file mode 100644 index 000000000..c04057704 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_tunnel_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetIPSecConnectionTunnelRequest wrapper for the GetIPSecConnectionTunnel operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionTunnel.go.html to see an example of how to use GetIPSecConnectionTunnelRequest. +type GetIPSecConnectionTunnelRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tunnel. + TunnelId *string `mandatory:"true" contributesTo:"path" name:"tunnelId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetIPSecConnectionTunnelRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetIPSecConnectionTunnelRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetIPSecConnectionTunnelRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIPSecConnectionTunnelRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetIPSecConnectionTunnelRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetIPSecConnectionTunnelResponse wrapper for the GetIPSecConnectionTunnel operation +type GetIPSecConnectionTunnelResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpSecConnectionTunnel instance + IpSecConnectionTunnel `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetIPSecConnectionTunnelResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetIPSecConnectionTunnelResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_tunnel_shared_secret_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_tunnel_shared_secret_request_response.go new file mode 100644 index 000000000..1cead5ed1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_i_p_sec_connection_tunnel_shared_secret_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetIPSecConnectionTunnelSharedSecretRequest wrapper for the GetIPSecConnectionTunnelSharedSecret operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIPSecConnectionTunnelSharedSecret.go.html to see an example of how to use GetIPSecConnectionTunnelSharedSecretRequest. +type GetIPSecConnectionTunnelSharedSecretRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tunnel. + TunnelId *string `mandatory:"true" contributesTo:"path" name:"tunnelId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetIPSecConnectionTunnelSharedSecretRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetIPSecConnectionTunnelSharedSecretRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetIPSecConnectionTunnelSharedSecretRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIPSecConnectionTunnelSharedSecretRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetIPSecConnectionTunnelSharedSecretRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetIPSecConnectionTunnelSharedSecretResponse wrapper for the GetIPSecConnectionTunnelSharedSecret operation +type GetIPSecConnectionTunnelSharedSecretResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpSecConnectionTunnelSharedSecret instance + IpSecConnectionTunnelSharedSecret `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetIPSecConnectionTunnelSharedSecretResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetIPSecConnectionTunnelSharedSecretResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_image_request_response.go new file mode 100644 index 000000000..a2aa96277 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_image_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetImageRequest wrapper for the GetImage operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetImage.go.html to see an example of how to use GetImageRequest. +type GetImageRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. + ImageId *string `mandatory:"true" contributesTo:"path" name:"imageId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetImageRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetImageRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetImageRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetImageRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetImageRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetImageResponse wrapper for the GetImage operation +type GetImageResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Image instance + Image `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetImageResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetImageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_image_shape_compatibility_entry_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_image_shape_compatibility_entry_request_response.go new file mode 100644 index 000000000..fd56322aa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_image_shape_compatibility_entry_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetImageShapeCompatibilityEntryRequest wrapper for the GetImageShapeCompatibilityEntry operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetImageShapeCompatibilityEntry.go.html to see an example of how to use GetImageShapeCompatibilityEntryRequest. +type GetImageShapeCompatibilityEntryRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. + ImageId *string `mandatory:"true" contributesTo:"path" name:"imageId"` + + // Shape name. + ShapeName *string `mandatory:"true" contributesTo:"path" name:"shapeName"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetImageShapeCompatibilityEntryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetImageShapeCompatibilityEntryRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetImageShapeCompatibilityEntryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetImageShapeCompatibilityEntryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetImageShapeCompatibilityEntryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetImageShapeCompatibilityEntryResponse wrapper for the GetImageShapeCompatibilityEntry operation +type GetImageShapeCompatibilityEntryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ImageShapeCompatibilityEntry instance + ImageShapeCompatibilityEntry `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetImageShapeCompatibilityEntryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetImageShapeCompatibilityEntryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_configuration_request_response.go new file mode 100644 index 000000000..56ae59483 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_configuration_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetInstanceConfigurationRequest wrapper for the GetInstanceConfiguration operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstanceConfiguration.go.html to see an example of how to use GetInstanceConfigurationRequest. +type GetInstanceConfigurationRequest struct { + + // The OCID of the instance configuration. + InstanceConfigurationId *string `mandatory:"true" contributesTo:"path" name:"instanceConfigurationId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetInstanceConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetInstanceConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetInstanceConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetInstanceConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetInstanceConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetInstanceConfigurationResponse wrapper for the GetInstanceConfiguration operation +type GetInstanceConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstanceConfiguration instance + InstanceConfiguration `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetInstanceConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetInstanceConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_console_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_console_connection_request_response.go new file mode 100644 index 000000000..f4040eed5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_console_connection_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetInstanceConsoleConnectionRequest wrapper for the GetInstanceConsoleConnection operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstanceConsoleConnection.go.html to see an example of how to use GetInstanceConsoleConnectionRequest. +type GetInstanceConsoleConnectionRequest struct { + + // The OCID of the instance console connection. + InstanceConsoleConnectionId *string `mandatory:"true" contributesTo:"path" name:"instanceConsoleConnectionId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetInstanceConsoleConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetInstanceConsoleConnectionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetInstanceConsoleConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetInstanceConsoleConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetInstanceConsoleConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetInstanceConsoleConnectionResponse wrapper for the GetInstanceConsoleConnection operation +type GetInstanceConsoleConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstanceConsoleConnection instance + InstanceConsoleConnection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetInstanceConsoleConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetInstanceConsoleConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_maintenance_event_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_maintenance_event_request_response.go new file mode 100644 index 000000000..9a9b16afe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_maintenance_event_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetInstanceMaintenanceEventRequest wrapper for the GetInstanceMaintenanceEvent operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstanceMaintenanceEvent.go.html to see an example of how to use GetInstanceMaintenanceEventRequest. +type GetInstanceMaintenanceEventRequest struct { + + // The OCID of the instance maintenance event. + InstanceMaintenanceEventId *string `mandatory:"true" contributesTo:"path" name:"instanceMaintenanceEventId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetInstanceMaintenanceEventRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetInstanceMaintenanceEventRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetInstanceMaintenanceEventRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetInstanceMaintenanceEventRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetInstanceMaintenanceEventRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetInstanceMaintenanceEventResponse wrapper for the GetInstanceMaintenanceEvent operation +type GetInstanceMaintenanceEventResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstanceMaintenanceEvent instance + InstanceMaintenanceEvent `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetInstanceMaintenanceEventResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetInstanceMaintenanceEventResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_maintenance_reboot_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_maintenance_reboot_request_response.go new file mode 100644 index 000000000..194faa33f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_maintenance_reboot_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetInstanceMaintenanceRebootRequest wrapper for the GetInstanceMaintenanceReboot operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstanceMaintenanceReboot.go.html to see an example of how to use GetInstanceMaintenanceRebootRequest. +type GetInstanceMaintenanceRebootRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetInstanceMaintenanceRebootRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetInstanceMaintenanceRebootRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetInstanceMaintenanceRebootRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetInstanceMaintenanceRebootRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetInstanceMaintenanceRebootRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetInstanceMaintenanceRebootResponse wrapper for the GetInstanceMaintenanceReboot operation +type GetInstanceMaintenanceRebootResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstanceMaintenanceReboot instance + InstanceMaintenanceReboot `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetInstanceMaintenanceRebootResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetInstanceMaintenanceRebootResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_pool_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_pool_instance_request_response.go new file mode 100644 index 000000000..5519b63ea --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_pool_instance_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetInstancePoolInstanceRequest wrapper for the GetInstancePoolInstance operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstancePoolInstance.go.html to see an example of how to use GetInstancePoolInstanceRequest. +type GetInstancePoolInstanceRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetInstancePoolInstanceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetInstancePoolInstanceRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetInstancePoolInstanceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetInstancePoolInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetInstancePoolInstanceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetInstancePoolInstanceResponse wrapper for the GetInstancePoolInstance operation +type GetInstancePoolInstanceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstancePoolInstance instance + InstancePoolInstance `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetInstancePoolInstanceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetInstancePoolInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_pool_load_balancer_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_pool_load_balancer_attachment_request_response.go new file mode 100644 index 000000000..689cd3577 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_pool_load_balancer_attachment_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetInstancePoolLoadBalancerAttachmentRequest wrapper for the GetInstancePoolLoadBalancerAttachment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstancePoolLoadBalancerAttachment.go.html to see an example of how to use GetInstancePoolLoadBalancerAttachmentRequest. +type GetInstancePoolLoadBalancerAttachmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // The OCID of the load balancer attachment. + InstancePoolLoadBalancerAttachmentId *string `mandatory:"true" contributesTo:"path" name:"instancePoolLoadBalancerAttachmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetInstancePoolLoadBalancerAttachmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetInstancePoolLoadBalancerAttachmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetInstancePoolLoadBalancerAttachmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetInstancePoolLoadBalancerAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetInstancePoolLoadBalancerAttachmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetInstancePoolLoadBalancerAttachmentResponse wrapper for the GetInstancePoolLoadBalancerAttachment operation +type GetInstancePoolLoadBalancerAttachmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstancePoolLoadBalancerAttachment instance + InstancePoolLoadBalancerAttachment `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetInstancePoolLoadBalancerAttachmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetInstancePoolLoadBalancerAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_pool_request_response.go new file mode 100644 index 000000000..c5966ba67 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_pool_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetInstancePoolRequest wrapper for the GetInstancePool operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstancePool.go.html to see an example of how to use GetInstancePoolRequest. +type GetInstancePoolRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetInstancePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetInstancePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetInstancePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetInstancePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetInstancePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetInstancePoolResponse wrapper for the GetInstancePool operation +type GetInstancePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstancePool instance + InstancePool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetInstancePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetInstancePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_request_response.go new file mode 100644 index 000000000..3025323f2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_instance_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetInstanceRequest wrapper for the GetInstance operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInstance.go.html to see an example of how to use GetInstanceRequest. +type GetInstanceRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetInstanceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetInstanceRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetInstanceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetInstanceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetInstanceResponse wrapper for the GetInstance operation +type GetInstanceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Instance instance + Instance `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetInstanceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_internet_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_internet_gateway_request_response.go new file mode 100644 index 000000000..9dee1b759 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_internet_gateway_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetInternetGatewayRequest wrapper for the GetInternetGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetInternetGateway.go.html to see an example of how to use GetInternetGatewayRequest. +type GetInternetGatewayRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the internet gateway. + IgId *string `mandatory:"true" contributesTo:"path" name:"igId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetInternetGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetInternetGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetInternetGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetInternetGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetInternetGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetInternetGatewayResponse wrapper for the GetInternetGateway operation +type GetInternetGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InternetGateway instance + InternetGateway `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetInternetGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetInternetGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_ip_inventory_vcn_overlap_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_ip_inventory_vcn_overlap_details.go new file mode 100644 index 000000000..0043da706 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_ip_inventory_vcn_overlap_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GetIpInventoryVcnOverlapDetails Lists the compartment to find VCN overlap. +type GetIpInventoryVcnOverlapDetails struct { + + // Lists the selected regions. + RegionList []string `mandatory:"true" json:"regionList"` + + // The list of OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartments. + CompartmentList []string `mandatory:"true" json:"compartmentList"` +} + +func (m GetIpInventoryVcnOverlapDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GetIpInventoryVcnOverlapDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_ipsec_cpe_device_config_content_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_ipsec_cpe_device_config_content_request_response.go new file mode 100644 index 000000000..e835a3b60 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_ipsec_cpe_device_config_content_request_response.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// GetIpsecCpeDeviceConfigContentRequest wrapper for the GetIpsecCpeDeviceConfigContent operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIpsecCpeDeviceConfigContent.go.html to see an example of how to use GetIpsecCpeDeviceConfigContentRequest. +type GetIpsecCpeDeviceConfigContentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetIpsecCpeDeviceConfigContentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetIpsecCpeDeviceConfigContentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetIpsecCpeDeviceConfigContentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIpsecCpeDeviceConfigContentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetIpsecCpeDeviceConfigContentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetIpsecCpeDeviceConfigContentResponse wrapper for the GetIpsecCpeDeviceConfigContent operation +type GetIpsecCpeDeviceConfigContentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The io.ReadCloser instance + Content io.ReadCloser `presentIn:"body" encoding:"binary"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetIpsecCpeDeviceConfigContentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetIpsecCpeDeviceConfigContentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_ipv6_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_ipv6_request_response.go new file mode 100644 index 000000000..89de20b29 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_ipv6_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetIpv6Request wrapper for the GetIpv6 operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetIpv6.go.html to see an example of how to use GetIpv6Request. +type GetIpv6Request struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPv6. + Ipv6Id *string `mandatory:"true" contributesTo:"path" name:"ipv6Id"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetIpv6Request) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetIpv6Request) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetIpv6Request) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIpv6Request) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetIpv6Request) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetIpv6Response wrapper for the GetIpv6 operation +type GetIpv6Response struct { + + // The underlying http response + RawResponse *http.Response + + // The Ipv6 instance + Ipv6 `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetIpv6Response) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetIpv6Response) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_local_peering_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_local_peering_gateway_request_response.go new file mode 100644 index 000000000..1b74fb950 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_local_peering_gateway_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetLocalPeeringGatewayRequest wrapper for the GetLocalPeeringGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetLocalPeeringGateway.go.html to see an example of how to use GetLocalPeeringGatewayRequest. +type GetLocalPeeringGatewayRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the local peering gateway. + LocalPeeringGatewayId *string `mandatory:"true" contributesTo:"path" name:"localPeeringGatewayId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetLocalPeeringGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetLocalPeeringGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetLocalPeeringGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetLocalPeeringGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetLocalPeeringGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetLocalPeeringGatewayResponse wrapper for the GetLocalPeeringGateway operation +type GetLocalPeeringGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The LocalPeeringGateway instance + LocalPeeringGateway `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetLocalPeeringGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetLocalPeeringGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_measured_boot_report_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_measured_boot_report_request_response.go new file mode 100644 index 000000000..66039d056 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_measured_boot_report_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetMeasuredBootReportRequest wrapper for the GetMeasuredBootReport operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetMeasuredBootReport.go.html to see an example of how to use GetMeasuredBootReportRequest. +type GetMeasuredBootReportRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetMeasuredBootReportRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetMeasuredBootReportRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetMeasuredBootReportRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetMeasuredBootReportRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetMeasuredBootReportRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetMeasuredBootReportResponse wrapper for the GetMeasuredBootReport operation +type GetMeasuredBootReportResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The MeasuredBootReport instance + MeasuredBootReport `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetMeasuredBootReportResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetMeasuredBootReportResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_nat_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_nat_gateway_request_response.go new file mode 100644 index 000000000..498b1d33f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_nat_gateway_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetNatGatewayRequest wrapper for the GetNatGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetNatGateway.go.html to see an example of how to use GetNatGatewayRequest. +type GetNatGatewayRequest struct { + + // The NAT gateway's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + NatGatewayId *string `mandatory:"true" contributesTo:"path" name:"natGatewayId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetNatGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetNatGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetNatGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetNatGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetNatGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetNatGatewayResponse wrapper for the GetNatGateway operation +type GetNatGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NatGateway instance + NatGateway `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetNatGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetNatGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_network_security_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_network_security_group_request_response.go new file mode 100644 index 000000000..596509ada --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_network_security_group_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetNetworkSecurityGroupRequest wrapper for the GetNetworkSecurityGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetNetworkSecurityGroup.go.html to see an example of how to use GetNetworkSecurityGroupRequest. +type GetNetworkSecurityGroupRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security group. + NetworkSecurityGroupId *string `mandatory:"true" contributesTo:"path" name:"networkSecurityGroupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetNetworkSecurityGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetNetworkSecurityGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetNetworkSecurityGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetNetworkSecurityGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetNetworkSecurityGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetNetworkSecurityGroupResponse wrapper for the GetNetworkSecurityGroup operation +type GetNetworkSecurityGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NetworkSecurityGroup instance + NetworkSecurityGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetNetworkSecurityGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetNetworkSecurityGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_networking_topology_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_networking_topology_request_response.go new file mode 100644 index 000000000..bd1bea697 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_networking_topology_request_response.go @@ -0,0 +1,164 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetNetworkingTopologyRequest wrapper for the GetNetworkingTopology operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetNetworkingTopology.go.html to see an example of how to use GetNetworkingTopologyRequest. +type GetNetworkingTopologyRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Valid values are `ANY` and `ACCESSIBLE`. The default is `ANY`. + // Setting this to `ACCESSIBLE` returns only compartments for which a + // user has INSPECT permissions, either directly or indirectly (permissions can be on a + // resource in a subcompartment). A restricted set of fields is returned for compartments in which a user has + // indirect INSPECT permissions. + // When set to `ANY` permissions are not checked. + AccessLevel GetNetworkingTopologyAccessLevelEnum `mandatory:"false" contributesTo:"query" name:"accessLevel" omitEmpty:"true"` + + // When set to true, the hierarchy of compartments is traversed + // and the specified compartment and its subcompartments are + // inspected depending on the the setting of `accessLevel`. + // Default is false. + QueryCompartmentSubtree *bool `mandatory:"false" contributesTo:"query" name:"queryCompartmentSubtree"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For querying if there is a cached value on the server. The If-None-Match HTTP request header + // makes the request conditional. For GET and HEAD methods, the server will send back the requested + // resource, with a 200 status, only if it doesn't have an ETag matching the given ones. + // For other methods, the request will be processed only if the eventually existing resource's + // ETag doesn't match any of the values listed. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // The Cache-Control HTTP header holds directives (instructions) + // for caching in both requests and responses. + CacheControl *string `mandatory:"false" contributesTo:"header" name:"cache-control"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetNetworkingTopologyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetNetworkingTopologyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetNetworkingTopologyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetNetworkingTopologyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetNetworkingTopologyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGetNetworkingTopologyAccessLevelEnum(string(request.AccessLevel)); !ok && request.AccessLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccessLevel: %s. Supported values are: %s.", request.AccessLevel, strings.Join(GetGetNetworkingTopologyAccessLevelEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetNetworkingTopologyResponse wrapper for the GetNetworkingTopology operation +type GetNetworkingTopologyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NetworkingTopology instance + NetworkingTopology `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetNetworkingTopologyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetNetworkingTopologyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetNetworkingTopologyAccessLevelEnum Enum with underlying type: string +type GetNetworkingTopologyAccessLevelEnum string + +// Set of constants representing the allowable values for GetNetworkingTopologyAccessLevelEnum +const ( + GetNetworkingTopologyAccessLevelAny GetNetworkingTopologyAccessLevelEnum = "ANY" + GetNetworkingTopologyAccessLevelAccessible GetNetworkingTopologyAccessLevelEnum = "ACCESSIBLE" +) + +var mappingGetNetworkingTopologyAccessLevelEnum = map[string]GetNetworkingTopologyAccessLevelEnum{ + "ANY": GetNetworkingTopologyAccessLevelAny, + "ACCESSIBLE": GetNetworkingTopologyAccessLevelAccessible, +} + +var mappingGetNetworkingTopologyAccessLevelEnumLowerCase = map[string]GetNetworkingTopologyAccessLevelEnum{ + "any": GetNetworkingTopologyAccessLevelAny, + "accessible": GetNetworkingTopologyAccessLevelAccessible, +} + +// GetGetNetworkingTopologyAccessLevelEnumValues Enumerates the set of values for GetNetworkingTopologyAccessLevelEnum +func GetGetNetworkingTopologyAccessLevelEnumValues() []GetNetworkingTopologyAccessLevelEnum { + values := make([]GetNetworkingTopologyAccessLevelEnum, 0) + for _, v := range mappingGetNetworkingTopologyAccessLevelEnum { + values = append(values, v) + } + return values +} + +// GetGetNetworkingTopologyAccessLevelEnumStringValues Enumerates the set of values in String for GetNetworkingTopologyAccessLevelEnum +func GetGetNetworkingTopologyAccessLevelEnumStringValues() []string { + return []string{ + "ANY", + "ACCESSIBLE", + } +} + +// GetMappingGetNetworkingTopologyAccessLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetNetworkingTopologyAccessLevelEnum(val string) (GetNetworkingTopologyAccessLevelEnum, bool) { + enum, ok := mappingGetNetworkingTopologyAccessLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_private_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_private_ip_request_response.go new file mode 100644 index 000000000..eee4bba16 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_private_ip_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPrivateIpRequest wrapper for the GetPrivateIp operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPrivateIp.go.html to see an example of how to use GetPrivateIpRequest. +type GetPrivateIpRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private IP or IPv6. + PrivateIpId *string `mandatory:"true" contributesTo:"path" name:"privateIpId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPrivateIpRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPrivateIpRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetPrivateIpRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPrivateIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetPrivateIpRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPrivateIpResponse wrapper for the GetPrivateIp operation +type GetPrivateIpResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PrivateIp instance + PrivateIp `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPrivateIpResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPrivateIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_by_ip_address_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_by_ip_address_details.go new file mode 100644 index 000000000..dd9d8d8ea --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_by_ip_address_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GetPublicIpByIpAddressDetails IP address of the public IP. +type GetPublicIpByIpAddressDetails struct { + + // The public IP address. + // Example: 203.0.113.2 + IpAddress *string `mandatory:"true" json:"ipAddress"` +} + +func (m GetPublicIpByIpAddressDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GetPublicIpByIpAddressDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_by_ip_address_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_by_ip_address_request_response.go new file mode 100644 index 000000000..57dd00438 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_by_ip_address_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPublicIpByIpAddressRequest wrapper for the GetPublicIpByIpAddress operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPublicIpByIpAddress.go.html to see an example of how to use GetPublicIpByIpAddressRequest. +type GetPublicIpByIpAddressRequest struct { + + // IP address details for fetching the public IP. + GetPublicIpByIpAddressDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPublicIpByIpAddressRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPublicIpByIpAddressRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetPublicIpByIpAddressRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPublicIpByIpAddressRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetPublicIpByIpAddressRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPublicIpByIpAddressResponse wrapper for the GetPublicIpByIpAddress operation +type GetPublicIpByIpAddressResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIp instance + PublicIp `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPublicIpByIpAddressResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPublicIpByIpAddressResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_by_private_ip_id_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_by_private_ip_id_details.go new file mode 100644 index 000000000..619e6a2e7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_by_private_ip_id_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GetPublicIpByPrivateIpIdDetails Details of the private IP that the public IP is assigned to. +type GetPublicIpByPrivateIpIdDetails struct { + + // OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private IP. + PrivateIpId *string `mandatory:"true" json:"privateIpId"` +} + +func (m GetPublicIpByPrivateIpIdDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GetPublicIpByPrivateIpIdDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_by_private_ip_id_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_by_private_ip_id_request_response.go new file mode 100644 index 000000000..fc828532c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_by_private_ip_id_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPublicIpByPrivateIpIdRequest wrapper for the GetPublicIpByPrivateIpId operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPublicIpByPrivateIpId.go.html to see an example of how to use GetPublicIpByPrivateIpIdRequest. +type GetPublicIpByPrivateIpIdRequest struct { + + // Private IP details for fetching the public IP. + GetPublicIpByPrivateIpIdDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPublicIpByPrivateIpIdRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPublicIpByPrivateIpIdRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetPublicIpByPrivateIpIdRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPublicIpByPrivateIpIdRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetPublicIpByPrivateIpIdRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPublicIpByPrivateIpIdResponse wrapper for the GetPublicIpByPrivateIpId operation +type GetPublicIpByPrivateIpIdResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIp instance + PublicIp `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPublicIpByPrivateIpIdResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPublicIpByPrivateIpIdResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_pool_request_response.go new file mode 100644 index 000000000..4d6d3747d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_pool_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPublicIpPoolRequest wrapper for the GetPublicIpPool operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPublicIpPool.go.html to see an example of how to use GetPublicIpPoolRequest. +type GetPublicIpPoolRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP pool. + PublicIpPoolId *string `mandatory:"true" contributesTo:"path" name:"publicIpPoolId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPublicIpPoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPublicIpPoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetPublicIpPoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPublicIpPoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetPublicIpPoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPublicIpPoolResponse wrapper for the GetPublicIpPool operation +type GetPublicIpPoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIpPool instance + PublicIpPool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPublicIpPoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPublicIpPoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_request_response.go new file mode 100644 index 000000000..f38689bba --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_public_ip_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPublicIpRequest wrapper for the GetPublicIp operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetPublicIp.go.html to see an example of how to use GetPublicIpRequest. +type GetPublicIpRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP. + PublicIpId *string `mandatory:"true" contributesTo:"path" name:"publicIpId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPublicIpRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPublicIpRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetPublicIpRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPublicIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetPublicIpRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPublicIpResponse wrapper for the GetPublicIp operation +type GetPublicIpResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIp instance + PublicIp `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPublicIpResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPublicIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_remote_peering_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_remote_peering_connection_request_response.go new file mode 100644 index 000000000..d9f62df99 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_remote_peering_connection_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetRemotePeeringConnectionRequest wrapper for the GetRemotePeeringConnection operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetRemotePeeringConnection.go.html to see an example of how to use GetRemotePeeringConnectionRequest. +type GetRemotePeeringConnectionRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the remote peering connection (RPC). + RemotePeeringConnectionId *string `mandatory:"true" contributesTo:"path" name:"remotePeeringConnectionId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetRemotePeeringConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetRemotePeeringConnectionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetRemotePeeringConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetRemotePeeringConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetRemotePeeringConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetRemotePeeringConnectionResponse wrapper for the GetRemotePeeringConnection operation +type GetRemotePeeringConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RemotePeeringConnection instance + RemotePeeringConnection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetRemotePeeringConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetRemotePeeringConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_resource_ip_inventory_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_resource_ip_inventory_request_response.go new file mode 100644 index 000000000..ec81127d1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_resource_ip_inventory_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetResourceIpInventoryRequest wrapper for the GetResourceIpInventory operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetResourceIpInventory.go.html to see an example of how to use GetResourceIpInventoryRequest. +type GetResourceIpInventoryRequest struct { + + // Specify the ID of the resource. + DataRequestId *string `mandatory:"true" contributesTo:"path" name:"dataRequestId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetResourceIpInventoryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetResourceIpInventoryRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetResourceIpInventoryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetResourceIpInventoryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetResourceIpInventoryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetResourceIpInventoryResponse wrapper for the GetResourceIpInventory operation +type GetResourceIpInventoryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpInventoryCollection instance + IpInventoryCollection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. A pagination token to get the total number of results available. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` +} + +func (response GetResourceIpInventoryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetResourceIpInventoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_route_table_request_response.go new file mode 100644 index 000000000..2012cd69e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_route_table_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetRouteTableRequest wrapper for the GetRouteTable operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetRouteTable.go.html to see an example of how to use GetRouteTableRequest. +type GetRouteTableRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table. + RtId *string `mandatory:"true" contributesTo:"path" name:"rtId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetRouteTableRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetRouteTableRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetRouteTableRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetRouteTableRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetRouteTableRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetRouteTableResponse wrapper for the GetRouteTable operation +type GetRouteTableResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RouteTable instance + RouteTable `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetRouteTableResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetRouteTableResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_security_list_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_security_list_request_response.go new file mode 100644 index 000000000..a24a28036 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_security_list_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetSecurityListRequest wrapper for the GetSecurityList operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSecurityList.go.html to see an example of how to use GetSecurityListRequest. +type GetSecurityListRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the security list. + SecurityListId *string `mandatory:"true" contributesTo:"path" name:"securityListId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetSecurityListRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSecurityListRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetSecurityListRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSecurityListRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetSecurityListRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetSecurityListResponse wrapper for the GetSecurityList operation +type GetSecurityListResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SecurityList instance + SecurityList `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetSecurityListResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSecurityListResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_service_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_service_gateway_request_response.go new file mode 100644 index 000000000..f5cc6d122 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_service_gateway_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetServiceGatewayRequest wrapper for the GetServiceGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetServiceGateway.go.html to see an example of how to use GetServiceGatewayRequest. +type GetServiceGatewayRequest struct { + + // The service gateway's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + ServiceGatewayId *string `mandatory:"true" contributesTo:"path" name:"serviceGatewayId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetServiceGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetServiceGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetServiceGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetServiceGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetServiceGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetServiceGatewayResponse wrapper for the GetServiceGateway operation +type GetServiceGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ServiceGateway instance + ServiceGateway `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetServiceGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetServiceGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_service_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_service_request_response.go new file mode 100644 index 000000000..6fb232776 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_service_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetServiceRequest wrapper for the GetService operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetService.go.html to see an example of how to use GetServiceRequest. +type GetServiceRequest struct { + + // The service's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + ServiceId *string `mandatory:"true" contributesTo:"path" name:"serviceId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetServiceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetServiceRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetServiceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetServiceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetServiceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetServiceResponse wrapper for the GetService operation +type GetServiceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Service instance + Service `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetServiceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetServiceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_cidr_utilization_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_cidr_utilization_request_response.go new file mode 100644 index 000000000..023c389d3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_cidr_utilization_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetSubnetCidrUtilizationRequest wrapper for the GetSubnetCidrUtilization operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSubnetCidrUtilization.go.html to see an example of how to use GetSubnetCidrUtilizationRequest. +type GetSubnetCidrUtilizationRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetSubnetCidrUtilizationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSubnetCidrUtilizationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetSubnetCidrUtilizationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSubnetCidrUtilizationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetSubnetCidrUtilizationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetSubnetCidrUtilizationResponse wrapper for the GetSubnetCidrUtilization operation +type GetSubnetCidrUtilizationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpInventoryCidrUtilizationCollection instance + IpInventoryCidrUtilizationCollection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. A pagination token to get the total number of results available. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` +} + +func (response GetSubnetCidrUtilizationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSubnetCidrUtilizationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_ip_inventory_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_ip_inventory_request_response.go new file mode 100644 index 000000000..52af69442 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_ip_inventory_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetSubnetIpInventoryRequest wrapper for the GetSubnetIpInventory operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSubnetIpInventory.go.html to see an example of how to use GetSubnetIpInventoryRequest. +type GetSubnetIpInventoryRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetSubnetIpInventoryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSubnetIpInventoryRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetSubnetIpInventoryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSubnetIpInventoryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetSubnetIpInventoryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetSubnetIpInventoryResponse wrapper for the GetSubnetIpInventory operation +type GetSubnetIpInventoryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpInventorySubnetResourceCollection instance + IpInventorySubnetResourceCollection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetSubnetIpInventoryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSubnetIpInventoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_request_response.go new file mode 100644 index 000000000..45407b023 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetSubnetRequest wrapper for the GetSubnet operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSubnet.go.html to see an example of how to use GetSubnetRequest. +type GetSubnetRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetSubnetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSubnetRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetSubnetRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSubnetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetSubnetRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetSubnetResponse wrapper for the GetSubnet operation +type GetSubnetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Subnet instance + Subnet `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetSubnetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSubnetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_topology_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_topology_request_response.go new file mode 100644 index 000000000..a2140047c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_topology_request_response.go @@ -0,0 +1,167 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetSubnetTopologyRequest wrapper for the GetSubnetTopology operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSubnetTopology.go.html to see an example of how to use GetSubnetTopologyRequest. +type GetSubnetTopologyRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"query" name:"subnetId"` + + // Valid values are `ANY` and `ACCESSIBLE`. The default is `ANY`. + // Setting this to `ACCESSIBLE` returns only compartments for which a + // user has INSPECT permissions, either directly or indirectly (permissions can be on a + // resource in a subcompartment). A restricted set of fields is returned for compartments in which a user has + // indirect INSPECT permissions. + // When set to `ANY` permissions are not checked. + AccessLevel GetSubnetTopologyAccessLevelEnum `mandatory:"false" contributesTo:"query" name:"accessLevel" omitEmpty:"true"` + + // When set to true, the hierarchy of compartments is traversed + // and the specified compartment and its subcompartments are + // inspected depending on the the setting of `accessLevel`. + // Default is false. + QueryCompartmentSubtree *bool `mandatory:"false" contributesTo:"query" name:"queryCompartmentSubtree"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For querying if there is a cached value on the server. The If-None-Match HTTP request header + // makes the request conditional. For GET and HEAD methods, the server will send back the requested + // resource, with a 200 status, only if it doesn't have an ETag matching the given ones. + // For other methods, the request will be processed only if the eventually existing resource's + // ETag doesn't match any of the values listed. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // The Cache-Control HTTP header holds directives (instructions) + // for caching in both requests and responses. + CacheControl *string `mandatory:"false" contributesTo:"header" name:"cache-control"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetSubnetTopologyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSubnetTopologyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetSubnetTopologyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSubnetTopologyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetSubnetTopologyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGetSubnetTopologyAccessLevelEnum(string(request.AccessLevel)); !ok && request.AccessLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccessLevel: %s. Supported values are: %s.", request.AccessLevel, strings.Join(GetGetSubnetTopologyAccessLevelEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetSubnetTopologyResponse wrapper for the GetSubnetTopology operation +type GetSubnetTopologyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SubnetTopology instance + SubnetTopology `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetSubnetTopologyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSubnetTopologyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetSubnetTopologyAccessLevelEnum Enum with underlying type: string +type GetSubnetTopologyAccessLevelEnum string + +// Set of constants representing the allowable values for GetSubnetTopologyAccessLevelEnum +const ( + GetSubnetTopologyAccessLevelAny GetSubnetTopologyAccessLevelEnum = "ANY" + GetSubnetTopologyAccessLevelAccessible GetSubnetTopologyAccessLevelEnum = "ACCESSIBLE" +) + +var mappingGetSubnetTopologyAccessLevelEnum = map[string]GetSubnetTopologyAccessLevelEnum{ + "ANY": GetSubnetTopologyAccessLevelAny, + "ACCESSIBLE": GetSubnetTopologyAccessLevelAccessible, +} + +var mappingGetSubnetTopologyAccessLevelEnumLowerCase = map[string]GetSubnetTopologyAccessLevelEnum{ + "any": GetSubnetTopologyAccessLevelAny, + "accessible": GetSubnetTopologyAccessLevelAccessible, +} + +// GetGetSubnetTopologyAccessLevelEnumValues Enumerates the set of values for GetSubnetTopologyAccessLevelEnum +func GetGetSubnetTopologyAccessLevelEnumValues() []GetSubnetTopologyAccessLevelEnum { + values := make([]GetSubnetTopologyAccessLevelEnum, 0) + for _, v := range mappingGetSubnetTopologyAccessLevelEnum { + values = append(values, v) + } + return values +} + +// GetGetSubnetTopologyAccessLevelEnumStringValues Enumerates the set of values in String for GetSubnetTopologyAccessLevelEnum +func GetGetSubnetTopologyAccessLevelEnumStringValues() []string { + return []string{ + "ANY", + "ACCESSIBLE", + } +} + +// GetMappingGetSubnetTopologyAccessLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetSubnetTopologyAccessLevelEnum(val string) (GetSubnetTopologyAccessLevelEnum, bool) { + enum, ok := mappingGetSubnetTopologyAccessLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_tunnel_cpe_device_config_content_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_tunnel_cpe_device_config_content_request_response.go new file mode 100644 index 000000000..222608156 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_tunnel_cpe_device_config_content_request_response.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// GetTunnelCpeDeviceConfigContentRequest wrapper for the GetTunnelCpeDeviceConfigContent operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetTunnelCpeDeviceConfigContent.go.html to see an example of how to use GetTunnelCpeDeviceConfigContentRequest. +type GetTunnelCpeDeviceConfigContentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tunnel. + TunnelId *string `mandatory:"true" contributesTo:"path" name:"tunnelId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetTunnelCpeDeviceConfigContentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetTunnelCpeDeviceConfigContentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetTunnelCpeDeviceConfigContentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetTunnelCpeDeviceConfigContentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetTunnelCpeDeviceConfigContentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetTunnelCpeDeviceConfigContentResponse wrapper for the GetTunnelCpeDeviceConfigContent operation +type GetTunnelCpeDeviceConfigContentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The io.ReadCloser instance + Content io.ReadCloser `presentIn:"body" encoding:"binary"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetTunnelCpeDeviceConfigContentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetTunnelCpeDeviceConfigContentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_tunnel_cpe_device_config_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_tunnel_cpe_device_config_request_response.go new file mode 100644 index 000000000..c8da8bd09 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_tunnel_cpe_device_config_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetTunnelCpeDeviceConfigRequest wrapper for the GetTunnelCpeDeviceConfig operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetTunnelCpeDeviceConfig.go.html to see an example of how to use GetTunnelCpeDeviceConfigRequest. +type GetTunnelCpeDeviceConfigRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tunnel. + TunnelId *string `mandatory:"true" contributesTo:"path" name:"tunnelId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetTunnelCpeDeviceConfigRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetTunnelCpeDeviceConfigRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetTunnelCpeDeviceConfigRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetTunnelCpeDeviceConfigRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetTunnelCpeDeviceConfigRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetTunnelCpeDeviceConfigResponse wrapper for the GetTunnelCpeDeviceConfig operation +type GetTunnelCpeDeviceConfigResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The TunnelCpeDeviceConfig instance + TunnelCpeDeviceConfig `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetTunnelCpeDeviceConfigResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetTunnelCpeDeviceConfigResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_upgrade_status_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_upgrade_status_request_response.go new file mode 100644 index 000000000..d6e620d35 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_upgrade_status_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetUpgradeStatusRequest wrapper for the GetUpgradeStatus operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetUpgradeStatus.go.html to see an example of how to use GetUpgradeStatusRequest. +type GetUpgradeStatusRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"true" contributesTo:"path" name:"drgId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetUpgradeStatusRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetUpgradeStatusRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetUpgradeStatusRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetUpgradeStatusRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetUpgradeStatusRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetUpgradeStatusResponse wrapper for the GetUpgradeStatus operation +type GetUpgradeStatusResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The UpgradeStatus instance + UpgradeStatus `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetUpgradeStatusResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetUpgradeStatusResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_dns_resolver_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_dns_resolver_association_request_response.go new file mode 100644 index 000000000..e43ffa406 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_dns_resolver_association_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVcnDnsResolverAssociationRequest wrapper for the GetVcnDnsResolverAssociation operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVcnDnsResolverAssociation.go.html to see an example of how to use GetVcnDnsResolverAssociationRequest. +type GetVcnDnsResolverAssociationRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVcnDnsResolverAssociationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVcnDnsResolverAssociationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVcnDnsResolverAssociationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVcnDnsResolverAssociationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVcnDnsResolverAssociationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVcnDnsResolverAssociationResponse wrapper for the GetVcnDnsResolverAssociation operation +type GetVcnDnsResolverAssociationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VcnDnsResolverAssociation instance + VcnDnsResolverAssociation `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVcnDnsResolverAssociationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVcnDnsResolverAssociationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_overlap_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_overlap_request_response.go new file mode 100644 index 000000000..63a15843e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_overlap_request_response.go @@ -0,0 +1,162 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVcnOverlapRequest wrapper for the GetVcnOverlap operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVcnOverlap.go.html to see an example of how to use GetVcnOverlapRequest. +type GetVcnOverlapRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` + + // Lists details of the IP Inventory VCN overlap data. + GetVcnOverlapDetails GetIpInventoryVcnOverlapDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVcnOverlapRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVcnOverlapRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVcnOverlapRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVcnOverlapRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVcnOverlapRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVcnOverlapResponse wrapper for the GetVcnOverlap operation +type GetVcnOverlapResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpInventoryVcnOverlapCollection instance + IpInventoryVcnOverlapCollection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. A pagination token to get the total number of results available. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // The IpInventory API current state. + LifecycleState GetVcnOverlapLifecycleStateEnum `presentIn:"header" name:"lifecycle-state"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the resource. + DataRequestId *string `presentIn:"header" name:"data-request-id"` +} + +func (response GetVcnOverlapResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVcnOverlapResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetVcnOverlapLifecycleStateEnum Enum with underlying type: string +type GetVcnOverlapLifecycleStateEnum string + +// Set of constants representing the allowable values for GetVcnOverlapLifecycleStateEnum +const ( + GetVcnOverlapLifecycleStateInProgress GetVcnOverlapLifecycleStateEnum = "IN_PROGRESS" + GetVcnOverlapLifecycleStateDone GetVcnOverlapLifecycleStateEnum = "DONE" +) + +var mappingGetVcnOverlapLifecycleStateEnum = map[string]GetVcnOverlapLifecycleStateEnum{ + "IN_PROGRESS": GetVcnOverlapLifecycleStateInProgress, + "DONE": GetVcnOverlapLifecycleStateDone, +} + +var mappingGetVcnOverlapLifecycleStateEnumLowerCase = map[string]GetVcnOverlapLifecycleStateEnum{ + "in_progress": GetVcnOverlapLifecycleStateInProgress, + "done": GetVcnOverlapLifecycleStateDone, +} + +// GetGetVcnOverlapLifecycleStateEnumValues Enumerates the set of values for GetVcnOverlapLifecycleStateEnum +func GetGetVcnOverlapLifecycleStateEnumValues() []GetVcnOverlapLifecycleStateEnum { + values := make([]GetVcnOverlapLifecycleStateEnum, 0) + for _, v := range mappingGetVcnOverlapLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetGetVcnOverlapLifecycleStateEnumStringValues Enumerates the set of values in String for GetVcnOverlapLifecycleStateEnum +func GetGetVcnOverlapLifecycleStateEnumStringValues() []string { + return []string{ + "IN_PROGRESS", + "DONE", + } +} + +// GetMappingGetVcnOverlapLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetVcnOverlapLifecycleStateEnum(val string) (GetVcnOverlapLifecycleStateEnum, bool) { + enum, ok := mappingGetVcnOverlapLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_request_response.go new file mode 100644 index 000000000..182fad481 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVcnRequest wrapper for the GetVcn operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVcn.go.html to see an example of how to use GetVcnRequest. +type GetVcnRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVcnRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVcnRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVcnRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVcnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVcnRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVcnResponse wrapper for the GetVcn operation +type GetVcnResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Vcn instance + Vcn `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVcnResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVcnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_topology_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_topology_request_response.go new file mode 100644 index 000000000..c709ebb13 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_topology_request_response.go @@ -0,0 +1,167 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVcnTopologyRequest wrapper for the GetVcnTopology operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVcnTopology.go.html to see an example of how to use GetVcnTopologyRequest. +type GetVcnTopologyRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" contributesTo:"query" name:"vcnId"` + + // Valid values are `ANY` and `ACCESSIBLE`. The default is `ANY`. + // Setting this to `ACCESSIBLE` returns only compartments for which a + // user has INSPECT permissions, either directly or indirectly (permissions can be on a + // resource in a subcompartment). A restricted set of fields is returned for compartments in which a user has + // indirect INSPECT permissions. + // When set to `ANY` permissions are not checked. + AccessLevel GetVcnTopologyAccessLevelEnum `mandatory:"false" contributesTo:"query" name:"accessLevel" omitEmpty:"true"` + + // When set to true, the hierarchy of compartments is traversed + // and the specified compartment and its subcompartments are + // inspected depending on the the setting of `accessLevel`. + // Default is false. + QueryCompartmentSubtree *bool `mandatory:"false" contributesTo:"query" name:"queryCompartmentSubtree"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For querying if there is a cached value on the server. The If-None-Match HTTP request header + // makes the request conditional. For GET and HEAD methods, the server will send back the requested + // resource, with a 200 status, only if it doesn't have an ETag matching the given ones. + // For other methods, the request will be processed only if the eventually existing resource's + // ETag doesn't match any of the values listed. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // The Cache-Control HTTP header holds directives (instructions) + // for caching in both requests and responses. + CacheControl *string `mandatory:"false" contributesTo:"header" name:"cache-control"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVcnTopologyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVcnTopologyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVcnTopologyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVcnTopologyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVcnTopologyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGetVcnTopologyAccessLevelEnum(string(request.AccessLevel)); !ok && request.AccessLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccessLevel: %s. Supported values are: %s.", request.AccessLevel, strings.Join(GetGetVcnTopologyAccessLevelEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVcnTopologyResponse wrapper for the GetVcnTopology operation +type GetVcnTopologyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VcnTopology instance + VcnTopology `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVcnTopologyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVcnTopologyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetVcnTopologyAccessLevelEnum Enum with underlying type: string +type GetVcnTopologyAccessLevelEnum string + +// Set of constants representing the allowable values for GetVcnTopologyAccessLevelEnum +const ( + GetVcnTopologyAccessLevelAny GetVcnTopologyAccessLevelEnum = "ANY" + GetVcnTopologyAccessLevelAccessible GetVcnTopologyAccessLevelEnum = "ACCESSIBLE" +) + +var mappingGetVcnTopologyAccessLevelEnum = map[string]GetVcnTopologyAccessLevelEnum{ + "ANY": GetVcnTopologyAccessLevelAny, + "ACCESSIBLE": GetVcnTopologyAccessLevelAccessible, +} + +var mappingGetVcnTopologyAccessLevelEnumLowerCase = map[string]GetVcnTopologyAccessLevelEnum{ + "any": GetVcnTopologyAccessLevelAny, + "accessible": GetVcnTopologyAccessLevelAccessible, +} + +// GetGetVcnTopologyAccessLevelEnumValues Enumerates the set of values for GetVcnTopologyAccessLevelEnum +func GetGetVcnTopologyAccessLevelEnumValues() []GetVcnTopologyAccessLevelEnum { + values := make([]GetVcnTopologyAccessLevelEnum, 0) + for _, v := range mappingGetVcnTopologyAccessLevelEnum { + values = append(values, v) + } + return values +} + +// GetGetVcnTopologyAccessLevelEnumStringValues Enumerates the set of values in String for GetVcnTopologyAccessLevelEnum +func GetGetVcnTopologyAccessLevelEnumStringValues() []string { + return []string{ + "ANY", + "ACCESSIBLE", + } +} + +// GetMappingGetVcnTopologyAccessLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetVcnTopologyAccessLevelEnum(val string) (GetVcnTopologyAccessLevelEnum, bool) { + enum, ok := mappingGetVcnTopologyAccessLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_virtual_circuit_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_virtual_circuit_request_response.go new file mode 100644 index 000000000..5afe5a4d5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_virtual_circuit_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVirtualCircuitRequest wrapper for the GetVirtualCircuit operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVirtualCircuit.go.html to see an example of how to use GetVirtualCircuitRequest. +type GetVirtualCircuitRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit. + VirtualCircuitId *string `mandatory:"true" contributesTo:"path" name:"virtualCircuitId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVirtualCircuitRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVirtualCircuitRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVirtualCircuitRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVirtualCircuitRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVirtualCircuitRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVirtualCircuitResponse wrapper for the GetVirtualCircuit operation +type GetVirtualCircuitResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VirtualCircuit instance + VirtualCircuit `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVirtualCircuitResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVirtualCircuitResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vlan_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vlan_request_response.go new file mode 100644 index 000000000..a4d2f62e5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vlan_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVlanRequest wrapper for the GetVlan operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVlan.go.html to see an example of how to use GetVlanRequest. +type GetVlanRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VLAN. + VlanId *string `mandatory:"true" contributesTo:"path" name:"vlanId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVlanRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVlanRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVlanRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVlanRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVlanRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVlanResponse wrapper for the GetVlan operation +type GetVlanResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Vlan instance + Vlan `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVlanResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVlanResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vnic_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vnic_attachment_request_response.go new file mode 100644 index 000000000..cfee8e4b7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vnic_attachment_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVnicAttachmentRequest wrapper for the GetVnicAttachment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVnicAttachment.go.html to see an example of how to use GetVnicAttachmentRequest. +type GetVnicAttachmentRequest struct { + + // The OCID of the VNIC attachment. + VnicAttachmentId *string `mandatory:"true" contributesTo:"path" name:"vnicAttachmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVnicAttachmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVnicAttachmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVnicAttachmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVnicAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVnicAttachmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVnicAttachmentResponse wrapper for the GetVnicAttachment operation +type GetVnicAttachmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VnicAttachment instance + VnicAttachment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVnicAttachmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVnicAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vnic_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vnic_request_response.go new file mode 100644 index 000000000..3bc204cf2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vnic_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVnicRequest wrapper for the GetVnic operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVnic.go.html to see an example of how to use GetVnicRequest. +type GetVnicRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC. + VnicId *string `mandatory:"true" contributesTo:"path" name:"vnicId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVnicRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVnicRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVnicRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVnicRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVnicRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVnicResponse wrapper for the GetVnic operation +type GetVnicResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Vnic instance + Vnic `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVnicResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVnicResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_attachment_request_response.go new file mode 100644 index 000000000..86dd32448 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_attachment_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVolumeAttachmentRequest wrapper for the GetVolumeAttachment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeAttachment.go.html to see an example of how to use GetVolumeAttachmentRequest. +type GetVolumeAttachmentRequest struct { + + // The OCID of the volume attachment. + VolumeAttachmentId *string `mandatory:"true" contributesTo:"path" name:"volumeAttachmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeAttachmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeAttachmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVolumeAttachmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVolumeAttachmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVolumeAttachmentResponse wrapper for the GetVolumeAttachment operation +type GetVolumeAttachmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeAttachment instance + VolumeAttachment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeAttachmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_backup_policy_asset_assignment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_backup_policy_asset_assignment_request_response.go new file mode 100644 index 000000000..f2322e679 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_backup_policy_asset_assignment_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVolumeBackupPolicyAssetAssignmentRequest wrapper for the GetVolumeBackupPolicyAssetAssignment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeBackupPolicyAssetAssignment.go.html to see an example of how to use GetVolumeBackupPolicyAssetAssignmentRequest. +type GetVolumeBackupPolicyAssetAssignmentRequest struct { + + // The OCID of an asset (e.g. a volume). + AssetId *string `mandatory:"true" contributesTo:"query" name:"assetId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeBackupPolicyAssetAssignmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeBackupPolicyAssetAssignmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVolumeBackupPolicyAssetAssignmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeBackupPolicyAssetAssignmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVolumeBackupPolicyAssetAssignmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVolumeBackupPolicyAssetAssignmentResponse wrapper for the GetVolumeBackupPolicyAssetAssignment operation +type GetVolumeBackupPolicyAssetAssignmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VolumeBackupPolicyAssignment instances + Items []VolumeBackupPolicyAssignment `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeBackupPolicyAssetAssignmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeBackupPolicyAssetAssignmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_backup_policy_assignment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_backup_policy_assignment_request_response.go new file mode 100644 index 000000000..faaf2371d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_backup_policy_assignment_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVolumeBackupPolicyAssignmentRequest wrapper for the GetVolumeBackupPolicyAssignment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeBackupPolicyAssignment.go.html to see an example of how to use GetVolumeBackupPolicyAssignmentRequest. +type GetVolumeBackupPolicyAssignmentRequest struct { + + // The OCID of the volume backup policy assignment. + PolicyAssignmentId *string `mandatory:"true" contributesTo:"path" name:"policyAssignmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeBackupPolicyAssignmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeBackupPolicyAssignmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVolumeBackupPolicyAssignmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeBackupPolicyAssignmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVolumeBackupPolicyAssignmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVolumeBackupPolicyAssignmentResponse wrapper for the GetVolumeBackupPolicyAssignment operation +type GetVolumeBackupPolicyAssignmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeBackupPolicyAssignment instance + VolumeBackupPolicyAssignment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeBackupPolicyAssignmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeBackupPolicyAssignmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_backup_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_backup_policy_request_response.go new file mode 100644 index 000000000..1f24cffe0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_backup_policy_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVolumeBackupPolicyRequest wrapper for the GetVolumeBackupPolicy operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeBackupPolicy.go.html to see an example of how to use GetVolumeBackupPolicyRequest. +type GetVolumeBackupPolicyRequest struct { + + // The OCID of the volume backup policy. + PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeBackupPolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeBackupPolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVolumeBackupPolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeBackupPolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVolumeBackupPolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVolumeBackupPolicyResponse wrapper for the GetVolumeBackupPolicy operation +type GetVolumeBackupPolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeBackupPolicy instance + VolumeBackupPolicy `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeBackupPolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeBackupPolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_backup_request_response.go new file mode 100644 index 000000000..21aca22aa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_backup_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVolumeBackupRequest wrapper for the GetVolumeBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeBackup.go.html to see an example of how to use GetVolumeBackupRequest. +type GetVolumeBackupRequest struct { + + // The OCID of the volume backup. + VolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeBackupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVolumeBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVolumeBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVolumeBackupResponse wrapper for the GetVolumeBackup operation +type GetVolumeBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeBackup instance + VolumeBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_group_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_group_backup_request_response.go new file mode 100644 index 000000000..198ed218d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_group_backup_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVolumeGroupBackupRequest wrapper for the GetVolumeGroupBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeGroupBackup.go.html to see an example of how to use GetVolumeGroupBackupRequest. +type GetVolumeGroupBackupRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup. + VolumeGroupBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupBackupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeGroupBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeGroupBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVolumeGroupBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeGroupBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVolumeGroupBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVolumeGroupBackupResponse wrapper for the GetVolumeGroupBackup operation +type GetVolumeGroupBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeGroupBackup instance + VolumeGroupBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeGroupBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeGroupBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_group_replica_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_group_replica_request_response.go new file mode 100644 index 000000000..86b6070f8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_group_replica_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVolumeGroupReplicaRequest wrapper for the GetVolumeGroupReplica operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeGroupReplica.go.html to see an example of how to use GetVolumeGroupReplicaRequest. +type GetVolumeGroupReplicaRequest struct { + + // The OCID of the volume replica group. + VolumeGroupReplicaId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupReplicaId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeGroupReplicaRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeGroupReplicaRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVolumeGroupReplicaRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeGroupReplicaRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVolumeGroupReplicaRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVolumeGroupReplicaResponse wrapper for the GetVolumeGroupReplica operation +type GetVolumeGroupReplicaResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeGroupReplica instance + VolumeGroupReplica `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeGroupReplicaResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeGroupReplicaResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_group_request_response.go new file mode 100644 index 000000000..55bf712af --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_group_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVolumeGroupRequest wrapper for the GetVolumeGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeGroup.go.html to see an example of how to use GetVolumeGroupRequest. +type GetVolumeGroupRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group. + VolumeGroupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVolumeGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVolumeGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVolumeGroupResponse wrapper for the GetVolumeGroup operation +type GetVolumeGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeGroup instance + VolumeGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_kms_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_kms_key_request_response.go new file mode 100644 index 000000000..7528bb4c5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_kms_key_request_response.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVolumeKmsKeyRequest wrapper for the GetVolumeKmsKey operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolumeKmsKey.go.html to see an example of how to use GetVolumeKmsKeyRequest. +type GetVolumeKmsKeyRequest struct { + + // The OCID of the volume. + VolumeId *string `mandatory:"true" contributesTo:"path" name:"volumeId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeKmsKeyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeKmsKeyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVolumeKmsKeyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeKmsKeyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVolumeKmsKeyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVolumeKmsKeyResponse wrapper for the GetVolumeKmsKey operation +type GetVolumeKmsKeyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeKmsKey instance + VolumeKmsKey `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeKmsKeyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeKmsKeyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_request_response.go new file mode 100644 index 000000000..784599e3b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_volume_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVolumeRequest wrapper for the GetVolume operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVolume.go.html to see an example of how to use GetVolumeRequest. +type GetVolumeRequest struct { + + // The OCID of the volume. + VolumeId *string `mandatory:"true" contributesTo:"path" name:"volumeId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVolumeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVolumeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVolumeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVolumeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVolumeResponse wrapper for the GetVolume operation +type GetVolumeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Volume instance + Volume `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVolumeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vtap_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vtap_request_response.go new file mode 100644 index 000000000..3ff957b8c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vtap_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVtapRequest wrapper for the GetVtap operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVtap.go.html to see an example of how to use GetVtapRequest. +type GetVtapRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VTAP. + VtapId *string `mandatory:"true" contributesTo:"path" name:"vtapId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVtapRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVtapRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVtapRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVtapRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVtapRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVtapResponse wrapper for the GetVtap operation +type GetVtapResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Vtap instance + Vtap `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVtapResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVtapResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_windows_instance_initial_credentials_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_windows_instance_initial_credentials_request_response.go new file mode 100644 index 000000000..89d55d92a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_windows_instance_initial_credentials_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetWindowsInstanceInitialCredentialsRequest wrapper for the GetWindowsInstanceInitialCredentials operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetWindowsInstanceInitialCredentials.go.html to see an example of how to use GetWindowsInstanceInitialCredentialsRequest. +type GetWindowsInstanceInitialCredentialsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetWindowsInstanceInitialCredentialsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetWindowsInstanceInitialCredentialsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetWindowsInstanceInitialCredentialsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetWindowsInstanceInitialCredentialsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetWindowsInstanceInitialCredentialsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetWindowsInstanceInitialCredentialsResponse wrapper for the GetWindowsInstanceInitialCredentials operation +type GetWindowsInstanceInitialCredentialsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstanceCredentials instance + InstanceCredentials `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetWindowsInstanceInitialCredentialsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetWindowsInstanceInitialCredentialsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/host_group_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/host_group_configuration.go new file mode 100644 index 000000000..7319d004e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/host_group_configuration.go @@ -0,0 +1,146 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HostGroupConfiguration Host group configuration +type HostGroupConfiguration struct { + + // Either the platform name or compute shape that the configuration is targeting + Target *string `mandatory:"false" json:"target"` + + // The OCID for firmware bundle + FirmwareBundleId *string `mandatory:"false" json:"firmwareBundleId"` + + // Preferred recycle level for hosts associated with the reservation config. + // * `SKIP_RECYCLE` - Skips host wipe. + // * `FULL_RECYCLE` - Does not skip host wipe. This is the default behavior. + RecycleLevel HostGroupConfigurationRecycleLevelEnum `mandatory:"false" json:"recycleLevel,omitempty"` + + // The state of the host group configuration. + State HostGroupConfigurationStateEnum `mandatory:"false" json:"state,omitempty"` +} + +func (m HostGroupConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m HostGroupConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingHostGroupConfigurationRecycleLevelEnum(string(m.RecycleLevel)); !ok && m.RecycleLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RecycleLevel: %s. Supported values are: %s.", m.RecycleLevel, strings.Join(GetHostGroupConfigurationRecycleLevelEnumStringValues(), ","))) + } + if _, ok := GetMappingHostGroupConfigurationStateEnum(string(m.State)); !ok && m.State != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for State: %s. Supported values are: %s.", m.State, strings.Join(GetHostGroupConfigurationStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// HostGroupConfigurationRecycleLevelEnum Enum with underlying type: string +type HostGroupConfigurationRecycleLevelEnum string + +// Set of constants representing the allowable values for HostGroupConfigurationRecycleLevelEnum +const ( + HostGroupConfigurationRecycleLevelSkipRecycle HostGroupConfigurationRecycleLevelEnum = "SKIP_RECYCLE" + HostGroupConfigurationRecycleLevelFullRecycle HostGroupConfigurationRecycleLevelEnum = "FULL_RECYCLE" +) + +var mappingHostGroupConfigurationRecycleLevelEnum = map[string]HostGroupConfigurationRecycleLevelEnum{ + "SKIP_RECYCLE": HostGroupConfigurationRecycleLevelSkipRecycle, + "FULL_RECYCLE": HostGroupConfigurationRecycleLevelFullRecycle, +} + +var mappingHostGroupConfigurationRecycleLevelEnumLowerCase = map[string]HostGroupConfigurationRecycleLevelEnum{ + "skip_recycle": HostGroupConfigurationRecycleLevelSkipRecycle, + "full_recycle": HostGroupConfigurationRecycleLevelFullRecycle, +} + +// GetHostGroupConfigurationRecycleLevelEnumValues Enumerates the set of values for HostGroupConfigurationRecycleLevelEnum +func GetHostGroupConfigurationRecycleLevelEnumValues() []HostGroupConfigurationRecycleLevelEnum { + values := make([]HostGroupConfigurationRecycleLevelEnum, 0) + for _, v := range mappingHostGroupConfigurationRecycleLevelEnum { + values = append(values, v) + } + return values +} + +// GetHostGroupConfigurationRecycleLevelEnumStringValues Enumerates the set of values in String for HostGroupConfigurationRecycleLevelEnum +func GetHostGroupConfigurationRecycleLevelEnumStringValues() []string { + return []string{ + "SKIP_RECYCLE", + "FULL_RECYCLE", + } +} + +// GetMappingHostGroupConfigurationRecycleLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingHostGroupConfigurationRecycleLevelEnum(val string) (HostGroupConfigurationRecycleLevelEnum, bool) { + enum, ok := mappingHostGroupConfigurationRecycleLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// HostGroupConfigurationStateEnum Enum with underlying type: string +type HostGroupConfigurationStateEnum string + +// Set of constants representing the allowable values for HostGroupConfigurationStateEnum +const ( + HostGroupConfigurationStateValid HostGroupConfigurationStateEnum = "VALID" + HostGroupConfigurationStateInvalid HostGroupConfigurationStateEnum = "INVALID" +) + +var mappingHostGroupConfigurationStateEnum = map[string]HostGroupConfigurationStateEnum{ + "VALID": HostGroupConfigurationStateValid, + "INVALID": HostGroupConfigurationStateInvalid, +} + +var mappingHostGroupConfigurationStateEnumLowerCase = map[string]HostGroupConfigurationStateEnum{ + "valid": HostGroupConfigurationStateValid, + "invalid": HostGroupConfigurationStateInvalid, +} + +// GetHostGroupConfigurationStateEnumValues Enumerates the set of values for HostGroupConfigurationStateEnum +func GetHostGroupConfigurationStateEnumValues() []HostGroupConfigurationStateEnum { + values := make([]HostGroupConfigurationStateEnum, 0) + for _, v := range mappingHostGroupConfigurationStateEnum { + values = append(values, v) + } + return values +} + +// GetHostGroupConfigurationStateEnumStringValues Enumerates the set of values in String for HostGroupConfigurationStateEnum +func GetHostGroupConfigurationStateEnumStringValues() []string { + return []string{ + "VALID", + "INVALID", + } +} + +// GetMappingHostGroupConfigurationStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingHostGroupConfigurationStateEnum(val string) (HostGroupConfigurationStateEnum, bool) { + enum, ok := mappingHostGroupConfigurationStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/host_group_placement_constraint_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/host_group_placement_constraint_details.go new file mode 100644 index 000000000..2f3090780 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/host_group_placement_constraint_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HostGroupPlacementConstraintDetails The details for providing placement constraints using the compute host group OCID. +type HostGroupPlacementConstraintDetails struct { + + // The OCID of the compute host group. This is only available for dedicated capacity customers. + ComputeHostGroupId *string `mandatory:"true" json:"computeHostGroupId"` +} + +func (m HostGroupPlacementConstraintDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m HostGroupPlacementConstraintDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m HostGroupPlacementConstraintDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeHostGroupPlacementConstraintDetails HostGroupPlacementConstraintDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeHostGroupPlacementConstraintDetails + }{ + "HOST_GROUP", + (MarshalTypeHostGroupPlacementConstraintDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/i_scsi_volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/i_scsi_volume_attachment.go new file mode 100644 index 000000000..6533263b4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/i_scsi_volume_attachment.go @@ -0,0 +1,231 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IScsiVolumeAttachment An ISCSI volume attachment. +type IScsiVolumeAttachment struct { + + // The availability domain of an instance. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the volume attachment. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the instance the volume is attached to. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The date and time the volume was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the volume. + VolumeId *string `mandatory:"true" json:"volumeId"` + + // The volume's iSCSI IP address. + // Example: `169.254.0.2` + Ipv4 *string `mandatory:"true" json:"ipv4"` + + // The target volume's iSCSI Qualified Name in the format defined + // by RFC 3720 (https://tools.ietf.org/html/rfc3720#page-32). + // Example: `iqn.2015-12.us.oracle.com:` + Iqn *string `mandatory:"true" json:"iqn"` + + // The volume's iSCSI port, usually port 860 or 3260. + // Example: `3260` + Port *int `mandatory:"true" json:"port"` + + // The device name. + Device *string `mandatory:"false" json:"device"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether the attachment was created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + IsShareable *bool `mandatory:"false" json:"isShareable"` + + // Whether in-transit encryption for the data volume's paravirtualized attachment is enabled or not. + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` + + // Whether the Iscsi or Paravirtualized attachment is multipath or not, it is not applicable to NVMe attachment. + IsMultipath *bool `mandatory:"false" json:"isMultipath"` + + // Flag indicating if this volume was created for the customer as part of a simplified launch. + // Used to determine whether the volume requires deletion on instance termination. + IsVolumeCreatedDuringLaunch *bool `mandatory:"false" json:"isVolumeCreatedDuringLaunch"` + + // The Challenge-Handshake-Authentication-Protocol (CHAP) secret + // valid for the associated CHAP user name. + // (Also called the "CHAP password".) + ChapSecret *string `mandatory:"false" json:"chapSecret"` + + // The volume's system-generated Challenge-Handshake-Authentication-Protocol + // (CHAP) user name. See RFC 1994 (https://tools.ietf.org/html/rfc1994) for more on CHAP. + // Example: `ocid1.volume.oc1.phx.` + ChapUsername *string `mandatory:"false" json:"chapUsername"` + + // The volume's iSCSI IPv6 address. + // Example: `2001:db8::1/64` + Ipv6 *string `mandatory:"false" json:"ipv6"` + + // A list of secondary multipath devices + MultipathDevices []MultipathDevice `mandatory:"false" json:"multipathDevices"` + + // Whether Oracle Cloud Agent is enabled perform the iSCSI login and logout commands after the volume attach or detach operations for non multipath-enabled iSCSI attachments. + IsAgentAutoIscsiLoginEnabled *bool `mandatory:"false" json:"isAgentAutoIscsiLoginEnabled"` + + // The current state of the volume attachment. + LifecycleState VolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The iscsi login state of the volume attachment. For a Iscsi volume attachment, + // all iscsi sessions need to be all logged-in or logged-out to be in logged-in or logged-out state. + IscsiLoginState VolumeAttachmentIscsiLoginStateEnum `mandatory:"false" json:"iscsiLoginState,omitempty"` + + // Refer the top-level definition of encryptionInTransitType. + // The default value is NONE. + EncryptionInTransitType EncryptionInTransitTypeEnum `mandatory:"false" json:"encryptionInTransitType,omitempty"` +} + +// GetAvailabilityDomain returns AvailabilityDomain +func (m IScsiVolumeAttachment) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetCompartmentId returns CompartmentId +func (m IScsiVolumeAttachment) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDevice returns Device +func (m IScsiVolumeAttachment) GetDevice() *string { + return m.Device +} + +// GetDisplayName returns DisplayName +func (m IScsiVolumeAttachment) GetDisplayName() *string { + return m.DisplayName +} + +// GetId returns Id +func (m IScsiVolumeAttachment) GetId() *string { + return m.Id +} + +// GetInstanceId returns InstanceId +func (m IScsiVolumeAttachment) GetInstanceId() *string { + return m.InstanceId +} + +// GetIsReadOnly returns IsReadOnly +func (m IScsiVolumeAttachment) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetIsShareable returns IsShareable +func (m IScsiVolumeAttachment) GetIsShareable() *bool { + return m.IsShareable +} + +// GetLifecycleState returns LifecycleState +func (m IScsiVolumeAttachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum { + return m.LifecycleState +} + +// GetTimeCreated returns TimeCreated +func (m IScsiVolumeAttachment) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetVolumeId returns VolumeId +func (m IScsiVolumeAttachment) GetVolumeId() *string { + return m.VolumeId +} + +// GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled +func (m IScsiVolumeAttachment) GetIsPvEncryptionInTransitEnabled() *bool { + return m.IsPvEncryptionInTransitEnabled +} + +// GetIsMultipath returns IsMultipath +func (m IScsiVolumeAttachment) GetIsMultipath() *bool { + return m.IsMultipath +} + +// GetIscsiLoginState returns IscsiLoginState +func (m IScsiVolumeAttachment) GetIscsiLoginState() VolumeAttachmentIscsiLoginStateEnum { + return m.IscsiLoginState +} + +// GetIsVolumeCreatedDuringLaunch returns IsVolumeCreatedDuringLaunch +func (m IScsiVolumeAttachment) GetIsVolumeCreatedDuringLaunch() *bool { + return m.IsVolumeCreatedDuringLaunch +} + +func (m IScsiVolumeAttachment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IScsiVolumeAttachment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingVolumeAttachmentLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVolumeAttachmentLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingVolumeAttachmentIscsiLoginStateEnum(string(m.IscsiLoginState)); !ok && m.IscsiLoginState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IscsiLoginState: %s. Supported values are: %s.", m.IscsiLoginState, strings.Join(GetVolumeAttachmentIscsiLoginStateEnumStringValues(), ","))) + } + if _, ok := GetMappingEncryptionInTransitTypeEnum(string(m.EncryptionInTransitType)); !ok && m.EncryptionInTransitType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncryptionInTransitType: %s. Supported values are: %s.", m.EncryptionInTransitType, strings.Join(GetEncryptionInTransitTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m IScsiVolumeAttachment) MarshalJSON() (buff []byte, e error) { + type MarshalTypeIScsiVolumeAttachment IScsiVolumeAttachment + s := struct { + DiscriminatorParam string `json:"attachmentType"` + MarshalTypeIScsiVolumeAttachment + }{ + "iscsi", + (MarshalTypeIScsiVolumeAttachment)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/icmp_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/icmp_options.go new file mode 100644 index 000000000..f7324aa06 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/icmp_options.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IcmpOptions Optional and valid only for ICMP and ICMPv6. Use to specify a particular ICMP type and code +// as defined in: +// - ICMP Parameters (http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml) +// - ICMPv6 Parameters (https://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xhtml) +// If you specify ICMP or ICMPv6 as the protocol but omit this object, then all ICMP types and +// codes are allowed. If you do provide this object, the type is required and the code is optional. +// To enable MTU negotiation for ingress internet traffic via IPv4, make sure to allow type 3 ("Destination +// Unreachable") code 4 ("Fragmentation Needed and Don't Fragment was Set"). If you need to specify +// multiple codes for a single type, create a separate security list rule for each. +type IcmpOptions struct { + + // The ICMP type. + Type *int `mandatory:"true" json:"type"` + + // The ICMP code (optional). + Code *int `mandatory:"false" json:"code"` +} + +func (m IcmpOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IcmpOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/image.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/image.go new file mode 100644 index 000000000..2fb48bfe7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/image.go @@ -0,0 +1,279 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Image A boot disk image for launching an instance. For more information, see +// Overview of the Compute Service (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type Image struct { + + // The OCID of the compartment containing the instance you want to use as the basis for the image. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Whether instances launched with this image can be used to create new images. + // For example, you cannot create an image of an Oracle Database instance. + // Example: `true` + CreateImageAllowed *bool `mandatory:"true" json:"createImageAllowed"` + + // The OCID of the image. + Id *string `mandatory:"true" json:"id"` + + LifecycleState ImageLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The image's operating system. + // Example: `Oracle Linux` + OperatingSystem *string `mandatory:"true" json:"operatingSystem"` + + // The image's operating system version. + // Example: `7.2` + OperatingSystemVersion *string `mandatory:"true" json:"operatingSystemVersion"` + + // The date and time the image was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the image originally used to launch the instance. + BaseImageId *string `mandatory:"false" json:"baseImageId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name for the image. It does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // You cannot use a platform image name as a custom image name. + // Example: `My custom Oracle Linux image` + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: + // * `NATIVE` - VM instances launch with iSCSI boot and VFIO devices. The default value for platform images. + // * `EMULATED` - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. + // * `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using VirtIO drivers. + // * `ACCELERATEDPV` - VM instances launch with accelerated paravirtualized networking type. + // * `CUSTOM` - VM instances launch with custom configuration settings specified in the `LaunchOptions` parameter. + LaunchMode ImageLaunchModeEnum `mandatory:"false" json:"launchMode,omitempty"` + + LaunchOptions *LaunchOptions `mandatory:"false" json:"launchOptions"` + + AgentFeatures *InstanceAgentFeatures `mandatory:"false" json:"agentFeatures"` + + // The listing type of the image. The default value is "NONE". + ListingType ImageListingTypeEnum `mandatory:"false" json:"listingType,omitempty"` + + // The boot volume size for an instance launched from this image (1 MB = 1,048,576 bytes). + // Note this is not the same as the size of the image when it was exported or the actual size of the image. + // Example: `47694` + SizeInMBs *int64 `mandatory:"false" json:"sizeInMBs"` + + // The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes). + // Example: `100` + BillableSizeInGBs *int64 `mandatory:"false" json:"billableSizeInGBs"` +} + +func (m Image) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Image) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingImageLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetImageLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingImageLaunchModeEnum(string(m.LaunchMode)); !ok && m.LaunchMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LaunchMode: %s. Supported values are: %s.", m.LaunchMode, strings.Join(GetImageLaunchModeEnumStringValues(), ","))) + } + if _, ok := GetMappingImageListingTypeEnum(string(m.ListingType)); !ok && m.ListingType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ListingType: %s. Supported values are: %s.", m.ListingType, strings.Join(GetImageListingTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ImageLaunchModeEnum Enum with underlying type: string +type ImageLaunchModeEnum string + +// Set of constants representing the allowable values for ImageLaunchModeEnum +const ( + ImageLaunchModeNative ImageLaunchModeEnum = "NATIVE" + ImageLaunchModeEmulated ImageLaunchModeEnum = "EMULATED" + ImageLaunchModeParavirtualized ImageLaunchModeEnum = "PARAVIRTUALIZED" + ImageLaunchModeAcceleratedpv ImageLaunchModeEnum = "ACCELERATEDPV" + ImageLaunchModeCustom ImageLaunchModeEnum = "CUSTOM" +) + +var mappingImageLaunchModeEnum = map[string]ImageLaunchModeEnum{ + "NATIVE": ImageLaunchModeNative, + "EMULATED": ImageLaunchModeEmulated, + "PARAVIRTUALIZED": ImageLaunchModeParavirtualized, + "ACCELERATEDPV": ImageLaunchModeAcceleratedpv, + "CUSTOM": ImageLaunchModeCustom, +} + +var mappingImageLaunchModeEnumLowerCase = map[string]ImageLaunchModeEnum{ + "native": ImageLaunchModeNative, + "emulated": ImageLaunchModeEmulated, + "paravirtualized": ImageLaunchModeParavirtualized, + "acceleratedpv": ImageLaunchModeAcceleratedpv, + "custom": ImageLaunchModeCustom, +} + +// GetImageLaunchModeEnumValues Enumerates the set of values for ImageLaunchModeEnum +func GetImageLaunchModeEnumValues() []ImageLaunchModeEnum { + values := make([]ImageLaunchModeEnum, 0) + for _, v := range mappingImageLaunchModeEnum { + values = append(values, v) + } + return values +} + +// GetImageLaunchModeEnumStringValues Enumerates the set of values in String for ImageLaunchModeEnum +func GetImageLaunchModeEnumStringValues() []string { + return []string{ + "NATIVE", + "EMULATED", + "PARAVIRTUALIZED", + "ACCELERATEDPV", + "CUSTOM", + } +} + +// GetMappingImageLaunchModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingImageLaunchModeEnum(val string) (ImageLaunchModeEnum, bool) { + enum, ok := mappingImageLaunchModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ImageLifecycleStateEnum Enum with underlying type: string +type ImageLifecycleStateEnum string + +// Set of constants representing the allowable values for ImageLifecycleStateEnum +const ( + ImageLifecycleStateProvisioning ImageLifecycleStateEnum = "PROVISIONING" + ImageLifecycleStateImporting ImageLifecycleStateEnum = "IMPORTING" + ImageLifecycleStateAvailable ImageLifecycleStateEnum = "AVAILABLE" + ImageLifecycleStateExporting ImageLifecycleStateEnum = "EXPORTING" + ImageLifecycleStateDisabled ImageLifecycleStateEnum = "DISABLED" + ImageLifecycleStateDeleted ImageLifecycleStateEnum = "DELETED" +) + +var mappingImageLifecycleStateEnum = map[string]ImageLifecycleStateEnum{ + "PROVISIONING": ImageLifecycleStateProvisioning, + "IMPORTING": ImageLifecycleStateImporting, + "AVAILABLE": ImageLifecycleStateAvailable, + "EXPORTING": ImageLifecycleStateExporting, + "DISABLED": ImageLifecycleStateDisabled, + "DELETED": ImageLifecycleStateDeleted, +} + +var mappingImageLifecycleStateEnumLowerCase = map[string]ImageLifecycleStateEnum{ + "provisioning": ImageLifecycleStateProvisioning, + "importing": ImageLifecycleStateImporting, + "available": ImageLifecycleStateAvailable, + "exporting": ImageLifecycleStateExporting, + "disabled": ImageLifecycleStateDisabled, + "deleted": ImageLifecycleStateDeleted, +} + +// GetImageLifecycleStateEnumValues Enumerates the set of values for ImageLifecycleStateEnum +func GetImageLifecycleStateEnumValues() []ImageLifecycleStateEnum { + values := make([]ImageLifecycleStateEnum, 0) + for _, v := range mappingImageLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetImageLifecycleStateEnumStringValues Enumerates the set of values in String for ImageLifecycleStateEnum +func GetImageLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "IMPORTING", + "AVAILABLE", + "EXPORTING", + "DISABLED", + "DELETED", + } +} + +// GetMappingImageLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingImageLifecycleStateEnum(val string) (ImageLifecycleStateEnum, bool) { + enum, ok := mappingImageLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ImageListingTypeEnum Enum with underlying type: string +type ImageListingTypeEnum string + +// Set of constants representing the allowable values for ImageListingTypeEnum +const ( + ImageListingTypeCommunity ImageListingTypeEnum = "COMMUNITY" + ImageListingTypeNone ImageListingTypeEnum = "NONE" +) + +var mappingImageListingTypeEnum = map[string]ImageListingTypeEnum{ + "COMMUNITY": ImageListingTypeCommunity, + "NONE": ImageListingTypeNone, +} + +var mappingImageListingTypeEnumLowerCase = map[string]ImageListingTypeEnum{ + "community": ImageListingTypeCommunity, + "none": ImageListingTypeNone, +} + +// GetImageListingTypeEnumValues Enumerates the set of values for ImageListingTypeEnum +func GetImageListingTypeEnumValues() []ImageListingTypeEnum { + values := make([]ImageListingTypeEnum, 0) + for _, v := range mappingImageListingTypeEnum { + values = append(values, v) + } + return values +} + +// GetImageListingTypeEnumStringValues Enumerates the set of values in String for ImageListingTypeEnum +func GetImageListingTypeEnumStringValues() []string { + return []string{ + "COMMUNITY", + "NONE", + } +} + +// GetMappingImageListingTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingImageListingTypeEnum(val string) (ImageListingTypeEnum, bool) { + enum, ok := mappingImageListingTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_capability_schema_descriptor.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_capability_schema_descriptor.go new file mode 100644 index 000000000..342689c4a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_capability_schema_descriptor.go @@ -0,0 +1,144 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ImageCapabilitySchemaDescriptor Image Capability Schema Descriptor is a type of capability for an image. +type ImageCapabilitySchemaDescriptor interface { + GetSource() ImageCapabilitySchemaDescriptorSourceEnum +} + +type imagecapabilityschemadescriptor struct { + JsonData []byte + Source ImageCapabilitySchemaDescriptorSourceEnum `mandatory:"true" json:"source"` + DescriptorType string `json:"descriptorType"` +} + +// UnmarshalJSON unmarshals json +func (m *imagecapabilityschemadescriptor) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerimagecapabilityschemadescriptor imagecapabilityschemadescriptor + s := struct { + Model Unmarshalerimagecapabilityschemadescriptor + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Source = s.Model.Source + m.DescriptorType = s.Model.DescriptorType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *imagecapabilityschemadescriptor) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.DescriptorType { + case "enumstring": + mm := EnumStringImageCapabilitySchemaDescriptor{} + err = json.Unmarshal(data, &mm) + return mm, err + case "enuminteger": + mm := EnumIntegerImageCapabilityDescriptor{} + err = json.Unmarshal(data, &mm) + return mm, err + case "boolean": + mm := BooleanImageCapabilitySchemaDescriptor{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for ImageCapabilitySchemaDescriptor: %s.", m.DescriptorType) + return *m, nil + } +} + +// GetSource returns Source +func (m imagecapabilityschemadescriptor) GetSource() ImageCapabilitySchemaDescriptorSourceEnum { + return m.Source +} + +func (m imagecapabilityschemadescriptor) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m imagecapabilityschemadescriptor) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingImageCapabilitySchemaDescriptorSourceEnum(string(m.Source)); !ok && m.Source != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Source: %s. Supported values are: %s.", m.Source, strings.Join(GetImageCapabilitySchemaDescriptorSourceEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ImageCapabilitySchemaDescriptorSourceEnum Enum with underlying type: string +type ImageCapabilitySchemaDescriptorSourceEnum string + +// Set of constants representing the allowable values for ImageCapabilitySchemaDescriptorSourceEnum +const ( + ImageCapabilitySchemaDescriptorSourceGlobal ImageCapabilitySchemaDescriptorSourceEnum = "GLOBAL" + ImageCapabilitySchemaDescriptorSourceImage ImageCapabilitySchemaDescriptorSourceEnum = "IMAGE" +) + +var mappingImageCapabilitySchemaDescriptorSourceEnum = map[string]ImageCapabilitySchemaDescriptorSourceEnum{ + "GLOBAL": ImageCapabilitySchemaDescriptorSourceGlobal, + "IMAGE": ImageCapabilitySchemaDescriptorSourceImage, +} + +var mappingImageCapabilitySchemaDescriptorSourceEnumLowerCase = map[string]ImageCapabilitySchemaDescriptorSourceEnum{ + "global": ImageCapabilitySchemaDescriptorSourceGlobal, + "image": ImageCapabilitySchemaDescriptorSourceImage, +} + +// GetImageCapabilitySchemaDescriptorSourceEnumValues Enumerates the set of values for ImageCapabilitySchemaDescriptorSourceEnum +func GetImageCapabilitySchemaDescriptorSourceEnumValues() []ImageCapabilitySchemaDescriptorSourceEnum { + values := make([]ImageCapabilitySchemaDescriptorSourceEnum, 0) + for _, v := range mappingImageCapabilitySchemaDescriptorSourceEnum { + values = append(values, v) + } + return values +} + +// GetImageCapabilitySchemaDescriptorSourceEnumStringValues Enumerates the set of values in String for ImageCapabilitySchemaDescriptorSourceEnum +func GetImageCapabilitySchemaDescriptorSourceEnumStringValues() []string { + return []string{ + "GLOBAL", + "IMAGE", + } +} + +// GetMappingImageCapabilitySchemaDescriptorSourceEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingImageCapabilitySchemaDescriptorSourceEnum(val string) (ImageCapabilitySchemaDescriptorSourceEnum, bool) { + enum, ok := mappingImageCapabilitySchemaDescriptorSourceEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_memory_constraints.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_memory_constraints.go new file mode 100644 index 000000000..2e17f3011 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_memory_constraints.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ImageMemoryConstraints For a flexible image and shape, the amount of memory supported for instances that use this image. +type ImageMemoryConstraints struct { + + // The minimum amount of memory, in gigabytes. + MinInGBs *int `mandatory:"false" json:"minInGBs"` + + // The maximum amount of memory, in gigabytes. + MaxInGBs *int `mandatory:"false" json:"maxInGBs"` +} + +func (m ImageMemoryConstraints) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ImageMemoryConstraints) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_ocpu_constraints.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_ocpu_constraints.go new file mode 100644 index 000000000..2e421c1c0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_ocpu_constraints.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ImageOcpuConstraints OCPU options for an image and shape. +type ImageOcpuConstraints struct { + + // The minimum number of OCPUs supported for this image and shape. + Min *int `mandatory:"false" json:"min"` + + // The maximum number of OCPUs supported for this image and shape. + Max *int `mandatory:"false" json:"max"` +} + +func (m ImageOcpuConstraints) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ImageOcpuConstraints) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_shape_compatibility_entry.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_shape_compatibility_entry.go new file mode 100644 index 000000000..06da852d3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_shape_compatibility_entry.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ImageShapeCompatibilityEntry An image and shape that are compatible. +type ImageShapeCompatibilityEntry struct { + + // The image OCID. + ImageId *string `mandatory:"true" json:"imageId"` + + // The shape name. + Shape *string `mandatory:"true" json:"shape"` + + MemoryConstraints *ImageMemoryConstraints `mandatory:"false" json:"memoryConstraints"` + + OcpuConstraints *ImageOcpuConstraints `mandatory:"false" json:"ocpuConstraints"` +} + +func (m ImageShapeCompatibilityEntry) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ImageShapeCompatibilityEntry) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_shape_compatibility_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_shape_compatibility_summary.go new file mode 100644 index 000000000..380bb5d82 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_shape_compatibility_summary.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ImageShapeCompatibilitySummary Summary information for a compatible image and shape. +type ImageShapeCompatibilitySummary struct { + + // The image OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + ImageId *string `mandatory:"true" json:"imageId"` + + // The shape name. + Shape *string `mandatory:"true" json:"shape"` + + MemoryConstraints *ImageMemoryConstraints `mandatory:"false" json:"memoryConstraints"` + + OcpuConstraints *ImageOcpuConstraints `mandatory:"false" json:"ocpuConstraints"` +} + +func (m ImageShapeCompatibilitySummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ImageShapeCompatibilitySummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_details.go new file mode 100644 index 000000000..804a03bf4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_details.go @@ -0,0 +1,160 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ImageSourceDetails The representation of ImageSourceDetails +type ImageSourceDetails interface { + GetOperatingSystem() *string + + GetOperatingSystemVersion() *string + + // The format of the image to be imported. Only monolithic + // images are supported. This attribute is not used for exported Oracle images with the OCI image format. + GetSourceImageType() ImageSourceDetailsSourceImageTypeEnum +} + +type imagesourcedetails struct { + JsonData []byte + OperatingSystem *string `mandatory:"false" json:"operatingSystem"` + OperatingSystemVersion *string `mandatory:"false" json:"operatingSystemVersion"` + SourceImageType ImageSourceDetailsSourceImageTypeEnum `mandatory:"false" json:"sourceImageType,omitempty"` + SourceType string `json:"sourceType"` +} + +// UnmarshalJSON unmarshals json +func (m *imagesourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerimagesourcedetails imagesourcedetails + s := struct { + Model Unmarshalerimagesourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.OperatingSystem = s.Model.OperatingSystem + m.OperatingSystemVersion = s.Model.OperatingSystemVersion + m.SourceImageType = s.Model.SourceImageType + m.SourceType = s.Model.SourceType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *imagesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.SourceType { + case "objectStorageTuple": + mm := ImageSourceViaObjectStorageTupleDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "objectStorageUri": + mm := ImageSourceViaObjectStorageUriDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for ImageSourceDetails: %s.", m.SourceType) + return *m, nil + } +} + +// GetOperatingSystem returns OperatingSystem +func (m imagesourcedetails) GetOperatingSystem() *string { + return m.OperatingSystem +} + +// GetOperatingSystemVersion returns OperatingSystemVersion +func (m imagesourcedetails) GetOperatingSystemVersion() *string { + return m.OperatingSystemVersion +} + +// GetSourceImageType returns SourceImageType +func (m imagesourcedetails) GetSourceImageType() ImageSourceDetailsSourceImageTypeEnum { + return m.SourceImageType +} + +func (m imagesourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m imagesourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingImageSourceDetailsSourceImageTypeEnum(string(m.SourceImageType)); !ok && m.SourceImageType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceImageType: %s. Supported values are: %s.", m.SourceImageType, strings.Join(GetImageSourceDetailsSourceImageTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ImageSourceDetailsSourceImageTypeEnum Enum with underlying type: string +type ImageSourceDetailsSourceImageTypeEnum string + +// Set of constants representing the allowable values for ImageSourceDetailsSourceImageTypeEnum +const ( + ImageSourceDetailsSourceImageTypeQcow2 ImageSourceDetailsSourceImageTypeEnum = "QCOW2" + ImageSourceDetailsSourceImageTypeVmdk ImageSourceDetailsSourceImageTypeEnum = "VMDK" +) + +var mappingImageSourceDetailsSourceImageTypeEnum = map[string]ImageSourceDetailsSourceImageTypeEnum{ + "QCOW2": ImageSourceDetailsSourceImageTypeQcow2, + "VMDK": ImageSourceDetailsSourceImageTypeVmdk, +} + +var mappingImageSourceDetailsSourceImageTypeEnumLowerCase = map[string]ImageSourceDetailsSourceImageTypeEnum{ + "qcow2": ImageSourceDetailsSourceImageTypeQcow2, + "vmdk": ImageSourceDetailsSourceImageTypeVmdk, +} + +// GetImageSourceDetailsSourceImageTypeEnumValues Enumerates the set of values for ImageSourceDetailsSourceImageTypeEnum +func GetImageSourceDetailsSourceImageTypeEnumValues() []ImageSourceDetailsSourceImageTypeEnum { + values := make([]ImageSourceDetailsSourceImageTypeEnum, 0) + for _, v := range mappingImageSourceDetailsSourceImageTypeEnum { + values = append(values, v) + } + return values +} + +// GetImageSourceDetailsSourceImageTypeEnumStringValues Enumerates the set of values in String for ImageSourceDetailsSourceImageTypeEnum +func GetImageSourceDetailsSourceImageTypeEnumStringValues() []string { + return []string{ + "QCOW2", + "VMDK", + } +} + +// GetMappingImageSourceDetailsSourceImageTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingImageSourceDetailsSourceImageTypeEnum(val string) (ImageSourceDetailsSourceImageTypeEnum, bool) { + enum, ok := mappingImageSourceDetailsSourceImageTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_via_object_storage_tuple_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_via_object_storage_tuple_details.go new file mode 100644 index 000000000..3d731dcb9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_via_object_storage_tuple_details.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ImageSourceViaObjectStorageTupleDetails The representation of ImageSourceViaObjectStorageTupleDetails +type ImageSourceViaObjectStorageTupleDetails struct { + + // The Object Storage bucket for the image. + BucketName *string `mandatory:"true" json:"bucketName"` + + // The Object Storage namespace for the image. + NamespaceName *string `mandatory:"true" json:"namespaceName"` + + // The Object Storage name for the image. + ObjectName *string `mandatory:"true" json:"objectName"` + + OperatingSystem *string `mandatory:"false" json:"operatingSystem"` + + OperatingSystemVersion *string `mandatory:"false" json:"operatingSystemVersion"` + + // The format of the image to be imported. Only monolithic + // images are supported. This attribute is not used for exported Oracle images with the OCI image format. + SourceImageType ImageSourceDetailsSourceImageTypeEnum `mandatory:"false" json:"sourceImageType,omitempty"` +} + +// GetOperatingSystem returns OperatingSystem +func (m ImageSourceViaObjectStorageTupleDetails) GetOperatingSystem() *string { + return m.OperatingSystem +} + +// GetOperatingSystemVersion returns OperatingSystemVersion +func (m ImageSourceViaObjectStorageTupleDetails) GetOperatingSystemVersion() *string { + return m.OperatingSystemVersion +} + +// GetSourceImageType returns SourceImageType +func (m ImageSourceViaObjectStorageTupleDetails) GetSourceImageType() ImageSourceDetailsSourceImageTypeEnum { + return m.SourceImageType +} + +func (m ImageSourceViaObjectStorageTupleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ImageSourceViaObjectStorageTupleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingImageSourceDetailsSourceImageTypeEnum(string(m.SourceImageType)); !ok && m.SourceImageType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceImageType: %s. Supported values are: %s.", m.SourceImageType, strings.Join(GetImageSourceDetailsSourceImageTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ImageSourceViaObjectStorageTupleDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeImageSourceViaObjectStorageTupleDetails ImageSourceViaObjectStorageTupleDetails + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeImageSourceViaObjectStorageTupleDetails + }{ + "objectStorageTuple", + (MarshalTypeImageSourceViaObjectStorageTupleDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_via_object_storage_uri_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_via_object_storage_uri_details.go new file mode 100644 index 000000000..b82a9a7b0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/image_source_via_object_storage_uri_details.go @@ -0,0 +1,86 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ImageSourceViaObjectStorageUriDetails The representation of ImageSourceViaObjectStorageUriDetails +type ImageSourceViaObjectStorageUriDetails struct { + + // The Object Storage URL for the image. + SourceUri *string `mandatory:"true" json:"sourceUri"` + + OperatingSystem *string `mandatory:"false" json:"operatingSystem"` + + OperatingSystemVersion *string `mandatory:"false" json:"operatingSystemVersion"` + + // The format of the image to be imported. Only monolithic + // images are supported. This attribute is not used for exported Oracle images with the OCI image format. + SourceImageType ImageSourceDetailsSourceImageTypeEnum `mandatory:"false" json:"sourceImageType,omitempty"` +} + +// GetOperatingSystem returns OperatingSystem +func (m ImageSourceViaObjectStorageUriDetails) GetOperatingSystem() *string { + return m.OperatingSystem +} + +// GetOperatingSystemVersion returns OperatingSystemVersion +func (m ImageSourceViaObjectStorageUriDetails) GetOperatingSystemVersion() *string { + return m.OperatingSystemVersion +} + +// GetSourceImageType returns SourceImageType +func (m ImageSourceViaObjectStorageUriDetails) GetSourceImageType() ImageSourceDetailsSourceImageTypeEnum { + return m.SourceImageType +} + +func (m ImageSourceViaObjectStorageUriDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ImageSourceViaObjectStorageUriDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingImageSourceDetailsSourceImageTypeEnum(string(m.SourceImageType)); !ok && m.SourceImageType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceImageType: %s. Supported values are: %s.", m.SourceImageType, strings.Join(GetImageSourceDetailsSourceImageTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ImageSourceViaObjectStorageUriDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeImageSourceViaObjectStorageUriDetails ImageSourceViaObjectStorageUriDetails + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeImageSourceViaObjectStorageUriDetails + }{ + "objectStorageUri", + (MarshalTypeImageSourceViaObjectStorageUriDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ingress_security_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ingress_security_rule.go new file mode 100644 index 000000000..a436eaeb6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ingress_security_rule.go @@ -0,0 +1,127 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IngressSecurityRule A rule for allowing inbound IP packets. +type IngressSecurityRule struct { + + // The transport protocol. Specify either `all` or an IPv4 protocol number as + // defined in + // Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). + // Options are supported only for ICMP ("1"), TCP ("6"), UDP ("17"), and ICMPv6 ("58"). + Protocol *string `mandatory:"true" json:"protocol"` + + // Conceptually, this is the range of IP addresses that a packet coming into the instance + // can come from. + // Allowed values: + // * IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56`. + // IPv6 addressing is supported for all commercial and government regions. See + // IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // * The `cidrBlock` value for a Service, if you're + // setting up a security list rule for traffic coming from a particular `Service` through + // a service gateway. For example: `oci-phx-objectstorage`. + Source *string `mandatory:"true" json:"source"` + + IcmpOptions *IcmpOptions `mandatory:"false" json:"icmpOptions"` + + // A stateless rule allows traffic in one direction. Remember to add a corresponding + // stateless rule in the other direction if you need to support bidirectional traffic. For + // example, if ingress traffic allows TCP destination port 80, there should be an egress + // rule to allow TCP source port 80. Defaults to false, which means the rule is stateful + // and a corresponding rule is not necessary for bidirectional traffic. + IsStateless *bool `mandatory:"false" json:"isStateless"` + + // Type of source for the rule. The default is `CIDR_BLOCK`. + // * `CIDR_BLOCK`: If the rule's `source` is an IP address range in CIDR notation. + // * `SERVICE_CIDR_BLOCK`: If the rule's `source` is the `cidrBlock` value for a + // Service (the rule is for traffic coming from a + // particular `Service` through a service gateway). + SourceType IngressSecurityRuleSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` + + TcpOptions *TcpOptions `mandatory:"false" json:"tcpOptions"` + + UdpOptions *UdpOptions `mandatory:"false" json:"udpOptions"` + + // An optional description of your choice for the rule. + Description *string `mandatory:"false" json:"description"` +} + +func (m IngressSecurityRule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IngressSecurityRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingIngressSecurityRuleSourceTypeEnum(string(m.SourceType)); !ok && m.SourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceType: %s. Supported values are: %s.", m.SourceType, strings.Join(GetIngressSecurityRuleSourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// IngressSecurityRuleSourceTypeEnum Enum with underlying type: string +type IngressSecurityRuleSourceTypeEnum string + +// Set of constants representing the allowable values for IngressSecurityRuleSourceTypeEnum +const ( + IngressSecurityRuleSourceTypeCidrBlock IngressSecurityRuleSourceTypeEnum = "CIDR_BLOCK" + IngressSecurityRuleSourceTypeServiceCidrBlock IngressSecurityRuleSourceTypeEnum = "SERVICE_CIDR_BLOCK" +) + +var mappingIngressSecurityRuleSourceTypeEnum = map[string]IngressSecurityRuleSourceTypeEnum{ + "CIDR_BLOCK": IngressSecurityRuleSourceTypeCidrBlock, + "SERVICE_CIDR_BLOCK": IngressSecurityRuleSourceTypeServiceCidrBlock, +} + +var mappingIngressSecurityRuleSourceTypeEnumLowerCase = map[string]IngressSecurityRuleSourceTypeEnum{ + "cidr_block": IngressSecurityRuleSourceTypeCidrBlock, + "service_cidr_block": IngressSecurityRuleSourceTypeServiceCidrBlock, +} + +// GetIngressSecurityRuleSourceTypeEnumValues Enumerates the set of values for IngressSecurityRuleSourceTypeEnum +func GetIngressSecurityRuleSourceTypeEnumValues() []IngressSecurityRuleSourceTypeEnum { + values := make([]IngressSecurityRuleSourceTypeEnum, 0) + for _, v := range mappingIngressSecurityRuleSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetIngressSecurityRuleSourceTypeEnumStringValues Enumerates the set of values in String for IngressSecurityRuleSourceTypeEnum +func GetIngressSecurityRuleSourceTypeEnumStringValues() []string { + return []string{ + "CIDR_BLOCK", + "SERVICE_CIDR_BLOCK", + } +} + +// GetMappingIngressSecurityRuleSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIngressSecurityRuleSourceTypeEnum(val string) (IngressSecurityRuleSourceTypeEnum, bool) { + enum, ok := mappingIngressSecurityRuleSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance.go new file mode 100644 index 000000000..69a54ac91 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance.go @@ -0,0 +1,537 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Instance A compute host. The image used to launch the instance determines its operating system and other +// software. The shape specified during the launch process determines the number of CPUs and memory +// allocated to the instance. +// When you launch an instance, it is automatically attached to a virtual +// network interface card (VNIC), called the *primary VNIC*. The VNIC +// has a private IP address from the subnet's CIDR. You can either assign a +// private IP address of your choice or let Oracle automatically assign one. +// You can choose whether the instance has a public IP address. To retrieve the +// addresses, use the ListVnicAttachments +// operation to get the VNIC ID for the instance, and then call +// GetVnic with the VNIC ID. +// For more information, see +// Overview of the Compute Service (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type Instance struct { + + // The availability domain the instance is running in. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the instance. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the instance. + Id *string `mandatory:"true" json:"id"` + + // The current state of the instance. + LifecycleState InstanceLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The region that contains the availability domain the instance is running in. + // For the us-phoenix-1 and us-ashburn-1 regions, `phx` and `iad` are returned, respectively. + // For all other regions, the full region name is returned. + // Examples: `phx`, `eu-frankfurt-1` + Region *string `mandatory:"true" json:"region"` + + // The shape of the instance. The shape determines the number of CPUs and the amount of memory + // allocated to the instance. You can enumerate all available shapes by calling + // ListShapes. + Shape *string `mandatory:"true" json:"shape"` + + // The date and time the instance was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the compute capacity reservation this instance is launched under. + // When this field contains an empty string or is null, the instance is not currently in a capacity reservation. + // For more information, see Capacity Reservations (https://docs.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm#default). + CapacityReservationId *string `mandatory:"false" json:"capacityReservationId"` + + PlacementConstraintDetails PlacementConstraintDetails `mandatory:"false" json:"placementConstraintDetails"` + + // Whether AI enterprise is enabled on the instance. + IsAIEnterpriseEnabled *bool `mandatory:"false" json:"isAIEnterpriseEnabled"` + + // The OCID of the cluster placement group of the instance. + ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` + + // The OCID of the dedicated virtual machine host that the instance is placed on. + DedicatedVmHostId *string `mandatory:"false" json:"dedicatedVmHostId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Security attributes (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels + // for a resource that can be referenced in a Zero Trust Packet Routing (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) + // (ZPR) policy to control access to ZPR-supported resources. + // Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` + SecurityAttributes map[string]map[string]interface{} `mandatory:"false" json:"securityAttributes"` + + // The lifecycle state of the `securityAttributes` + SecurityAttributesState InstanceSecurityAttributesStateEnum `mandatory:"false" json:"securityAttributesState,omitempty"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Additional metadata key/value pairs that you provide. They serve the same purpose and functionality + // as fields in the `metadata` object. + // They are distinguished from `metadata` fields in that these can be nested JSON objects (whereas `metadata` + // fields are string/string maps only). + ExtendedMetadata map[string]interface{} `mandatory:"false" json:"extendedMetadata"` + + // The name of the fault domain the instance is running in. + // A fault domain is a grouping of hardware and infrastructure within an availability domain. + // Each availability domain contains three fault domains. Fault domains let you distribute your + // instances so that they are not on the same physical hardware within a single availability domain. + // A hardware failure or Compute hardware maintenance that affects one fault domain does not affect + // instances in other fault domains. + // If you do not specify the fault domain, the system selects one for you. + // Example: `FAULT-DOMAIN-1` + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Deprecated. Use `sourceDetails` instead. + ImageId *string `mandatory:"false" json:"imageId"` + + // When a bare metal or virtual machine + // instance boots, the iPXE firmware that runs on the instance is + // configured to run an iPXE script to continue the boot process. + // If you want more control over the boot process, you can provide + // your own custom iPXE script that will run when the instance boots. + // Be aware that the same iPXE script will run + // every time an instance boots, not only after the initial + // LaunchInstance call. + // The default iPXE script connects to the instance's local boot + // volume over iSCSI and performs a network boot. If you use a custom iPXE + // script and want to network-boot from the instance's local boot volume + // over iSCSI the same way as the default iPXE script, use the + // following iSCSI IP address: 169.254.0.2, and boot volume IQN: + // iqn.2015-02.oracle.boot. + // If your instance boot volume attachment type is paravirtualized, + // the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. + // If your instance boot volume attachment type is paravirtualized + // and you use custom iPXE to network boot into your instance, + // the primary boot volume is attached as a data volume through virtio-scsi drive. + // For more information about the Bring Your Own Image feature of + // Oracle Cloud Infrastructure, see + // Bring Your Own Image (https://docs.oracle.com/iaas/Content/Compute/References/bringyourownimage.htm). + // For more information about iPXE, see http://ipxe.org. + IpxeScript *string `mandatory:"false" json:"ipxeScript"` + + // Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: + // * `NATIVE` - VM instances launch with iSCSI boot and VFIO devices. The default value for platform images. + // * `EMULATED` - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. + // * `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using VirtIO drivers. + // * `ACCELERATEDPV` - VM instances launch with accelerated paravirtualized networking type. + // * `CUSTOM` - VM instances launch with custom configuration settings specified in the `LaunchOptions` parameter. + LaunchMode InstanceLaunchModeEnum `mandatory:"false" json:"launchMode,omitempty"` + + LaunchOptions *LaunchOptions `mandatory:"false" json:"launchOptions"` + + InstanceOptions *InstanceOptions `mandatory:"false" json:"instanceOptions"` + + AvailabilityConfig *InstanceAvailabilityConfig `mandatory:"false" json:"availabilityConfig"` + + PreemptibleInstanceConfig *PreemptibleInstanceConfigDetails `mandatory:"false" json:"preemptibleInstanceConfig"` + + // Custom metadata that you provide. + Metadata map[string]string `mandatory:"false" json:"metadata"` + + ShapeConfig *InstanceShapeConfig `mandatory:"false" json:"shapeConfig"` + + // Whether the instance’s OCPUs and memory are distributed across multiple NUMA nodes. + IsCrossNumaNode *bool `mandatory:"false" json:"isCrossNumaNode"` + + SourceDetails InstanceSourceDetails `mandatory:"false" json:"sourceDetails"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + AgentConfig *InstanceAgentConfig `mandatory:"false" json:"agentConfig"` + + // The date and time the instance is expected to be stopped / started, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // After that time if instance hasn't been rebooted, Oracle will reboot the instance within 24 hours of the due time. + // Regardless of how the instance was stopped, the flag will be reset to empty as soon as instance reaches Stopped state. + // Example: `2018-05-25T21:10:29.600Z` + TimeMaintenanceRebootDue *common.SDKTime `mandatory:"false" json:"timeMaintenanceRebootDue"` + + PlatformConfig PlatformConfig `mandatory:"false" json:"platformConfig"` + + // The OCID of the Instance Configuration used to source launch details for this instance. Any other fields supplied in the instance launch request override the details stored in the Instance Configuration for this instance launch. + InstanceConfigurationId *string `mandatory:"false" json:"instanceConfigurationId"` + + // List of licensing configurations associated with the instance. + LicensingConfigs []LicensingConfig `mandatory:"false" json:"licensingConfigs"` +} + +func (m Instance) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Instance) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetInstanceLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingInstanceSecurityAttributesStateEnum(string(m.SecurityAttributesState)); !ok && m.SecurityAttributesState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SecurityAttributesState: %s. Supported values are: %s.", m.SecurityAttributesState, strings.Join(GetInstanceSecurityAttributesStateEnumStringValues(), ","))) + } + if _, ok := GetMappingInstanceLaunchModeEnum(string(m.LaunchMode)); !ok && m.LaunchMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LaunchMode: %s. Supported values are: %s.", m.LaunchMode, strings.Join(GetInstanceLaunchModeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *Instance) UnmarshalJSON(data []byte) (e error) { + model := struct { + CapacityReservationId *string `json:"capacityReservationId"` + PlacementConstraintDetails placementconstraintdetails `json:"placementConstraintDetails"` + IsAIEnterpriseEnabled *bool `json:"isAIEnterpriseEnabled"` + ClusterPlacementGroupId *string `json:"clusterPlacementGroupId"` + DedicatedVmHostId *string `json:"dedicatedVmHostId"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + SecurityAttributesState InstanceSecurityAttributesStateEnum `json:"securityAttributesState"` + DisplayName *string `json:"displayName"` + ExtendedMetadata map[string]interface{} `json:"extendedMetadata"` + FaultDomain *string `json:"faultDomain"` + FreeformTags map[string]string `json:"freeformTags"` + ImageId *string `json:"imageId"` + IpxeScript *string `json:"ipxeScript"` + LaunchMode InstanceLaunchModeEnum `json:"launchMode"` + LaunchOptions *LaunchOptions `json:"launchOptions"` + InstanceOptions *InstanceOptions `json:"instanceOptions"` + AvailabilityConfig *InstanceAvailabilityConfig `json:"availabilityConfig"` + PreemptibleInstanceConfig *PreemptibleInstanceConfigDetails `json:"preemptibleInstanceConfig"` + Metadata map[string]string `json:"metadata"` + ShapeConfig *InstanceShapeConfig `json:"shapeConfig"` + IsCrossNumaNode *bool `json:"isCrossNumaNode"` + SourceDetails instancesourcedetails `json:"sourceDetails"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + AgentConfig *InstanceAgentConfig `json:"agentConfig"` + TimeMaintenanceRebootDue *common.SDKTime `json:"timeMaintenanceRebootDue"` + PlatformConfig platformconfig `json:"platformConfig"` + InstanceConfigurationId *string `json:"instanceConfigurationId"` + LicensingConfigs []LicensingConfig `json:"licensingConfigs"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + Id *string `json:"id"` + LifecycleState InstanceLifecycleStateEnum `json:"lifecycleState"` + Region *string `json:"region"` + Shape *string `json:"shape"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.CapacityReservationId = model.CapacityReservationId + + nn, e = model.PlacementConstraintDetails.UnmarshalPolymorphicJSON(model.PlacementConstraintDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.PlacementConstraintDetails = nn.(PlacementConstraintDetails) + } else { + m.PlacementConstraintDetails = nil + } + + m.IsAIEnterpriseEnabled = model.IsAIEnterpriseEnabled + + m.ClusterPlacementGroupId = model.ClusterPlacementGroupId + + m.DedicatedVmHostId = model.DedicatedVmHostId + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.SecurityAttributesState = model.SecurityAttributesState + + m.DisplayName = model.DisplayName + + m.ExtendedMetadata = model.ExtendedMetadata + + m.FaultDomain = model.FaultDomain + + m.FreeformTags = model.FreeformTags + + m.ImageId = model.ImageId + + m.IpxeScript = model.IpxeScript + + m.LaunchMode = model.LaunchMode + + m.LaunchOptions = model.LaunchOptions + + m.InstanceOptions = model.InstanceOptions + + m.AvailabilityConfig = model.AvailabilityConfig + + m.PreemptibleInstanceConfig = model.PreemptibleInstanceConfig + + m.Metadata = model.Metadata + + m.ShapeConfig = model.ShapeConfig + + m.IsCrossNumaNode = model.IsCrossNumaNode + + nn, e = model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.SourceDetails = nn.(InstanceSourceDetails) + } else { + m.SourceDetails = nil + } + + m.SystemTags = model.SystemTags + + m.AgentConfig = model.AgentConfig + + m.TimeMaintenanceRebootDue = model.TimeMaintenanceRebootDue + + nn, e = model.PlatformConfig.UnmarshalPolymorphicJSON(model.PlatformConfig.JsonData) + if e != nil { + return + } + if nn != nil { + m.PlatformConfig = nn.(PlatformConfig) + } else { + m.PlatformConfig = nil + } + + m.InstanceConfigurationId = model.InstanceConfigurationId + + m.LicensingConfigs = make([]LicensingConfig, len(model.LicensingConfigs)) + copy(m.LicensingConfigs, model.LicensingConfigs) + m.AvailabilityDomain = model.AvailabilityDomain + + m.CompartmentId = model.CompartmentId + + m.Id = model.Id + + m.LifecycleState = model.LifecycleState + + m.Region = model.Region + + m.Shape = model.Shape + + m.TimeCreated = model.TimeCreated + + return +} + +// InstanceSecurityAttributesStateEnum Enum with underlying type: string +type InstanceSecurityAttributesStateEnum string + +// Set of constants representing the allowable values for InstanceSecurityAttributesStateEnum +const ( + InstanceSecurityAttributesStateStable InstanceSecurityAttributesStateEnum = "STABLE" + InstanceSecurityAttributesStateUpdating InstanceSecurityAttributesStateEnum = "UPDATING" +) + +var mappingInstanceSecurityAttributesStateEnum = map[string]InstanceSecurityAttributesStateEnum{ + "STABLE": InstanceSecurityAttributesStateStable, + "UPDATING": InstanceSecurityAttributesStateUpdating, +} + +var mappingInstanceSecurityAttributesStateEnumLowerCase = map[string]InstanceSecurityAttributesStateEnum{ + "stable": InstanceSecurityAttributesStateStable, + "updating": InstanceSecurityAttributesStateUpdating, +} + +// GetInstanceSecurityAttributesStateEnumValues Enumerates the set of values for InstanceSecurityAttributesStateEnum +func GetInstanceSecurityAttributesStateEnumValues() []InstanceSecurityAttributesStateEnum { + values := make([]InstanceSecurityAttributesStateEnum, 0) + for _, v := range mappingInstanceSecurityAttributesStateEnum { + values = append(values, v) + } + return values +} + +// GetInstanceSecurityAttributesStateEnumStringValues Enumerates the set of values in String for InstanceSecurityAttributesStateEnum +func GetInstanceSecurityAttributesStateEnumStringValues() []string { + return []string{ + "STABLE", + "UPDATING", + } +} + +// GetMappingInstanceSecurityAttributesStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceSecurityAttributesStateEnum(val string) (InstanceSecurityAttributesStateEnum, bool) { + enum, ok := mappingInstanceSecurityAttributesStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// InstanceLaunchModeEnum Enum with underlying type: string +type InstanceLaunchModeEnum string + +// Set of constants representing the allowable values for InstanceLaunchModeEnum +const ( + InstanceLaunchModeNative InstanceLaunchModeEnum = "NATIVE" + InstanceLaunchModeEmulated InstanceLaunchModeEnum = "EMULATED" + InstanceLaunchModeParavirtualized InstanceLaunchModeEnum = "PARAVIRTUALIZED" + InstanceLaunchModeAcceleratedpv InstanceLaunchModeEnum = "ACCELERATEDPV" + InstanceLaunchModeCustom InstanceLaunchModeEnum = "CUSTOM" +) + +var mappingInstanceLaunchModeEnum = map[string]InstanceLaunchModeEnum{ + "NATIVE": InstanceLaunchModeNative, + "EMULATED": InstanceLaunchModeEmulated, + "PARAVIRTUALIZED": InstanceLaunchModeParavirtualized, + "ACCELERATEDPV": InstanceLaunchModeAcceleratedpv, + "CUSTOM": InstanceLaunchModeCustom, +} + +var mappingInstanceLaunchModeEnumLowerCase = map[string]InstanceLaunchModeEnum{ + "native": InstanceLaunchModeNative, + "emulated": InstanceLaunchModeEmulated, + "paravirtualized": InstanceLaunchModeParavirtualized, + "acceleratedpv": InstanceLaunchModeAcceleratedpv, + "custom": InstanceLaunchModeCustom, +} + +// GetInstanceLaunchModeEnumValues Enumerates the set of values for InstanceLaunchModeEnum +func GetInstanceLaunchModeEnumValues() []InstanceLaunchModeEnum { + values := make([]InstanceLaunchModeEnum, 0) + for _, v := range mappingInstanceLaunchModeEnum { + values = append(values, v) + } + return values +} + +// GetInstanceLaunchModeEnumStringValues Enumerates the set of values in String for InstanceLaunchModeEnum +func GetInstanceLaunchModeEnumStringValues() []string { + return []string{ + "NATIVE", + "EMULATED", + "PARAVIRTUALIZED", + "ACCELERATEDPV", + "CUSTOM", + } +} + +// GetMappingInstanceLaunchModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceLaunchModeEnum(val string) (InstanceLaunchModeEnum, bool) { + enum, ok := mappingInstanceLaunchModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// InstanceLifecycleStateEnum Enum with underlying type: string +type InstanceLifecycleStateEnum string + +// Set of constants representing the allowable values for InstanceLifecycleStateEnum +const ( + InstanceLifecycleStateMoving InstanceLifecycleStateEnum = "MOVING" + InstanceLifecycleStateProvisioning InstanceLifecycleStateEnum = "PROVISIONING" + InstanceLifecycleStateRunning InstanceLifecycleStateEnum = "RUNNING" + InstanceLifecycleStateStarting InstanceLifecycleStateEnum = "STARTING" + InstanceLifecycleStateStopping InstanceLifecycleStateEnum = "STOPPING" + InstanceLifecycleStateStopped InstanceLifecycleStateEnum = "STOPPED" + InstanceLifecycleStateCreatingImage InstanceLifecycleStateEnum = "CREATING_IMAGE" + InstanceLifecycleStateTerminating InstanceLifecycleStateEnum = "TERMINATING" + InstanceLifecycleStateTerminated InstanceLifecycleStateEnum = "TERMINATED" +) + +var mappingInstanceLifecycleStateEnum = map[string]InstanceLifecycleStateEnum{ + "MOVING": InstanceLifecycleStateMoving, + "PROVISIONING": InstanceLifecycleStateProvisioning, + "RUNNING": InstanceLifecycleStateRunning, + "STARTING": InstanceLifecycleStateStarting, + "STOPPING": InstanceLifecycleStateStopping, + "STOPPED": InstanceLifecycleStateStopped, + "CREATING_IMAGE": InstanceLifecycleStateCreatingImage, + "TERMINATING": InstanceLifecycleStateTerminating, + "TERMINATED": InstanceLifecycleStateTerminated, +} + +var mappingInstanceLifecycleStateEnumLowerCase = map[string]InstanceLifecycleStateEnum{ + "moving": InstanceLifecycleStateMoving, + "provisioning": InstanceLifecycleStateProvisioning, + "running": InstanceLifecycleStateRunning, + "starting": InstanceLifecycleStateStarting, + "stopping": InstanceLifecycleStateStopping, + "stopped": InstanceLifecycleStateStopped, + "creating_image": InstanceLifecycleStateCreatingImage, + "terminating": InstanceLifecycleStateTerminating, + "terminated": InstanceLifecycleStateTerminated, +} + +// GetInstanceLifecycleStateEnumValues Enumerates the set of values for InstanceLifecycleStateEnum +func GetInstanceLifecycleStateEnumValues() []InstanceLifecycleStateEnum { + values := make([]InstanceLifecycleStateEnum, 0) + for _, v := range mappingInstanceLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetInstanceLifecycleStateEnumStringValues Enumerates the set of values in String for InstanceLifecycleStateEnum +func GetInstanceLifecycleStateEnumStringValues() []string { + return []string{ + "MOVING", + "PROVISIONING", + "RUNNING", + "STARTING", + "STOPPING", + "STOPPED", + "CREATING_IMAGE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingInstanceLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceLifecycleStateEnum(val string) (InstanceLifecycleStateEnum, bool) { + enum, ok := mappingInstanceLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_action_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_action_request_response.go new file mode 100644 index 000000000..6df1c8e2b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_action_request_response.go @@ -0,0 +1,181 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// InstanceActionRequest wrapper for the InstanceAction operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/InstanceAction.go.html to see an example of how to use InstanceActionRequest. +type InstanceActionRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` + + // The action to perform on the instance. + Action InstanceActionActionEnum `mandatory:"true" contributesTo:"query" name:"action" omitEmpty:"true"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Instance Power Action details + InstancePowerActionDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request InstanceActionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request InstanceActionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request InstanceActionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request InstanceActionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request InstanceActionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceActionActionEnum(string(request.Action)); !ok && request.Action != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Action: %s. Supported values are: %s.", request.Action, strings.Join(GetInstanceActionActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstanceActionResponse wrapper for the InstanceAction operation +type InstanceActionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Instance instance + Instance `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response InstanceActionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response InstanceActionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// InstanceActionActionEnum Enum with underlying type: string +type InstanceActionActionEnum string + +// Set of constants representing the allowable values for InstanceActionActionEnum +const ( + InstanceActionActionStop InstanceActionActionEnum = "STOP" + InstanceActionActionStart InstanceActionActionEnum = "START" + InstanceActionActionSoftreset InstanceActionActionEnum = "SOFTRESET" + InstanceActionActionReset InstanceActionActionEnum = "RESET" + InstanceActionActionSoftstop InstanceActionActionEnum = "SOFTSTOP" + InstanceActionActionSenddiagnosticinterrupt InstanceActionActionEnum = "SENDDIAGNOSTICINTERRUPT" + InstanceActionActionDiagnosticreboot InstanceActionActionEnum = "DIAGNOSTICREBOOT" + InstanceActionActionRebootmigrate InstanceActionActionEnum = "REBOOTMIGRATE" +) + +var mappingInstanceActionActionEnum = map[string]InstanceActionActionEnum{ + "STOP": InstanceActionActionStop, + "START": InstanceActionActionStart, + "SOFTRESET": InstanceActionActionSoftreset, + "RESET": InstanceActionActionReset, + "SOFTSTOP": InstanceActionActionSoftstop, + "SENDDIAGNOSTICINTERRUPT": InstanceActionActionSenddiagnosticinterrupt, + "DIAGNOSTICREBOOT": InstanceActionActionDiagnosticreboot, + "REBOOTMIGRATE": InstanceActionActionRebootmigrate, +} + +var mappingInstanceActionActionEnumLowerCase = map[string]InstanceActionActionEnum{ + "stop": InstanceActionActionStop, + "start": InstanceActionActionStart, + "softreset": InstanceActionActionSoftreset, + "reset": InstanceActionActionReset, + "softstop": InstanceActionActionSoftstop, + "senddiagnosticinterrupt": InstanceActionActionSenddiagnosticinterrupt, + "diagnosticreboot": InstanceActionActionDiagnosticreboot, + "rebootmigrate": InstanceActionActionRebootmigrate, +} + +// GetInstanceActionActionEnumValues Enumerates the set of values for InstanceActionActionEnum +func GetInstanceActionActionEnumValues() []InstanceActionActionEnum { + values := make([]InstanceActionActionEnum, 0) + for _, v := range mappingInstanceActionActionEnum { + values = append(values, v) + } + return values +} + +// GetInstanceActionActionEnumStringValues Enumerates the set of values in String for InstanceActionActionEnum +func GetInstanceActionActionEnumStringValues() []string { + return []string{ + "STOP", + "START", + "SOFTRESET", + "RESET", + "SOFTSTOP", + "SENDDIAGNOSTICINTERRUPT", + "DIAGNOSTICREBOOT", + "REBOOTMIGRATE", + } +} + +// GetMappingInstanceActionActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceActionActionEnum(val string) (InstanceActionActionEnum, bool) { + enum, ok := mappingInstanceActionActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_agent_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_agent_config.go new file mode 100644 index 000000000..f5e4c1a23 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_agent_config.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceAgentConfig Configuration options for the Oracle Cloud Agent software running on the instance. +type InstanceAgentConfig struct { + + // Whether Oracle Cloud Agent can gather performance metrics and monitor the instance using the + // monitoring plugins. + // These are the monitoring plugins: Compute Instance Monitoring + // and Custom Logs Monitoring. + // The monitoring plugins are controlled by this parameter and by the per-plugin + // configuration in the `pluginsConfig` object. + // - If `isMonitoringDisabled` is true, all of the monitoring plugins are disabled, regardless of + // the per-plugin configuration. + // - If `isMonitoringDisabled` is false, all of the monitoring plugins are enabled. You + // can optionally disable individual monitoring plugins by providing a value in the `pluginsConfig` + // object. + IsMonitoringDisabled *bool `mandatory:"false" json:"isMonitoringDisabled"` + + // Whether Oracle Cloud Agent can run all the available management plugins. + // These are the management plugins: OS Management Service Agent and Compute Instance + // Run Command. + // The management plugins are controlled by this parameter and by the per-plugin + // configuration in the `pluginsConfig` object. + // - If `isManagementDisabled` is true, all of the management plugins are disabled, regardless of + // the per-plugin configuration. + // - If `isManagementDisabled` is false, all of the management plugins are enabled. You + // can optionally disable individual management plugins by providing a value in the `pluginsConfig` + // object. + IsManagementDisabled *bool `mandatory:"false" json:"isManagementDisabled"` + + // Whether Oracle Cloud Agent can run all of the available plugins. + // This includes the management and monitoring plugins. + // For more information about the available plugins, see + // Managing Plugins with Oracle Cloud Agent (https://docs.oracle.com/iaas/Content/Compute/Tasks/manage-plugins.htm). + AreAllPluginsDisabled *bool `mandatory:"false" json:"areAllPluginsDisabled"` + + // The configuration of plugins associated with this instance. + PluginsConfig []InstanceAgentPluginConfigDetails `mandatory:"false" json:"pluginsConfig"` +} + +func (m InstanceAgentConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceAgentConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_agent_features.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_agent_features.go new file mode 100644 index 000000000..1f3a93381 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_agent_features.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceAgentFeatures Oracle Cloud Agent features supported on the image. +type InstanceAgentFeatures struct { + + // This attribute is not used. + IsMonitoringSupported *bool `mandatory:"false" json:"isMonitoringSupported"` + + // This attribute is not used. + IsManagementSupported *bool `mandatory:"false" json:"isManagementSupported"` +} + +func (m InstanceAgentFeatures) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceAgentFeatures) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_agent_plugin_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_agent_plugin_config_details.go new file mode 100644 index 000000000..f74957218 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_agent_plugin_config_details.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceAgentPluginConfigDetails The configuration of plugins associated with this instance. +type InstanceAgentPluginConfigDetails struct { + + // The plugin name. To get a list of available plugins, use the + // ListInstanceagentAvailablePlugins + // operation in the Oracle Cloud Agent API. For more information about the available plugins, see + // Managing Plugins with Oracle Cloud Agent (https://docs.oracle.com/iaas/Content/Compute/Tasks/manage-plugins.htm). + Name *string `mandatory:"true" json:"name"` + + // Whether the plugin should be enabled or disabled. + // To enable the monitoring and management plugins, the `isMonitoringDisabled` and + // `isManagementDisabled` attributes must also be set to false. + DesiredState InstanceAgentPluginConfigDetailsDesiredStateEnum `mandatory:"true" json:"desiredState"` +} + +func (m InstanceAgentPluginConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceAgentPluginConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceAgentPluginConfigDetailsDesiredStateEnum(string(m.DesiredState)); !ok && m.DesiredState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DesiredState: %s. Supported values are: %s.", m.DesiredState, strings.Join(GetInstanceAgentPluginConfigDetailsDesiredStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstanceAgentPluginConfigDetailsDesiredStateEnum Enum with underlying type: string +type InstanceAgentPluginConfigDetailsDesiredStateEnum string + +// Set of constants representing the allowable values for InstanceAgentPluginConfigDetailsDesiredStateEnum +const ( + InstanceAgentPluginConfigDetailsDesiredStateEnabled InstanceAgentPluginConfigDetailsDesiredStateEnum = "ENABLED" + InstanceAgentPluginConfigDetailsDesiredStateDisabled InstanceAgentPluginConfigDetailsDesiredStateEnum = "DISABLED" +) + +var mappingInstanceAgentPluginConfigDetailsDesiredStateEnum = map[string]InstanceAgentPluginConfigDetailsDesiredStateEnum{ + "ENABLED": InstanceAgentPluginConfigDetailsDesiredStateEnabled, + "DISABLED": InstanceAgentPluginConfigDetailsDesiredStateDisabled, +} + +var mappingInstanceAgentPluginConfigDetailsDesiredStateEnumLowerCase = map[string]InstanceAgentPluginConfigDetailsDesiredStateEnum{ + "enabled": InstanceAgentPluginConfigDetailsDesiredStateEnabled, + "disabled": InstanceAgentPluginConfigDetailsDesiredStateDisabled, +} + +// GetInstanceAgentPluginConfigDetailsDesiredStateEnumValues Enumerates the set of values for InstanceAgentPluginConfigDetailsDesiredStateEnum +func GetInstanceAgentPluginConfigDetailsDesiredStateEnumValues() []InstanceAgentPluginConfigDetailsDesiredStateEnum { + values := make([]InstanceAgentPluginConfigDetailsDesiredStateEnum, 0) + for _, v := range mappingInstanceAgentPluginConfigDetailsDesiredStateEnum { + values = append(values, v) + } + return values +} + +// GetInstanceAgentPluginConfigDetailsDesiredStateEnumStringValues Enumerates the set of values in String for InstanceAgentPluginConfigDetailsDesiredStateEnum +func GetInstanceAgentPluginConfigDetailsDesiredStateEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + } +} + +// GetMappingInstanceAgentPluginConfigDetailsDesiredStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceAgentPluginConfigDetailsDesiredStateEnum(val string) (InstanceAgentPluginConfigDetailsDesiredStateEnum, bool) { + enum, ok := mappingInstanceAgentPluginConfigDetailsDesiredStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_availability_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_availability_config.go new file mode 100644 index 000000000..d0d000d38 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_availability_config.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceAvailabilityConfig Options for defining the availabiity of a VM instance after a maintenance event that impacts the underlying hardware. +type InstanceAvailabilityConfig struct { + + // Whether to live migrate supported VM instances to a healthy physical VM host without + // disrupting running instances during infrastructure maintenance events. If null, Oracle + // chooses the best option for migrating the VM during infrastructure maintenance events. + IsLiveMigrationPreferred *bool `mandatory:"false" json:"isLiveMigrationPreferred"` + + // The lifecycle state for an instance when it is recovered after infrastructure maintenance. + // * `RESTORE_INSTANCE` - The instance is restored to the lifecycle state it was in before the maintenance event. + // If the instance was running, it is automatically rebooted. This is the default action when a value is not set. + // * `STOP_INSTANCE` - The instance is recovered in the stopped state. + RecoveryAction InstanceAvailabilityConfigRecoveryActionEnum `mandatory:"false" json:"recoveryAction,omitempty"` +} + +func (m InstanceAvailabilityConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceAvailabilityConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInstanceAvailabilityConfigRecoveryActionEnum(string(m.RecoveryAction)); !ok && m.RecoveryAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RecoveryAction: %s. Supported values are: %s.", m.RecoveryAction, strings.Join(GetInstanceAvailabilityConfigRecoveryActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstanceAvailabilityConfigRecoveryActionEnum Enum with underlying type: string +type InstanceAvailabilityConfigRecoveryActionEnum string + +// Set of constants representing the allowable values for InstanceAvailabilityConfigRecoveryActionEnum +const ( + InstanceAvailabilityConfigRecoveryActionRestoreInstance InstanceAvailabilityConfigRecoveryActionEnum = "RESTORE_INSTANCE" + InstanceAvailabilityConfigRecoveryActionStopInstance InstanceAvailabilityConfigRecoveryActionEnum = "STOP_INSTANCE" +) + +var mappingInstanceAvailabilityConfigRecoveryActionEnum = map[string]InstanceAvailabilityConfigRecoveryActionEnum{ + "RESTORE_INSTANCE": InstanceAvailabilityConfigRecoveryActionRestoreInstance, + "STOP_INSTANCE": InstanceAvailabilityConfigRecoveryActionStopInstance, +} + +var mappingInstanceAvailabilityConfigRecoveryActionEnumLowerCase = map[string]InstanceAvailabilityConfigRecoveryActionEnum{ + "restore_instance": InstanceAvailabilityConfigRecoveryActionRestoreInstance, + "stop_instance": InstanceAvailabilityConfigRecoveryActionStopInstance, +} + +// GetInstanceAvailabilityConfigRecoveryActionEnumValues Enumerates the set of values for InstanceAvailabilityConfigRecoveryActionEnum +func GetInstanceAvailabilityConfigRecoveryActionEnumValues() []InstanceAvailabilityConfigRecoveryActionEnum { + values := make([]InstanceAvailabilityConfigRecoveryActionEnum, 0) + for _, v := range mappingInstanceAvailabilityConfigRecoveryActionEnum { + values = append(values, v) + } + return values +} + +// GetInstanceAvailabilityConfigRecoveryActionEnumStringValues Enumerates the set of values in String for InstanceAvailabilityConfigRecoveryActionEnum +func GetInstanceAvailabilityConfigRecoveryActionEnumStringValues() []string { + return []string{ + "RESTORE_INSTANCE", + "STOP_INSTANCE", + } +} + +// GetMappingInstanceAvailabilityConfigRecoveryActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceAvailabilityConfigRecoveryActionEnum(val string) (InstanceAvailabilityConfigRecoveryActionEnum, bool) { + enum, ok := mappingInstanceAvailabilityConfigRecoveryActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration.go new file mode 100644 index 000000000..7458cba40 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration.go @@ -0,0 +1,120 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfiguration An instance configuration is a template that defines the settings to use when creating Compute instances. +type InstanceConfiguration struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + // containing the instance configuration. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance configuration. + Id *string `mandatory:"true" json:"id"` + + // The date and time the instance configuration was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + InstanceDetails InstanceConfigurationInstanceDetails `mandatory:"false" json:"instanceDetails"` + + // Parameters that were not specified when the instance configuration was created, but that + // are required to launch an instance from the instance configuration. See the + // LaunchInstanceConfiguration operation. + DeferredFields []string `mandatory:"false" json:"deferredFields"` +} + +func (m InstanceConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *InstanceConfiguration) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + InstanceDetails instanceconfigurationinstancedetails `json:"instanceDetails"` + DeferredFields []string `json:"deferredFields"` + CompartmentId *string `json:"compartmentId"` + Id *string `json:"id"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + nn, e = model.InstanceDetails.UnmarshalPolymorphicJSON(model.InstanceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.InstanceDetails = nn.(InstanceConfigurationInstanceDetails) + } else { + m.InstanceDetails = nil + } + + m.DeferredFields = make([]string, len(model.DeferredFields)) + copy(m.DeferredFields, model.DeferredFields) + m.CompartmentId = model.CompartmentId + + m.Id = model.Id + + m.TimeCreated = model.TimeCreated + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_milan_bm_gpu_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_milan_bm_gpu_launch_instance_platform_config.go new file mode 100644 index 000000000..584924424 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_milan_bm_gpu_launch_instance_platform_config.go @@ -0,0 +1,172 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig The platform configuration used when launching a bare metal GPU instance with the following shape: BM.GPU.GM4.8 (also +// named BM.GPU.A100-v2.8) (the AMD Milan platform). +type InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig + }{ + "AMD_MILAN_BM_GPU", + (MarshalTypeInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps0 InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS0" + InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps1 InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps2 InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" + InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps4 InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS4" + InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps6 InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS0": InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "NPS1": InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "NPS4": InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "NPS6": InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +var mappingInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps0": InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "nps1": InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "nps4": InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "nps6": InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +// GetInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingInstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_milan_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_milan_bm_launch_instance_platform_config.go new file mode 100644 index 000000000..6ee5f79bd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_milan_bm_launch_instance_platform_config.go @@ -0,0 +1,180 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig The platform configuration used when launching a bare metal instance with one of the following shapes: BM.Standard.E4.128 +// or BM.DenseIO.E4.128 (the AMD Milan platform). +type InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig + }{ + "AMD_MILAN_BM", + (MarshalTypeInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0 InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS0" + InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" + InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4 InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS4" + InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6 InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS0": InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "NPS1": InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "NPS4": InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "NPS6": InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +var mappingInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps0": InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "nps1": InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "nps4": InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "nps6": InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +// GetInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingInstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_rome_bm_gpu_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_rome_bm_gpu_launch_instance_platform_config.go new file mode 100644 index 000000000..485573fcb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_rome_bm_gpu_launch_instance_platform_config.go @@ -0,0 +1,172 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig The platform configuration of a bare metal GPU instance that uses the BM.GPU4.8 shape +// (the AMD Rome platform). +type InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig + }{ + "AMD_ROME_BM_GPU", + (MarshalTypeInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps0 InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS0" + InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps1 InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps2 InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" + InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps4 InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS4" + InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps6 InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS0": InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "NPS1": InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "NPS4": InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "NPS6": InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +var mappingInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps0": InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "nps1": InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "nps4": InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "nps6": InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +// GetInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingInstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_rome_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_rome_bm_launch_instance_platform_config.go new file mode 100644 index 000000000..d3734f0f5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_rome_bm_launch_instance_platform_config.go @@ -0,0 +1,180 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig The platform configuration used when launching a bare metal instance with the BM.Standard.E3.128 shape +// (the AMD Rome platform). +type InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig + }{ + "AMD_ROME_BM", + (MarshalTypeInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0 InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS0" + InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" + InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4 InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS4" + InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6 InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS0": InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "NPS1": InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "NPS4": InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "NPS6": InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +var mappingInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps0": InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "nps1": InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "nps4": InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "nps6": InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +// GetInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingInstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_vm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_vm_launch_instance_platform_config.go new file mode 100644 index 000000000..26f97d0aa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_amd_vm_launch_instance_platform_config.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationAmdVmLaunchInstancePlatformConfig The platform configuration used when launching a virtual machine instance with the AMD platform. +type InstanceConfigurationAmdVmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m InstanceConfigurationAmdVmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m InstanceConfigurationAmdVmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m InstanceConfigurationAmdVmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m InstanceConfigurationAmdVmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m InstanceConfigurationAmdVmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationAmdVmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationAmdVmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationAmdVmLaunchInstancePlatformConfig InstanceConfigurationAmdVmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationAmdVmLaunchInstancePlatformConfig + }{ + "AMD_VM", + (MarshalTypeInstanceConfigurationAmdVmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_attach_vnic_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_attach_vnic_details.go new file mode 100644 index 000000000..545bf9332 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_attach_vnic_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationAttachVnicDetails The representation of InstanceConfigurationAttachVnicDetails +type InstanceConfigurationAttachVnicDetails struct { + CreateVnicDetails *InstanceConfigurationCreateVnicDetails `mandatory:"false" json:"createVnicDetails"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Which physical network interface card (NIC) the VNIC will use. Defaults to 0. + // Certain bare metal instance shapes have two active physical NICs (0 and 1). If + // you add a secondary VNIC to one of these instances, you can specify which NIC + // the VNIC will use. For more information, see + // Virtual Network Interface Cards (VNICs) (https://docs.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). + NicIndex *int `mandatory:"false" json:"nicIndex"` +} + +func (m InstanceConfigurationAttachVnicDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationAttachVnicDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_attach_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_attach_volume_details.go new file mode 100644 index 000000000..055d6bbce --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_attach_volume_details.go @@ -0,0 +1,131 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationAttachVolumeDetails Volume attachmentDetails. Please see AttachVolumeDetails +type InstanceConfigurationAttachVolumeDetails interface { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + GetDisplayName() *string + + // Whether the attachment should be created in read-only mode. + GetIsReadOnly() *bool + + // The device name. + GetDevice() *string + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + GetIsShareable() *bool +} + +type instanceconfigurationattachvolumedetails struct { + JsonData []byte + DisplayName *string `mandatory:"false" json:"displayName"` + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + Device *string `mandatory:"false" json:"device"` + IsShareable *bool `mandatory:"false" json:"isShareable"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *instanceconfigurationattachvolumedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerinstanceconfigurationattachvolumedetails instanceconfigurationattachvolumedetails + s := struct { + Model Unmarshalerinstanceconfigurationattachvolumedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.DisplayName = s.Model.DisplayName + m.IsReadOnly = s.Model.IsReadOnly + m.Device = s.Model.Device + m.IsShareable = s.Model.IsShareable + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *instanceconfigurationattachvolumedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "iscsi": + mm := InstanceConfigurationIscsiAttachVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "paravirtualized": + mm := InstanceConfigurationParavirtualizedAttachVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for InstanceConfigurationAttachVolumeDetails: %s.", m.Type) + return *m, nil + } +} + +// GetDisplayName returns DisplayName +func (m instanceconfigurationattachvolumedetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetIsReadOnly returns IsReadOnly +func (m instanceconfigurationattachvolumedetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetDevice returns Device +func (m instanceconfigurationattachvolumedetails) GetDevice() *string { + return m.Device +} + +// GetIsShareable returns IsShareable +func (m instanceconfigurationattachvolumedetails) GetIsShareable() *bool { + return m.IsShareable +} + +func (m instanceconfigurationattachvolumedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m instanceconfigurationattachvolumedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_autotune_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_autotune_policy.go new file mode 100644 index 000000000..b1596ffd6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_autotune_policy.go @@ -0,0 +1,129 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationAutotunePolicy An autotune policy automatically tunes the volume's performace based on the type of the policy. +type InstanceConfigurationAutotunePolicy interface { +} + +type instanceconfigurationautotunepolicy struct { + JsonData []byte + AutotuneType string `json:"autotuneType"` +} + +// UnmarshalJSON unmarshals json +func (m *instanceconfigurationautotunepolicy) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerinstanceconfigurationautotunepolicy instanceconfigurationautotunepolicy + s := struct { + Model Unmarshalerinstanceconfigurationautotunepolicy + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.AutotuneType = s.Model.AutotuneType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *instanceconfigurationautotunepolicy) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.AutotuneType { + case "PERFORMANCE_BASED": + mm := InstanceConfigurationPerformanceBasedAutotunePolicy{} + err = json.Unmarshal(data, &mm) + return mm, err + case "DETACHED_VOLUME": + mm := InstanceConfigurationDetachedVolumeAutotunePolicy{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for InstanceConfigurationAutotunePolicy: %s.", m.AutotuneType) + return *m, nil + } +} + +func (m instanceconfigurationautotunepolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m instanceconfigurationautotunepolicy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstanceConfigurationAutotunePolicyAutotuneTypeEnum Enum with underlying type: string +type InstanceConfigurationAutotunePolicyAutotuneTypeEnum string + +// Set of constants representing the allowable values for InstanceConfigurationAutotunePolicyAutotuneTypeEnum +const ( + InstanceConfigurationAutotunePolicyAutotuneTypeDetachedVolume InstanceConfigurationAutotunePolicyAutotuneTypeEnum = "DETACHED_VOLUME" + InstanceConfigurationAutotunePolicyAutotuneTypePerformanceBased InstanceConfigurationAutotunePolicyAutotuneTypeEnum = "PERFORMANCE_BASED" +) + +var mappingInstanceConfigurationAutotunePolicyAutotuneTypeEnum = map[string]InstanceConfigurationAutotunePolicyAutotuneTypeEnum{ + "DETACHED_VOLUME": InstanceConfigurationAutotunePolicyAutotuneTypeDetachedVolume, + "PERFORMANCE_BASED": InstanceConfigurationAutotunePolicyAutotuneTypePerformanceBased, +} + +var mappingInstanceConfigurationAutotunePolicyAutotuneTypeEnumLowerCase = map[string]InstanceConfigurationAutotunePolicyAutotuneTypeEnum{ + "detached_volume": InstanceConfigurationAutotunePolicyAutotuneTypeDetachedVolume, + "performance_based": InstanceConfigurationAutotunePolicyAutotuneTypePerformanceBased, +} + +// GetInstanceConfigurationAutotunePolicyAutotuneTypeEnumValues Enumerates the set of values for InstanceConfigurationAutotunePolicyAutotuneTypeEnum +func GetInstanceConfigurationAutotunePolicyAutotuneTypeEnumValues() []InstanceConfigurationAutotunePolicyAutotuneTypeEnum { + values := make([]InstanceConfigurationAutotunePolicyAutotuneTypeEnum, 0) + for _, v := range mappingInstanceConfigurationAutotunePolicyAutotuneTypeEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationAutotunePolicyAutotuneTypeEnumStringValues Enumerates the set of values in String for InstanceConfigurationAutotunePolicyAutotuneTypeEnum +func GetInstanceConfigurationAutotunePolicyAutotuneTypeEnumStringValues() []string { + return []string{ + "DETACHED_VOLUME", + "PERFORMANCE_BASED", + } +} + +// GetMappingInstanceConfigurationAutotunePolicyAutotuneTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationAutotunePolicyAutotuneTypeEnum(val string) (InstanceConfigurationAutotunePolicyAutotuneTypeEnum, bool) { + enum, ok := mappingInstanceConfigurationAutotunePolicyAutotuneTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_availability_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_availability_config.go new file mode 100644 index 000000000..ef55f5ab1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_availability_config.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationAvailabilityConfig Options for defining the availabiity of a VM instance after a maintenance event that impacts the underlying hardware. +type InstanceConfigurationAvailabilityConfig struct { + + // Whether to live migrate supported VM instances to a healthy physical VM host without + // disrupting running instances during infrastructure maintenance events. If null, Oracle + // chooses the best option for migrating the VM during infrastructure maintenance events. + IsLiveMigrationPreferred *bool `mandatory:"false" json:"isLiveMigrationPreferred"` + + // The lifecycle state for an instance when it is recovered after infrastructure maintenance. + // * `RESTORE_INSTANCE` - The instance is restored to the lifecycle state it was in before the maintenance event. + // If the instance was running, it is automatically rebooted. This is the default action when a value is not set. + // * `STOP_INSTANCE` - The instance is recovered in the stopped state. + RecoveryAction InstanceConfigurationAvailabilityConfigRecoveryActionEnum `mandatory:"false" json:"recoveryAction,omitempty"` +} + +func (m InstanceConfigurationAvailabilityConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationAvailabilityConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInstanceConfigurationAvailabilityConfigRecoveryActionEnum(string(m.RecoveryAction)); !ok && m.RecoveryAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RecoveryAction: %s. Supported values are: %s.", m.RecoveryAction, strings.Join(GetInstanceConfigurationAvailabilityConfigRecoveryActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstanceConfigurationAvailabilityConfigRecoveryActionEnum Enum with underlying type: string +type InstanceConfigurationAvailabilityConfigRecoveryActionEnum string + +// Set of constants representing the allowable values for InstanceConfigurationAvailabilityConfigRecoveryActionEnum +const ( + InstanceConfigurationAvailabilityConfigRecoveryActionRestoreInstance InstanceConfigurationAvailabilityConfigRecoveryActionEnum = "RESTORE_INSTANCE" + InstanceConfigurationAvailabilityConfigRecoveryActionStopInstance InstanceConfigurationAvailabilityConfigRecoveryActionEnum = "STOP_INSTANCE" +) + +var mappingInstanceConfigurationAvailabilityConfigRecoveryActionEnum = map[string]InstanceConfigurationAvailabilityConfigRecoveryActionEnum{ + "RESTORE_INSTANCE": InstanceConfigurationAvailabilityConfigRecoveryActionRestoreInstance, + "STOP_INSTANCE": InstanceConfigurationAvailabilityConfigRecoveryActionStopInstance, +} + +var mappingInstanceConfigurationAvailabilityConfigRecoveryActionEnumLowerCase = map[string]InstanceConfigurationAvailabilityConfigRecoveryActionEnum{ + "restore_instance": InstanceConfigurationAvailabilityConfigRecoveryActionRestoreInstance, + "stop_instance": InstanceConfigurationAvailabilityConfigRecoveryActionStopInstance, +} + +// GetInstanceConfigurationAvailabilityConfigRecoveryActionEnumValues Enumerates the set of values for InstanceConfigurationAvailabilityConfigRecoveryActionEnum +func GetInstanceConfigurationAvailabilityConfigRecoveryActionEnumValues() []InstanceConfigurationAvailabilityConfigRecoveryActionEnum { + values := make([]InstanceConfigurationAvailabilityConfigRecoveryActionEnum, 0) + for _, v := range mappingInstanceConfigurationAvailabilityConfigRecoveryActionEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationAvailabilityConfigRecoveryActionEnumStringValues Enumerates the set of values in String for InstanceConfigurationAvailabilityConfigRecoveryActionEnum +func GetInstanceConfigurationAvailabilityConfigRecoveryActionEnumStringValues() []string { + return []string{ + "RESTORE_INSTANCE", + "STOP_INSTANCE", + } +} + +// GetMappingInstanceConfigurationAvailabilityConfigRecoveryActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationAvailabilityConfigRecoveryActionEnum(val string) (InstanceConfigurationAvailabilityConfigRecoveryActionEnum, bool) { + enum, ok := mappingInstanceConfigurationAvailabilityConfigRecoveryActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_block_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_block_volume_details.go new file mode 100644 index 000000000..8b9638f26 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_block_volume_details.go @@ -0,0 +1,79 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationBlockVolumeDetails Create new block volumes or attach to an existing volume. Specify either createDetails or volumeId. +type InstanceConfigurationBlockVolumeDetails struct { + AttachDetails InstanceConfigurationAttachVolumeDetails `mandatory:"false" json:"attachDetails"` + + CreateDetails *InstanceConfigurationCreateVolumeDetails `mandatory:"false" json:"createDetails"` + + // The OCID of the volume. + VolumeId *string `mandatory:"false" json:"volumeId"` +} + +func (m InstanceConfigurationBlockVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationBlockVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *InstanceConfigurationBlockVolumeDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + AttachDetails instanceconfigurationattachvolumedetails `json:"attachDetails"` + CreateDetails *InstanceConfigurationCreateVolumeDetails `json:"createDetails"` + VolumeId *string `json:"volumeId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.AttachDetails.UnmarshalPolymorphicJSON(model.AttachDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.AttachDetails = nn.(InstanceConfigurationAttachVolumeDetails) + } else { + m.AttachDetails = nil + } + + m.CreateDetails = model.CreateDetails + + m.VolumeId = model.VolumeId + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_block_volume_replica_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_block_volume_replica_details.go new file mode 100644 index 000000000..d4dd611f9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_block_volume_replica_details.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationBlockVolumeReplicaDetails Contains the details for the block volume replica +type InstanceConfigurationBlockVolumeReplicaDetails struct { + + // The availability domain of the block volume replica. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The display name of the block volume replica. You may optionally specify a *display name* for + // the block volume replica, otherwise a default is provided. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m InstanceConfigurationBlockVolumeReplicaDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationBlockVolumeReplicaDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_create_vnic_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_create_vnic_details.go new file mode 100644 index 000000000..fd51c5fb7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_create_vnic_details.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationCreateVnicDetails Contains the properties of the VNIC for an instance configuration. See CreateVnicDetails +// and Instance Configurations (https://docs.oracle.com/iaas/Content/Compute/Concepts/instancemanagement.htm#config) for more information. +type InstanceConfigurationCreateVnicDetails struct { + + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + AssignIpv6Ip *bool `mandatory:"false" json:"assignIpv6Ip"` + + // Whether the VNIC should be assigned a public IP address. See the `assignPublicIp` attribute of CreateVnicDetails + // for more information. + AssignPublicIp *bool `mandatory:"false" json:"assignPublicIp"` + + // Whether the VNIC should be assigned a private DNS record. See the `assignPrivateDnsRecord` attribute of CreateVnicDetails + // for more information. + AssignPrivateDnsRecord *bool `mandatory:"false" json:"assignPrivateDnsRecord"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Security attributes (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels + // for a resource that can be referenced in a Zero Trust Packet Routing (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) + // (ZPR) policy to control access to ZPR-supported resources. + // Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` + SecurityAttributes map[string]map[string]interface{} `mandatory:"false" json:"securityAttributes"` + + // A list of IPv6 prefixes from which the VNIC should be assigned an IPv6 address. + // You can provide only the prefix and OCI selects an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address that should be used from within that range. + Ipv6AddressIpv6SubnetCidrPairDetails []InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` + + // The hostname for the VNIC's primary private IP. + // See the `hostnameLabel` attribute of CreateVnicDetails for more information. + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. For more + // information about NSGs, see + // NetworkSecurityGroup. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // One of the IPv4 CIDR blocks allocated to the subnet. Represents the IP range + // from which the VNIC's private IP address will be assigned if `privateIp` or + // `privateIpId` is not specified. + // Either this field or the `privateIp` (or `privateIpId`, if applicable) field + // must be provided, but not both simultaneously. + // Example: `192.168.1.0/28` + // See the `subnetCidr` attribute of CreateVnicDetails for more information. + SubnetCidr *string `mandatory:"false" json:"subnetCidr"` + + // A private IP address of your choice to assign to the VNIC. + // See the `privateIp` attribute of CreateVnicDetails for more information. + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // An OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that specifies a previously-reserved IP address to use for this VNIC. + // See the `privateIpId` attribute of CreateVnicDetails for more information. + PrivateIpId *string `mandatory:"false" json:"privateIpId"` + + // Whether the source/destination check is disabled on the VNIC. + // See the `skipSourceDestCheck` attribute of CreateVnicDetails for more information. + SkipSourceDestCheck *bool `mandatory:"false" json:"skipSourceDestCheck"` + + // The OCID of the subnet to create the VNIC in. + // See the `subnetId` attribute of CreateVnicDetails for more information. + SubnetId *string `mandatory:"false" json:"subnetId"` +} + +func (m InstanceConfigurationCreateVnicDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationCreateVnicDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_create_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_create_volume_details.go new file mode 100644 index 000000000..117cc7892 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_create_volume_details.go @@ -0,0 +1,191 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationCreateVolumeDetails Creates a new block volume. Please see CreateVolumeDetails +type InstanceConfigurationCreateVolumeDetails struct { + + // The availability domain of the volume. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // If provided, specifies the ID of the volume backup policy to assign to the newly + // created volume. If omitted, no policy will be assigned. + BackupPolicyId *string `mandatory:"false" json:"backupPolicyId"` + + // The OCID of the compartment that contains the volume. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Specifies whether the auto-tune performance is enabled for this boot volume. This field is deprecated. + // Use the `InstanceConfigurationDetachedVolumeAutotunePolicy` instead to enable the volume for detached autotune. + IsAutoTuneEnabled *bool `mandatory:"false" json:"isAutoTuneEnabled"` + + // The list of block volume replicas to be enabled for this volume + // in the specified destination availability domains. + BlockVolumeReplicas []InstanceConfigurationBlockVolumeReplicaDetails `mandatory:"false" json:"blockVolumeReplicas"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID of the Vault service key to assign as the master encryption key + // for the volume. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // The number of volume performance units (VPUs) that will be applied to this volume per GB, + // representing the Block Volume service's elastic performance options. + // See Block Volume Performance Levels (https://docs.oracle.com/iaas/Content/Block/Concepts/blockvolumeperformance.htm#perf_levels) for more information. + // Allowed values: + // * `0`: Represents Lower Cost option. + // * `10`: Represents Balanced option. + // * `20`: Represents Higher Performance option. + // * `30`-`120`: Represents the Ultra High Performance option. + // For performance autotune enabled volumes, it would be the Default(Minimum) VPUs/GB. + VpusPerGB *int64 `mandatory:"false" json:"vpusPerGB"` + + // The clusterPlacementGroup Id of the volume for volume placement. + ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` + + // The size of the volume in GBs. + SizeInGBs *int64 `mandatory:"false" json:"sizeInGBs"` + + SourceDetails InstanceConfigurationVolumeSourceDetails `mandatory:"false" json:"sourceDetails"` + + // The list of autotune policies enabled for this volume. + AutotunePolicies []InstanceConfigurationAutotunePolicy `mandatory:"false" json:"autotunePolicies"` + + // The OCID of the Vault service key which is the master encryption key for the block volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + XrcKmsKeyId *string `mandatory:"false" json:"xrcKmsKeyId"` + + // When set to true, enables SCSI Persistent Reservation (SCSI PR) for the volume. For more information, see + // Persistent Reservations (https://docs.oracle.com/iaas/Content/Block/Concepts/persistent-reservations.htm). + IsReservationsEnabled *bool `mandatory:"false" json:"isReservationsEnabled"` +} + +func (m InstanceConfigurationCreateVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationCreateVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *InstanceConfigurationCreateVolumeDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + AvailabilityDomain *string `json:"availabilityDomain"` + BackupPolicyId *string `json:"backupPolicyId"` + CompartmentId *string `json:"compartmentId"` + IsAutoTuneEnabled *bool `json:"isAutoTuneEnabled"` + BlockVolumeReplicas []InstanceConfigurationBlockVolumeReplicaDetails `json:"blockVolumeReplicas"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + KmsKeyId *string `json:"kmsKeyId"` + VpusPerGB *int64 `json:"vpusPerGB"` + ClusterPlacementGroupId *string `json:"clusterPlacementGroupId"` + SizeInGBs *int64 `json:"sizeInGBs"` + SourceDetails instanceconfigurationvolumesourcedetails `json:"sourceDetails"` + AutotunePolicies []instanceconfigurationautotunepolicy `json:"autotunePolicies"` + XrcKmsKeyId *string `json:"xrcKmsKeyId"` + IsReservationsEnabled *bool `json:"isReservationsEnabled"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.AvailabilityDomain = model.AvailabilityDomain + + m.BackupPolicyId = model.BackupPolicyId + + m.CompartmentId = model.CompartmentId + + m.IsAutoTuneEnabled = model.IsAutoTuneEnabled + + m.BlockVolumeReplicas = make([]InstanceConfigurationBlockVolumeReplicaDetails, len(model.BlockVolumeReplicas)) + copy(m.BlockVolumeReplicas, model.BlockVolumeReplicas) + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.KmsKeyId = model.KmsKeyId + + m.VpusPerGB = model.VpusPerGB + + m.ClusterPlacementGroupId = model.ClusterPlacementGroupId + + m.SizeInGBs = model.SizeInGBs + + nn, e = model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.SourceDetails = nn.(InstanceConfigurationVolumeSourceDetails) + } else { + m.SourceDetails = nil + } + + m.AutotunePolicies = make([]InstanceConfigurationAutotunePolicy, len(model.AutotunePolicies)) + for i, n := range model.AutotunePolicies { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.AutotunePolicies[i] = nn.(InstanceConfigurationAutotunePolicy) + } else { + m.AutotunePolicies[i] = nil + } + } + m.XrcKmsKeyId = model.XrcKmsKeyId + + m.IsReservationsEnabled = model.IsReservationsEnabled + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_detached_volume_autotune_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_detached_volume_autotune_policy.go new file mode 100644 index 000000000..621381416 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_detached_volume_autotune_policy.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationDetachedVolumeAutotunePolicy Volume's performace will be tuned to the lower cost settings once detached. +type InstanceConfigurationDetachedVolumeAutotunePolicy struct { +} + +func (m InstanceConfigurationDetachedVolumeAutotunePolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationDetachedVolumeAutotunePolicy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationDetachedVolumeAutotunePolicy) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationDetachedVolumeAutotunePolicy InstanceConfigurationDetachedVolumeAutotunePolicy + s := struct { + DiscriminatorParam string `json:"autotuneType"` + MarshalTypeInstanceConfigurationDetachedVolumeAutotunePolicy + }{ + "DETACHED_VOLUME", + (MarshalTypeInstanceConfigurationDetachedVolumeAutotunePolicy)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_generic_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_generic_bm_launch_instance_platform_config.go new file mode 100644 index 000000000..408eb778a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_generic_bm_launch_instance_platform_config.go @@ -0,0 +1,179 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationGenericBmLaunchInstancePlatformConfig The standard platform configuration to be used when launching a bare metal instance. +type InstanceConfigurationGenericBmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationGenericBmLaunchInstancePlatformConfig InstanceConfigurationGenericBmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationGenericBmLaunchInstancePlatformConfig + }{ + "GENERIC_BM", + (MarshalTypeInstanceConfigurationGenericBmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0 InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS0" + InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" + InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4 InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS4" + InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6 InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS6" +) + +var mappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS0": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "NPS1": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "NPS4": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "NPS6": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +var mappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps0": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "nps1": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "nps4": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, + "nps6": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps6, +} + +// GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_host_group_placement_constraint_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_host_group_placement_constraint_details.go new file mode 100644 index 000000000..52f2f57e6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_host_group_placement_constraint_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationHostGroupPlacementConstraintDetails The details for providing placement constraints using the compute host group OCID. +type InstanceConfigurationHostGroupPlacementConstraintDetails struct { + + // The OCID of the compute host group. This is only available for dedicated capacity customers. + ComputeHostGroupId *string `mandatory:"true" json:"computeHostGroupId"` +} + +func (m InstanceConfigurationHostGroupPlacementConstraintDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationHostGroupPlacementConstraintDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationHostGroupPlacementConstraintDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationHostGroupPlacementConstraintDetails InstanceConfigurationHostGroupPlacementConstraintDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationHostGroupPlacementConstraintDetails + }{ + "HOST_GROUP", + (MarshalTypeInstanceConfigurationHostGroupPlacementConstraintDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_details.go new file mode 100644 index 000000000..78b855927 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_details.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationInstanceDetails The representation of InstanceConfigurationInstanceDetails +type InstanceConfigurationInstanceDetails interface { +} + +type instanceconfigurationinstancedetails struct { + JsonData []byte + InstanceType string `json:"instanceType"` +} + +// UnmarshalJSON unmarshals json +func (m *instanceconfigurationinstancedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerinstanceconfigurationinstancedetails instanceconfigurationinstancedetails + s := struct { + Model Unmarshalerinstanceconfigurationinstancedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.InstanceType = s.Model.InstanceType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *instanceconfigurationinstancedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.InstanceType { + case "instance_options": + mm := ComputeInstanceOptions{} + err = json.Unmarshal(data, &mm) + return mm, err + case "compute": + mm := ComputeInstanceDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for InstanceConfigurationInstanceDetails: %s.", m.InstanceType) + return *m, nil + } +} + +func (m instanceconfigurationinstancedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m instanceconfigurationinstancedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_options.go new file mode 100644 index 000000000..f2ee750d3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_options.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationInstanceOptions Optional mutable instance options. As a part of Instance Metadata Service Security Header, This allows user to disable the legacy imds endpoints. +type InstanceConfigurationInstanceOptions struct { + + // Whether to disable the legacy (/v1) instance metadata service endpoints. + // Customers who have migrated to /v2 should set this to true for added security. + // Default is false. + AreLegacyImdsEndpointsDisabled *bool `mandatory:"false" json:"areLegacyImdsEndpointsDisabled"` +} + +func (m InstanceConfigurationInstanceOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationInstanceOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_details.go new file mode 100644 index 000000000..aa914f78c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_details.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationInstanceSourceDetails The representation of InstanceConfigurationInstanceSourceDetails +type InstanceConfigurationInstanceSourceDetails interface { +} + +type instanceconfigurationinstancesourcedetails struct { + JsonData []byte + SourceType string `json:"sourceType"` +} + +// UnmarshalJSON unmarshals json +func (m *instanceconfigurationinstancesourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerinstanceconfigurationinstancesourcedetails instanceconfigurationinstancesourcedetails + s := struct { + Model Unmarshalerinstanceconfigurationinstancesourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.SourceType = s.Model.SourceType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *instanceconfigurationinstancesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.SourceType { + case "image": + mm := InstanceConfigurationInstanceSourceViaImageDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "bootVolume": + mm := InstanceConfigurationInstanceSourceViaBootVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for InstanceConfigurationInstanceSourceDetails: %s.", m.SourceType) + return *m, nil + } +} + +func (m instanceconfigurationinstancesourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m instanceconfigurationinstancesourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_image_filter_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_image_filter_details.go new file mode 100644 index 000000000..e92ddc623 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_image_filter_details.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationInstanceSourceImageFilterDetails These are the criteria for selecting an image. This is required if imageId is not specified. +type InstanceConfigurationInstanceSourceImageFilterDetails struct { + + // The OCID of the compartment containing images to search + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Filter based on these defined tags. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + DefinedTagsFilter map[string]map[string]interface{} `mandatory:"false" json:"definedTagsFilter"` + + // The image's operating system. + // Example: `Oracle Linux` + OperatingSystem *string `mandatory:"false" json:"operatingSystem"` + + // The image's operating system version. + // Example: `7.2` + OperatingSystemVersion *string `mandatory:"false" json:"operatingSystemVersion"` +} + +func (m InstanceConfigurationInstanceSourceImageFilterDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationInstanceSourceImageFilterDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_via_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_via_boot_volume_details.go new file mode 100644 index 000000000..8a18ea7a4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_via_boot_volume_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationInstanceSourceViaBootVolumeDetails The representation of InstanceConfigurationInstanceSourceViaBootVolumeDetails +type InstanceConfigurationInstanceSourceViaBootVolumeDetails struct { + + // The OCID of the boot volume used to boot the instance. + BootVolumeId *string `mandatory:"false" json:"bootVolumeId"` +} + +func (m InstanceConfigurationInstanceSourceViaBootVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationInstanceSourceViaBootVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationInstanceSourceViaBootVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationInstanceSourceViaBootVolumeDetails InstanceConfigurationInstanceSourceViaBootVolumeDetails + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeInstanceConfigurationInstanceSourceViaBootVolumeDetails + }{ + "bootVolume", + (MarshalTypeInstanceConfigurationInstanceSourceViaBootVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_via_image_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_via_image_details.go new file mode 100644 index 000000000..c53234308 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_instance_source_via_image_details.go @@ -0,0 +1,79 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationInstanceSourceViaImageDetails The representation of InstanceConfigurationInstanceSourceViaImageDetails +type InstanceConfigurationInstanceSourceViaImageDetails struct { + + // The size of the boot volume in GBs. The minimum value is 50 GB and the maximum + // value is 32,768 GB (32 TB). + BootVolumeSizeInGBs *int64 `mandatory:"false" json:"bootVolumeSizeInGBs"` + + // The OCID of the image used to boot the instance. + ImageId *string `mandatory:"false" json:"imageId"` + + // The OCID of the Vault service key to assign as the master encryption key for the boot volume. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // The number of volume performance units (VPUs) that will be applied to this volume per GB, + // representing the Block Volume service's elastic performance options. + // See Block Volume Performance Levels (https://docs.oracle.com/iaas/Content/Block/Concepts/blockvolumeperformance.htm#perf_levels) for more information. + // Allowed values: + // * `10`: Represents Balanced option. + // * `20`: Represents Higher Performance option. + // * `30`-`120`: Represents the Ultra High Performance option. + // For performance autotune enabled volumes, it would be the Default(Minimum) VPUs/GB. + BootVolumeVpusPerGB *int64 `mandatory:"false" json:"bootVolumeVpusPerGB"` + + InstanceSourceImageFilterDetails *InstanceConfigurationInstanceSourceImageFilterDetails `mandatory:"false" json:"instanceSourceImageFilterDetails"` +} + +func (m InstanceConfigurationInstanceSourceViaImageDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationInstanceSourceViaImageDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationInstanceSourceViaImageDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationInstanceSourceViaImageDetails InstanceConfigurationInstanceSourceViaImageDetails + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeInstanceConfigurationInstanceSourceViaImageDetails + }{ + "image", + (MarshalTypeInstanceConfigurationInstanceSourceViaImageDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_icelake_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_icelake_bm_launch_instance_platform_config.go new file mode 100644 index 000000000..9f4d3030d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_icelake_bm_launch_instance_platform_config.go @@ -0,0 +1,160 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig The platform configuration used when launching a bare metal instance with the BM.Standard3.64 shape +// or the BM.Optimized3.36 shape (the Intel Ice Lake platform). +type InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig + }{ + "INTEL_ICELAKE_BM", + (MarshalTypeInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" +) + +var mappingInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS1": InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +var mappingInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps1": InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +// GetInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS1", + "NPS2", + } +} + +// GetMappingInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingInstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_skylake_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_skylake_bm_launch_instance_platform_config.go new file mode 100644 index 000000000..e74b3550b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_skylake_bm_launch_instance_platform_config.go @@ -0,0 +1,160 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig The platform configuration used when launching a bare metal instance with one of the following +// shapes: BM.Standard2.52, BM.GPU2.2, BM.GPU3.8, or BM.DenseIO2.52 (the Intel Skylake platform). +type InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig + }{ + "INTEL_SKYLAKE_BM", + (MarshalTypeInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" +) + +var mappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS1": InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +var mappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps1": InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +// GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS1", + "NPS2", + } +} + +// GetMappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_vm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_vm_launch_instance_platform_config.go new file mode 100644 index 000000000..373051333 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_intel_vm_launch_instance_platform_config.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationIntelVmLaunchInstancePlatformConfig The platform configuration used when launching a virtual machine instance with the Intel platform. +type InstanceConfigurationIntelVmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m InstanceConfigurationIntelVmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m InstanceConfigurationIntelVmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m InstanceConfigurationIntelVmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m InstanceConfigurationIntelVmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m InstanceConfigurationIntelVmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationIntelVmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationIntelVmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationIntelVmLaunchInstancePlatformConfig InstanceConfigurationIntelVmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationIntelVmLaunchInstancePlatformConfig + }{ + "INTEL_VM", + (MarshalTypeInstanceConfigurationIntelVmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_ipv6_address_ipv6_subnet_cidr_pair_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_ipv6_address_ipv6_subnet_cidr_pair_details.go new file mode 100644 index 000000000..545f3959c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_ipv6_address_ipv6_subnet_cidr_pair_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails Optional. Used to specify from which subnet prefixes an IPv6 address should be allocated, or to assign valid available IPv6 addresses. +type InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails struct { + + // Optional. Used to disambiguate which subnet prefix should be used to create an IPv6 allocation. + Ipv6SubnetCidr *string `mandatory:"false" json:"ipv6SubnetCidr"` + + // Optional. An available IPv6 address of your subnet from a valid IPv6 prefix on the subnet (otherwise the IP address is automatically assigned). + Ipv6Address *string `mandatory:"false" json:"ipv6Address"` + + // An OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that specifies a previously-reserved ipv6 to use. + Ipv6Id *string `mandatory:"false" json:"ipv6Id"` +} + +func (m InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_iscsi_attach_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_iscsi_attach_volume_details.go new file mode 100644 index 000000000..e6f6e1508 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_iscsi_attach_volume_details.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationIscsiAttachVolumeDetails The representation of InstanceConfigurationIscsiAttachVolumeDetails +type InstanceConfigurationIscsiAttachVolumeDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether the attachment should be created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + + // The device name. + Device *string `mandatory:"false" json:"device"` + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + IsShareable *bool `mandatory:"false" json:"isShareable"` + + // Whether to use CHAP authentication for the volume attachment. Defaults to false. + UseChap *bool `mandatory:"false" json:"useChap"` +} + +// GetDisplayName returns DisplayName +func (m InstanceConfigurationIscsiAttachVolumeDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetIsReadOnly returns IsReadOnly +func (m InstanceConfigurationIscsiAttachVolumeDetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetDevice returns Device +func (m InstanceConfigurationIscsiAttachVolumeDetails) GetDevice() *string { + return m.Device +} + +// GetIsShareable returns IsShareable +func (m InstanceConfigurationIscsiAttachVolumeDetails) GetIsShareable() *bool { + return m.IsShareable +} + +func (m InstanceConfigurationIscsiAttachVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationIscsiAttachVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationIscsiAttachVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationIscsiAttachVolumeDetails InstanceConfigurationIscsiAttachVolumeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationIscsiAttachVolumeDetails + }{ + "iscsi", + (MarshalTypeInstanceConfigurationIscsiAttachVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_agent_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_agent_config_details.go new file mode 100644 index 000000000..166d5d1df --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_agent_config_details.go @@ -0,0 +1,79 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationLaunchInstanceAgentConfigDetails Configuration options for the Oracle Cloud Agent software running on the instance. +type InstanceConfigurationLaunchInstanceAgentConfigDetails struct { + + // Whether Oracle Cloud Agent can gather performance metrics and monitor the instance using the + // monitoring plugins. Default value is false (monitoring plugins are enabled). + // These are the monitoring plugins: Compute Instance Monitoring + // and Custom Logs Monitoring. + // The monitoring plugins are controlled by this parameter and by the per-plugin + // configuration in the `pluginsConfig` object. + // - If `isMonitoringDisabled` is true, all of the monitoring plugins are disabled, regardless of + // the per-plugin configuration. + // - If `isMonitoringDisabled` is false, all of the monitoring plugins are enabled. You + // can optionally disable individual monitoring plugins by providing a value in the `pluginsConfig` + // object. + IsMonitoringDisabled *bool `mandatory:"false" json:"isMonitoringDisabled"` + + // Whether Oracle Cloud Agent can run all the available management plugins. + // Default value is false (management plugins are enabled). + // These are the management plugins: OS Management Service Agent and Compute Instance + // Run Command. + // The management plugins are controlled by this parameter and by the per-plugin + // configuration in the `pluginsConfig` object. + // - If `isManagementDisabled` is true, all of the management plugins are disabled, regardless of + // the per-plugin configuration. + // - If `isManagementDisabled` is false, all of the management plugins are enabled. You + // can optionally disable individual management plugins by providing a value in the `pluginsConfig` + // object. + IsManagementDisabled *bool `mandatory:"false" json:"isManagementDisabled"` + + // Whether Oracle Cloud Agent can run all the available plugins. + // This includes the management and monitoring plugins. + // To get a list of available plugins, use the + // ListInstanceagentAvailablePlugins + // operation in the Oracle Cloud Agent API. For more information about the available plugins, see + // Managing Plugins with Oracle Cloud Agent (https://docs.oracle.com/iaas/Content/Compute/Tasks/manage-plugins.htm). + AreAllPluginsDisabled *bool `mandatory:"false" json:"areAllPluginsDisabled"` + + // The configuration of plugins associated with this instance. + PluginsConfig []InstanceAgentPluginConfigDetails `mandatory:"false" json:"pluginsConfig"` +} + +func (m InstanceConfigurationLaunchInstanceAgentConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationLaunchInstanceAgentConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_details.go new file mode 100644 index 000000000..5a29f7b1c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_details.go @@ -0,0 +1,454 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationLaunchInstanceDetails Instance launch details for creating an instance from an instance configuration. Use the `sourceDetails` +// parameter to specify whether a boot volume or an image should be used to launch a new instance. +// See LaunchInstanceDetails for more information. +type InstanceConfigurationLaunchInstanceDetails struct { + + // The availability domain of the instance. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The OCID of the compute capacity reservation this instance is launched under. + CapacityReservationId *string `mandatory:"false" json:"capacityReservationId"` + + // Whether to enable AI enterprise on the instance. + IsAIEnterpriseEnabled *bool `mandatory:"false" json:"isAIEnterpriseEnabled"` + + PlacementConstraintDetails InstanceConfigurationPlacementConstraintDetails `mandatory:"false" json:"placementConstraintDetails"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the + // compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) that the instance will be created in. + ComputeClusterId *string `mandatory:"false" json:"computeClusterId"` + + // The OCID of the compartment containing the instance. + // Instances created from instance configurations are placed in the same compartment + // as the instance that was used to create the instance configuration. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID of the cluster placement group of the instance. + ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` + + CreateVnicDetails *InstanceConfigurationCreateVnicDetails `mandatory:"false" json:"createVnicDetails"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Security attributes (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels + // for a resource that can be referenced in a Zero Trust Packet Routing (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) + // (ZPR) policy to control access to ZPR-supported resources. + // Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` + SecurityAttributes map[string]map[string]interface{} `mandatory:"false" json:"securityAttributes"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Additional metadata key/value pairs that you provide. They serve the same purpose and + // functionality as fields in the `metadata` object. + // They are distinguished from `metadata` fields in that these can be nested JSON objects + // (whereas `metadata` fields are string/string maps only). + // The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of + // 32,000 bytes. + ExtendedMetadata map[string]interface{} `mandatory:"false" json:"extendedMetadata"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // This is an advanced option. + // When a bare metal or virtual machine + // instance boots, the iPXE firmware that runs on the instance is + // configured to run an iPXE script to continue the boot process. + // If you want more control over the boot process, you can provide + // your own custom iPXE script that will run when the instance boots; + // however, you should be aware that the same iPXE script will run + // every time an instance boots; not only after the initial + // LaunchInstance call. + // The default iPXE script connects to the instance's local boot + // volume over iSCSI and performs a network boot. If you use a custom iPXE + // script and want to network-boot from the instance's local boot volume + // over iSCSI the same way as the default iPXE script, you should use the + // following iSCSI IP address: 169.254.0.2, and boot volume IQN: + // iqn.2015-02.oracle.boot. + // For more information about the Bring Your Own Image feature of + // Oracle Cloud Infrastructure, see + // Bring Your Own Image (https://docs.oracle.com/iaas/Content/Compute/References/bringyourownimage.htm). + // For more information about iPXE, see http://ipxe.org. + IpxeScript *string `mandatory:"false" json:"ipxeScript"` + + // Custom metadata key/value pairs that you provide, such as the SSH public key + // required to connect to the instance. + // A metadata service runs on every launched instance. The service is an HTTP + // endpoint listening on 169.254.169.254. You can use the service to: + // * Provide information to Cloud-Init (https://cloudinit.readthedocs.org/en/latest/) + // to be used for various system initialization tasks. + // * Get information about the instance, including the custom metadata that you + // provide when you launch the instance. + // **Providing Cloud-Init Metadata** + // You can use the following metadata key names to provide information to + // Cloud-Init: + // **"ssh_authorized_keys"** - Provide one or more public SSH keys to be + // included in the `~/.ssh/authorized_keys` file for the default user on the + // instance. Use a newline character to separate multiple keys. The SSH + // keys must be in the format necessary for the `authorized_keys` file, as shown + // in the example below. + // **"user_data"** - Provide your own base64-encoded data to be used by + // Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. For + // information about how to take advantage of user data, see the + // Cloud-Init Documentation (http://cloudinit.readthedocs.org/en/latest/topics/format.html). + // **Metadata Example** + // "metadata" : { + // "quake_bot_level" : "Severe", + // "ssh_authorized_keys" : "ssh-rsa == rsa-key-20160227", + // "user_data" : "==" + // } + // **Getting Metadata on the Instance** + // To get information about your instance, connect to the instance using SSH and issue any of the + // following GET requests: + // curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/ + // curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/metadata/ + // curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/metadata/ + // You'll get back a response that includes all the instance information; only the metadata information; or + // the metadata information for the specified key name, respectively. + // The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of 32,000 bytes. + Metadata map[string]string `mandatory:"false" json:"metadata"` + + // The shape of an instance. The shape determines the number of CPUs, amount of memory, + // and other resources allocated to the instance. + // You can enumerate all available shapes by calling ListShapes. + Shape *string `mandatory:"false" json:"shape"` + + ShapeConfig *InstanceConfigurationLaunchInstanceShapeConfigDetails `mandatory:"false" json:"shapeConfig"` + + PlatformConfig InstanceConfigurationLaunchInstancePlatformConfig `mandatory:"false" json:"platformConfig"` + + SourceDetails InstanceConfigurationInstanceSourceDetails `mandatory:"false" json:"sourceDetails"` + + // A fault domain is a grouping of hardware and infrastructure within an availability domain. + // Each availability domain contains three fault domains. Fault domains let you distribute your + // instances so that they are not on the same physical hardware within a single availability domain. + // A hardware failure or Compute hardware maintenance that affects one fault domain does not affect + // instances in other fault domains. + // If you do not specify the fault domain, the system selects one for you. + // + // To get a list of fault domains, use the + // ListFaultDomains operation in the + // Identity and Access Management Service API. + // Example: `FAULT-DOMAIN-1` + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + // The OCID of the dedicated virtual machine host to place the instance on. + // Dedicated VM hosts can be used when launching individual instances from an instance configuration. They + // cannot be used to launch instance pools. + DedicatedVmHostId *string `mandatory:"false" json:"dedicatedVmHostId"` + + // Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: + // * `NATIVE` - VM instances launch with iSCSI boot and VFIO devices. The default value for platform images. + // * `EMULATED` - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. + // * `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using VirtIO drivers. + // * `ACCELERATEDPV` - VM instances launch with accelerated paravirtualized networking type. + // * `CUSTOM` - VM instances launch with custom configuration settings specified in the `LaunchOptions` parameter. + LaunchMode InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum `mandatory:"false" json:"launchMode,omitempty"` + + LaunchOptions *InstanceConfigurationLaunchOptions `mandatory:"false" json:"launchOptions"` + + AgentConfig *InstanceConfigurationLaunchInstanceAgentConfigDetails `mandatory:"false" json:"agentConfig"` + + // Whether to enable in-transit encryption for the data volume's paravirtualized attachment. The default value is false. + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` + + // The preferred maintenance action for an instance. The default is LIVE_MIGRATE, if live migration is supported. + // * `LIVE_MIGRATE` - Run maintenance using a live migration. + // * `REBOOT` - Run maintenance using a reboot. + PreferredMaintenanceAction InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum `mandatory:"false" json:"preferredMaintenanceAction,omitempty"` + + InstanceOptions *InstanceConfigurationInstanceOptions `mandatory:"false" json:"instanceOptions"` + + AvailabilityConfig *InstanceConfigurationAvailabilityConfig `mandatory:"false" json:"availabilityConfig"` + + PreemptibleInstanceConfig *PreemptibleInstanceConfigDetails `mandatory:"false" json:"preemptibleInstanceConfig"` + + // List of licensing configurations associated with target launch values. + LicensingConfigs []LaunchInstanceLicensingConfig `mandatory:"false" json:"licensingConfigs"` +} + +func (m InstanceConfigurationLaunchInstanceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationLaunchInstanceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInstanceConfigurationLaunchInstanceDetailsLaunchModeEnum(string(m.LaunchMode)); !ok && m.LaunchMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LaunchMode: %s. Supported values are: %s.", m.LaunchMode, strings.Join(GetInstanceConfigurationLaunchInstanceDetailsLaunchModeEnumStringValues(), ","))) + } + if _, ok := GetMappingInstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum(string(m.PreferredMaintenanceAction)); !ok && m.PreferredMaintenanceAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PreferredMaintenanceAction: %s. Supported values are: %s.", m.PreferredMaintenanceAction, strings.Join(GetInstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *InstanceConfigurationLaunchInstanceDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + AvailabilityDomain *string `json:"availabilityDomain"` + CapacityReservationId *string `json:"capacityReservationId"` + IsAIEnterpriseEnabled *bool `json:"isAIEnterpriseEnabled"` + PlacementConstraintDetails instanceconfigurationplacementconstraintdetails `json:"placementConstraintDetails"` + ComputeClusterId *string `json:"computeClusterId"` + CompartmentId *string `json:"compartmentId"` + ClusterPlacementGroupId *string `json:"clusterPlacementGroupId"` + CreateVnicDetails *InstanceConfigurationCreateVnicDetails `json:"createVnicDetails"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + DisplayName *string `json:"displayName"` + ExtendedMetadata map[string]interface{} `json:"extendedMetadata"` + FreeformTags map[string]string `json:"freeformTags"` + IpxeScript *string `json:"ipxeScript"` + Metadata map[string]string `json:"metadata"` + Shape *string `json:"shape"` + ShapeConfig *InstanceConfigurationLaunchInstanceShapeConfigDetails `json:"shapeConfig"` + PlatformConfig instanceconfigurationlaunchinstanceplatformconfig `json:"platformConfig"` + SourceDetails instanceconfigurationinstancesourcedetails `json:"sourceDetails"` + FaultDomain *string `json:"faultDomain"` + DedicatedVmHostId *string `json:"dedicatedVmHostId"` + LaunchMode InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum `json:"launchMode"` + LaunchOptions *InstanceConfigurationLaunchOptions `json:"launchOptions"` + AgentConfig *InstanceConfigurationLaunchInstanceAgentConfigDetails `json:"agentConfig"` + IsPvEncryptionInTransitEnabled *bool `json:"isPvEncryptionInTransitEnabled"` + PreferredMaintenanceAction InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum `json:"preferredMaintenanceAction"` + InstanceOptions *InstanceConfigurationInstanceOptions `json:"instanceOptions"` + AvailabilityConfig *InstanceConfigurationAvailabilityConfig `json:"availabilityConfig"` + PreemptibleInstanceConfig *PreemptibleInstanceConfigDetails `json:"preemptibleInstanceConfig"` + LicensingConfigs []launchinstancelicensingconfig `json:"licensingConfigs"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.AvailabilityDomain = model.AvailabilityDomain + + m.CapacityReservationId = model.CapacityReservationId + + m.IsAIEnterpriseEnabled = model.IsAIEnterpriseEnabled + + nn, e = model.PlacementConstraintDetails.UnmarshalPolymorphicJSON(model.PlacementConstraintDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.PlacementConstraintDetails = nn.(InstanceConfigurationPlacementConstraintDetails) + } else { + m.PlacementConstraintDetails = nil + } + + m.ComputeClusterId = model.ComputeClusterId + + m.CompartmentId = model.CompartmentId + + m.ClusterPlacementGroupId = model.ClusterPlacementGroupId + + m.CreateVnicDetails = model.CreateVnicDetails + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.DisplayName = model.DisplayName + + m.ExtendedMetadata = model.ExtendedMetadata + + m.FreeformTags = model.FreeformTags + + m.IpxeScript = model.IpxeScript + + m.Metadata = model.Metadata + + m.Shape = model.Shape + + m.ShapeConfig = model.ShapeConfig + + nn, e = model.PlatformConfig.UnmarshalPolymorphicJSON(model.PlatformConfig.JsonData) + if e != nil { + return + } + if nn != nil { + m.PlatformConfig = nn.(InstanceConfigurationLaunchInstancePlatformConfig) + } else { + m.PlatformConfig = nil + } + + nn, e = model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.SourceDetails = nn.(InstanceConfigurationInstanceSourceDetails) + } else { + m.SourceDetails = nil + } + + m.FaultDomain = model.FaultDomain + + m.DedicatedVmHostId = model.DedicatedVmHostId + + m.LaunchMode = model.LaunchMode + + m.LaunchOptions = model.LaunchOptions + + m.AgentConfig = model.AgentConfig + + m.IsPvEncryptionInTransitEnabled = model.IsPvEncryptionInTransitEnabled + + m.PreferredMaintenanceAction = model.PreferredMaintenanceAction + + m.InstanceOptions = model.InstanceOptions + + m.AvailabilityConfig = model.AvailabilityConfig + + m.PreemptibleInstanceConfig = model.PreemptibleInstanceConfig + + m.LicensingConfigs = make([]LaunchInstanceLicensingConfig, len(model.LicensingConfigs)) + for i, n := range model.LicensingConfigs { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.LicensingConfigs[i] = nn.(LaunchInstanceLicensingConfig) + } else { + m.LicensingConfigs[i] = nil + } + } + return +} + +// InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum Enum with underlying type: string +type InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum string + +// Set of constants representing the allowable values for InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum +const ( + InstanceConfigurationLaunchInstanceDetailsLaunchModeNative InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum = "NATIVE" + InstanceConfigurationLaunchInstanceDetailsLaunchModeEmulated InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum = "EMULATED" + InstanceConfigurationLaunchInstanceDetailsLaunchModeParavirtualized InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum = "PARAVIRTUALIZED" + InstanceConfigurationLaunchInstanceDetailsLaunchModeAcceleratedpv InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum = "ACCELERATEDPV" + InstanceConfigurationLaunchInstanceDetailsLaunchModeCustom InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum = "CUSTOM" +) + +var mappingInstanceConfigurationLaunchInstanceDetailsLaunchModeEnum = map[string]InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum{ + "NATIVE": InstanceConfigurationLaunchInstanceDetailsLaunchModeNative, + "EMULATED": InstanceConfigurationLaunchInstanceDetailsLaunchModeEmulated, + "PARAVIRTUALIZED": InstanceConfigurationLaunchInstanceDetailsLaunchModeParavirtualized, + "ACCELERATEDPV": InstanceConfigurationLaunchInstanceDetailsLaunchModeAcceleratedpv, + "CUSTOM": InstanceConfigurationLaunchInstanceDetailsLaunchModeCustom, +} + +var mappingInstanceConfigurationLaunchInstanceDetailsLaunchModeEnumLowerCase = map[string]InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum{ + "native": InstanceConfigurationLaunchInstanceDetailsLaunchModeNative, + "emulated": InstanceConfigurationLaunchInstanceDetailsLaunchModeEmulated, + "paravirtualized": InstanceConfigurationLaunchInstanceDetailsLaunchModeParavirtualized, + "acceleratedpv": InstanceConfigurationLaunchInstanceDetailsLaunchModeAcceleratedpv, + "custom": InstanceConfigurationLaunchInstanceDetailsLaunchModeCustom, +} + +// GetInstanceConfigurationLaunchInstanceDetailsLaunchModeEnumValues Enumerates the set of values for InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum +func GetInstanceConfigurationLaunchInstanceDetailsLaunchModeEnumValues() []InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum { + values := make([]InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum, 0) + for _, v := range mappingInstanceConfigurationLaunchInstanceDetailsLaunchModeEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationLaunchInstanceDetailsLaunchModeEnumStringValues Enumerates the set of values in String for InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum +func GetInstanceConfigurationLaunchInstanceDetailsLaunchModeEnumStringValues() []string { + return []string{ + "NATIVE", + "EMULATED", + "PARAVIRTUALIZED", + "ACCELERATEDPV", + "CUSTOM", + } +} + +// GetMappingInstanceConfigurationLaunchInstanceDetailsLaunchModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationLaunchInstanceDetailsLaunchModeEnum(val string) (InstanceConfigurationLaunchInstanceDetailsLaunchModeEnum, bool) { + enum, ok := mappingInstanceConfigurationLaunchInstanceDetailsLaunchModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum Enum with underlying type: string +type InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum string + +// Set of constants representing the allowable values for InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum +const ( + InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionLiveMigrate InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum = "LIVE_MIGRATE" + InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionReboot InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum = "REBOOT" +) + +var mappingInstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum = map[string]InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum{ + "LIVE_MIGRATE": InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionLiveMigrate, + "REBOOT": InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionReboot, +} + +var mappingInstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnumLowerCase = map[string]InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum{ + "live_migrate": InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionLiveMigrate, + "reboot": InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionReboot, +} + +// GetInstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnumValues Enumerates the set of values for InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum +func GetInstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnumValues() []InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum { + values := make([]InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum, 0) + for _, v := range mappingInstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnumStringValues Enumerates the set of values in String for InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum +func GetInstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnumStringValues() []string { + return []string{ + "LIVE_MIGRATE", + "REBOOT", + } +} + +// GetMappingInstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum(val string) (InstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnum, bool) { + enum, ok := mappingInstanceConfigurationLaunchInstanceDetailsPreferredMaintenanceActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_platform_config.go new file mode 100644 index 000000000..a93d8e0aa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_platform_config.go @@ -0,0 +1,230 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationLaunchInstancePlatformConfig The platform configuration requested for the instance. +// If you provide the parameter, the instance is created with the platform configuration that you specify. +// For any values that you omit, the instance uses the default configuration values for the `shape` that you +// specify. If you don't provide the parameter, the default values for the `shape` are used. +// Each shape only supports certain configurable values. If the values that you provide are not valid for the +// specified `shape`, an error is returned. +type InstanceConfigurationLaunchInstancePlatformConfig interface { + + // Whether Secure Boot is enabled on the instance. + GetIsSecureBootEnabled() *bool + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + GetIsTrustedPlatformModuleEnabled() *bool + + // Whether the Measured Boot feature is enabled on the instance. + GetIsMeasuredBootEnabled() *bool + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + GetIsMemoryEncryptionEnabled() *bool +} + +type instanceconfigurationlaunchinstanceplatformconfig struct { + JsonData []byte + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *instanceconfigurationlaunchinstanceplatformconfig) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerinstanceconfigurationlaunchinstanceplatformconfig instanceconfigurationlaunchinstanceplatformconfig + s := struct { + Model Unmarshalerinstanceconfigurationlaunchinstanceplatformconfig + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.IsSecureBootEnabled = s.Model.IsSecureBootEnabled + m.IsTrustedPlatformModuleEnabled = s.Model.IsTrustedPlatformModuleEnabled + m.IsMeasuredBootEnabled = s.Model.IsMeasuredBootEnabled + m.IsMemoryEncryptionEnabled = s.Model.IsMemoryEncryptionEnabled + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *instanceconfigurationlaunchinstanceplatformconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "AMD_MILAN_BM": + mm := InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INTEL_VM": + mm := InstanceConfigurationIntelVmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AMD_MILAN_BM_GPU": + mm := InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INTEL_ICELAKE_BM": + mm := InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "GENERIC_BM": + mm := InstanceConfigurationGenericBmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AMD_ROME_BM": + mm := InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INTEL_SKYLAKE_BM": + mm := InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AMD_ROME_BM_GPU": + mm := InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AMD_VM": + mm := InstanceConfigurationAmdVmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for InstanceConfigurationLaunchInstancePlatformConfig: %s.", m.Type) + return *m, nil + } +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m instanceconfigurationlaunchinstanceplatformconfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m instanceconfigurationlaunchinstanceplatformconfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m instanceconfigurationlaunchinstanceplatformconfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m instanceconfigurationlaunchinstanceplatformconfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m instanceconfigurationlaunchinstanceplatformconfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m instanceconfigurationlaunchinstanceplatformconfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstanceConfigurationLaunchInstancePlatformConfigTypeEnum Enum with underlying type: string +type InstanceConfigurationLaunchInstancePlatformConfigTypeEnum string + +// Set of constants representing the allowable values for InstanceConfigurationLaunchInstancePlatformConfigTypeEnum +const ( + InstanceConfigurationLaunchInstancePlatformConfigTypeAmdMilanBm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "AMD_MILAN_BM" + InstanceConfigurationLaunchInstancePlatformConfigTypeAmdMilanBmGpu InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "AMD_MILAN_BM_GPU" + InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "AMD_ROME_BM" + InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBmGpu InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "AMD_ROME_BM_GPU" + InstanceConfigurationLaunchInstancePlatformConfigTypeGenericBm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "GENERIC_BM" + InstanceConfigurationLaunchInstancePlatformConfigTypeIntelIcelakeBm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "INTEL_ICELAKE_BM" + InstanceConfigurationLaunchInstancePlatformConfigTypeIntelSkylakeBm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "INTEL_SKYLAKE_BM" + InstanceConfigurationLaunchInstancePlatformConfigTypeAmdVm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "AMD_VM" + InstanceConfigurationLaunchInstancePlatformConfigTypeIntelVm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "INTEL_VM" +) + +var mappingInstanceConfigurationLaunchInstancePlatformConfigTypeEnum = map[string]InstanceConfigurationLaunchInstancePlatformConfigTypeEnum{ + "AMD_MILAN_BM": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdMilanBm, + "AMD_MILAN_BM_GPU": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdMilanBmGpu, + "AMD_ROME_BM": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBm, + "AMD_ROME_BM_GPU": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBmGpu, + "GENERIC_BM": InstanceConfigurationLaunchInstancePlatformConfigTypeGenericBm, + "INTEL_ICELAKE_BM": InstanceConfigurationLaunchInstancePlatformConfigTypeIntelIcelakeBm, + "INTEL_SKYLAKE_BM": InstanceConfigurationLaunchInstancePlatformConfigTypeIntelSkylakeBm, + "AMD_VM": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdVm, + "INTEL_VM": InstanceConfigurationLaunchInstancePlatformConfigTypeIntelVm, +} + +var mappingInstanceConfigurationLaunchInstancePlatformConfigTypeEnumLowerCase = map[string]InstanceConfigurationLaunchInstancePlatformConfigTypeEnum{ + "amd_milan_bm": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdMilanBm, + "amd_milan_bm_gpu": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdMilanBmGpu, + "amd_rome_bm": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBm, + "amd_rome_bm_gpu": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBmGpu, + "generic_bm": InstanceConfigurationLaunchInstancePlatformConfigTypeGenericBm, + "intel_icelake_bm": InstanceConfigurationLaunchInstancePlatformConfigTypeIntelIcelakeBm, + "intel_skylake_bm": InstanceConfigurationLaunchInstancePlatformConfigTypeIntelSkylakeBm, + "amd_vm": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdVm, + "intel_vm": InstanceConfigurationLaunchInstancePlatformConfigTypeIntelVm, +} + +// GetInstanceConfigurationLaunchInstancePlatformConfigTypeEnumValues Enumerates the set of values for InstanceConfigurationLaunchInstancePlatformConfigTypeEnum +func GetInstanceConfigurationLaunchInstancePlatformConfigTypeEnumValues() []InstanceConfigurationLaunchInstancePlatformConfigTypeEnum { + values := make([]InstanceConfigurationLaunchInstancePlatformConfigTypeEnum, 0) + for _, v := range mappingInstanceConfigurationLaunchInstancePlatformConfigTypeEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationLaunchInstancePlatformConfigTypeEnumStringValues Enumerates the set of values in String for InstanceConfigurationLaunchInstancePlatformConfigTypeEnum +func GetInstanceConfigurationLaunchInstancePlatformConfigTypeEnumStringValues() []string { + return []string{ + "AMD_MILAN_BM", + "AMD_MILAN_BM_GPU", + "AMD_ROME_BM", + "AMD_ROME_BM_GPU", + "GENERIC_BM", + "INTEL_ICELAKE_BM", + "INTEL_SKYLAKE_BM", + "AMD_VM", + "INTEL_VM", + } +} + +// GetMappingInstanceConfigurationLaunchInstancePlatformConfigTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationLaunchInstancePlatformConfigTypeEnum(val string) (InstanceConfigurationLaunchInstancePlatformConfigTypeEnum, bool) { + enum, ok := mappingInstanceConfigurationLaunchInstancePlatformConfigTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_shape_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_shape_config_details.go new file mode 100644 index 000000000..b8cef9a48 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_instance_shape_config_details.go @@ -0,0 +1,172 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationLaunchInstanceShapeConfigDetails The shape configuration requested for the instance. +// If the parameter is provided, the instance is created +// with the resources that you specify. If some properties are missing or +// the entire parameter is not provided, the instance is created with the default +// configuration values for the `shape` that you specify. +// Each shape only supports certain configurable values. If the values that you provide are not valid for the +// specified `shape`, an error is returned. +type InstanceConfigurationLaunchInstanceShapeConfigDetails struct { + + // The total number of OCPUs available to the instance. + Ocpus *float32 `mandatory:"false" json:"ocpus"` + + // The total number of VCPUs available to the instance. This can be used instead of OCPUs, + // in which case the actual number of OCPUs will be calculated based on this value + // and the actual hardware. This must be a multiple of 2. + Vcpus *int `mandatory:"false" json:"vcpus"` + + // The total amount of memory available to the instance, in gigabytes. + MemoryInGBs *float32 `mandatory:"false" json:"memoryInGBs"` + + // The baseline OCPU utilization for a subcore burstable VM instance. Leave this attribute blank for a + // non-burstable instance, or explicitly specify non-burstable with `BASELINE_1_1`. + // The following values are supported: + // - `BASELINE_1_8` - baseline usage is 1/8 of an OCPU. + // - `BASELINE_1_2` - baseline usage is 1/2 of an OCPU. + // - `BASELINE_1_1` - baseline usage is an entire OCPU. This represents a non-burstable instance. + BaselineOcpuUtilization InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum `mandatory:"false" json:"baselineOcpuUtilization,omitempty"` + + // The number of NVMe drives to be used for storage. A single drive has 6.8 TB available. + Nvmes *int `mandatory:"false" json:"nvmes"` + + // This field is reserved for internal use. + ResourceManagement InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum `mandatory:"false" json:"resourceManagement,omitempty"` + + // The NVMe-backed local storage capacity, in GB, for flexible dense (DenseLV) VM shapes. If the selected shape + // is DenseLV, the value must be greater than 0. For all other shapes, the value must be null (if specified); + // any non-null value for a non-DenseLV shape results in an error. + LocalVolumeSizeInGBs *int `mandatory:"false" json:"localVolumeSizeInGBs"` +} + +func (m InstanceConfigurationLaunchInstanceShapeConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationLaunchInstanceShapeConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum(string(m.BaselineOcpuUtilization)); !ok && m.BaselineOcpuUtilization != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BaselineOcpuUtilization: %s. Supported values are: %s.", m.BaselineOcpuUtilization, strings.Join(GetInstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumStringValues(), ","))) + } + if _, ok := GetMappingInstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum(string(m.ResourceManagement)); !ok && m.ResourceManagement != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceManagement: %s. Supported values are: %s.", m.ResourceManagement, strings.Join(GetInstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum Enum with underlying type: string +type InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum string + +// Set of constants representing the allowable values for InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum +const ( + InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilization8 InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum = "BASELINE_1_8" + InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilization2 InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum = "BASELINE_1_2" + InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilization1 InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum = "BASELINE_1_1" +) + +var mappingInstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum = map[string]InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum{ + "BASELINE_1_8": InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilization8, + "BASELINE_1_2": InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilization2, + "BASELINE_1_1": InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilization1, +} + +var mappingInstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumLowerCase = map[string]InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum{ + "baseline_1_8": InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilization8, + "baseline_1_2": InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilization2, + "baseline_1_1": InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilization1, +} + +// GetInstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumValues Enumerates the set of values for InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum +func GetInstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumValues() []InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum { + values := make([]InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum, 0) + for _, v := range mappingInstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumStringValues Enumerates the set of values in String for InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum +func GetInstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumStringValues() []string { + return []string{ + "BASELINE_1_8", + "BASELINE_1_2", + "BASELINE_1_1", + } +} + +// GetMappingInstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum(val string) (InstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum, bool) { + enum, ok := mappingInstanceConfigurationLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum Enum with underlying type: string +type InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum string + +// Set of constants representing the allowable values for InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum +const ( + InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementDynamic InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum = "DYNAMIC" + InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementStatic InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum = "STATIC" +) + +var mappingInstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum = map[string]InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum{ + "DYNAMIC": InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementDynamic, + "STATIC": InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementStatic, +} + +var mappingInstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnumLowerCase = map[string]InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum{ + "dynamic": InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementDynamic, + "static": InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementStatic, +} + +// GetInstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnumValues Enumerates the set of values for InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum +func GetInstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnumValues() []InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum { + values := make([]InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum, 0) + for _, v := range mappingInstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnumStringValues Enumerates the set of values in String for InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum +func GetInstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnumStringValues() []string { + return []string{ + "DYNAMIC", + "STATIC", + } +} + +// GetMappingInstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum(val string) (InstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnum, bool) { + enum, ok := mappingInstanceConfigurationLaunchInstanceShapeConfigDetailsResourceManagementEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_options.go new file mode 100644 index 000000000..5988ee1f6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_launch_options.go @@ -0,0 +1,297 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationLaunchOptions Options for tuning the compatibility and performance of VM shapes. The values that you specify override any +// default values. +type InstanceConfigurationLaunchOptions struct { + + // Emulation type for the boot volume. + // * `ISCSI` - ISCSI attached block storage device. + // * `SCSI` - Emulated SCSI disk. + // * `IDE` - Emulated IDE disk. + // * `VFIO` - Direct attached Virtual Function storage. This is the default option for local data + // volumes on platform images. + // * `PARAVIRTUALIZED` - Paravirtualized disk. This is the default for boot volumes and remote block + // storage volumes on platform images. + BootVolumeType InstanceConfigurationLaunchOptionsBootVolumeTypeEnum `mandatory:"false" json:"bootVolumeType,omitempty"` + + // Firmware used to boot VM. Select the option that matches your operating system. + // * `BIOS` - Boot VM using BIOS style firmware. This is compatible with both 32 bit and 64 bit operating + // systems that boot using MBR style bootloaders. + // * `UEFI_64` - Boot VM using UEFI style firmware compatible with 64 bit operating systems. This is the + // default for platform images. + Firmware InstanceConfigurationLaunchOptionsFirmwareEnum `mandatory:"false" json:"firmware,omitempty"` + + // Emulation type for the physical network interface card (NIC). + // * `E1000` - Emulated Gigabit ethernet controller. Compatible with Linux e1000 network driver. + // * `VFIO` - Direct attached Virtual Function network controller. This is the networking type + // when you launch an instance using hardware-assisted (SR-IOV) networking. + // * `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using VirtIO drivers. + // * `ACCELERATEDPV` - VM instances launch with accelerated paravirtualized networking type. + NetworkType InstanceConfigurationLaunchOptionsNetworkTypeEnum `mandatory:"false" json:"networkType,omitempty"` + + // Emulation type for volume. + // * `ISCSI` - ISCSI attached block storage device. + // * `SCSI` - Emulated SCSI disk. + // * `IDE` - Emulated IDE disk. + // * `VFIO` - Direct attached Virtual Function storage. This is the default option for local data + // volumes on platform images. + // * `PARAVIRTUALIZED` - Paravirtualized disk. This is the default for boot volumes and remote block + // storage volumes on platform images. + RemoteDataVolumeType InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum `mandatory:"false" json:"remoteDataVolumeType,omitempty"` + + // Deprecated. Instead use `isPvEncryptionInTransitEnabled` in + // InstanceConfigurationLaunchInstanceDetails. + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` + + // Whether to enable consistent volume naming feature. Defaults to false. + IsConsistentVolumeNamingEnabled *bool `mandatory:"false" json:"isConsistentVolumeNamingEnabled"` +} + +func (m InstanceConfigurationLaunchOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationLaunchOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInstanceConfigurationLaunchOptionsBootVolumeTypeEnum(string(m.BootVolumeType)); !ok && m.BootVolumeType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BootVolumeType: %s. Supported values are: %s.", m.BootVolumeType, strings.Join(GetInstanceConfigurationLaunchOptionsBootVolumeTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingInstanceConfigurationLaunchOptionsFirmwareEnum(string(m.Firmware)); !ok && m.Firmware != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Firmware: %s. Supported values are: %s.", m.Firmware, strings.Join(GetInstanceConfigurationLaunchOptionsFirmwareEnumStringValues(), ","))) + } + if _, ok := GetMappingInstanceConfigurationLaunchOptionsNetworkTypeEnum(string(m.NetworkType)); !ok && m.NetworkType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NetworkType: %s. Supported values are: %s.", m.NetworkType, strings.Join(GetInstanceConfigurationLaunchOptionsNetworkTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingInstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum(string(m.RemoteDataVolumeType)); !ok && m.RemoteDataVolumeType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RemoteDataVolumeType: %s. Supported values are: %s.", m.RemoteDataVolumeType, strings.Join(GetInstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstanceConfigurationLaunchOptionsBootVolumeTypeEnum Enum with underlying type: string +type InstanceConfigurationLaunchOptionsBootVolumeTypeEnum string + +// Set of constants representing the allowable values for InstanceConfigurationLaunchOptionsBootVolumeTypeEnum +const ( + InstanceConfigurationLaunchOptionsBootVolumeTypeIscsi InstanceConfigurationLaunchOptionsBootVolumeTypeEnum = "ISCSI" + InstanceConfigurationLaunchOptionsBootVolumeTypeScsi InstanceConfigurationLaunchOptionsBootVolumeTypeEnum = "SCSI" + InstanceConfigurationLaunchOptionsBootVolumeTypeIde InstanceConfigurationLaunchOptionsBootVolumeTypeEnum = "IDE" + InstanceConfigurationLaunchOptionsBootVolumeTypeVfio InstanceConfigurationLaunchOptionsBootVolumeTypeEnum = "VFIO" + InstanceConfigurationLaunchOptionsBootVolumeTypeParavirtualized InstanceConfigurationLaunchOptionsBootVolumeTypeEnum = "PARAVIRTUALIZED" +) + +var mappingInstanceConfigurationLaunchOptionsBootVolumeTypeEnum = map[string]InstanceConfigurationLaunchOptionsBootVolumeTypeEnum{ + "ISCSI": InstanceConfigurationLaunchOptionsBootVolumeTypeIscsi, + "SCSI": InstanceConfigurationLaunchOptionsBootVolumeTypeScsi, + "IDE": InstanceConfigurationLaunchOptionsBootVolumeTypeIde, + "VFIO": InstanceConfigurationLaunchOptionsBootVolumeTypeVfio, + "PARAVIRTUALIZED": InstanceConfigurationLaunchOptionsBootVolumeTypeParavirtualized, +} + +var mappingInstanceConfigurationLaunchOptionsBootVolumeTypeEnumLowerCase = map[string]InstanceConfigurationLaunchOptionsBootVolumeTypeEnum{ + "iscsi": InstanceConfigurationLaunchOptionsBootVolumeTypeIscsi, + "scsi": InstanceConfigurationLaunchOptionsBootVolumeTypeScsi, + "ide": InstanceConfigurationLaunchOptionsBootVolumeTypeIde, + "vfio": InstanceConfigurationLaunchOptionsBootVolumeTypeVfio, + "paravirtualized": InstanceConfigurationLaunchOptionsBootVolumeTypeParavirtualized, +} + +// GetInstanceConfigurationLaunchOptionsBootVolumeTypeEnumValues Enumerates the set of values for InstanceConfigurationLaunchOptionsBootVolumeTypeEnum +func GetInstanceConfigurationLaunchOptionsBootVolumeTypeEnumValues() []InstanceConfigurationLaunchOptionsBootVolumeTypeEnum { + values := make([]InstanceConfigurationLaunchOptionsBootVolumeTypeEnum, 0) + for _, v := range mappingInstanceConfigurationLaunchOptionsBootVolumeTypeEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationLaunchOptionsBootVolumeTypeEnumStringValues Enumerates the set of values in String for InstanceConfigurationLaunchOptionsBootVolumeTypeEnum +func GetInstanceConfigurationLaunchOptionsBootVolumeTypeEnumStringValues() []string { + return []string{ + "ISCSI", + "SCSI", + "IDE", + "VFIO", + "PARAVIRTUALIZED", + } +} + +// GetMappingInstanceConfigurationLaunchOptionsBootVolumeTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationLaunchOptionsBootVolumeTypeEnum(val string) (InstanceConfigurationLaunchOptionsBootVolumeTypeEnum, bool) { + enum, ok := mappingInstanceConfigurationLaunchOptionsBootVolumeTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// InstanceConfigurationLaunchOptionsFirmwareEnum Enum with underlying type: string +type InstanceConfigurationLaunchOptionsFirmwareEnum string + +// Set of constants representing the allowable values for InstanceConfigurationLaunchOptionsFirmwareEnum +const ( + InstanceConfigurationLaunchOptionsFirmwareBios InstanceConfigurationLaunchOptionsFirmwareEnum = "BIOS" + InstanceConfigurationLaunchOptionsFirmwareUefi64 InstanceConfigurationLaunchOptionsFirmwareEnum = "UEFI_64" +) + +var mappingInstanceConfigurationLaunchOptionsFirmwareEnum = map[string]InstanceConfigurationLaunchOptionsFirmwareEnum{ + "BIOS": InstanceConfigurationLaunchOptionsFirmwareBios, + "UEFI_64": InstanceConfigurationLaunchOptionsFirmwareUefi64, +} + +var mappingInstanceConfigurationLaunchOptionsFirmwareEnumLowerCase = map[string]InstanceConfigurationLaunchOptionsFirmwareEnum{ + "bios": InstanceConfigurationLaunchOptionsFirmwareBios, + "uefi_64": InstanceConfigurationLaunchOptionsFirmwareUefi64, +} + +// GetInstanceConfigurationLaunchOptionsFirmwareEnumValues Enumerates the set of values for InstanceConfigurationLaunchOptionsFirmwareEnum +func GetInstanceConfigurationLaunchOptionsFirmwareEnumValues() []InstanceConfigurationLaunchOptionsFirmwareEnum { + values := make([]InstanceConfigurationLaunchOptionsFirmwareEnum, 0) + for _, v := range mappingInstanceConfigurationLaunchOptionsFirmwareEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationLaunchOptionsFirmwareEnumStringValues Enumerates the set of values in String for InstanceConfigurationLaunchOptionsFirmwareEnum +func GetInstanceConfigurationLaunchOptionsFirmwareEnumStringValues() []string { + return []string{ + "BIOS", + "UEFI_64", + } +} + +// GetMappingInstanceConfigurationLaunchOptionsFirmwareEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationLaunchOptionsFirmwareEnum(val string) (InstanceConfigurationLaunchOptionsFirmwareEnum, bool) { + enum, ok := mappingInstanceConfigurationLaunchOptionsFirmwareEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// InstanceConfigurationLaunchOptionsNetworkTypeEnum Enum with underlying type: string +type InstanceConfigurationLaunchOptionsNetworkTypeEnum string + +// Set of constants representing the allowable values for InstanceConfigurationLaunchOptionsNetworkTypeEnum +const ( + InstanceConfigurationLaunchOptionsNetworkTypeE1000 InstanceConfigurationLaunchOptionsNetworkTypeEnum = "E1000" + InstanceConfigurationLaunchOptionsNetworkTypeVfio InstanceConfigurationLaunchOptionsNetworkTypeEnum = "VFIO" + InstanceConfigurationLaunchOptionsNetworkTypeParavirtualized InstanceConfigurationLaunchOptionsNetworkTypeEnum = "PARAVIRTUALIZED" + InstanceConfigurationLaunchOptionsNetworkTypeAcceleratedpv InstanceConfigurationLaunchOptionsNetworkTypeEnum = "ACCELERATEDPV" +) + +var mappingInstanceConfigurationLaunchOptionsNetworkTypeEnum = map[string]InstanceConfigurationLaunchOptionsNetworkTypeEnum{ + "E1000": InstanceConfigurationLaunchOptionsNetworkTypeE1000, + "VFIO": InstanceConfigurationLaunchOptionsNetworkTypeVfio, + "PARAVIRTUALIZED": InstanceConfigurationLaunchOptionsNetworkTypeParavirtualized, + "ACCELERATEDPV": InstanceConfigurationLaunchOptionsNetworkTypeAcceleratedpv, +} + +var mappingInstanceConfigurationLaunchOptionsNetworkTypeEnumLowerCase = map[string]InstanceConfigurationLaunchOptionsNetworkTypeEnum{ + "e1000": InstanceConfigurationLaunchOptionsNetworkTypeE1000, + "vfio": InstanceConfigurationLaunchOptionsNetworkTypeVfio, + "paravirtualized": InstanceConfigurationLaunchOptionsNetworkTypeParavirtualized, + "acceleratedpv": InstanceConfigurationLaunchOptionsNetworkTypeAcceleratedpv, +} + +// GetInstanceConfigurationLaunchOptionsNetworkTypeEnumValues Enumerates the set of values for InstanceConfigurationLaunchOptionsNetworkTypeEnum +func GetInstanceConfigurationLaunchOptionsNetworkTypeEnumValues() []InstanceConfigurationLaunchOptionsNetworkTypeEnum { + values := make([]InstanceConfigurationLaunchOptionsNetworkTypeEnum, 0) + for _, v := range mappingInstanceConfigurationLaunchOptionsNetworkTypeEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationLaunchOptionsNetworkTypeEnumStringValues Enumerates the set of values in String for InstanceConfigurationLaunchOptionsNetworkTypeEnum +func GetInstanceConfigurationLaunchOptionsNetworkTypeEnumStringValues() []string { + return []string{ + "E1000", + "VFIO", + "PARAVIRTUALIZED", + "ACCELERATEDPV", + } +} + +// GetMappingInstanceConfigurationLaunchOptionsNetworkTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationLaunchOptionsNetworkTypeEnum(val string) (InstanceConfigurationLaunchOptionsNetworkTypeEnum, bool) { + enum, ok := mappingInstanceConfigurationLaunchOptionsNetworkTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum Enum with underlying type: string +type InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum string + +// Set of constants representing the allowable values for InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum +const ( + InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeIscsi InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum = "ISCSI" + InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeScsi InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum = "SCSI" + InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeIde InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum = "IDE" + InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeVfio InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum = "VFIO" + InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeParavirtualized InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum = "PARAVIRTUALIZED" +) + +var mappingInstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum = map[string]InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum{ + "ISCSI": InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeIscsi, + "SCSI": InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeScsi, + "IDE": InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeIde, + "VFIO": InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeVfio, + "PARAVIRTUALIZED": InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeParavirtualized, +} + +var mappingInstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnumLowerCase = map[string]InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum{ + "iscsi": InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeIscsi, + "scsi": InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeScsi, + "ide": InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeIde, + "vfio": InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeVfio, + "paravirtualized": InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeParavirtualized, +} + +// GetInstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnumValues Enumerates the set of values for InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum +func GetInstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnumValues() []InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum { + values := make([]InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum, 0) + for _, v := range mappingInstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnumStringValues Enumerates the set of values in String for InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum +func GetInstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnumStringValues() []string { + return []string{ + "ISCSI", + "SCSI", + "IDE", + "VFIO", + "PARAVIRTUALIZED", + } +} + +// GetMappingInstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum(val string) (InstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnum, bool) { + enum, ok := mappingInstanceConfigurationLaunchOptionsRemoteDataVolumeTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_paravirtualized_attach_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_paravirtualized_attach_volume_details.go new file mode 100644 index 000000000..5b022e93a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_paravirtualized_attach_volume_details.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationParavirtualizedAttachVolumeDetails The representation of InstanceConfigurationParavirtualizedAttachVolumeDetails +type InstanceConfigurationParavirtualizedAttachVolumeDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether the attachment should be created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + + // The device name. + Device *string `mandatory:"false" json:"device"` + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + IsShareable *bool `mandatory:"false" json:"isShareable"` + + // Whether to enable in-transit encryption for the data volume's paravirtualized attachment. The default value is false. + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` +} + +// GetDisplayName returns DisplayName +func (m InstanceConfigurationParavirtualizedAttachVolumeDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetIsReadOnly returns IsReadOnly +func (m InstanceConfigurationParavirtualizedAttachVolumeDetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetDevice returns Device +func (m InstanceConfigurationParavirtualizedAttachVolumeDetails) GetDevice() *string { + return m.Device +} + +// GetIsShareable returns IsShareable +func (m InstanceConfigurationParavirtualizedAttachVolumeDetails) GetIsShareable() *bool { + return m.IsShareable +} + +func (m InstanceConfigurationParavirtualizedAttachVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationParavirtualizedAttachVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationParavirtualizedAttachVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationParavirtualizedAttachVolumeDetails InstanceConfigurationParavirtualizedAttachVolumeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationParavirtualizedAttachVolumeDetails + }{ + "paravirtualized", + (MarshalTypeInstanceConfigurationParavirtualizedAttachVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_performance_based_autotune_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_performance_based_autotune_policy.go new file mode 100644 index 000000000..7848454e8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_performance_based_autotune_policy.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationPerformanceBasedAutotunePolicy If a volume is being throttled at the current setting for a certain period of time, auto-tune will +// gradually increase the volume’s performance limited up to Maximum VPUs/GB. After the volume has been idle at the +// current setting for a certain period of time, auto-tune will gradually decrease the volume’s performance limited +// down to Default/Minimum VPUs/GB. +type InstanceConfigurationPerformanceBasedAutotunePolicy struct { + + // This will be the maximum VPUs/GB performance level that the volume will be auto-tuned + // temporarily based on performance monitoring. + MaxVpusPerGB *int64 `mandatory:"true" json:"maxVpusPerGB"` +} + +func (m InstanceConfigurationPerformanceBasedAutotunePolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationPerformanceBasedAutotunePolicy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationPerformanceBasedAutotunePolicy) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationPerformanceBasedAutotunePolicy InstanceConfigurationPerformanceBasedAutotunePolicy + s := struct { + DiscriminatorParam string `json:"autotuneType"` + MarshalTypeInstanceConfigurationPerformanceBasedAutotunePolicy + }{ + "PERFORMANCE_BASED", + (MarshalTypeInstanceConfigurationPerformanceBasedAutotunePolicy)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_placement_constraint_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_placement_constraint_details.go new file mode 100644 index 000000000..b83333f6a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_placement_constraint_details.go @@ -0,0 +1,83 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationPlacementConstraintDetails The details for providing placement constraints. +type InstanceConfigurationPlacementConstraintDetails interface { +} + +type instanceconfigurationplacementconstraintdetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *instanceconfigurationplacementconstraintdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerinstanceconfigurationplacementconstraintdetails instanceconfigurationplacementconstraintdetails + s := struct { + Model Unmarshalerinstanceconfigurationplacementconstraintdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *instanceconfigurationplacementconstraintdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "HOST_GROUP": + mm := InstanceConfigurationHostGroupPlacementConstraintDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for InstanceConfigurationPlacementConstraintDetails: %s.", m.Type) + return *m, nil + } +} + +func (m instanceconfigurationplacementconstraintdetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m instanceconfigurationplacementconstraintdetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_summary.go new file mode 100644 index 000000000..8659d4ede --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_summary.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationSummary Summary information for an instance configuration. +type InstanceConfigurationSummary struct { + + // The OCID of the compartment containing the instance configuration. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the instance configuration. + Id *string `mandatory:"true" json:"id"` + + // The date and time the instance configuration was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m InstanceConfigurationSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_volume_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_volume_source_details.go new file mode 100644 index 000000000..74b30cfc8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_volume_source_details.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationVolumeSourceDetails The representation of InstanceConfigurationVolumeSourceDetails +type InstanceConfigurationVolumeSourceDetails interface { +} + +type instanceconfigurationvolumesourcedetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *instanceconfigurationvolumesourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerinstanceconfigurationvolumesourcedetails instanceconfigurationvolumesourcedetails + s := struct { + Model Unmarshalerinstanceconfigurationvolumesourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *instanceconfigurationvolumesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "volumeBackup": + mm := InstanceConfigurationVolumeSourceFromVolumeBackupDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "volume": + mm := InstanceConfigurationVolumeSourceFromVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for InstanceConfigurationVolumeSourceDetails: %s.", m.Type) + return *m, nil + } +} + +func (m instanceconfigurationvolumesourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m instanceconfigurationvolumesourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_volume_source_from_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_volume_source_from_volume_backup_details.go new file mode 100644 index 000000000..c7a7a8935 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_volume_source_from_volume_backup_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationVolumeSourceFromVolumeBackupDetails Specifies the volume backup. +type InstanceConfigurationVolumeSourceFromVolumeBackupDetails struct { + + // The OCID of the volume backup. + Id *string `mandatory:"false" json:"id"` +} + +func (m InstanceConfigurationVolumeSourceFromVolumeBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationVolumeSourceFromVolumeBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationVolumeSourceFromVolumeBackupDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationVolumeSourceFromVolumeBackupDetails InstanceConfigurationVolumeSourceFromVolumeBackupDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationVolumeSourceFromVolumeBackupDetails + }{ + "volumeBackup", + (MarshalTypeInstanceConfigurationVolumeSourceFromVolumeBackupDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_volume_source_from_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_volume_source_from_volume_details.go new file mode 100644 index 000000000..d9c55f79a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_configuration_volume_source_from_volume_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationVolumeSourceFromVolumeDetails Specifies the source volume. +type InstanceConfigurationVolumeSourceFromVolumeDetails struct { + + // The OCID of the volume. + Id *string `mandatory:"false" json:"id"` +} + +func (m InstanceConfigurationVolumeSourceFromVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationVolumeSourceFromVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationVolumeSourceFromVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationVolumeSourceFromVolumeDetails InstanceConfigurationVolumeSourceFromVolumeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationVolumeSourceFromVolumeDetails + }{ + "volume", + (MarshalTypeInstanceConfigurationVolumeSourceFromVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_console_connection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_console_connection.go new file mode 100644 index 000000000..ac7d93864 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_console_connection.go @@ -0,0 +1,136 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConsoleConnection The `InstanceConsoleConnection` API provides you with console access to Compute instances, +// enabling you to troubleshoot malfunctioning instances remotely. +// For more information about instance console connections, see Troubleshooting Instances Using Instance Console Connections (https://docs.oracle.com/iaas/Content/Compute/References/serialconsole.htm). +type InstanceConsoleConnection struct { + + // The OCID of the compartment to contain the console connection. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The SSH connection string for the console connection. + ConnectionString *string `mandatory:"false" json:"connectionString"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The SSH public key's fingerprint for client authentication to the console connection. + Fingerprint *string `mandatory:"false" json:"fingerprint"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID of the console connection. + Id *string `mandatory:"false" json:"id"` + + // The OCID of the instance the console connection connects to. + InstanceId *string `mandatory:"false" json:"instanceId"` + + // The current state of the console connection. + LifecycleState InstanceConsoleConnectionLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The SSH public key's fingerprint for the console connection service host. + ServiceHostKeyFingerprint *string `mandatory:"false" json:"serviceHostKeyFingerprint"` + + // The SSH connection string for the SSH tunnel used to + // connect to the console connection over VNC. + VncConnectionString *string `mandatory:"false" json:"vncConnectionString"` +} + +func (m InstanceConsoleConnection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConsoleConnection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInstanceConsoleConnectionLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetInstanceConsoleConnectionLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstanceConsoleConnectionLifecycleStateEnum Enum with underlying type: string +type InstanceConsoleConnectionLifecycleStateEnum string + +// Set of constants representing the allowable values for InstanceConsoleConnectionLifecycleStateEnum +const ( + InstanceConsoleConnectionLifecycleStateActive InstanceConsoleConnectionLifecycleStateEnum = "ACTIVE" + InstanceConsoleConnectionLifecycleStateCreating InstanceConsoleConnectionLifecycleStateEnum = "CREATING" + InstanceConsoleConnectionLifecycleStateDeleted InstanceConsoleConnectionLifecycleStateEnum = "DELETED" + InstanceConsoleConnectionLifecycleStateDeleting InstanceConsoleConnectionLifecycleStateEnum = "DELETING" + InstanceConsoleConnectionLifecycleStateFailed InstanceConsoleConnectionLifecycleStateEnum = "FAILED" +) + +var mappingInstanceConsoleConnectionLifecycleStateEnum = map[string]InstanceConsoleConnectionLifecycleStateEnum{ + "ACTIVE": InstanceConsoleConnectionLifecycleStateActive, + "CREATING": InstanceConsoleConnectionLifecycleStateCreating, + "DELETED": InstanceConsoleConnectionLifecycleStateDeleted, + "DELETING": InstanceConsoleConnectionLifecycleStateDeleting, + "FAILED": InstanceConsoleConnectionLifecycleStateFailed, +} + +var mappingInstanceConsoleConnectionLifecycleStateEnumLowerCase = map[string]InstanceConsoleConnectionLifecycleStateEnum{ + "active": InstanceConsoleConnectionLifecycleStateActive, + "creating": InstanceConsoleConnectionLifecycleStateCreating, + "deleted": InstanceConsoleConnectionLifecycleStateDeleted, + "deleting": InstanceConsoleConnectionLifecycleStateDeleting, + "failed": InstanceConsoleConnectionLifecycleStateFailed, +} + +// GetInstanceConsoleConnectionLifecycleStateEnumValues Enumerates the set of values for InstanceConsoleConnectionLifecycleStateEnum +func GetInstanceConsoleConnectionLifecycleStateEnumValues() []InstanceConsoleConnectionLifecycleStateEnum { + values := make([]InstanceConsoleConnectionLifecycleStateEnum, 0) + for _, v := range mappingInstanceConsoleConnectionLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConsoleConnectionLifecycleStateEnumStringValues Enumerates the set of values in String for InstanceConsoleConnectionLifecycleStateEnum +func GetInstanceConsoleConnectionLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "CREATING", + "DELETED", + "DELETING", + "FAILED", + } +} + +// GetMappingInstanceConsoleConnectionLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConsoleConnectionLifecycleStateEnum(val string) (InstanceConsoleConnectionLifecycleStateEnum, bool) { + enum, ok := mappingInstanceConsoleConnectionLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_credentials.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_credentials.go new file mode 100644 index 000000000..75024c6ba --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_credentials.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceCredentials The credentials for a particular instance. +type InstanceCredentials struct { + + // The password for the username. + Password *string `mandatory:"true" json:"password"` + + // The username. + Username *string `mandatory:"true" json:"username"` +} + +func (m InstanceCredentials) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceCredentials) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_maintenance_alternative_resolution_actions.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_maintenance_alternative_resolution_actions.go new file mode 100644 index 000000000..cd02b2605 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_maintenance_alternative_resolution_actions.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "strings" +) + +// InstanceMaintenanceAlternativeResolutionActionsEnum Enum with underlying type: string +type InstanceMaintenanceAlternativeResolutionActionsEnum string + +// Set of constants representing the allowable values for InstanceMaintenanceAlternativeResolutionActionsEnum +const ( + InstanceMaintenanceAlternativeResolutionActionsRebootMigration InstanceMaintenanceAlternativeResolutionActionsEnum = "REBOOT_MIGRATION" + InstanceMaintenanceAlternativeResolutionActionsTerminate InstanceMaintenanceAlternativeResolutionActionsEnum = "TERMINATE" +) + +var mappingInstanceMaintenanceAlternativeResolutionActionsEnum = map[string]InstanceMaintenanceAlternativeResolutionActionsEnum{ + "REBOOT_MIGRATION": InstanceMaintenanceAlternativeResolutionActionsRebootMigration, + "TERMINATE": InstanceMaintenanceAlternativeResolutionActionsTerminate, +} + +var mappingInstanceMaintenanceAlternativeResolutionActionsEnumLowerCase = map[string]InstanceMaintenanceAlternativeResolutionActionsEnum{ + "reboot_migration": InstanceMaintenanceAlternativeResolutionActionsRebootMigration, + "terminate": InstanceMaintenanceAlternativeResolutionActionsTerminate, +} + +// GetInstanceMaintenanceAlternativeResolutionActionsEnumValues Enumerates the set of values for InstanceMaintenanceAlternativeResolutionActionsEnum +func GetInstanceMaintenanceAlternativeResolutionActionsEnumValues() []InstanceMaintenanceAlternativeResolutionActionsEnum { + values := make([]InstanceMaintenanceAlternativeResolutionActionsEnum, 0) + for _, v := range mappingInstanceMaintenanceAlternativeResolutionActionsEnum { + values = append(values, v) + } + return values +} + +// GetInstanceMaintenanceAlternativeResolutionActionsEnumStringValues Enumerates the set of values in String for InstanceMaintenanceAlternativeResolutionActionsEnum +func GetInstanceMaintenanceAlternativeResolutionActionsEnumStringValues() []string { + return []string{ + "REBOOT_MIGRATION", + "TERMINATE", + } +} + +// GetMappingInstanceMaintenanceAlternativeResolutionActionsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceMaintenanceAlternativeResolutionActionsEnum(val string) (InstanceMaintenanceAlternativeResolutionActionsEnum, bool) { + enum, ok := mappingInstanceMaintenanceAlternativeResolutionActionsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_maintenance_event.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_maintenance_event.go new file mode 100644 index 000000000..d6d61d389 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_maintenance_event.go @@ -0,0 +1,415 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceMaintenanceEvent It is the event in which the maintenance action will be be performed on the customer instance on the scheduled date and time. +type InstanceMaintenanceEvent struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the maintenance event. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the instance. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The OCID of the compartment that contains the instance. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + // tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + // deferred, or even cancelled. Please see the + // Instance Maintenance (https://docs.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + MaintenanceCategory InstanceMaintenanceEventMaintenanceCategoryEnum `mandatory:"true" json:"maintenanceCategory"` + + // This is the reason that Maintenance is being performed. See + // Instance Maintenance (https://docs.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + MaintenanceReason InstanceMaintenanceEventMaintenanceReasonEnum `mandatory:"true" json:"maintenanceReason"` + + // This is the action that will be performed on the Instance by OCI when the Maintenance begins. + InstanceAction InstanceMaintenanceEventInstanceActionEnum `mandatory:"true" json:"instanceAction"` + + // These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + AlternativeResolutionActions []InstanceMaintenanceAlternativeResolutionActionsEnum `mandatory:"true" json:"alternativeResolutionActions"` + + // The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + // this time. + TimeWindowStart *common.SDKTime `mandatory:"true" json:"timeWindowStart"` + + // Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. + CanReschedule *bool `mandatory:"true" json:"canReschedule"` + + // The date and time the maintenance event was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the maintenance event. + LifecycleState InstanceMaintenanceEventLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The creator of the maintenance event. + CreatedBy InstanceMaintenanceEventCreatedByEnum `mandatory:"true" json:"createdBy"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The time at which the Maintenance actually started. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time at which the Maintenance actually finished. + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` + + // The duration of the time window Maintenance is scheduled to begin within. + StartWindowDuration *string `mandatory:"false" json:"startWindowDuration"` + + // This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. + EstimatedDuration *string `mandatory:"false" json:"estimatedDuration"` + + // It is the scheduled hard due date and time of the maintenance event. + // The maintenance event will happen at this time and the due date will not be extended. + TimeHardDueDate *common.SDKTime `mandatory:"false" json:"timeHardDueDate"` + + // Provides more details about the state of the maintenance event. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // It is the descriptive information about the maintenance taking place on the customer instance. + Description *string `mandatory:"false" json:"description"` + + // A unique identifier that will group Instances that have a relationship with one another and must be scheduled + // together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance + // perspective will have a matching correlationToken. + CorrelationToken *string `mandatory:"false" json:"correlationToken"` + + // For Instances that have local storage, this field is set to true when local storage + // will be deleted as a result of the Maintenance. + CanDeleteLocalStorage *bool `mandatory:"false" json:"canDeleteLocalStorage"` + + // Additional details of the maintenance in the form of json. + AdditionalDetails map[string]string `mandatory:"false" json:"additionalDetails"` +} + +func (m InstanceMaintenanceEvent) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceMaintenanceEvent) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceMaintenanceEventMaintenanceCategoryEnum(string(m.MaintenanceCategory)); !ok && m.MaintenanceCategory != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MaintenanceCategory: %s. Supported values are: %s.", m.MaintenanceCategory, strings.Join(GetInstanceMaintenanceEventMaintenanceCategoryEnumStringValues(), ","))) + } + if _, ok := GetMappingInstanceMaintenanceEventMaintenanceReasonEnum(string(m.MaintenanceReason)); !ok && m.MaintenanceReason != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MaintenanceReason: %s. Supported values are: %s.", m.MaintenanceReason, strings.Join(GetInstanceMaintenanceEventMaintenanceReasonEnumStringValues(), ","))) + } + if _, ok := GetMappingInstanceMaintenanceEventInstanceActionEnum(string(m.InstanceAction)); !ok && m.InstanceAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for InstanceAction: %s. Supported values are: %s.", m.InstanceAction, strings.Join(GetInstanceMaintenanceEventInstanceActionEnumStringValues(), ","))) + } + for _, val := range m.AlternativeResolutionActions { + if _, ok := GetMappingInstanceMaintenanceAlternativeResolutionActionsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AlternativeResolutionActions: %s. Supported values are: %s.", val, strings.Join(GetInstanceMaintenanceAlternativeResolutionActionsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingInstanceMaintenanceEventLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetInstanceMaintenanceEventLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingInstanceMaintenanceEventCreatedByEnum(string(m.CreatedBy)); !ok && m.CreatedBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CreatedBy: %s. Supported values are: %s.", m.CreatedBy, strings.Join(GetInstanceMaintenanceEventCreatedByEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstanceMaintenanceEventMaintenanceCategoryEnum Enum with underlying type: string +type InstanceMaintenanceEventMaintenanceCategoryEnum string + +// Set of constants representing the allowable values for InstanceMaintenanceEventMaintenanceCategoryEnum +const ( + InstanceMaintenanceEventMaintenanceCategoryEmergency InstanceMaintenanceEventMaintenanceCategoryEnum = "EMERGENCY" + InstanceMaintenanceEventMaintenanceCategoryMandatory InstanceMaintenanceEventMaintenanceCategoryEnum = "MANDATORY" + InstanceMaintenanceEventMaintenanceCategoryFlexible InstanceMaintenanceEventMaintenanceCategoryEnum = "FLEXIBLE" + InstanceMaintenanceEventMaintenanceCategoryOptional InstanceMaintenanceEventMaintenanceCategoryEnum = "OPTIONAL" + InstanceMaintenanceEventMaintenanceCategoryNotification InstanceMaintenanceEventMaintenanceCategoryEnum = "NOTIFICATION" +) + +var mappingInstanceMaintenanceEventMaintenanceCategoryEnum = map[string]InstanceMaintenanceEventMaintenanceCategoryEnum{ + "EMERGENCY": InstanceMaintenanceEventMaintenanceCategoryEmergency, + "MANDATORY": InstanceMaintenanceEventMaintenanceCategoryMandatory, + "FLEXIBLE": InstanceMaintenanceEventMaintenanceCategoryFlexible, + "OPTIONAL": InstanceMaintenanceEventMaintenanceCategoryOptional, + "NOTIFICATION": InstanceMaintenanceEventMaintenanceCategoryNotification, +} + +var mappingInstanceMaintenanceEventMaintenanceCategoryEnumLowerCase = map[string]InstanceMaintenanceEventMaintenanceCategoryEnum{ + "emergency": InstanceMaintenanceEventMaintenanceCategoryEmergency, + "mandatory": InstanceMaintenanceEventMaintenanceCategoryMandatory, + "flexible": InstanceMaintenanceEventMaintenanceCategoryFlexible, + "optional": InstanceMaintenanceEventMaintenanceCategoryOptional, + "notification": InstanceMaintenanceEventMaintenanceCategoryNotification, +} + +// GetInstanceMaintenanceEventMaintenanceCategoryEnumValues Enumerates the set of values for InstanceMaintenanceEventMaintenanceCategoryEnum +func GetInstanceMaintenanceEventMaintenanceCategoryEnumValues() []InstanceMaintenanceEventMaintenanceCategoryEnum { + values := make([]InstanceMaintenanceEventMaintenanceCategoryEnum, 0) + for _, v := range mappingInstanceMaintenanceEventMaintenanceCategoryEnum { + values = append(values, v) + } + return values +} + +// GetInstanceMaintenanceEventMaintenanceCategoryEnumStringValues Enumerates the set of values in String for InstanceMaintenanceEventMaintenanceCategoryEnum +func GetInstanceMaintenanceEventMaintenanceCategoryEnumStringValues() []string { + return []string{ + "EMERGENCY", + "MANDATORY", + "FLEXIBLE", + "OPTIONAL", + "NOTIFICATION", + } +} + +// GetMappingInstanceMaintenanceEventMaintenanceCategoryEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceMaintenanceEventMaintenanceCategoryEnum(val string) (InstanceMaintenanceEventMaintenanceCategoryEnum, bool) { + enum, ok := mappingInstanceMaintenanceEventMaintenanceCategoryEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// InstanceMaintenanceEventMaintenanceReasonEnum Enum with underlying type: string +type InstanceMaintenanceEventMaintenanceReasonEnum string + +// Set of constants representing the allowable values for InstanceMaintenanceEventMaintenanceReasonEnum +const ( + InstanceMaintenanceEventMaintenanceReasonEvacuation InstanceMaintenanceEventMaintenanceReasonEnum = "EVACUATION" + InstanceMaintenanceEventMaintenanceReasonEnvironmentalFactors InstanceMaintenanceEventMaintenanceReasonEnum = "ENVIRONMENTAL_FACTORS" + InstanceMaintenanceEventMaintenanceReasonDecommission InstanceMaintenanceEventMaintenanceReasonEnum = "DECOMMISSION" + InstanceMaintenanceEventMaintenanceReasonHardwareReplacement InstanceMaintenanceEventMaintenanceReasonEnum = "HARDWARE_REPLACEMENT" + InstanceMaintenanceEventMaintenanceReasonFirmwareUpdate InstanceMaintenanceEventMaintenanceReasonEnum = "FIRMWARE_UPDATE" + InstanceMaintenanceEventMaintenanceReasonSecurityUpdate InstanceMaintenanceEventMaintenanceReasonEnum = "SECURITY_UPDATE" +) + +var mappingInstanceMaintenanceEventMaintenanceReasonEnum = map[string]InstanceMaintenanceEventMaintenanceReasonEnum{ + "EVACUATION": InstanceMaintenanceEventMaintenanceReasonEvacuation, + "ENVIRONMENTAL_FACTORS": InstanceMaintenanceEventMaintenanceReasonEnvironmentalFactors, + "DECOMMISSION": InstanceMaintenanceEventMaintenanceReasonDecommission, + "HARDWARE_REPLACEMENT": InstanceMaintenanceEventMaintenanceReasonHardwareReplacement, + "FIRMWARE_UPDATE": InstanceMaintenanceEventMaintenanceReasonFirmwareUpdate, + "SECURITY_UPDATE": InstanceMaintenanceEventMaintenanceReasonSecurityUpdate, +} + +var mappingInstanceMaintenanceEventMaintenanceReasonEnumLowerCase = map[string]InstanceMaintenanceEventMaintenanceReasonEnum{ + "evacuation": InstanceMaintenanceEventMaintenanceReasonEvacuation, + "environmental_factors": InstanceMaintenanceEventMaintenanceReasonEnvironmentalFactors, + "decommission": InstanceMaintenanceEventMaintenanceReasonDecommission, + "hardware_replacement": InstanceMaintenanceEventMaintenanceReasonHardwareReplacement, + "firmware_update": InstanceMaintenanceEventMaintenanceReasonFirmwareUpdate, + "security_update": InstanceMaintenanceEventMaintenanceReasonSecurityUpdate, +} + +// GetInstanceMaintenanceEventMaintenanceReasonEnumValues Enumerates the set of values for InstanceMaintenanceEventMaintenanceReasonEnum +func GetInstanceMaintenanceEventMaintenanceReasonEnumValues() []InstanceMaintenanceEventMaintenanceReasonEnum { + values := make([]InstanceMaintenanceEventMaintenanceReasonEnum, 0) + for _, v := range mappingInstanceMaintenanceEventMaintenanceReasonEnum { + values = append(values, v) + } + return values +} + +// GetInstanceMaintenanceEventMaintenanceReasonEnumStringValues Enumerates the set of values in String for InstanceMaintenanceEventMaintenanceReasonEnum +func GetInstanceMaintenanceEventMaintenanceReasonEnumStringValues() []string { + return []string{ + "EVACUATION", + "ENVIRONMENTAL_FACTORS", + "DECOMMISSION", + "HARDWARE_REPLACEMENT", + "FIRMWARE_UPDATE", + "SECURITY_UPDATE", + } +} + +// GetMappingInstanceMaintenanceEventMaintenanceReasonEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceMaintenanceEventMaintenanceReasonEnum(val string) (InstanceMaintenanceEventMaintenanceReasonEnum, bool) { + enum, ok := mappingInstanceMaintenanceEventMaintenanceReasonEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// InstanceMaintenanceEventInstanceActionEnum Enum with underlying type: string +type InstanceMaintenanceEventInstanceActionEnum string + +// Set of constants representing the allowable values for InstanceMaintenanceEventInstanceActionEnum +const ( + InstanceMaintenanceEventInstanceActionRebootMigration InstanceMaintenanceEventInstanceActionEnum = "REBOOT_MIGRATION" + InstanceMaintenanceEventInstanceActionTerminate InstanceMaintenanceEventInstanceActionEnum = "TERMINATE" + InstanceMaintenanceEventInstanceActionStop InstanceMaintenanceEventInstanceActionEnum = "STOP" + InstanceMaintenanceEventInstanceActionNone InstanceMaintenanceEventInstanceActionEnum = "NONE" +) + +var mappingInstanceMaintenanceEventInstanceActionEnum = map[string]InstanceMaintenanceEventInstanceActionEnum{ + "REBOOT_MIGRATION": InstanceMaintenanceEventInstanceActionRebootMigration, + "TERMINATE": InstanceMaintenanceEventInstanceActionTerminate, + "STOP": InstanceMaintenanceEventInstanceActionStop, + "NONE": InstanceMaintenanceEventInstanceActionNone, +} + +var mappingInstanceMaintenanceEventInstanceActionEnumLowerCase = map[string]InstanceMaintenanceEventInstanceActionEnum{ + "reboot_migration": InstanceMaintenanceEventInstanceActionRebootMigration, + "terminate": InstanceMaintenanceEventInstanceActionTerminate, + "stop": InstanceMaintenanceEventInstanceActionStop, + "none": InstanceMaintenanceEventInstanceActionNone, +} + +// GetInstanceMaintenanceEventInstanceActionEnumValues Enumerates the set of values for InstanceMaintenanceEventInstanceActionEnum +func GetInstanceMaintenanceEventInstanceActionEnumValues() []InstanceMaintenanceEventInstanceActionEnum { + values := make([]InstanceMaintenanceEventInstanceActionEnum, 0) + for _, v := range mappingInstanceMaintenanceEventInstanceActionEnum { + values = append(values, v) + } + return values +} + +// GetInstanceMaintenanceEventInstanceActionEnumStringValues Enumerates the set of values in String for InstanceMaintenanceEventInstanceActionEnum +func GetInstanceMaintenanceEventInstanceActionEnumStringValues() []string { + return []string{ + "REBOOT_MIGRATION", + "TERMINATE", + "STOP", + "NONE", + } +} + +// GetMappingInstanceMaintenanceEventInstanceActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceMaintenanceEventInstanceActionEnum(val string) (InstanceMaintenanceEventInstanceActionEnum, bool) { + enum, ok := mappingInstanceMaintenanceEventInstanceActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// InstanceMaintenanceEventLifecycleStateEnum Enum with underlying type: string +type InstanceMaintenanceEventLifecycleStateEnum string + +// Set of constants representing the allowable values for InstanceMaintenanceEventLifecycleStateEnum +const ( + InstanceMaintenanceEventLifecycleStateScheduled InstanceMaintenanceEventLifecycleStateEnum = "SCHEDULED" + InstanceMaintenanceEventLifecycleStateStarted InstanceMaintenanceEventLifecycleStateEnum = "STARTED" + InstanceMaintenanceEventLifecycleStateProcessing InstanceMaintenanceEventLifecycleStateEnum = "PROCESSING" + InstanceMaintenanceEventLifecycleStateSucceeded InstanceMaintenanceEventLifecycleStateEnum = "SUCCEEDED" + InstanceMaintenanceEventLifecycleStateFailed InstanceMaintenanceEventLifecycleStateEnum = "FAILED" + InstanceMaintenanceEventLifecycleStateCanceled InstanceMaintenanceEventLifecycleStateEnum = "CANCELED" +) + +var mappingInstanceMaintenanceEventLifecycleStateEnum = map[string]InstanceMaintenanceEventLifecycleStateEnum{ + "SCHEDULED": InstanceMaintenanceEventLifecycleStateScheduled, + "STARTED": InstanceMaintenanceEventLifecycleStateStarted, + "PROCESSING": InstanceMaintenanceEventLifecycleStateProcessing, + "SUCCEEDED": InstanceMaintenanceEventLifecycleStateSucceeded, + "FAILED": InstanceMaintenanceEventLifecycleStateFailed, + "CANCELED": InstanceMaintenanceEventLifecycleStateCanceled, +} + +var mappingInstanceMaintenanceEventLifecycleStateEnumLowerCase = map[string]InstanceMaintenanceEventLifecycleStateEnum{ + "scheduled": InstanceMaintenanceEventLifecycleStateScheduled, + "started": InstanceMaintenanceEventLifecycleStateStarted, + "processing": InstanceMaintenanceEventLifecycleStateProcessing, + "succeeded": InstanceMaintenanceEventLifecycleStateSucceeded, + "failed": InstanceMaintenanceEventLifecycleStateFailed, + "canceled": InstanceMaintenanceEventLifecycleStateCanceled, +} + +// GetInstanceMaintenanceEventLifecycleStateEnumValues Enumerates the set of values for InstanceMaintenanceEventLifecycleStateEnum +func GetInstanceMaintenanceEventLifecycleStateEnumValues() []InstanceMaintenanceEventLifecycleStateEnum { + values := make([]InstanceMaintenanceEventLifecycleStateEnum, 0) + for _, v := range mappingInstanceMaintenanceEventLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetInstanceMaintenanceEventLifecycleStateEnumStringValues Enumerates the set of values in String for InstanceMaintenanceEventLifecycleStateEnum +func GetInstanceMaintenanceEventLifecycleStateEnumStringValues() []string { + return []string{ + "SCHEDULED", + "STARTED", + "PROCESSING", + "SUCCEEDED", + "FAILED", + "CANCELED", + } +} + +// GetMappingInstanceMaintenanceEventLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceMaintenanceEventLifecycleStateEnum(val string) (InstanceMaintenanceEventLifecycleStateEnum, bool) { + enum, ok := mappingInstanceMaintenanceEventLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// InstanceMaintenanceEventCreatedByEnum Enum with underlying type: string +type InstanceMaintenanceEventCreatedByEnum string + +// Set of constants representing the allowable values for InstanceMaintenanceEventCreatedByEnum +const ( + InstanceMaintenanceEventCreatedByCustomer InstanceMaintenanceEventCreatedByEnum = "CUSTOMER" + InstanceMaintenanceEventCreatedBySystem InstanceMaintenanceEventCreatedByEnum = "SYSTEM" +) + +var mappingInstanceMaintenanceEventCreatedByEnum = map[string]InstanceMaintenanceEventCreatedByEnum{ + "CUSTOMER": InstanceMaintenanceEventCreatedByCustomer, + "SYSTEM": InstanceMaintenanceEventCreatedBySystem, +} + +var mappingInstanceMaintenanceEventCreatedByEnumLowerCase = map[string]InstanceMaintenanceEventCreatedByEnum{ + "customer": InstanceMaintenanceEventCreatedByCustomer, + "system": InstanceMaintenanceEventCreatedBySystem, +} + +// GetInstanceMaintenanceEventCreatedByEnumValues Enumerates the set of values for InstanceMaintenanceEventCreatedByEnum +func GetInstanceMaintenanceEventCreatedByEnumValues() []InstanceMaintenanceEventCreatedByEnum { + values := make([]InstanceMaintenanceEventCreatedByEnum, 0) + for _, v := range mappingInstanceMaintenanceEventCreatedByEnum { + values = append(values, v) + } + return values +} + +// GetInstanceMaintenanceEventCreatedByEnumStringValues Enumerates the set of values in String for InstanceMaintenanceEventCreatedByEnum +func GetInstanceMaintenanceEventCreatedByEnumStringValues() []string { + return []string{ + "CUSTOMER", + "SYSTEM", + } +} + +// GetMappingInstanceMaintenanceEventCreatedByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceMaintenanceEventCreatedByEnum(val string) (InstanceMaintenanceEventCreatedByEnum, bool) { + enum, ok := mappingInstanceMaintenanceEventCreatedByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_maintenance_event_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_maintenance_event_summary.go new file mode 100644 index 000000000..8d8366dd4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_maintenance_event_summary.go @@ -0,0 +1,143 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceMaintenanceEventSummary It is the event in which the maintenance action will be be performed on the customer instance on the scheduled date and time. +type InstanceMaintenanceEventSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the maintenance event. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the instance. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The OCID of the compartment that contains the instance. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + // tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + // deferred, or even cancelled. Please see the + // Instance Maintenance (https://docs.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + MaintenanceCategory InstanceMaintenanceEventMaintenanceCategoryEnum `mandatory:"true" json:"maintenanceCategory"` + + // This is the reason that Maintenance is being performed. See + // Instance Maintenance (https://docs.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details. + MaintenanceReason InstanceMaintenanceEventMaintenanceReasonEnum `mandatory:"true" json:"maintenanceReason"` + + // This is the action that will be performed on the Instance by OCI when the Maintenance begins. + InstanceAction InstanceMaintenanceEventInstanceActionEnum `mandatory:"true" json:"instanceAction"` + + // These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + AlternativeResolutionActions []InstanceMaintenanceAlternativeResolutionActionsEnum `mandatory:"true" json:"alternativeResolutionActions"` + + // The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + // this time. + TimeWindowStart *common.SDKTime `mandatory:"true" json:"timeWindowStart"` + + // Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. + CanReschedule *bool `mandatory:"true" json:"canReschedule"` + + // The date and time the maintenance event was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the maintenance event. + LifecycleState InstanceMaintenanceEventLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The creator of the maintenance event. + CreatedBy InstanceMaintenanceEventCreatedByEnum `mandatory:"true" json:"createdBy"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The time at which the Maintenance actually started. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time at which the Maintenance actually finished. + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` + + // The duration of the time window Maintenance is scheduled to begin within. + StartWindowDuration *string `mandatory:"false" json:"startWindowDuration"` + + // This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. + EstimatedDuration *string `mandatory:"false" json:"estimatedDuration"` + + // It is the scheduled hard due date and time of the maintenance event. + // The maintenance event will happen at this time and the due date will not be extended. + TimeHardDueDate *common.SDKTime `mandatory:"false" json:"timeHardDueDate"` + + // It is the descriptive information about the maintenance taking place on the customer instance. + Description *string `mandatory:"false" json:"description"` + + // A unique identifier that will group Instances that have a relationship with one another and must be scheduled + // together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance + // perspective will have a matching correlationToken. + CorrelationToken *string `mandatory:"false" json:"correlationToken"` +} + +func (m InstanceMaintenanceEventSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceMaintenanceEventSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceMaintenanceEventMaintenanceCategoryEnum(string(m.MaintenanceCategory)); !ok && m.MaintenanceCategory != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MaintenanceCategory: %s. Supported values are: %s.", m.MaintenanceCategory, strings.Join(GetInstanceMaintenanceEventMaintenanceCategoryEnumStringValues(), ","))) + } + if _, ok := GetMappingInstanceMaintenanceEventMaintenanceReasonEnum(string(m.MaintenanceReason)); !ok && m.MaintenanceReason != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MaintenanceReason: %s. Supported values are: %s.", m.MaintenanceReason, strings.Join(GetInstanceMaintenanceEventMaintenanceReasonEnumStringValues(), ","))) + } + if _, ok := GetMappingInstanceMaintenanceEventInstanceActionEnum(string(m.InstanceAction)); !ok && m.InstanceAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for InstanceAction: %s. Supported values are: %s.", m.InstanceAction, strings.Join(GetInstanceMaintenanceEventInstanceActionEnumStringValues(), ","))) + } + for _, val := range m.AlternativeResolutionActions { + if _, ok := GetMappingInstanceMaintenanceAlternativeResolutionActionsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AlternativeResolutionActions: %s. Supported values are: %s.", val, strings.Join(GetInstanceMaintenanceAlternativeResolutionActionsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingInstanceMaintenanceEventLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetInstanceMaintenanceEventLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingInstanceMaintenanceEventCreatedByEnum(string(m.CreatedBy)); !ok && m.CreatedBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CreatedBy: %s. Supported values are: %s.", m.CreatedBy, strings.Join(GetInstanceMaintenanceEventCreatedByEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_maintenance_reboot.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_maintenance_reboot.go new file mode 100644 index 000000000..b743de648 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_maintenance_reboot.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceMaintenanceReboot The maximum possible date and time that a maintenance reboot can be extended. +type InstanceMaintenanceReboot struct { + + // The maximum extension date and time for the maintenance reboot, in the format defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339). + // The range for the maintenance extension is between 1 and 14 days from the initial scheduled maintenance date. + // Example: `2018-05-25T21:10:29.600Z` + TimeMaintenanceRebootDueMax *common.SDKTime `mandatory:"true" json:"timeMaintenanceRebootDueMax"` +} + +func (m InstanceMaintenanceReboot) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceMaintenanceReboot) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_options.go new file mode 100644 index 000000000..4b7ac9968 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_options.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceOptions Optional mutable instance options +type InstanceOptions struct { + + // Whether to disable the legacy (/v1) instance metadata service endpoints. + // Customers who have migrated to /v2 should set this to true for added security. + // Default is false. + AreLegacyImdsEndpointsDisabled *bool `mandatory:"false" json:"areLegacyImdsEndpointsDisabled"` +} + +func (m InstanceOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool.go new file mode 100644 index 000000000..3cefb7911 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool.go @@ -0,0 +1,167 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePool An instance pool is a set of instances within the same region that are managed as a group. +// For more information about instance pools and instance configurations, see +// Managing Compute Instances (https://docs.oracle.com/iaas/Content/Compute/Concepts/instancemanagement.htm). +type InstancePool struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the instance + // pool. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance configuration associated + // with the instance pool. + InstanceConfigurationId *string `mandatory:"true" json:"instanceConfigurationId"` + + // The current state of the instance pool. + LifecycleState InstancePoolLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The placement configurations for the instance pool. + PlacementConfigurations []InstancePoolPlacementConfiguration `mandatory:"true" json:"placementConfigurations"` + + // The number of instances that should be in the instance pool. + Size *int `mandatory:"true" json:"size"` + + // The date and time the instance pool was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The load balancers attached to the instance pool. + LoadBalancers []InstancePoolLoadBalancerAttachment `mandatory:"false" json:"loadBalancers"` + + // A user-friendly formatter for the instance pool's instances. Instance displaynames follow the format. + // The formatter does not retroactively change instance's displaynames, only instance displaynames in the future follow the format + InstanceDisplayNameFormatter *string `mandatory:"false" json:"instanceDisplayNameFormatter"` + + // A user-friendly formatter for the instance pool's instances. Instance hostnames follow the format. + // The formatter does not retroactively change instance's hostnames, only instance hostnames in the future follow the format + InstanceHostnameFormatter *string `mandatory:"false" json:"instanceHostnameFormatter"` + + LifecycleManagement *InstancePoolLifecycleManagementDetails `mandatory:"false" json:"lifecycleManagement"` + + // Count of instance in running state associated to the Instance Pool. + CurrentSize *int `mandatory:"false" json:"currentSize"` +} + +func (m InstancePool) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePool) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstancePoolLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetInstancePoolLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstancePoolLifecycleStateEnum Enum with underlying type: string +type InstancePoolLifecycleStateEnum string + +// Set of constants representing the allowable values for InstancePoolLifecycleStateEnum +const ( + InstancePoolLifecycleStateProvisioning InstancePoolLifecycleStateEnum = "PROVISIONING" + InstancePoolLifecycleStateScaling InstancePoolLifecycleStateEnum = "SCALING" + InstancePoolLifecycleStateStarting InstancePoolLifecycleStateEnum = "STARTING" + InstancePoolLifecycleStateStopping InstancePoolLifecycleStateEnum = "STOPPING" + InstancePoolLifecycleStateTerminating InstancePoolLifecycleStateEnum = "TERMINATING" + InstancePoolLifecycleStateStopped InstancePoolLifecycleStateEnum = "STOPPED" + InstancePoolLifecycleStateTerminated InstancePoolLifecycleStateEnum = "TERMINATED" + InstancePoolLifecycleStateRunning InstancePoolLifecycleStateEnum = "RUNNING" +) + +var mappingInstancePoolLifecycleStateEnum = map[string]InstancePoolLifecycleStateEnum{ + "PROVISIONING": InstancePoolLifecycleStateProvisioning, + "SCALING": InstancePoolLifecycleStateScaling, + "STARTING": InstancePoolLifecycleStateStarting, + "STOPPING": InstancePoolLifecycleStateStopping, + "TERMINATING": InstancePoolLifecycleStateTerminating, + "STOPPED": InstancePoolLifecycleStateStopped, + "TERMINATED": InstancePoolLifecycleStateTerminated, + "RUNNING": InstancePoolLifecycleStateRunning, +} + +var mappingInstancePoolLifecycleStateEnumLowerCase = map[string]InstancePoolLifecycleStateEnum{ + "provisioning": InstancePoolLifecycleStateProvisioning, + "scaling": InstancePoolLifecycleStateScaling, + "starting": InstancePoolLifecycleStateStarting, + "stopping": InstancePoolLifecycleStateStopping, + "terminating": InstancePoolLifecycleStateTerminating, + "stopped": InstancePoolLifecycleStateStopped, + "terminated": InstancePoolLifecycleStateTerminated, + "running": InstancePoolLifecycleStateRunning, +} + +// GetInstancePoolLifecycleStateEnumValues Enumerates the set of values for InstancePoolLifecycleStateEnum +func GetInstancePoolLifecycleStateEnumValues() []InstancePoolLifecycleStateEnum { + values := make([]InstancePoolLifecycleStateEnum, 0) + for _, v := range mappingInstancePoolLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetInstancePoolLifecycleStateEnumStringValues Enumerates the set of values in String for InstancePoolLifecycleStateEnum +func GetInstancePoolLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "SCALING", + "STARTING", + "STOPPING", + "TERMINATING", + "STOPPED", + "TERMINATED", + "RUNNING", + } +} + +// GetMappingInstancePoolLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstancePoolLifecycleStateEnum(val string) (InstancePoolLifecycleStateEnum, bool) { + enum, ok := mappingInstancePoolLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_instance.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_instance.go new file mode 100644 index 000000000..a0ef53ae2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_instance.go @@ -0,0 +1,143 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolInstance Information about an instance that belongs to an instance pool. +type InstancePoolInstance struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" json:"instancePoolId"` + + // The availability domain the instance is running in. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The attachment state of the instance in relation to the instance pool. + LifecycleState InstancePoolInstanceLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the + // instance. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance configuration + // used to create the instance. + InstanceConfigurationId *string `mandatory:"true" json:"instanceConfigurationId"` + + // The region that contains the availability domain the instance is running in. + Region *string `mandatory:"true" json:"region"` + + // The shape of the instance. The shape determines the number of CPUs, amount of memory, + // and other resources allocated to the instance. + Shape *string `mandatory:"true" json:"shape"` + + // The lifecycle state of the instance. Refer to `lifecycleState` in the Instance resource. + State *string `mandatory:"true" json:"state"` + + // The date and time the instance pool instance was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The fault domain the instance is running in. + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + // The load balancer backends that are configured for the instance. + LoadBalancerBackends []InstancePoolInstanceLoadBalancerBackend `mandatory:"false" json:"loadBalancerBackends"` +} + +func (m InstancePoolInstance) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolInstance) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstancePoolInstanceLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetInstancePoolInstanceLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstancePoolInstanceLifecycleStateEnum Enum with underlying type: string +type InstancePoolInstanceLifecycleStateEnum string + +// Set of constants representing the allowable values for InstancePoolInstanceLifecycleStateEnum +const ( + InstancePoolInstanceLifecycleStateAttaching InstancePoolInstanceLifecycleStateEnum = "ATTACHING" + InstancePoolInstanceLifecycleStateActive InstancePoolInstanceLifecycleStateEnum = "ACTIVE" + InstancePoolInstanceLifecycleStateDetaching InstancePoolInstanceLifecycleStateEnum = "DETACHING" + InstancePoolInstanceLifecycleStateTerminationAwait InstancePoolInstanceLifecycleStateEnum = "TERMINATION_AWAIT" + InstancePoolInstanceLifecycleStateTerminationProceed InstancePoolInstanceLifecycleStateEnum = "TERMINATION_PROCEED" +) + +var mappingInstancePoolInstanceLifecycleStateEnum = map[string]InstancePoolInstanceLifecycleStateEnum{ + "ATTACHING": InstancePoolInstanceLifecycleStateAttaching, + "ACTIVE": InstancePoolInstanceLifecycleStateActive, + "DETACHING": InstancePoolInstanceLifecycleStateDetaching, + "TERMINATION_AWAIT": InstancePoolInstanceLifecycleStateTerminationAwait, + "TERMINATION_PROCEED": InstancePoolInstanceLifecycleStateTerminationProceed, +} + +var mappingInstancePoolInstanceLifecycleStateEnumLowerCase = map[string]InstancePoolInstanceLifecycleStateEnum{ + "attaching": InstancePoolInstanceLifecycleStateAttaching, + "active": InstancePoolInstanceLifecycleStateActive, + "detaching": InstancePoolInstanceLifecycleStateDetaching, + "termination_await": InstancePoolInstanceLifecycleStateTerminationAwait, + "termination_proceed": InstancePoolInstanceLifecycleStateTerminationProceed, +} + +// GetInstancePoolInstanceLifecycleStateEnumValues Enumerates the set of values for InstancePoolInstanceLifecycleStateEnum +func GetInstancePoolInstanceLifecycleStateEnumValues() []InstancePoolInstanceLifecycleStateEnum { + values := make([]InstancePoolInstanceLifecycleStateEnum, 0) + for _, v := range mappingInstancePoolInstanceLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetInstancePoolInstanceLifecycleStateEnumStringValues Enumerates the set of values in String for InstancePoolInstanceLifecycleStateEnum +func GetInstancePoolInstanceLifecycleStateEnumStringValues() []string { + return []string{ + "ATTACHING", + "ACTIVE", + "DETACHING", + "TERMINATION_AWAIT", + "TERMINATION_PROCEED", + } +} + +// GetMappingInstancePoolInstanceLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstancePoolInstanceLifecycleStateEnum(val string) (InstancePoolInstanceLifecycleStateEnum, bool) { + enum, ok := mappingInstancePoolInstanceLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_instance_load_balancer_backend.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_instance_load_balancer_backend.go new file mode 100644 index 000000000..6f2abe759 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_instance_load_balancer_backend.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolInstanceLoadBalancerBackend Represents the load balancer Backend that is configured for an instance pool instance. +type InstancePoolInstanceLoadBalancerBackend struct { + + // The OCID of the load balancer attached to the instance pool. + LoadBalancerId *string `mandatory:"true" json:"loadBalancerId"` + + // The name of the backend set on the load balancer. + BackendSetName *string `mandatory:"true" json:"backendSetName"` + + // The name of the backend in the backend set. + BackendName *string `mandatory:"true" json:"backendName"` + + // The health of the backend as observed by the load balancer. + BackendHealthStatus InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum `mandatory:"true" json:"backendHealthStatus"` +} + +func (m InstancePoolInstanceLoadBalancerBackend) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolInstanceLoadBalancerBackend) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum(string(m.BackendHealthStatus)); !ok && m.BackendHealthStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BackendHealthStatus: %s. Supported values are: %s.", m.BackendHealthStatus, strings.Join(GetInstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum Enum with underlying type: string +type InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum string + +// Set of constants representing the allowable values for InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum +const ( + InstancePoolInstanceLoadBalancerBackendBackendHealthStatusOk InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum = "OK" + InstancePoolInstanceLoadBalancerBackendBackendHealthStatusWarning InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum = "WARNING" + InstancePoolInstanceLoadBalancerBackendBackendHealthStatusCritical InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum = "CRITICAL" + InstancePoolInstanceLoadBalancerBackendBackendHealthStatusUnknown InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum = "UNKNOWN" +) + +var mappingInstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum = map[string]InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum{ + "OK": InstancePoolInstanceLoadBalancerBackendBackendHealthStatusOk, + "WARNING": InstancePoolInstanceLoadBalancerBackendBackendHealthStatusWarning, + "CRITICAL": InstancePoolInstanceLoadBalancerBackendBackendHealthStatusCritical, + "UNKNOWN": InstancePoolInstanceLoadBalancerBackendBackendHealthStatusUnknown, +} + +var mappingInstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnumLowerCase = map[string]InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum{ + "ok": InstancePoolInstanceLoadBalancerBackendBackendHealthStatusOk, + "warning": InstancePoolInstanceLoadBalancerBackendBackendHealthStatusWarning, + "critical": InstancePoolInstanceLoadBalancerBackendBackendHealthStatusCritical, + "unknown": InstancePoolInstanceLoadBalancerBackendBackendHealthStatusUnknown, +} + +// GetInstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnumValues Enumerates the set of values for InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum +func GetInstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnumValues() []InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum { + values := make([]InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum, 0) + for _, v := range mappingInstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum { + values = append(values, v) + } + return values +} + +// GetInstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnumStringValues Enumerates the set of values in String for InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum +func GetInstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnumStringValues() []string { + return []string{ + "OK", + "WARNING", + "CRITICAL", + "UNKNOWN", + } +} + +// GetMappingInstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum(val string) (InstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnum, bool) { + enum, ok := mappingInstancePoolInstanceLoadBalancerBackendBackendHealthStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_lifecycle_actions_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_lifecycle_actions_details.go new file mode 100644 index 000000000..ed5d738cc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_lifecycle_actions_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolLifecycleActionsDetails The lifecycle actions for the instance pool. +type InstancePoolLifecycleActionsDetails struct { + PreTermination *InstancePoolPreTerminationActionDetails `mandatory:"false" json:"preTermination"` +} + +func (m InstancePoolLifecycleActionsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolLifecycleActionsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_lifecycle_management_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_lifecycle_management_details.go new file mode 100644 index 000000000..9637afc08 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_lifecycle_management_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolLifecycleManagementDetails The lifecycle management options for the instance pool. +type InstancePoolLifecycleManagementDetails struct { + LifecycleActions *InstancePoolLifecycleActionsDetails `mandatory:"true" json:"lifecycleActions"` +} + +func (m InstancePoolLifecycleManagementDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolLifecycleManagementDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_load_balancer_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_load_balancer_attachment.go new file mode 100644 index 000000000..e5768a6fd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_load_balancer_attachment.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolLoadBalancerAttachment Represents a load balancer that is attached to an instance pool. +type InstancePoolLoadBalancerAttachment struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the load balancer attachment. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool of the load balancer attachment. + InstancePoolId *string `mandatory:"true" json:"instancePoolId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the load balancer attached to the instance pool. + LoadBalancerId *string `mandatory:"true" json:"loadBalancerId"` + + // The name of the backend set on the load balancer. + BackendSetName *string `mandatory:"true" json:"backendSetName"` + + // The port value used for the backends. + Port *int `mandatory:"true" json:"port"` + + // Indicates which VNIC on each instance in the instance pool should be used to associate with the load balancer. + // Possible values are "PrimaryVnic" or the displayName of one of the secondary VNICs on the instance configuration + // that is associated with the instance pool. + VnicSelection *string `mandatory:"true" json:"vnicSelection"` + + // The status of the interaction between the instance pool and the load balancer. + LifecycleState InstancePoolLoadBalancerAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +func (m InstancePoolLoadBalancerAttachment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolLoadBalancerAttachment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstancePoolLoadBalancerAttachmentLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetInstancePoolLoadBalancerAttachmentLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstancePoolLoadBalancerAttachmentLifecycleStateEnum Enum with underlying type: string +type InstancePoolLoadBalancerAttachmentLifecycleStateEnum string + +// Set of constants representing the allowable values for InstancePoolLoadBalancerAttachmentLifecycleStateEnum +const ( + InstancePoolLoadBalancerAttachmentLifecycleStateAttaching InstancePoolLoadBalancerAttachmentLifecycleStateEnum = "ATTACHING" + InstancePoolLoadBalancerAttachmentLifecycleStateAttached InstancePoolLoadBalancerAttachmentLifecycleStateEnum = "ATTACHED" + InstancePoolLoadBalancerAttachmentLifecycleStateDetaching InstancePoolLoadBalancerAttachmentLifecycleStateEnum = "DETACHING" + InstancePoolLoadBalancerAttachmentLifecycleStateDetached InstancePoolLoadBalancerAttachmentLifecycleStateEnum = "DETACHED" +) + +var mappingInstancePoolLoadBalancerAttachmentLifecycleStateEnum = map[string]InstancePoolLoadBalancerAttachmentLifecycleStateEnum{ + "ATTACHING": InstancePoolLoadBalancerAttachmentLifecycleStateAttaching, + "ATTACHED": InstancePoolLoadBalancerAttachmentLifecycleStateAttached, + "DETACHING": InstancePoolLoadBalancerAttachmentLifecycleStateDetaching, + "DETACHED": InstancePoolLoadBalancerAttachmentLifecycleStateDetached, +} + +var mappingInstancePoolLoadBalancerAttachmentLifecycleStateEnumLowerCase = map[string]InstancePoolLoadBalancerAttachmentLifecycleStateEnum{ + "attaching": InstancePoolLoadBalancerAttachmentLifecycleStateAttaching, + "attached": InstancePoolLoadBalancerAttachmentLifecycleStateAttached, + "detaching": InstancePoolLoadBalancerAttachmentLifecycleStateDetaching, + "detached": InstancePoolLoadBalancerAttachmentLifecycleStateDetached, +} + +// GetInstancePoolLoadBalancerAttachmentLifecycleStateEnumValues Enumerates the set of values for InstancePoolLoadBalancerAttachmentLifecycleStateEnum +func GetInstancePoolLoadBalancerAttachmentLifecycleStateEnumValues() []InstancePoolLoadBalancerAttachmentLifecycleStateEnum { + values := make([]InstancePoolLoadBalancerAttachmentLifecycleStateEnum, 0) + for _, v := range mappingInstancePoolLoadBalancerAttachmentLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetInstancePoolLoadBalancerAttachmentLifecycleStateEnumStringValues Enumerates the set of values in String for InstancePoolLoadBalancerAttachmentLifecycleStateEnum +func GetInstancePoolLoadBalancerAttachmentLifecycleStateEnumStringValues() []string { + return []string{ + "ATTACHING", + "ATTACHED", + "DETACHING", + "DETACHED", + } +} + +// GetMappingInstancePoolLoadBalancerAttachmentLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstancePoolLoadBalancerAttachmentLifecycleStateEnum(val string) (InstancePoolLoadBalancerAttachmentLifecycleStateEnum, bool) { + enum, ok := mappingInstancePoolLoadBalancerAttachmentLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_configuration.go new file mode 100644 index 000000000..e2572fd23 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_configuration.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolPlacementConfiguration The location for where an instance pool will place instances. +type InstancePoolPlacementConfiguration struct { + + // The availability domain to place instances. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the + // compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) that the instance will be created in. + ComputeClusterId *string `mandatory:"false" json:"computeClusterId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. This field is deprecated. + // Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. + PrimarySubnetId *string `mandatory:"false" json:"primarySubnetId"` + + // The fault domains to place instances. + // If you don't provide any values, the system makes a best effort to distribute + // instances across all fault domains based on capacity. + // To distribute the instances evenly across selected fault domains, provide a + // set of fault domains. For example, you might want instances to be evenly + // distributed if your applications require high availability. + // To get a list of fault domains, use the + // ListFaultDomains operation + // in the Identity and Access Management Service API. + // Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` + FaultDomains []string `mandatory:"false" json:"faultDomains"` + + PrimaryVnicSubnets *InstancePoolPlacementPrimarySubnet `mandatory:"false" json:"primaryVnicSubnets"` + + // The set of secondary VNIC data for instances in the pool. + SecondaryVnicSubnets []InstancePoolPlacementSecondaryVnicSubnet `mandatory:"false" json:"secondaryVnicSubnets"` +} + +func (m InstancePoolPlacementConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolPlacementConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_ipv6_address_ipv6_subnet_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_ipv6_address_ipv6_subnet_cidr_details.go new file mode 100644 index 000000000..c72f131b0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_ipv6_address_ipv6_subnet_cidr_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails Optional. Used to specify from which subnet prefixes an IPv6 address should be allocated, or to assign valid available IPv6 addresses. +type InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails struct { + + // Optional. Used to disambiguate which subnet prefix should be used to create an IPv6 allocation. + Ipv6SubnetCidr *string `mandatory:"false" json:"ipv6SubnetCidr"` +} + +func (m InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_primary_subnet.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_primary_subnet.go new file mode 100644 index 000000000..7dc97c130 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_primary_subnet.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolPlacementPrimarySubnet Details about the IPv6 primary subnet. +type InstancePoolPlacementPrimarySubnet struct { + + // The subnet OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + IsAssignIpv6Ip *bool `mandatory:"false" json:"isAssignIpv6Ip"` + + // A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. + // You can provide only the prefix ranges and OCI will select an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address that should be used from within that range. + Ipv6AddressIpv6SubnetCidrPairDetails []InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` +} + +func (m InstancePoolPlacementPrimarySubnet) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolPlacementPrimarySubnet) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_secondary_vnic_subnet.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_secondary_vnic_subnet.go new file mode 100644 index 000000000..1a83bdd4f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_secondary_vnic_subnet.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolPlacementSecondaryVnicSubnet The secondary VNIC object for the placement configuration for an instance pool. +type InstancePoolPlacementSecondaryVnicSubnet struct { + + // The subnet OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + IsAssignIpv6Ip *bool `mandatory:"false" json:"isAssignIpv6Ip"` + + // A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. + // You can provide only the prefix ranges and OCI will select an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address that should be used from within that range. + Ipv6AddressIpv6SubnetCidrPairDetails []InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` + + // The display name of the VNIC. This is also used to match against the instance configuration defined + // secondary VNIC. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m InstancePoolPlacementSecondaryVnicSubnet) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolPlacementSecondaryVnicSubnet) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_subnet_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_subnet_details.go new file mode 100644 index 000000000..72ce27cf1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_placement_subnet_details.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolPlacementSubnetDetails Base details about the IPv6 subnet. +type InstancePoolPlacementSubnetDetails struct { + + // The subnet OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + IsAssignIpv6Ip *bool `mandatory:"false" json:"isAssignIpv6Ip"` + + // A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. + // You can provide only the prefix ranges and OCI will select an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address that should be used from within that range. + Ipv6AddressIpv6SubnetCidrPairDetails []InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` +} + +func (m InstancePoolPlacementSubnetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolPlacementSubnetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_pre_termination_action_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_pre_termination_action_details.go new file mode 100644 index 000000000..0e3f76586 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_pre_termination_action_details.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolPreTerminationActionDetails The data for pre-termination action for an instance pool +type InstancePoolPreTerminationActionDetails struct { + + // Whether pre-termination action is enabled or not. + IsEnabled *bool `mandatory:"true" json:"isEnabled"` + + // The timeout in seconds for pre-termination action for an instance pool. + Timeout *int `mandatory:"true" json:"timeout"` + + OnTimeout *InstancePoolPreTerminationActionHandleTimeoutDetails `mandatory:"true" json:"onTimeout"` +} + +func (m InstancePoolPreTerminationActionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolPreTerminationActionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_pre_termination_action_handle_timeout_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_pre_termination_action_handle_timeout_details.go new file mode 100644 index 000000000..07e138455 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_pre_termination_action_handle_timeout_details.go @@ -0,0 +1,146 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolPreTerminationActionHandleTimeoutDetails Options to handle timeout for pre-termination action. +type InstancePoolPreTerminationActionHandleTimeoutDetails struct { + + // Whether the block volume should be preserved after termination. + PreserveBlockVolumeMode InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum `mandatory:"true" json:"preserveBlockVolumeMode"` + + // Whether the boot volume should be preserved after termination. + PreserveBootVolumeMode InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum `mandatory:"true" json:"preserveBootVolumeMode"` +} + +func (m InstancePoolPreTerminationActionHandleTimeoutDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolPreTerminationActionHandleTimeoutDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum(string(m.PreserveBlockVolumeMode)); !ok && m.PreserveBlockVolumeMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PreserveBlockVolumeMode: %s. Supported values are: %s.", m.PreserveBlockVolumeMode, strings.Join(GetInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnumStringValues(), ","))) + } + if _, ok := GetMappingInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum(string(m.PreserveBootVolumeMode)); !ok && m.PreserveBootVolumeMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PreserveBootVolumeMode: %s. Supported values are: %s.", m.PreserveBootVolumeMode, strings.Join(GetInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum Enum with underlying type: string +type InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum string + +// Set of constants representing the allowable values for InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum +const ( + InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModePreserveAlways InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum = "PRESERVE_ALWAYS" + InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModePreserveOnTimeout InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum = "PRESERVE_ON_TIMEOUT" + InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeDeleteAlways InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum = "DELETE_ALWAYS" +) + +var mappingInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum = map[string]InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum{ + "PRESERVE_ALWAYS": InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModePreserveAlways, + "PRESERVE_ON_TIMEOUT": InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModePreserveOnTimeout, + "DELETE_ALWAYS": InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeDeleteAlways, +} + +var mappingInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnumLowerCase = map[string]InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum{ + "preserve_always": InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModePreserveAlways, + "preserve_on_timeout": InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModePreserveOnTimeout, + "delete_always": InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeDeleteAlways, +} + +// GetInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnumValues Enumerates the set of values for InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum +func GetInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnumValues() []InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum { + values := make([]InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum, 0) + for _, v := range mappingInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum { + values = append(values, v) + } + return values +} + +// GetInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnumStringValues Enumerates the set of values in String for InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum +func GetInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnumStringValues() []string { + return []string{ + "PRESERVE_ALWAYS", + "PRESERVE_ON_TIMEOUT", + "DELETE_ALWAYS", + } +} + +// GetMappingInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum(val string) (InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnum, bool) { + enum, ok := mappingInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBlockVolumeModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum Enum with underlying type: string +type InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum string + +// Set of constants representing the allowable values for InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum +const ( + InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModePreserveAlways InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum = "PRESERVE_ALWAYS" + InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModePreserveOnTimeout InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum = "PRESERVE_ON_TIMEOUT" + InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeDeleteAlways InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum = "DELETE_ALWAYS" +) + +var mappingInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum = map[string]InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum{ + "PRESERVE_ALWAYS": InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModePreserveAlways, + "PRESERVE_ON_TIMEOUT": InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModePreserveOnTimeout, + "DELETE_ALWAYS": InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeDeleteAlways, +} + +var mappingInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnumLowerCase = map[string]InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum{ + "preserve_always": InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModePreserveAlways, + "preserve_on_timeout": InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModePreserveOnTimeout, + "delete_always": InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeDeleteAlways, +} + +// GetInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnumValues Enumerates the set of values for InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum +func GetInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnumValues() []InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum { + values := make([]InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum, 0) + for _, v := range mappingInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum { + values = append(values, v) + } + return values +} + +// GetInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnumStringValues Enumerates the set of values in String for InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum +func GetInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnumStringValues() []string { + return []string{ + "PRESERVE_ALWAYS", + "PRESERVE_ON_TIMEOUT", + "DELETE_ALWAYS", + } +} + +// GetMappingInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum(val string) (InstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnum, bool) { + enum, ok := mappingInstancePoolPreTerminationActionHandleTimeoutDetailsPreserveBootVolumeModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_summary.go new file mode 100644 index 000000000..c3c2c813b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_pool_summary.go @@ -0,0 +1,150 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolSummary Summary information for an instance pool. +type InstancePoolSummary struct { + + // The OCID of the instance pool. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the compartment containing the instance pool. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the instance configuration associated with the instance pool. + InstanceConfigurationId *string `mandatory:"true" json:"instanceConfigurationId"` + + // The current state of the instance pool. + LifecycleState InstancePoolSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The availability domains for the instance pool. + AvailabilityDomains []string `mandatory:"true" json:"availabilityDomains"` + + // The number of instances that should be in the instance pool. + Size *int `mandatory:"true" json:"size"` + + // The date and time the instance pool was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Count of instance in running state associated to the Instance Pool. + CurrentSize *int `mandatory:"false" json:"currentSize"` +} + +func (m InstancePoolSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstancePoolSummaryLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetInstancePoolSummaryLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstancePoolSummaryLifecycleStateEnum Enum with underlying type: string +type InstancePoolSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for InstancePoolSummaryLifecycleStateEnum +const ( + InstancePoolSummaryLifecycleStateProvisioning InstancePoolSummaryLifecycleStateEnum = "PROVISIONING" + InstancePoolSummaryLifecycleStateScaling InstancePoolSummaryLifecycleStateEnum = "SCALING" + InstancePoolSummaryLifecycleStateStarting InstancePoolSummaryLifecycleStateEnum = "STARTING" + InstancePoolSummaryLifecycleStateStopping InstancePoolSummaryLifecycleStateEnum = "STOPPING" + InstancePoolSummaryLifecycleStateTerminating InstancePoolSummaryLifecycleStateEnum = "TERMINATING" + InstancePoolSummaryLifecycleStateStopped InstancePoolSummaryLifecycleStateEnum = "STOPPED" + InstancePoolSummaryLifecycleStateTerminated InstancePoolSummaryLifecycleStateEnum = "TERMINATED" + InstancePoolSummaryLifecycleStateRunning InstancePoolSummaryLifecycleStateEnum = "RUNNING" +) + +var mappingInstancePoolSummaryLifecycleStateEnum = map[string]InstancePoolSummaryLifecycleStateEnum{ + "PROVISIONING": InstancePoolSummaryLifecycleStateProvisioning, + "SCALING": InstancePoolSummaryLifecycleStateScaling, + "STARTING": InstancePoolSummaryLifecycleStateStarting, + "STOPPING": InstancePoolSummaryLifecycleStateStopping, + "TERMINATING": InstancePoolSummaryLifecycleStateTerminating, + "STOPPED": InstancePoolSummaryLifecycleStateStopped, + "TERMINATED": InstancePoolSummaryLifecycleStateTerminated, + "RUNNING": InstancePoolSummaryLifecycleStateRunning, +} + +var mappingInstancePoolSummaryLifecycleStateEnumLowerCase = map[string]InstancePoolSummaryLifecycleStateEnum{ + "provisioning": InstancePoolSummaryLifecycleStateProvisioning, + "scaling": InstancePoolSummaryLifecycleStateScaling, + "starting": InstancePoolSummaryLifecycleStateStarting, + "stopping": InstancePoolSummaryLifecycleStateStopping, + "terminating": InstancePoolSummaryLifecycleStateTerminating, + "stopped": InstancePoolSummaryLifecycleStateStopped, + "terminated": InstancePoolSummaryLifecycleStateTerminated, + "running": InstancePoolSummaryLifecycleStateRunning, +} + +// GetInstancePoolSummaryLifecycleStateEnumValues Enumerates the set of values for InstancePoolSummaryLifecycleStateEnum +func GetInstancePoolSummaryLifecycleStateEnumValues() []InstancePoolSummaryLifecycleStateEnum { + values := make([]InstancePoolSummaryLifecycleStateEnum, 0) + for _, v := range mappingInstancePoolSummaryLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetInstancePoolSummaryLifecycleStateEnumStringValues Enumerates the set of values in String for InstancePoolSummaryLifecycleStateEnum +func GetInstancePoolSummaryLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "SCALING", + "STARTING", + "STOPPING", + "TERMINATING", + "STOPPED", + "TERMINATED", + "RUNNING", + } +} + +// GetMappingInstancePoolSummaryLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstancePoolSummaryLifecycleStateEnum(val string) (InstancePoolSummaryLifecycleStateEnum, bool) { + enum, ok := mappingInstancePoolSummaryLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_power_action_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_power_action_details.go new file mode 100644 index 000000000..db09b2d6e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_power_action_details.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePowerActionDetails A base object for all types of instance power action requests. +type InstancePowerActionDetails interface { +} + +type instancepoweractiondetails struct { + JsonData []byte + ActionType string `json:"actionType"` +} + +// UnmarshalJSON unmarshals json +func (m *instancepoweractiondetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerinstancepoweractiondetails instancepoweractiondetails + s := struct { + Model Unmarshalerinstancepoweractiondetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.ActionType = s.Model.ActionType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *instancepoweractiondetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.ActionType { + case "reset": + mm := ResetActionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "rebootMigrate": + mm := RebootMigrateActionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "softreset": + mm := SoftResetActionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for InstancePowerActionDetails: %s.", m.ActionType) + return *m, nil + } +} + +func (m instancepoweractiondetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m instancepoweractiondetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_reservation_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_reservation_config.go new file mode 100644 index 000000000..599cd8165 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_reservation_config.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceReservationConfig Data that defines the capacity configuration. +type InstanceReservationConfig struct { + + // The shape to use when launching instances using compute capacity reservations. The shape determines the number of CPUs, the amount of memory, + // and other resources allocated to the instance. + // You can list all available shapes by calling ListComputeCapacityReservationInstanceShapes. + InstanceShape *string `mandatory:"true" json:"instanceShape"` + + // The total number of instances that can be launched from the capacity configuration. + ReservedCount *int64 `mandatory:"true" json:"reservedCount"` + + // The amount of capacity in use out of the total capacity reserved in this capacity configuration. + UsedCount *int64 `mandatory:"true" json:"usedCount"` + + // The fault domain of this capacity configuration. + // If a value is not supplied, this capacity configuration is applicable to all fault domains in the specified availability domain. + // For more information, see Capacity Reservations (https://docs.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm). + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + ClusterConfig *ClusterConfigDetails `mandatory:"false" json:"clusterConfig"` + + InstanceShapeConfig *InstanceReservationShapeConfigDetails `mandatory:"false" json:"instanceShapeConfig"` + + // The OCID of the cluster placement group for this instance reservation capacity configuration. + ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` +} + +func (m InstanceReservationConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceReservationConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_reservation_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_reservation_config_details.go new file mode 100644 index 000000000..e3c08ba12 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_reservation_config_details.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceReservationConfigDetails A template that contains the settings to use when defining the instance capacity configuration. +type InstanceReservationConfigDetails struct { + + // The shape requested when launching instances using reserved capacity. + // The shape determines the number of CPUs, amount of memory, + // and other resources allocated to the instance. + // You can list all available shapes by calling ListComputeCapacityReservationInstanceShapes. + InstanceShape *string `mandatory:"true" json:"instanceShape"` + + // The total number of instances that can be launched from the capacity configuration. + ReservedCount *int64 `mandatory:"true" json:"reservedCount"` + + InstanceShapeConfig *InstanceReservationShapeConfigDetails `mandatory:"false" json:"instanceShapeConfig"` + + // The fault domain to use for instances created using this capacity configuration. + // For more information, see Fault Domains (https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm#fault). + // If you do not specify the fault domain, the capacity is available for an instance + // that does not specify a fault domain. To change the fault domain for a reservation, + // delete the reservation and create a new one in the preferred fault domain. + // To retrieve a list of fault domains, use the `ListFaultDomains` operation in + // the Identity and Access Management Service API (https://docs.oracle.com/iaas/api/#/en/identity/20160918/). + // Example: `FAULT-DOMAIN-1` + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + ClusterConfig *ClusterConfigDetails `mandatory:"false" json:"clusterConfig"` + + // The OCID of the cluster placement group for this instance reservation capacity configuration. + ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` +} + +func (m InstanceReservationConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceReservationConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_reservation_shape_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_reservation_shape_config_details.go new file mode 100644 index 000000000..1e4f0916c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_reservation_shape_config_details.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceReservationShapeConfigDetails The shape configuration requested when launching instances in a compute capacity reservation. +// If the parameter is provided, the reservation is created with the resources that you specify. If some +// properties are missing or the parameter is not provided, the reservation is created +// with the default configuration values for the `shape` that you specify. +// Each shape only supports certain configurable values. If the values that you provide are not valid for the +// specified `shape`, an error is returned. +// For more information about customizing the resources that are allocated to flexible shapes, +// see Flexible Shapes (https://docs.oracle.com/iaas/Content/Compute/References/computeshapes.htm#flexible). +type InstanceReservationShapeConfigDetails struct { + + // The total number of OCPUs available to the instance. + Ocpus *float32 `mandatory:"false" json:"ocpus"` + + // The total amount of memory available to the instance, in gigabytes. + MemoryInGBs *float32 `mandatory:"false" json:"memoryInGBs"` + + // This field is reserved for internal use. + ResourceManagement InstanceReservationShapeConfigDetailsResourceManagementEnum `mandatory:"false" json:"resourceManagement,omitempty"` +} + +func (m InstanceReservationShapeConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceReservationShapeConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInstanceReservationShapeConfigDetailsResourceManagementEnum(string(m.ResourceManagement)); !ok && m.ResourceManagement != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceManagement: %s. Supported values are: %s.", m.ResourceManagement, strings.Join(GetInstanceReservationShapeConfigDetailsResourceManagementEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstanceReservationShapeConfigDetailsResourceManagementEnum Enum with underlying type: string +type InstanceReservationShapeConfigDetailsResourceManagementEnum string + +// Set of constants representing the allowable values for InstanceReservationShapeConfigDetailsResourceManagementEnum +const ( + InstanceReservationShapeConfigDetailsResourceManagementDynamic InstanceReservationShapeConfigDetailsResourceManagementEnum = "DYNAMIC" + InstanceReservationShapeConfigDetailsResourceManagementStatic InstanceReservationShapeConfigDetailsResourceManagementEnum = "STATIC" +) + +var mappingInstanceReservationShapeConfigDetailsResourceManagementEnum = map[string]InstanceReservationShapeConfigDetailsResourceManagementEnum{ + "DYNAMIC": InstanceReservationShapeConfigDetailsResourceManagementDynamic, + "STATIC": InstanceReservationShapeConfigDetailsResourceManagementStatic, +} + +var mappingInstanceReservationShapeConfigDetailsResourceManagementEnumLowerCase = map[string]InstanceReservationShapeConfigDetailsResourceManagementEnum{ + "dynamic": InstanceReservationShapeConfigDetailsResourceManagementDynamic, + "static": InstanceReservationShapeConfigDetailsResourceManagementStatic, +} + +// GetInstanceReservationShapeConfigDetailsResourceManagementEnumValues Enumerates the set of values for InstanceReservationShapeConfigDetailsResourceManagementEnum +func GetInstanceReservationShapeConfigDetailsResourceManagementEnumValues() []InstanceReservationShapeConfigDetailsResourceManagementEnum { + values := make([]InstanceReservationShapeConfigDetailsResourceManagementEnum, 0) + for _, v := range mappingInstanceReservationShapeConfigDetailsResourceManagementEnum { + values = append(values, v) + } + return values +} + +// GetInstanceReservationShapeConfigDetailsResourceManagementEnumStringValues Enumerates the set of values in String for InstanceReservationShapeConfigDetailsResourceManagementEnum +func GetInstanceReservationShapeConfigDetailsResourceManagementEnumStringValues() []string { + return []string{ + "DYNAMIC", + "STATIC", + } +} + +// GetMappingInstanceReservationShapeConfigDetailsResourceManagementEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceReservationShapeConfigDetailsResourceManagementEnum(val string) (InstanceReservationShapeConfigDetailsResourceManagementEnum, bool) { + enum, ok := mappingInstanceReservationShapeConfigDetailsResourceManagementEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_shape_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_shape_config.go new file mode 100644 index 000000000..742ecd706 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_shape_config.go @@ -0,0 +1,190 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceShapeConfig The shape configuration for an instance. The shape configuration determines +// the resources allocated to an instance. +type InstanceShapeConfig struct { + + // The total number of OCPUs available to the instance. + Ocpus *float32 `mandatory:"false" json:"ocpus"` + + // The total amount of memory available to the instance, in gigabytes. + MemoryInGBs *float32 `mandatory:"false" json:"memoryInGBs"` + + // The baseline OCPU utilization for a subcore burstable VM instance. Leave this attribute blank for a + // non-burstable instance, or explicitly specify non-burstable with `BASELINE_1_1`. + // The following values are supported: + // - `BASELINE_1_8` - baseline usage is 1/8 of an OCPU. + // - `BASELINE_1_2` - baseline usage is 1/2 of an OCPU. + // - `BASELINE_1_1` - baseline usage is the entire OCPU. This represents a non-burstable instance. + BaselineOcpuUtilization InstanceShapeConfigBaselineOcpuUtilizationEnum `mandatory:"false" json:"baselineOcpuUtilization,omitempty"` + + // A short description of the instance's processor (CPU). + ProcessorDescription *string `mandatory:"false" json:"processorDescription"` + + // The networking bandwidth available to the instance, in gigabits per second. + NetworkingBandwidthInGbps *float32 `mandatory:"false" json:"networkingBandwidthInGbps"` + + // The maximum number of VNIC attachments for the instance. + MaxVnicAttachments *int `mandatory:"false" json:"maxVnicAttachments"` + + // The number of GPUs available to the instance. + Gpus *int `mandatory:"false" json:"gpus"` + + // A short description of the instance's graphics processing unit (GPU). + // If the instance does not have any GPUs, this field is `null`. + GpuDescription *string `mandatory:"false" json:"gpuDescription"` + + // The number of local disks available to the instance. + LocalDisks *int `mandatory:"false" json:"localDisks"` + + // The aggregate size of all local disks, in gigabytes. + // If the instance does not have any local disks, this field is `null`. + LocalDisksTotalSizeInGBs *float32 `mandatory:"false" json:"localDisksTotalSizeInGBs"` + + // A short description of the local disks available to this instance. + // If the instance does not have any local disks, this field is `null`. + LocalDiskDescription *string `mandatory:"false" json:"localDiskDescription"` + + // The total number of VCPUs available to the instance. This can be used instead of OCPUs, + // in which case the actual number of OCPUs will be calculated based on this value + // and the actual hardware. This must be a multiple of 2. + Vcpus *int `mandatory:"false" json:"vcpus"` + + // This field is reserved for internal use. + ResourceManagement InstanceShapeConfigResourceManagementEnum `mandatory:"false" json:"resourceManagement,omitempty"` + + // The NVMe-backed local storage capacity, in GB, for flexible dense (DenseLV) VM shapes. If the shape + // is DenseLV, the value will be greater than 0. For all other shapes, the value will be null. + LocalVolumeSizeInGBs *int `mandatory:"false" json:"localVolumeSizeInGBs"` +} + +func (m InstanceShapeConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceShapeConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInstanceShapeConfigBaselineOcpuUtilizationEnum(string(m.BaselineOcpuUtilization)); !ok && m.BaselineOcpuUtilization != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BaselineOcpuUtilization: %s. Supported values are: %s.", m.BaselineOcpuUtilization, strings.Join(GetInstanceShapeConfigBaselineOcpuUtilizationEnumStringValues(), ","))) + } + if _, ok := GetMappingInstanceShapeConfigResourceManagementEnum(string(m.ResourceManagement)); !ok && m.ResourceManagement != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceManagement: %s. Supported values are: %s.", m.ResourceManagement, strings.Join(GetInstanceShapeConfigResourceManagementEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstanceShapeConfigBaselineOcpuUtilizationEnum Enum with underlying type: string +type InstanceShapeConfigBaselineOcpuUtilizationEnum string + +// Set of constants representing the allowable values for InstanceShapeConfigBaselineOcpuUtilizationEnum +const ( + InstanceShapeConfigBaselineOcpuUtilization8 InstanceShapeConfigBaselineOcpuUtilizationEnum = "BASELINE_1_8" + InstanceShapeConfigBaselineOcpuUtilization2 InstanceShapeConfigBaselineOcpuUtilizationEnum = "BASELINE_1_2" + InstanceShapeConfigBaselineOcpuUtilization1 InstanceShapeConfigBaselineOcpuUtilizationEnum = "BASELINE_1_1" +) + +var mappingInstanceShapeConfigBaselineOcpuUtilizationEnum = map[string]InstanceShapeConfigBaselineOcpuUtilizationEnum{ + "BASELINE_1_8": InstanceShapeConfigBaselineOcpuUtilization8, + "BASELINE_1_2": InstanceShapeConfigBaselineOcpuUtilization2, + "BASELINE_1_1": InstanceShapeConfigBaselineOcpuUtilization1, +} + +var mappingInstanceShapeConfigBaselineOcpuUtilizationEnumLowerCase = map[string]InstanceShapeConfigBaselineOcpuUtilizationEnum{ + "baseline_1_8": InstanceShapeConfigBaselineOcpuUtilization8, + "baseline_1_2": InstanceShapeConfigBaselineOcpuUtilization2, + "baseline_1_1": InstanceShapeConfigBaselineOcpuUtilization1, +} + +// GetInstanceShapeConfigBaselineOcpuUtilizationEnumValues Enumerates the set of values for InstanceShapeConfigBaselineOcpuUtilizationEnum +func GetInstanceShapeConfigBaselineOcpuUtilizationEnumValues() []InstanceShapeConfigBaselineOcpuUtilizationEnum { + values := make([]InstanceShapeConfigBaselineOcpuUtilizationEnum, 0) + for _, v := range mappingInstanceShapeConfigBaselineOcpuUtilizationEnum { + values = append(values, v) + } + return values +} + +// GetInstanceShapeConfigBaselineOcpuUtilizationEnumStringValues Enumerates the set of values in String for InstanceShapeConfigBaselineOcpuUtilizationEnum +func GetInstanceShapeConfigBaselineOcpuUtilizationEnumStringValues() []string { + return []string{ + "BASELINE_1_8", + "BASELINE_1_2", + "BASELINE_1_1", + } +} + +// GetMappingInstanceShapeConfigBaselineOcpuUtilizationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceShapeConfigBaselineOcpuUtilizationEnum(val string) (InstanceShapeConfigBaselineOcpuUtilizationEnum, bool) { + enum, ok := mappingInstanceShapeConfigBaselineOcpuUtilizationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// InstanceShapeConfigResourceManagementEnum Enum with underlying type: string +type InstanceShapeConfigResourceManagementEnum string + +// Set of constants representing the allowable values for InstanceShapeConfigResourceManagementEnum +const ( + InstanceShapeConfigResourceManagementDynamic InstanceShapeConfigResourceManagementEnum = "DYNAMIC" + InstanceShapeConfigResourceManagementStatic InstanceShapeConfigResourceManagementEnum = "STATIC" +) + +var mappingInstanceShapeConfigResourceManagementEnum = map[string]InstanceShapeConfigResourceManagementEnum{ + "DYNAMIC": InstanceShapeConfigResourceManagementDynamic, + "STATIC": InstanceShapeConfigResourceManagementStatic, +} + +var mappingInstanceShapeConfigResourceManagementEnumLowerCase = map[string]InstanceShapeConfigResourceManagementEnum{ + "dynamic": InstanceShapeConfigResourceManagementDynamic, + "static": InstanceShapeConfigResourceManagementStatic, +} + +// GetInstanceShapeConfigResourceManagementEnumValues Enumerates the set of values for InstanceShapeConfigResourceManagementEnum +func GetInstanceShapeConfigResourceManagementEnumValues() []InstanceShapeConfigResourceManagementEnum { + values := make([]InstanceShapeConfigResourceManagementEnum, 0) + for _, v := range mappingInstanceShapeConfigResourceManagementEnum { + values = append(values, v) + } + return values +} + +// GetInstanceShapeConfigResourceManagementEnumStringValues Enumerates the set of values in String for InstanceShapeConfigResourceManagementEnum +func GetInstanceShapeConfigResourceManagementEnumStringValues() []string { + return []string{ + "DYNAMIC", + "STATIC", + } +} + +// GetMappingInstanceShapeConfigResourceManagementEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceShapeConfigResourceManagementEnum(val string) (InstanceShapeConfigResourceManagementEnum, bool) { + enum, ok := mappingInstanceShapeConfigResourceManagementEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_details.go new file mode 100644 index 000000000..0dc6945de --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_details.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceSourceDetails The representation of InstanceSourceDetails +type InstanceSourceDetails interface { +} + +type instancesourcedetails struct { + JsonData []byte + SourceType string `json:"sourceType"` +} + +// UnmarshalJSON unmarshals json +func (m *instancesourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerinstancesourcedetails instancesourcedetails + s := struct { + Model Unmarshalerinstancesourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.SourceType = s.Model.SourceType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *instancesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.SourceType { + case "image": + mm := InstanceSourceViaImageDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "bootVolume": + mm := InstanceSourceViaBootVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for InstanceSourceDetails: %s.", m.SourceType) + return *m, nil + } +} + +func (m instancesourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m instancesourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_image_filter_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_image_filter_details.go new file mode 100644 index 000000000..189efaeef --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_image_filter_details.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceSourceImageFilterDetails These are the criteria for selecting an image. This is required if imageId is not specified. +type InstanceSourceImageFilterDetails struct { + + // The OCID of the compartment containing images to search + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Filter based on these defined tags. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + DefinedTagsFilter map[string]map[string]interface{} `mandatory:"false" json:"definedTagsFilter"` + + // The image's operating system. + // Example: `Oracle Linux` + OperatingSystem *string `mandatory:"false" json:"operatingSystem"` + + // The image's operating system version. + // Example: `7.2` + OperatingSystemVersion *string `mandatory:"false" json:"operatingSystemVersion"` +} + +func (m InstanceSourceImageFilterDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceSourceImageFilterDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_via_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_via_boot_volume_details.go new file mode 100644 index 000000000..8b8661a83 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_via_boot_volume_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceSourceViaBootVolumeDetails The representation of InstanceSourceViaBootVolumeDetails +type InstanceSourceViaBootVolumeDetails struct { + + // The OCID of the boot volume used to boot the instance. + BootVolumeId *string `mandatory:"true" json:"bootVolumeId"` +} + +func (m InstanceSourceViaBootVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceSourceViaBootVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceSourceViaBootVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceSourceViaBootVolumeDetails InstanceSourceViaBootVolumeDetails + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeInstanceSourceViaBootVolumeDetails + }{ + "bootVolume", + (MarshalTypeInstanceSourceViaBootVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_via_image_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_via_image_details.go new file mode 100644 index 000000000..13e30bb98 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_source_via_image_details.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceSourceViaImageDetails The representation of InstanceSourceViaImageDetails +type InstanceSourceViaImageDetails struct { + + // The size of the boot volume in GBs. Minimum value is 50 GB and maximum value is 32,768 GB (32 TB). + BootVolumeSizeInGBs *int64 `mandatory:"false" json:"bootVolumeSizeInGBs"` + + // The OCID of the image used to boot the instance. + ImageId *string `mandatory:"false" json:"imageId"` + + // The OCID of the Vault service key to assign as the master encryption key for the boot volume. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // The number of volume performance units (VPUs) that will be applied to this volume per GB, + // representing the Block Volume service's elastic performance options. + // See Block Volume Performance Levels (https://docs.oracle.com/iaas/Content/Block/Concepts/blockvolumeperformance.htm#perf_levels) for more information. + // Allowed values: + // * `10`: Represents Balanced option. + // * `20`: Represents Higher Performance option. + // * `30`-`120`: Represents the Ultra High Performance option. + // For volumes with the auto-tuned performance feature enabled, this is set to the default (minimum) VPUs/GB. + BootVolumeVpusPerGB *int64 `mandatory:"false" json:"bootVolumeVpusPerGB"` + + InstanceSourceImageFilterDetails *InstanceSourceImageFilterDetails `mandatory:"false" json:"instanceSourceImageFilterDetails"` +} + +func (m InstanceSourceViaImageDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceSourceViaImageDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceSourceViaImageDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceSourceViaImageDetails InstanceSourceViaImageDetails + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeInstanceSourceViaImageDetails + }{ + "image", + (MarshalTypeInstanceSourceViaImageDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_summary.go new file mode 100644 index 000000000..65db47dc4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/instance_summary.go @@ -0,0 +1,79 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceSummary Condensed instance data when listing instances in an instance pool. +type InstanceSummary struct { + + // The OCID of the instance. + Id *string `mandatory:"true" json:"id"` + + // The availability domain the instance is running in. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the instance. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the instance confgiuration used to create the instance. + InstanceConfigurationId *string `mandatory:"true" json:"instanceConfigurationId"` + + // The region that contains the availability domain the instance is running in. + Region *string `mandatory:"true" json:"region"` + + // The current state of the instance pool instance. + State *string `mandatory:"true" json:"state"` + + // The date and time the instance pool instance was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The fault domain the instance is running in. + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + // The shape of an instance. The shape determines the number of CPUs, amount of memory, + // and other resources allocated to the instance. + // You can enumerate all available shapes by calling ListShapes. + Shape *string `mandatory:"false" json:"shape"` + + // The load balancer backends that are configured for the instance pool instance. + LoadBalancerBackends []InstancePoolInstanceLoadBalancerBackend `mandatory:"false" json:"loadBalancerBackends"` +} + +func (m InstanceSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_icelake_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_icelake_bm_launch_instance_platform_config.go new file mode 100644 index 000000000..a9fa2db29 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_icelake_bm_launch_instance_platform_config.go @@ -0,0 +1,160 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IntelIcelakeBmLaunchInstancePlatformConfig The platform configuration used when launching a bare metal instance with the BM.Standard3.64 shape +// or the BM.Optimized3.36 shape (the Intel Ice Lake platform). +type IntelIcelakeBmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m IntelIcelakeBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m IntelIcelakeBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m IntelIcelakeBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m IntelIcelakeBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m IntelIcelakeBmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IntelIcelakeBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m IntelIcelakeBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeIntelIcelakeBmLaunchInstancePlatformConfig IntelIcelakeBmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeIntelIcelakeBmLaunchInstancePlatformConfig + }{ + "INTEL_ICELAKE_BM", + (MarshalTypeIntelIcelakeBmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" +) + +var mappingIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS1": IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +var mappingIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps1": IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +// GetIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS1", + "NPS2", + } +} + +// GetMappingIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_icelake_bm_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_icelake_bm_platform_config.go new file mode 100644 index 000000000..fb01ed632 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_icelake_bm_platform_config.go @@ -0,0 +1,160 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IntelIcelakeBmPlatformConfig The platform configuration of a bare metal instance that uses the BM.Standard3.64 shape or the +// BM.Optimized3.36 shape (the Intel Ice Lake platform). +type IntelIcelakeBmPlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m IntelIcelakeBmPlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m IntelIcelakeBmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m IntelIcelakeBmPlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m IntelIcelakeBmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m IntelIcelakeBmPlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IntelIcelakeBmPlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingIntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetIntelIcelakeBmPlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m IntelIcelakeBmPlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeIntelIcelakeBmPlatformConfig IntelIcelakeBmPlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeIntelIcelakeBmPlatformConfig + }{ + "INTEL_ICELAKE_BM", + (MarshalTypeIntelIcelakeBmPlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum +const ( + IntelIcelakeBmPlatformConfigNumaNodesPerSocketNps1 IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum = "NPS1" + IntelIcelakeBmPlatformConfigNumaNodesPerSocketNps2 IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum = "NPS2" +) + +var mappingIntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum = map[string]IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum{ + "NPS1": IntelIcelakeBmPlatformConfigNumaNodesPerSocketNps1, + "NPS2": IntelIcelakeBmPlatformConfigNumaNodesPerSocketNps2, +} + +var mappingIntelIcelakeBmPlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum{ + "nps1": IntelIcelakeBmPlatformConfigNumaNodesPerSocketNps1, + "nps2": IntelIcelakeBmPlatformConfigNumaNodesPerSocketNps2, +} + +// GetIntelIcelakeBmPlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum +func GetIntelIcelakeBmPlatformConfigNumaNodesPerSocketEnumValues() []IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum { + values := make([]IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingIntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetIntelIcelakeBmPlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum +func GetIntelIcelakeBmPlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS1", + "NPS2", + } +} + +// GetMappingIntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum(val string) (IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingIntelIcelakeBmPlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_skylake_bm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_skylake_bm_launch_instance_platform_config.go new file mode 100644 index 000000000..e73de4a62 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_skylake_bm_launch_instance_platform_config.go @@ -0,0 +1,160 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IntelSkylakeBmLaunchInstancePlatformConfig The platform configuration used when launching a bare metal instance with an Intel X7-based processor +// (the Intel Skylake platform). +type IntelSkylakeBmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m IntelSkylakeBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m IntelSkylakeBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m IntelSkylakeBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m IntelSkylakeBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m IntelSkylakeBmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IntelSkylakeBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m IntelSkylakeBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeIntelSkylakeBmLaunchInstancePlatformConfig IntelSkylakeBmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeIntelSkylakeBmLaunchInstancePlatformConfig + }{ + "INTEL_SKYLAKE_BM", + (MarshalTypeIntelSkylakeBmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" +) + +var mappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS1": IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +var mappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps1": IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +// GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS1", + "NPS2", + } +} + +// GetMappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_skylake_bm_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_skylake_bm_platform_config.go new file mode 100644 index 000000000..65f51f663 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_skylake_bm_platform_config.go @@ -0,0 +1,160 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IntelSkylakeBmPlatformConfig The platform configuration of a bare metal instance that uses one of the following shapes: +// BM.Standard2.52, BM.GPU2.2, BM.GPU3.8, or BM.DenseIO2.52 (the Intel Skylake platform). +type IntelSkylakeBmPlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m IntelSkylakeBmPlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m IntelSkylakeBmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m IntelSkylakeBmPlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m IntelSkylakeBmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m IntelSkylakeBmPlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IntelSkylakeBmPlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m IntelSkylakeBmPlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeIntelSkylakeBmPlatformConfig IntelSkylakeBmPlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeIntelSkylakeBmPlatformConfig + }{ + "INTEL_SKYLAKE_BM", + (MarshalTypeIntelSkylakeBmPlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum +const ( + IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps1 IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum = "NPS1" + IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps2 IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum = "NPS2" +) + +var mappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum = map[string]IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum{ + "NPS1": IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps1, + "NPS2": IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps2, +} + +var mappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum{ + "nps1": IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps1, + "nps2": IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps2, +} + +// GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum +func GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumValues() []IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum { + values := make([]IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum +func GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS1", + "NPS2", + } +} + +// GetMappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum(val string) (IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_launch_instance_platform_config.go new file mode 100644 index 000000000..2bac92a3c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_launch_instance_platform_config.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IntelVmLaunchInstancePlatformConfig The platform configuration used when launching a virtual machine instance with the Intel platform. +type IntelVmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m IntelVmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m IntelVmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m IntelVmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m IntelVmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m IntelVmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IntelVmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m IntelVmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeIntelVmLaunchInstancePlatformConfig IntelVmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeIntelVmLaunchInstancePlatformConfig + }{ + "INTEL_VM", + (MarshalTypeIntelVmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_platform_config.go new file mode 100644 index 000000000..93b9b8ac6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_platform_config.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IntelVmPlatformConfig The platform configuration of a virtual machine instance that uses the Intel platform. +type IntelVmPlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m IntelVmPlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m IntelVmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m IntelVmPlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m IntelVmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m IntelVmPlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IntelVmPlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m IntelVmPlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeIntelVmPlatformConfig IntelVmPlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeIntelVmPlatformConfig + }{ + "INTEL_VM", + (MarshalTypeIntelVmPlatformConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_update_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_update_instance_platform_config.go new file mode 100644 index 000000000..f738556f0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_update_instance_platform_config.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IntelVmUpdateInstancePlatformConfig The platform configuration used when updating a virtual machine instance with the Intel platform. +type IntelVmUpdateInstancePlatformConfig struct { + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` +} + +func (m IntelVmUpdateInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IntelVmUpdateInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m IntelVmUpdateInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeIntelVmUpdateInstancePlatformConfig IntelVmUpdateInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeIntelVmUpdateInstancePlatformConfig + }{ + "INTEL_VM", + (MarshalTypeIntelVmUpdateInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/internet_gateway.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/internet_gateway.go new file mode 100644 index 000000000..bae352d53 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/internet_gateway.go @@ -0,0 +1,137 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InternetGateway Represents a router that connects the edge of a VCN with the Internet. For an example scenario +// that uses an internet gateway, see +// Typical Networking Service Scenarios (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm#scenarios). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type InternetGateway struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the internet gateway. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The internet gateway's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // The internet gateway's current state. + LifecycleState InternetGatewayLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN the Internet Gateway belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Whether the gateway is enabled. When the gateway is disabled, traffic is not + // routed to/from the Internet, regardless of route rules. + IsEnabled *bool `mandatory:"false" json:"isEnabled"` + + // The date and time the internet gateway was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the Internet Gateway is using. + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m InternetGateway) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InternetGateway) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInternetGatewayLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetInternetGatewayLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InternetGatewayLifecycleStateEnum Enum with underlying type: string +type InternetGatewayLifecycleStateEnum string + +// Set of constants representing the allowable values for InternetGatewayLifecycleStateEnum +const ( + InternetGatewayLifecycleStateProvisioning InternetGatewayLifecycleStateEnum = "PROVISIONING" + InternetGatewayLifecycleStateAvailable InternetGatewayLifecycleStateEnum = "AVAILABLE" + InternetGatewayLifecycleStateTerminating InternetGatewayLifecycleStateEnum = "TERMINATING" + InternetGatewayLifecycleStateTerminated InternetGatewayLifecycleStateEnum = "TERMINATED" +) + +var mappingInternetGatewayLifecycleStateEnum = map[string]InternetGatewayLifecycleStateEnum{ + "PROVISIONING": InternetGatewayLifecycleStateProvisioning, + "AVAILABLE": InternetGatewayLifecycleStateAvailable, + "TERMINATING": InternetGatewayLifecycleStateTerminating, + "TERMINATED": InternetGatewayLifecycleStateTerminated, +} + +var mappingInternetGatewayLifecycleStateEnumLowerCase = map[string]InternetGatewayLifecycleStateEnum{ + "provisioning": InternetGatewayLifecycleStateProvisioning, + "available": InternetGatewayLifecycleStateAvailable, + "terminating": InternetGatewayLifecycleStateTerminating, + "terminated": InternetGatewayLifecycleStateTerminated, +} + +// GetInternetGatewayLifecycleStateEnumValues Enumerates the set of values for InternetGatewayLifecycleStateEnum +func GetInternetGatewayLifecycleStateEnumValues() []InternetGatewayLifecycleStateEnum { + values := make([]InternetGatewayLifecycleStateEnum, 0) + for _, v := range mappingInternetGatewayLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetInternetGatewayLifecycleStateEnumStringValues Enumerates the set of values in String for InternetGatewayLifecycleStateEnum +func GetInternetGatewayLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingInternetGatewayLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInternetGatewayLifecycleStateEnum(val string) (InternetGatewayLifecycleStateEnum, bool) { + enum, ok := mappingInternetGatewayLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_ip_address_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_ip_address_summary.go new file mode 100644 index 000000000..e44a1f68d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_ip_address_summary.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InventoryIpAddressSummary Provides the IP address and its corresponding VNIC ID, VNIC name, and DNS hostname. +type InventoryIpAddressSummary struct { + + // The IP address assigned from a subnet. + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC. + VnicId *string `mandatory:"false" json:"vnicId"` + + // The name of the VNIC. + VnicName *string `mandatory:"false" json:"vnicName"` + + // The DNS hostname of the resource assigned with the IP address. + DnsHostName *string `mandatory:"false" json:"dnsHostName"` +} + +func (m InventoryIpAddressSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InventoryIpAddressSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_resource_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_resource_summary.go new file mode 100644 index 000000000..9324b7a36 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_resource_summary.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InventoryResourceSummary Lists resources and its properties under a given subnet. +type InventoryResourceSummary struct { + + // The name of the resource created. + ResourceName *string `mandatory:"false" json:"resourceName"` + + // Resource types of the resource. + ResourceType InventoryResourceSummaryResourceTypeEnum `mandatory:"false" json:"resourceType,omitempty"` + + // Mac Address of IP Resource + MacAddress *string `mandatory:"false" json:"macAddress"` + + // Lists the 'IpAddressCollection' object. + IpAddressCollection []InventoryIpAddressSummary `mandatory:"false" json:"ipAddressCollection"` + + // The region name of the corresponding resource. + Region *string `mandatory:"false" json:"region"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` +} + +func (m InventoryResourceSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InventoryResourceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInventoryResourceSummaryResourceTypeEnum(string(m.ResourceType)); !ok && m.ResourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceType: %s. Supported values are: %s.", m.ResourceType, strings.Join(GetInventoryResourceSummaryResourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InventoryResourceSummaryResourceTypeEnum Enum with underlying type: string +type InventoryResourceSummaryResourceTypeEnum string + +// Set of constants representing the allowable values for InventoryResourceSummaryResourceTypeEnum +const ( + InventoryResourceSummaryResourceTypeResource InventoryResourceSummaryResourceTypeEnum = "Resource" +) + +var mappingInventoryResourceSummaryResourceTypeEnum = map[string]InventoryResourceSummaryResourceTypeEnum{ + "Resource": InventoryResourceSummaryResourceTypeResource, +} + +var mappingInventoryResourceSummaryResourceTypeEnumLowerCase = map[string]InventoryResourceSummaryResourceTypeEnum{ + "resource": InventoryResourceSummaryResourceTypeResource, +} + +// GetInventoryResourceSummaryResourceTypeEnumValues Enumerates the set of values for InventoryResourceSummaryResourceTypeEnum +func GetInventoryResourceSummaryResourceTypeEnumValues() []InventoryResourceSummaryResourceTypeEnum { + values := make([]InventoryResourceSummaryResourceTypeEnum, 0) + for _, v := range mappingInventoryResourceSummaryResourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetInventoryResourceSummaryResourceTypeEnumStringValues Enumerates the set of values in String for InventoryResourceSummaryResourceTypeEnum +func GetInventoryResourceSummaryResourceTypeEnumStringValues() []string { + return []string{ + "Resource", + } +} + +// GetMappingInventoryResourceSummaryResourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInventoryResourceSummaryResourceTypeEnum(val string) (InventoryResourceSummaryResourceTypeEnum, bool) { + enum, ok := mappingInventoryResourceSummaryResourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_subnet_cidr_block_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_subnet_cidr_block_summary.go new file mode 100644 index 000000000..0d7f7bb0d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_subnet_cidr_block_summary.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InventorySubnetCidrBlockSummary Lists CIDRs and utilization within a subnet. +type InventorySubnetCidrBlockSummary struct { + + // The CIDR Prefix within a VCN. + IpCidrBlock *string `mandatory:"false" json:"ipCidrBlock"` + + // The CIDR utilization of a VCN. + Utilization *float32 `mandatory:"false" json:"utilization"` +} + +func (m InventorySubnetCidrBlockSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InventorySubnetCidrBlockSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_subnet_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_subnet_summary.go new file mode 100644 index 000000000..4fed05f34 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_subnet_summary.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InventorySubnetSummary Lists subnet and its associated resources. +type InventorySubnetSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // Name of the subnet within a VCN. + SubnetName *string `mandatory:"false" json:"subnetName"` + + // Resource types of the subnet. + ResourceType InventorySubnetSummaryResourceTypeEnum `mandatory:"false" json:"resourceType,omitempty"` + + // Lists CIDRs and utilization within the subnet. + InventorySubnetCidrCollection []InventorySubnetCidrBlockSummary `mandatory:"false" json:"inventorySubnetCidrCollection"` + + // DNS domain name of the subnet. + DnsDomainName *string `mandatory:"false" json:"dnsDomainName"` + + // Region name of the subnet. + Region *string `mandatory:"false" json:"region"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Lists the `ResourceCollection` object. + InventoryResourceSummary []InventoryResourceSummary `mandatory:"false" json:"inventoryResourceSummary"` +} + +func (m InventorySubnetSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InventorySubnetSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInventorySubnetSummaryResourceTypeEnum(string(m.ResourceType)); !ok && m.ResourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceType: %s. Supported values are: %s.", m.ResourceType, strings.Join(GetInventorySubnetSummaryResourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InventorySubnetSummaryResourceTypeEnum Enum with underlying type: string +type InventorySubnetSummaryResourceTypeEnum string + +// Set of constants representing the allowable values for InventorySubnetSummaryResourceTypeEnum +const ( + InventorySubnetSummaryResourceTypeSubnet InventorySubnetSummaryResourceTypeEnum = "Subnet" +) + +var mappingInventorySubnetSummaryResourceTypeEnum = map[string]InventorySubnetSummaryResourceTypeEnum{ + "Subnet": InventorySubnetSummaryResourceTypeSubnet, +} + +var mappingInventorySubnetSummaryResourceTypeEnumLowerCase = map[string]InventorySubnetSummaryResourceTypeEnum{ + "subnet": InventorySubnetSummaryResourceTypeSubnet, +} + +// GetInventorySubnetSummaryResourceTypeEnumValues Enumerates the set of values for InventorySubnetSummaryResourceTypeEnum +func GetInventorySubnetSummaryResourceTypeEnumValues() []InventorySubnetSummaryResourceTypeEnum { + values := make([]InventorySubnetSummaryResourceTypeEnum, 0) + for _, v := range mappingInventorySubnetSummaryResourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetInventorySubnetSummaryResourceTypeEnumStringValues Enumerates the set of values in String for InventorySubnetSummaryResourceTypeEnum +func GetInventorySubnetSummaryResourceTypeEnumStringValues() []string { + return []string{ + "Subnet", + } +} + +// GetMappingInventorySubnetSummaryResourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInventorySubnetSummaryResourceTypeEnum(val string) (InventorySubnetSummaryResourceTypeEnum, bool) { + enum, ok := mappingInventorySubnetSummaryResourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_vcn_cidr_block_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_vcn_cidr_block_summary.go new file mode 100644 index 000000000..5f5558257 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_vcn_cidr_block_summary.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InventoryVcnCidrBlockSummary Lists the CIDRs and utilization within a VCN. +type InventoryVcnCidrBlockSummary struct { + + // The CIDR prefix within a VCN. + IpCidrBlock *string `mandatory:"false" json:"ipCidrBlock"` + + // The CIDR utilization of a VCN. + Utilization *float32 `mandatory:"false" json:"utilization"` +} + +func (m InventoryVcnCidrBlockSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InventoryVcnCidrBlockSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_vcn_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_vcn_summary.go new file mode 100644 index 000000000..a76b4be5c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_vcn_summary.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InventoryVcnSummary Provides the summary of a VCN's IP Inventory data under specified compartments. +type InventoryVcnSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN . + VcnId *string `mandatory:"false" json:"vcnId"` + + // Name of the VCN. + VcnName *string `mandatory:"false" json:"vcnName"` + + // Resource types of the VCN. + ResourceType InventoryVcnSummaryResourceTypeEnum `mandatory:"false" json:"resourceType,omitempty"` + + // Lists `InventoryVcnCidrBlockSummary` objects. + InventoryVcnCidrBlockCollection []InventoryVcnCidrBlockSummary `mandatory:"false" json:"inventoryVcnCidrBlockCollection"` + + // DNS domain name of the VCN. + DnsDomainName *string `mandatory:"false" json:"dnsDomainName"` + + // Region name of the VCN. + Region *string `mandatory:"false" json:"region"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Lists `Subnetcollection` objects + InventorySubnetcollection []InventorySubnetSummary `mandatory:"false" json:"inventorySubnetcollection"` +} + +func (m InventoryVcnSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InventoryVcnSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInventoryVcnSummaryResourceTypeEnum(string(m.ResourceType)); !ok && m.ResourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceType: %s. Supported values are: %s.", m.ResourceType, strings.Join(GetInventoryVcnSummaryResourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InventoryVcnSummaryResourceTypeEnum Enum with underlying type: string +type InventoryVcnSummaryResourceTypeEnum string + +// Set of constants representing the allowable values for InventoryVcnSummaryResourceTypeEnum +const ( + InventoryVcnSummaryResourceTypeVcn InventoryVcnSummaryResourceTypeEnum = "VCN" +) + +var mappingInventoryVcnSummaryResourceTypeEnum = map[string]InventoryVcnSummaryResourceTypeEnum{ + "VCN": InventoryVcnSummaryResourceTypeVcn, +} + +var mappingInventoryVcnSummaryResourceTypeEnumLowerCase = map[string]InventoryVcnSummaryResourceTypeEnum{ + "vcn": InventoryVcnSummaryResourceTypeVcn, +} + +// GetInventoryVcnSummaryResourceTypeEnumValues Enumerates the set of values for InventoryVcnSummaryResourceTypeEnum +func GetInventoryVcnSummaryResourceTypeEnumValues() []InventoryVcnSummaryResourceTypeEnum { + values := make([]InventoryVcnSummaryResourceTypeEnum, 0) + for _, v := range mappingInventoryVcnSummaryResourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetInventoryVcnSummaryResourceTypeEnumStringValues Enumerates the set of values in String for InventoryVcnSummaryResourceTypeEnum +func GetInventoryVcnSummaryResourceTypeEnumStringValues() []string { + return []string{ + "VCN", + } +} + +// GetMappingInventoryVcnSummaryResourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInventoryVcnSummaryResourceTypeEnum(val string) (InventoryVcnSummaryResourceTypeEnum, bool) { + enum, ok := mappingInventoryVcnSummaryResourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_cidr_utilization_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_cidr_utilization_collection.go new file mode 100644 index 000000000..ad65ff61b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_cidr_utilization_collection.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpInventoryCidrUtilizationCollection The IP Inventory CIDR utilization details of a subnet. +type IpInventoryCidrUtilizationCollection struct { + + // Specifies the count for the number of results for the response. + Count *int `mandatory:"false" json:"count"` + + // The Timestamp of the latest update from the database in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + LastUpdatedTimestamp *common.SDKTime `mandatory:"false" json:"lastUpdatedTimestamp"` + + // Lists 'IpInventoryCidrUtilizationSummary` object. + IpInventoryCidrUtilizationSummary []IpInventoryCidrUtilizationSummary `mandatory:"false" json:"ipInventoryCidrUtilizationSummary"` + + // Indicates the status of the data. + Message *string `mandatory:"false" json:"message"` + + // Compartment of the subnet. + CompartmentId *string `mandatory:"false" json:"compartmentId"` +} + +func (m IpInventoryCidrUtilizationCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpInventoryCidrUtilizationCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_cidr_utilization_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_cidr_utilization_summary.go new file mode 100644 index 000000000..62727fa2f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_cidr_utilization_summary.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpInventoryCidrUtilizationSummary The CIDR utilization details of a subnet. +type IpInventoryCidrUtilizationSummary struct { + + // The CIDR range of a subnet. + Cidr *string `mandatory:"false" json:"cidr"` + + // The CIDR utilisation of a subnet. + Utilization *float32 `mandatory:"false" json:"utilization"` + + // Address type of the CIDR within a subnet. + AddressType *string `mandatory:"false" json:"addressType"` +} + +func (m IpInventoryCidrUtilizationSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpInventoryCidrUtilizationSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_collection.go new file mode 100644 index 000000000..cdcebfb7f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_collection.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpInventoryCollection The results returned by a `ListIpInventory` operation. +type IpInventoryCollection struct { + + // Species the count for the number of results for the response. + Count *int `mandatory:"false" json:"count"` + + // The timestamp of the latest update from the database in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + LastUpdatedTimestamp *common.SDKTime `mandatory:"false" json:"lastUpdatedTimestamp"` + + // The number of compartments per compartments per tenant. + CompartmentsPerTenant *int64 `mandatory:"false" json:"compartmentsPerTenant"` + + // Lists `IpInventoryVcnSummary` objects. + InventoryVcnCollection []InventoryVcnSummary `mandatory:"false" json:"inventoryVcnCollection"` + + // Indicates the status of the data. + Message *string `mandatory:"false" json:"message"` +} + +func (m IpInventoryCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpInventoryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_subnet_resource_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_subnet_resource_collection.go new file mode 100644 index 000000000..a15e5f199 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_subnet_resource_collection.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpInventorySubnetResourceCollection The results returned by a `ListIpInventorySubnet` operation. +type IpInventorySubnetResourceCollection struct { + + // Specifies the count for the number of results for the response. + Count *int `mandatory:"false" json:"count"` + + // The Timestamp of the latest update from the database in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + LastUpdatedTimestamp *common.SDKTime `mandatory:"false" json:"lastUpdatedTimestamp"` + + // Lists `SubnetResourceSummary` objects. + IpInventorySubnetResourceSummary []IpInventorySubnetResourceSummary `mandatory:"false" json:"ipInventorySubnetResourceSummary"` + + // Indicates the status of the data. + Message *string `mandatory:"false" json:"message"` + + // The compartment of the subnet. + CompartmentId *string `mandatory:"false" json:"compartmentId"` +} + +func (m IpInventorySubnetResourceCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpInventorySubnetResourceCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_subnet_resource_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_subnet_resource_summary.go new file mode 100644 index 000000000..343935032 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_subnet_resource_summary.go @@ -0,0 +1,257 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpInventorySubnetResourceSummary Provides the IP Inventory details of a subnet and its associated resources. +type IpInventorySubnetResourceSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IP address. + IpId *string `mandatory:"false" json:"ipId"` + + // Lists the allocated private IP address. + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // Lifetime of the allocated private IP address. + IpAddressLifetime IpInventorySubnetResourceSummaryIpAddressLifetimeEnum `mandatory:"false" json:"ipAddressLifetime,omitempty"` + + // The address range the IP address is assigned from. + ParentCidr *string `mandatory:"false" json:"parentCidr"` + + // Associated public IP address for the private IP address. + AssociatedPublicIp *string `mandatory:"false" json:"associatedPublicIp"` + + // Lifetime of the assigned public IP address. + PublicIpLifetime IpInventorySubnetResourceSummaryPublicIpLifetimeEnum `mandatory:"false" json:"publicIpLifetime,omitempty"` + + // Public IP address Pool the IP address is allocated from. + AssociatedPublicIpPool IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum `mandatory:"false" json:"associatedPublicIpPool,omitempty"` + + // DNS hostname of the IP address. + DnsHostName *string `mandatory:"false" json:"dnsHostName"` + + // Name of the created resource. + AssignedResourceName *string `mandatory:"false" json:"assignedResourceName"` + + // Primary flag for IP Resource + IsPrimary *bool `mandatory:"false" json:"isPrimary"` + + // Type of the resource. + AssignedResourceType IpInventorySubnetResourceSummaryAssignedResourceTypeEnum `mandatory:"false" json:"assignedResourceType,omitempty"` + + // Address type of the allocated private IP address. + AddressType *string `mandatory:"false" json:"addressType"` + + // Assigned time of the private IP address. + AssignedTime *common.SDKTime `mandatory:"false" json:"assignedTime"` +} + +func (m IpInventorySubnetResourceSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpInventorySubnetResourceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingIpInventorySubnetResourceSummaryIpAddressLifetimeEnum(string(m.IpAddressLifetime)); !ok && m.IpAddressLifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IpAddressLifetime: %s. Supported values are: %s.", m.IpAddressLifetime, strings.Join(GetIpInventorySubnetResourceSummaryIpAddressLifetimeEnumStringValues(), ","))) + } + if _, ok := GetMappingIpInventorySubnetResourceSummaryPublicIpLifetimeEnum(string(m.PublicIpLifetime)); !ok && m.PublicIpLifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PublicIpLifetime: %s. Supported values are: %s.", m.PublicIpLifetime, strings.Join(GetIpInventorySubnetResourceSummaryPublicIpLifetimeEnumStringValues(), ","))) + } + if _, ok := GetMappingIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum(string(m.AssociatedPublicIpPool)); !ok && m.AssociatedPublicIpPool != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AssociatedPublicIpPool: %s. Supported values are: %s.", m.AssociatedPublicIpPool, strings.Join(GetIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnumStringValues(), ","))) + } + if _, ok := GetMappingIpInventorySubnetResourceSummaryAssignedResourceTypeEnum(string(m.AssignedResourceType)); !ok && m.AssignedResourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AssignedResourceType: %s. Supported values are: %s.", m.AssignedResourceType, strings.Join(GetIpInventorySubnetResourceSummaryAssignedResourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// IpInventorySubnetResourceSummaryIpAddressLifetimeEnum Enum with underlying type: string +type IpInventorySubnetResourceSummaryIpAddressLifetimeEnum string + +// Set of constants representing the allowable values for IpInventorySubnetResourceSummaryIpAddressLifetimeEnum +const ( + IpInventorySubnetResourceSummaryIpAddressLifetimeEphemeral IpInventorySubnetResourceSummaryIpAddressLifetimeEnum = "Ephemeral" + IpInventorySubnetResourceSummaryIpAddressLifetimeReserved IpInventorySubnetResourceSummaryIpAddressLifetimeEnum = "Reserved" +) + +var mappingIpInventorySubnetResourceSummaryIpAddressLifetimeEnum = map[string]IpInventorySubnetResourceSummaryIpAddressLifetimeEnum{ + "Ephemeral": IpInventorySubnetResourceSummaryIpAddressLifetimeEphemeral, + "Reserved": IpInventorySubnetResourceSummaryIpAddressLifetimeReserved, +} + +var mappingIpInventorySubnetResourceSummaryIpAddressLifetimeEnumLowerCase = map[string]IpInventorySubnetResourceSummaryIpAddressLifetimeEnum{ + "ephemeral": IpInventorySubnetResourceSummaryIpAddressLifetimeEphemeral, + "reserved": IpInventorySubnetResourceSummaryIpAddressLifetimeReserved, +} + +// GetIpInventorySubnetResourceSummaryIpAddressLifetimeEnumValues Enumerates the set of values for IpInventorySubnetResourceSummaryIpAddressLifetimeEnum +func GetIpInventorySubnetResourceSummaryIpAddressLifetimeEnumValues() []IpInventorySubnetResourceSummaryIpAddressLifetimeEnum { + values := make([]IpInventorySubnetResourceSummaryIpAddressLifetimeEnum, 0) + for _, v := range mappingIpInventorySubnetResourceSummaryIpAddressLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetIpInventorySubnetResourceSummaryIpAddressLifetimeEnumStringValues Enumerates the set of values in String for IpInventorySubnetResourceSummaryIpAddressLifetimeEnum +func GetIpInventorySubnetResourceSummaryIpAddressLifetimeEnumStringValues() []string { + return []string{ + "Ephemeral", + "Reserved", + } +} + +// GetMappingIpInventorySubnetResourceSummaryIpAddressLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpInventorySubnetResourceSummaryIpAddressLifetimeEnum(val string) (IpInventorySubnetResourceSummaryIpAddressLifetimeEnum, bool) { + enum, ok := mappingIpInventorySubnetResourceSummaryIpAddressLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// IpInventorySubnetResourceSummaryPublicIpLifetimeEnum Enum with underlying type: string +type IpInventorySubnetResourceSummaryPublicIpLifetimeEnum string + +// Set of constants representing the allowable values for IpInventorySubnetResourceSummaryPublicIpLifetimeEnum +const ( + IpInventorySubnetResourceSummaryPublicIpLifetimeEphemeral IpInventorySubnetResourceSummaryPublicIpLifetimeEnum = "Ephemeral" + IpInventorySubnetResourceSummaryPublicIpLifetimeReserved IpInventorySubnetResourceSummaryPublicIpLifetimeEnum = "Reserved" +) + +var mappingIpInventorySubnetResourceSummaryPublicIpLifetimeEnum = map[string]IpInventorySubnetResourceSummaryPublicIpLifetimeEnum{ + "Ephemeral": IpInventorySubnetResourceSummaryPublicIpLifetimeEphemeral, + "Reserved": IpInventorySubnetResourceSummaryPublicIpLifetimeReserved, +} + +var mappingIpInventorySubnetResourceSummaryPublicIpLifetimeEnumLowerCase = map[string]IpInventorySubnetResourceSummaryPublicIpLifetimeEnum{ + "ephemeral": IpInventorySubnetResourceSummaryPublicIpLifetimeEphemeral, + "reserved": IpInventorySubnetResourceSummaryPublicIpLifetimeReserved, +} + +// GetIpInventorySubnetResourceSummaryPublicIpLifetimeEnumValues Enumerates the set of values for IpInventorySubnetResourceSummaryPublicIpLifetimeEnum +func GetIpInventorySubnetResourceSummaryPublicIpLifetimeEnumValues() []IpInventorySubnetResourceSummaryPublicIpLifetimeEnum { + values := make([]IpInventorySubnetResourceSummaryPublicIpLifetimeEnum, 0) + for _, v := range mappingIpInventorySubnetResourceSummaryPublicIpLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetIpInventorySubnetResourceSummaryPublicIpLifetimeEnumStringValues Enumerates the set of values in String for IpInventorySubnetResourceSummaryPublicIpLifetimeEnum +func GetIpInventorySubnetResourceSummaryPublicIpLifetimeEnumStringValues() []string { + return []string{ + "Ephemeral", + "Reserved", + } +} + +// GetMappingIpInventorySubnetResourceSummaryPublicIpLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpInventorySubnetResourceSummaryPublicIpLifetimeEnum(val string) (IpInventorySubnetResourceSummaryPublicIpLifetimeEnum, bool) { + enum, ok := mappingIpInventorySubnetResourceSummaryPublicIpLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum Enum with underlying type: string +type IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum string + +// Set of constants representing the allowable values for IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum +const ( + IpInventorySubnetResourceSummaryAssociatedPublicIpPoolOracle IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum = "ORACLE" + IpInventorySubnetResourceSummaryAssociatedPublicIpPoolByoip IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum = "BYOIP" +) + +var mappingIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum = map[string]IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum{ + "ORACLE": IpInventorySubnetResourceSummaryAssociatedPublicIpPoolOracle, + "BYOIP": IpInventorySubnetResourceSummaryAssociatedPublicIpPoolByoip, +} + +var mappingIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnumLowerCase = map[string]IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum{ + "oracle": IpInventorySubnetResourceSummaryAssociatedPublicIpPoolOracle, + "byoip": IpInventorySubnetResourceSummaryAssociatedPublicIpPoolByoip, +} + +// GetIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnumValues Enumerates the set of values for IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum +func GetIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnumValues() []IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum { + values := make([]IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum, 0) + for _, v := range mappingIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum { + values = append(values, v) + } + return values +} + +// GetIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnumStringValues Enumerates the set of values in String for IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum +func GetIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnumStringValues() []string { + return []string{ + "ORACLE", + "BYOIP", + } +} + +// GetMappingIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum(val string) (IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum, bool) { + enum, ok := mappingIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// IpInventorySubnetResourceSummaryAssignedResourceTypeEnum Enum with underlying type: string +type IpInventorySubnetResourceSummaryAssignedResourceTypeEnum string + +// Set of constants representing the allowable values for IpInventorySubnetResourceSummaryAssignedResourceTypeEnum +const ( + IpInventorySubnetResourceSummaryAssignedResourceTypeResource IpInventorySubnetResourceSummaryAssignedResourceTypeEnum = "Resource" +) + +var mappingIpInventorySubnetResourceSummaryAssignedResourceTypeEnum = map[string]IpInventorySubnetResourceSummaryAssignedResourceTypeEnum{ + "Resource": IpInventorySubnetResourceSummaryAssignedResourceTypeResource, +} + +var mappingIpInventorySubnetResourceSummaryAssignedResourceTypeEnumLowerCase = map[string]IpInventorySubnetResourceSummaryAssignedResourceTypeEnum{ + "resource": IpInventorySubnetResourceSummaryAssignedResourceTypeResource, +} + +// GetIpInventorySubnetResourceSummaryAssignedResourceTypeEnumValues Enumerates the set of values for IpInventorySubnetResourceSummaryAssignedResourceTypeEnum +func GetIpInventorySubnetResourceSummaryAssignedResourceTypeEnumValues() []IpInventorySubnetResourceSummaryAssignedResourceTypeEnum { + values := make([]IpInventorySubnetResourceSummaryAssignedResourceTypeEnum, 0) + for _, v := range mappingIpInventorySubnetResourceSummaryAssignedResourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetIpInventorySubnetResourceSummaryAssignedResourceTypeEnumStringValues Enumerates the set of values in String for IpInventorySubnetResourceSummaryAssignedResourceTypeEnum +func GetIpInventorySubnetResourceSummaryAssignedResourceTypeEnumStringValues() []string { + return []string{ + "Resource", + } +} + +// GetMappingIpInventorySubnetResourceSummaryAssignedResourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpInventorySubnetResourceSummaryAssignedResourceTypeEnum(val string) (IpInventorySubnetResourceSummaryAssignedResourceTypeEnum, bool) { + enum, ok := mappingIpInventorySubnetResourceSummaryAssignedResourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_vcn_overlap_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_vcn_overlap_collection.go new file mode 100644 index 000000000..bfc30e717 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_vcn_overlap_collection.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpInventoryVcnOverlapCollection The details of the overlapping VCNs and compartments. +type IpInventoryVcnOverlapCollection struct { + + // The timestamp of the latest update from the database in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + LastUpdatedTimestamp *common.SDKTime `mandatory:"false" json:"lastUpdatedTimestamp"` + + // Lists `IpInventoryVcnOverlapSummary` object. + IpInventoryVcnOverlapSummary []IpInventoryVcnOverlapSummary `mandatory:"false" json:"ipInventoryVcnOverlapSummary"` + + // Indicates the status of the data. + Message *string `mandatory:"false" json:"message"` + + // The overlap count for the given VCN and compartments. + OverlapCount *int `mandatory:"false" json:"overlapCount"` +} + +func (m IpInventoryVcnOverlapCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpInventoryVcnOverlapCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_vcn_overlap_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_vcn_overlap_summary.go new file mode 100644 index 000000000..d8fe9258e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_vcn_overlap_summary.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpInventoryVcnOverlapSummary Provides the VCN overlap details. +type IpInventoryVcnOverlapSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN . + OverlappingVcnId *string `mandatory:"false" json:"overlappingVcnId"` + + // Name of the overlapping VCN. + OverlappingVcnName *string `mandatory:"false" json:"overlappingVcnName"` + + // The overlapping CIDR prefix. + OverlappingCidr *string `mandatory:"false" json:"overlappingCidr"` + + // CIDR prefix of the VCN. + Cidr *string `mandatory:"false" json:"cidr"` +} + +func (m IpInventoryVcnOverlapSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpInventoryVcnOverlapSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection.go new file mode 100644 index 000000000..abbe9464d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection.go @@ -0,0 +1,265 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpSecConnection A connection between a DRG and CPE. This connection consists of multiple IPSec +// tunnels. Creating this connection is one of the steps required when setting up +// a Site-to-Site VPN. +// **Important:** Each tunnel in an IPSec connection can use either static routing or BGP dynamic +// routing (see the IPSecConnectionTunnel object's +// `routing` attribute). Originally only static routing was supported and +// every IPSec connection was required to have at least one static route configured. +// To maintain backward compatibility in the API when support for BPG dynamic routing was introduced, +// the API accepts an empty list of static routes if you configure both of the IPSec tunnels to use +// BGP dynamic routing. If you switch a tunnel's routing from `BGP` to `STATIC`, you must first +// ensure that the IPSec connection is configured with at least one valid CIDR block static route. +// Oracle uses the IPSec connection's static routes when routing a tunnel's traffic *only* +// if that tunnel's `routing` attribute = `STATIC`. Otherwise the static routes are ignored. +// For more information about the workflow for setting up an IPSec connection, see +// Site-to-Site VPN Overview (https://docs.oracle.com/iaas/Content/Network/Tasks/overviewIPsec.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type IpSecConnection struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the IPSec connection. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cpe object. + CpeId *string `mandatory:"true" json:"cpeId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"true" json:"drgId"` + + // The IPSec connection's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // The IPSec connection's current state. + LifecycleState IpSecConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Your identifier for your CPE device. Can be either an IP address or a hostname (specifically, + // the fully qualified domain name (FQDN)). The type of identifier here must correspond + // to the value for `cpeLocalIdentifierType`. + // If you don't provide a value when creating the IPSec connection, the `ipAddress` attribute + // for the Cpe object specified by `cpeId` is used as the `cpeLocalIdentifier`. + // For information about why you'd provide this value, see + // If Your CPE Is Behind a NAT Device (https://docs.oracle.com/iaas/Content/Network/Tasks/overviewIPsec.htm#nat). + // Example IP address: `10.0.3.3` + // Example hostname: `cpe.example.com` + CpeLocalIdentifier *string `mandatory:"false" json:"cpeLocalIdentifier"` + + // The type of identifier for your CPE device. The value here must correspond to the value + // for `cpeLocalIdentifier`. + CpeLocalIdentifierType IpSecConnectionCpeLocalIdentifierTypeEnum `mandatory:"false" json:"cpeLocalIdentifierType,omitempty"` + + // Static routes to the CPE. The CIDR must not be a + // multicast address or class E address. + // Used for routing a given IPSec tunnel's traffic only if the tunnel + // is using static routing. If you configure at least one tunnel to use static routing, then + // you must provide at least one valid static route. If you configure both + // tunnels to use BGP dynamic routing, you can provide an empty list for the static routes. + // The CIDR can be either IPv4 or IPv6. IPv6 addressing is supported for all commercial and government regions. + // See IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // Example: `10.0.1.0/24` + // Example: `2001:db8::/32` + StaticRoutes []string `mandatory:"false" json:"staticRoutes"` + + // The date and time the IPSec connection was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The transport type used for the IPSec connection. + TransportType IpSecConnectionTransportTypeEnum `mandatory:"false" json:"transportType,omitempty"` +} + +func (m IpSecConnection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpSecConnection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingIpSecConnectionLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetIpSecConnectionLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingIpSecConnectionCpeLocalIdentifierTypeEnum(string(m.CpeLocalIdentifierType)); !ok && m.CpeLocalIdentifierType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CpeLocalIdentifierType: %s. Supported values are: %s.", m.CpeLocalIdentifierType, strings.Join(GetIpSecConnectionCpeLocalIdentifierTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingIpSecConnectionTransportTypeEnum(string(m.TransportType)); !ok && m.TransportType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TransportType: %s. Supported values are: %s.", m.TransportType, strings.Join(GetIpSecConnectionTransportTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// IpSecConnectionLifecycleStateEnum Enum with underlying type: string +type IpSecConnectionLifecycleStateEnum string + +// Set of constants representing the allowable values for IpSecConnectionLifecycleStateEnum +const ( + IpSecConnectionLifecycleStateProvisioning IpSecConnectionLifecycleStateEnum = "PROVISIONING" + IpSecConnectionLifecycleStateAvailable IpSecConnectionLifecycleStateEnum = "AVAILABLE" + IpSecConnectionLifecycleStateTerminating IpSecConnectionLifecycleStateEnum = "TERMINATING" + IpSecConnectionLifecycleStateTerminated IpSecConnectionLifecycleStateEnum = "TERMINATED" +) + +var mappingIpSecConnectionLifecycleStateEnum = map[string]IpSecConnectionLifecycleStateEnum{ + "PROVISIONING": IpSecConnectionLifecycleStateProvisioning, + "AVAILABLE": IpSecConnectionLifecycleStateAvailable, + "TERMINATING": IpSecConnectionLifecycleStateTerminating, + "TERMINATED": IpSecConnectionLifecycleStateTerminated, +} + +var mappingIpSecConnectionLifecycleStateEnumLowerCase = map[string]IpSecConnectionLifecycleStateEnum{ + "provisioning": IpSecConnectionLifecycleStateProvisioning, + "available": IpSecConnectionLifecycleStateAvailable, + "terminating": IpSecConnectionLifecycleStateTerminating, + "terminated": IpSecConnectionLifecycleStateTerminated, +} + +// GetIpSecConnectionLifecycleStateEnumValues Enumerates the set of values for IpSecConnectionLifecycleStateEnum +func GetIpSecConnectionLifecycleStateEnumValues() []IpSecConnectionLifecycleStateEnum { + values := make([]IpSecConnectionLifecycleStateEnum, 0) + for _, v := range mappingIpSecConnectionLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetIpSecConnectionLifecycleStateEnumStringValues Enumerates the set of values in String for IpSecConnectionLifecycleStateEnum +func GetIpSecConnectionLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingIpSecConnectionLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpSecConnectionLifecycleStateEnum(val string) (IpSecConnectionLifecycleStateEnum, bool) { + enum, ok := mappingIpSecConnectionLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// IpSecConnectionCpeLocalIdentifierTypeEnum Enum with underlying type: string +type IpSecConnectionCpeLocalIdentifierTypeEnum string + +// Set of constants representing the allowable values for IpSecConnectionCpeLocalIdentifierTypeEnum +const ( + IpSecConnectionCpeLocalIdentifierTypeIpAddress IpSecConnectionCpeLocalIdentifierTypeEnum = "IP_ADDRESS" + IpSecConnectionCpeLocalIdentifierTypeHostname IpSecConnectionCpeLocalIdentifierTypeEnum = "HOSTNAME" +) + +var mappingIpSecConnectionCpeLocalIdentifierTypeEnum = map[string]IpSecConnectionCpeLocalIdentifierTypeEnum{ + "IP_ADDRESS": IpSecConnectionCpeLocalIdentifierTypeIpAddress, + "HOSTNAME": IpSecConnectionCpeLocalIdentifierTypeHostname, +} + +var mappingIpSecConnectionCpeLocalIdentifierTypeEnumLowerCase = map[string]IpSecConnectionCpeLocalIdentifierTypeEnum{ + "ip_address": IpSecConnectionCpeLocalIdentifierTypeIpAddress, + "hostname": IpSecConnectionCpeLocalIdentifierTypeHostname, +} + +// GetIpSecConnectionCpeLocalIdentifierTypeEnumValues Enumerates the set of values for IpSecConnectionCpeLocalIdentifierTypeEnum +func GetIpSecConnectionCpeLocalIdentifierTypeEnumValues() []IpSecConnectionCpeLocalIdentifierTypeEnum { + values := make([]IpSecConnectionCpeLocalIdentifierTypeEnum, 0) + for _, v := range mappingIpSecConnectionCpeLocalIdentifierTypeEnum { + values = append(values, v) + } + return values +} + +// GetIpSecConnectionCpeLocalIdentifierTypeEnumStringValues Enumerates the set of values in String for IpSecConnectionCpeLocalIdentifierTypeEnum +func GetIpSecConnectionCpeLocalIdentifierTypeEnumStringValues() []string { + return []string{ + "IP_ADDRESS", + "HOSTNAME", + } +} + +// GetMappingIpSecConnectionCpeLocalIdentifierTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpSecConnectionCpeLocalIdentifierTypeEnum(val string) (IpSecConnectionCpeLocalIdentifierTypeEnum, bool) { + enum, ok := mappingIpSecConnectionCpeLocalIdentifierTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// IpSecConnectionTransportTypeEnum Enum with underlying type: string +type IpSecConnectionTransportTypeEnum string + +// Set of constants representing the allowable values for IpSecConnectionTransportTypeEnum +const ( + IpSecConnectionTransportTypeInternet IpSecConnectionTransportTypeEnum = "INTERNET" + IpSecConnectionTransportTypeFastconnect IpSecConnectionTransportTypeEnum = "FASTCONNECT" +) + +var mappingIpSecConnectionTransportTypeEnum = map[string]IpSecConnectionTransportTypeEnum{ + "INTERNET": IpSecConnectionTransportTypeInternet, + "FASTCONNECT": IpSecConnectionTransportTypeFastconnect, +} + +var mappingIpSecConnectionTransportTypeEnumLowerCase = map[string]IpSecConnectionTransportTypeEnum{ + "internet": IpSecConnectionTransportTypeInternet, + "fastconnect": IpSecConnectionTransportTypeFastconnect, +} + +// GetIpSecConnectionTransportTypeEnumValues Enumerates the set of values for IpSecConnectionTransportTypeEnum +func GetIpSecConnectionTransportTypeEnumValues() []IpSecConnectionTransportTypeEnum { + values := make([]IpSecConnectionTransportTypeEnum, 0) + for _, v := range mappingIpSecConnectionTransportTypeEnum { + values = append(values, v) + } + return values +} + +// GetIpSecConnectionTransportTypeEnumStringValues Enumerates the set of values in String for IpSecConnectionTransportTypeEnum +func GetIpSecConnectionTransportTypeEnumStringValues() []string { + return []string{ + "INTERNET", + "FASTCONNECT", + } +} + +// GetMappingIpSecConnectionTransportTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpSecConnectionTransportTypeEnum(val string) (IpSecConnectionTransportTypeEnum, bool) { + enum, ok := mappingIpSecConnectionTransportTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_device_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_device_config.go new file mode 100644 index 000000000..4ba9ca5ae --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_device_config.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpSecConnectionDeviceConfig Deprecated. For tunnel information, instead see: +// - IPSecConnectionTunnel +// - IPSecConnectionTunnelSharedSecret +type IpSecConnectionDeviceConfig struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the IPSec connection. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The IPSec connection's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // The date and time the IPSec connection was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Two TunnelConfig objects. + Tunnels []TunnelConfig `mandatory:"false" json:"tunnels"` +} + +func (m IpSecConnectionDeviceConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpSecConnectionDeviceConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_device_status.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_device_status.go new file mode 100644 index 000000000..c9fdd4b55 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_device_status.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpSecConnectionDeviceStatus Deprecated. For tunnel information, instead see +// IPSecConnectionTunnel. +type IpSecConnectionDeviceStatus struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the IPSec connection. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The IPSec connection's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // The date and time the IPSec connection was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Two TunnelStatus objects. + Tunnels []TunnelStatus `mandatory:"false" json:"tunnels"` +} + +func (m IpSecConnectionDeviceStatus) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpSecConnectionDeviceStatus) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_tunnel.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_tunnel.go new file mode 100644 index 000000000..e907e05bc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_tunnel.go @@ -0,0 +1,453 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpSecConnectionTunnel Information about a single IPSec tunnel in an IPSec connection. This object does not include the tunnel's +// shared secret (pre-shared key), which is found in the +// IPSecConnectionTunnelSharedSecret object. +type IpSecConnectionTunnel struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the tunnel. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tunnel. + Id *string `mandatory:"true" json:"id"` + + // The tunnel's lifecycle state. + LifecycleState IpSecConnectionTunnelLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The IP address of the Oracle VPN headend for the connection. + // Example: `203.0.113.21` + VpnIp *string `mandatory:"false" json:"vpnIp"` + + // The IP address of the CPE device's VPN headend. + // Example: `203.0.113.22` + CpeIp *string `mandatory:"false" json:"cpeIp"` + + // The status of the tunnel based on IPSec protocol characteristics. + Status IpSecConnectionTunnelStatusEnum `mandatory:"false" json:"status,omitempty"` + + // Internet Key Exchange protocol version. + IkeVersion IpSecConnectionTunnelIkeVersionEnum `mandatory:"false" json:"ikeVersion,omitempty"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + BgpSessionInfo *BgpSessionInfo `mandatory:"false" json:"bgpSessionInfo"` + + EncryptionDomainConfig *EncryptionDomainConfig `mandatory:"false" json:"encryptionDomainConfig"` + + // The type of routing used for this tunnel (BGP dynamic routing, static routing, or policy-based routing). + Routing IpSecConnectionTunnelRoutingEnum `mandatory:"false" json:"routing,omitempty"` + + // The date and time the IPSec tunnel was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // When the status of the IPSec tunnel last changed, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeStatusUpdated *common.SDKTime `mandatory:"false" json:"timeStatusUpdated"` + + // Indicates whether Oracle can only respond to a request to start an IPSec tunnel from the CPE device, or both respond to and initiate requests. + OracleCanInitiate IpSecConnectionTunnelOracleCanInitiateEnum `mandatory:"false" json:"oracleCanInitiate,omitempty"` + + // By default (the `AUTO` setting), IKE sends packets with a source and destination port set to 500, + // and when it detects that the port used to forward packets has changed (most likely because a NAT device + // is between the CPE device and the Oracle VPN headend) it will try to negotiate the use of NAT-T. + // The `ENABLED` option sets the IKE protocol to use port 4500 instead of 500 and forces encapsulating traffic with the ESP protocol inside UDP packets. + // The `DISABLED` option directs IKE to completely refuse to negotiate NAT-T + // even if it senses there may be a NAT device in use. + // + // . + NatTranslationEnabled IpSecConnectionTunnelNatTranslationEnabledEnum `mandatory:"false" json:"natTranslationEnabled,omitempty"` + + // Dead peer detection (DPD) mode set on the Oracle side of the connection. + // This mode sets whether Oracle can only respond to a request from the CPE device to start DPD, + // or both respond to and initiate requests. + DpdMode IpSecConnectionTunnelDpdModeEnum `mandatory:"false" json:"dpdMode,omitempty"` + + // DPD timeout in seconds. + DpdTimeoutInSec *int `mandatory:"false" json:"dpdTimeoutInSec"` + + PhaseOneDetails *TunnelPhaseOneDetails `mandatory:"false" json:"phaseOneDetails"` + + PhaseTwoDetails *TunnelPhaseTwoDetails `mandatory:"false" json:"phaseTwoDetails"` + + // The list of virtual circuit OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)s over which your network can reach this tunnel. + AssociatedVirtualCircuits []string `mandatory:"false" json:"associatedVirtualCircuits"` +} + +func (m IpSecConnectionTunnel) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpSecConnectionTunnel) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingIpSecConnectionTunnelLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetIpSecConnectionTunnelLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingIpSecConnectionTunnelStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetIpSecConnectionTunnelStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingIpSecConnectionTunnelIkeVersionEnum(string(m.IkeVersion)); !ok && m.IkeVersion != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IkeVersion: %s. Supported values are: %s.", m.IkeVersion, strings.Join(GetIpSecConnectionTunnelIkeVersionEnumStringValues(), ","))) + } + if _, ok := GetMappingIpSecConnectionTunnelRoutingEnum(string(m.Routing)); !ok && m.Routing != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Routing: %s. Supported values are: %s.", m.Routing, strings.Join(GetIpSecConnectionTunnelRoutingEnumStringValues(), ","))) + } + if _, ok := GetMappingIpSecConnectionTunnelOracleCanInitiateEnum(string(m.OracleCanInitiate)); !ok && m.OracleCanInitiate != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OracleCanInitiate: %s. Supported values are: %s.", m.OracleCanInitiate, strings.Join(GetIpSecConnectionTunnelOracleCanInitiateEnumStringValues(), ","))) + } + if _, ok := GetMappingIpSecConnectionTunnelNatTranslationEnabledEnum(string(m.NatTranslationEnabled)); !ok && m.NatTranslationEnabled != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NatTranslationEnabled: %s. Supported values are: %s.", m.NatTranslationEnabled, strings.Join(GetIpSecConnectionTunnelNatTranslationEnabledEnumStringValues(), ","))) + } + if _, ok := GetMappingIpSecConnectionTunnelDpdModeEnum(string(m.DpdMode)); !ok && m.DpdMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DpdMode: %s. Supported values are: %s.", m.DpdMode, strings.Join(GetIpSecConnectionTunnelDpdModeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// IpSecConnectionTunnelStatusEnum Enum with underlying type: string +type IpSecConnectionTunnelStatusEnum string + +// Set of constants representing the allowable values for IpSecConnectionTunnelStatusEnum +const ( + IpSecConnectionTunnelStatusUp IpSecConnectionTunnelStatusEnum = "UP" + IpSecConnectionTunnelStatusDown IpSecConnectionTunnelStatusEnum = "DOWN" + IpSecConnectionTunnelStatusDownForMaintenance IpSecConnectionTunnelStatusEnum = "DOWN_FOR_MAINTENANCE" + IpSecConnectionTunnelStatusPartialUp IpSecConnectionTunnelStatusEnum = "PARTIAL_UP" +) + +var mappingIpSecConnectionTunnelStatusEnum = map[string]IpSecConnectionTunnelStatusEnum{ + "UP": IpSecConnectionTunnelStatusUp, + "DOWN": IpSecConnectionTunnelStatusDown, + "DOWN_FOR_MAINTENANCE": IpSecConnectionTunnelStatusDownForMaintenance, + "PARTIAL_UP": IpSecConnectionTunnelStatusPartialUp, +} + +var mappingIpSecConnectionTunnelStatusEnumLowerCase = map[string]IpSecConnectionTunnelStatusEnum{ + "up": IpSecConnectionTunnelStatusUp, + "down": IpSecConnectionTunnelStatusDown, + "down_for_maintenance": IpSecConnectionTunnelStatusDownForMaintenance, + "partial_up": IpSecConnectionTunnelStatusPartialUp, +} + +// GetIpSecConnectionTunnelStatusEnumValues Enumerates the set of values for IpSecConnectionTunnelStatusEnum +func GetIpSecConnectionTunnelStatusEnumValues() []IpSecConnectionTunnelStatusEnum { + values := make([]IpSecConnectionTunnelStatusEnum, 0) + for _, v := range mappingIpSecConnectionTunnelStatusEnum { + values = append(values, v) + } + return values +} + +// GetIpSecConnectionTunnelStatusEnumStringValues Enumerates the set of values in String for IpSecConnectionTunnelStatusEnum +func GetIpSecConnectionTunnelStatusEnumStringValues() []string { + return []string{ + "UP", + "DOWN", + "DOWN_FOR_MAINTENANCE", + "PARTIAL_UP", + } +} + +// GetMappingIpSecConnectionTunnelStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpSecConnectionTunnelStatusEnum(val string) (IpSecConnectionTunnelStatusEnum, bool) { + enum, ok := mappingIpSecConnectionTunnelStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// IpSecConnectionTunnelIkeVersionEnum Enum with underlying type: string +type IpSecConnectionTunnelIkeVersionEnum string + +// Set of constants representing the allowable values for IpSecConnectionTunnelIkeVersionEnum +const ( + IpSecConnectionTunnelIkeVersionV1 IpSecConnectionTunnelIkeVersionEnum = "V1" + IpSecConnectionTunnelIkeVersionV2 IpSecConnectionTunnelIkeVersionEnum = "V2" +) + +var mappingIpSecConnectionTunnelIkeVersionEnum = map[string]IpSecConnectionTunnelIkeVersionEnum{ + "V1": IpSecConnectionTunnelIkeVersionV1, + "V2": IpSecConnectionTunnelIkeVersionV2, +} + +var mappingIpSecConnectionTunnelIkeVersionEnumLowerCase = map[string]IpSecConnectionTunnelIkeVersionEnum{ + "v1": IpSecConnectionTunnelIkeVersionV1, + "v2": IpSecConnectionTunnelIkeVersionV2, +} + +// GetIpSecConnectionTunnelIkeVersionEnumValues Enumerates the set of values for IpSecConnectionTunnelIkeVersionEnum +func GetIpSecConnectionTunnelIkeVersionEnumValues() []IpSecConnectionTunnelIkeVersionEnum { + values := make([]IpSecConnectionTunnelIkeVersionEnum, 0) + for _, v := range mappingIpSecConnectionTunnelIkeVersionEnum { + values = append(values, v) + } + return values +} + +// GetIpSecConnectionTunnelIkeVersionEnumStringValues Enumerates the set of values in String for IpSecConnectionTunnelIkeVersionEnum +func GetIpSecConnectionTunnelIkeVersionEnumStringValues() []string { + return []string{ + "V1", + "V2", + } +} + +// GetMappingIpSecConnectionTunnelIkeVersionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpSecConnectionTunnelIkeVersionEnum(val string) (IpSecConnectionTunnelIkeVersionEnum, bool) { + enum, ok := mappingIpSecConnectionTunnelIkeVersionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// IpSecConnectionTunnelLifecycleStateEnum Enum with underlying type: string +type IpSecConnectionTunnelLifecycleStateEnum string + +// Set of constants representing the allowable values for IpSecConnectionTunnelLifecycleStateEnum +const ( + IpSecConnectionTunnelLifecycleStateProvisioning IpSecConnectionTunnelLifecycleStateEnum = "PROVISIONING" + IpSecConnectionTunnelLifecycleStateAvailable IpSecConnectionTunnelLifecycleStateEnum = "AVAILABLE" + IpSecConnectionTunnelLifecycleStateTerminating IpSecConnectionTunnelLifecycleStateEnum = "TERMINATING" + IpSecConnectionTunnelLifecycleStateTerminated IpSecConnectionTunnelLifecycleStateEnum = "TERMINATED" +) + +var mappingIpSecConnectionTunnelLifecycleStateEnum = map[string]IpSecConnectionTunnelLifecycleStateEnum{ + "PROVISIONING": IpSecConnectionTunnelLifecycleStateProvisioning, + "AVAILABLE": IpSecConnectionTunnelLifecycleStateAvailable, + "TERMINATING": IpSecConnectionTunnelLifecycleStateTerminating, + "TERMINATED": IpSecConnectionTunnelLifecycleStateTerminated, +} + +var mappingIpSecConnectionTunnelLifecycleStateEnumLowerCase = map[string]IpSecConnectionTunnelLifecycleStateEnum{ + "provisioning": IpSecConnectionTunnelLifecycleStateProvisioning, + "available": IpSecConnectionTunnelLifecycleStateAvailable, + "terminating": IpSecConnectionTunnelLifecycleStateTerminating, + "terminated": IpSecConnectionTunnelLifecycleStateTerminated, +} + +// GetIpSecConnectionTunnelLifecycleStateEnumValues Enumerates the set of values for IpSecConnectionTunnelLifecycleStateEnum +func GetIpSecConnectionTunnelLifecycleStateEnumValues() []IpSecConnectionTunnelLifecycleStateEnum { + values := make([]IpSecConnectionTunnelLifecycleStateEnum, 0) + for _, v := range mappingIpSecConnectionTunnelLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetIpSecConnectionTunnelLifecycleStateEnumStringValues Enumerates the set of values in String for IpSecConnectionTunnelLifecycleStateEnum +func GetIpSecConnectionTunnelLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingIpSecConnectionTunnelLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpSecConnectionTunnelLifecycleStateEnum(val string) (IpSecConnectionTunnelLifecycleStateEnum, bool) { + enum, ok := mappingIpSecConnectionTunnelLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// IpSecConnectionTunnelRoutingEnum Enum with underlying type: string +type IpSecConnectionTunnelRoutingEnum string + +// Set of constants representing the allowable values for IpSecConnectionTunnelRoutingEnum +const ( + IpSecConnectionTunnelRoutingBgp IpSecConnectionTunnelRoutingEnum = "BGP" + IpSecConnectionTunnelRoutingStatic IpSecConnectionTunnelRoutingEnum = "STATIC" + IpSecConnectionTunnelRoutingPolicy IpSecConnectionTunnelRoutingEnum = "POLICY" +) + +var mappingIpSecConnectionTunnelRoutingEnum = map[string]IpSecConnectionTunnelRoutingEnum{ + "BGP": IpSecConnectionTunnelRoutingBgp, + "STATIC": IpSecConnectionTunnelRoutingStatic, + "POLICY": IpSecConnectionTunnelRoutingPolicy, +} + +var mappingIpSecConnectionTunnelRoutingEnumLowerCase = map[string]IpSecConnectionTunnelRoutingEnum{ + "bgp": IpSecConnectionTunnelRoutingBgp, + "static": IpSecConnectionTunnelRoutingStatic, + "policy": IpSecConnectionTunnelRoutingPolicy, +} + +// GetIpSecConnectionTunnelRoutingEnumValues Enumerates the set of values for IpSecConnectionTunnelRoutingEnum +func GetIpSecConnectionTunnelRoutingEnumValues() []IpSecConnectionTunnelRoutingEnum { + values := make([]IpSecConnectionTunnelRoutingEnum, 0) + for _, v := range mappingIpSecConnectionTunnelRoutingEnum { + values = append(values, v) + } + return values +} + +// GetIpSecConnectionTunnelRoutingEnumStringValues Enumerates the set of values in String for IpSecConnectionTunnelRoutingEnum +func GetIpSecConnectionTunnelRoutingEnumStringValues() []string { + return []string{ + "BGP", + "STATIC", + "POLICY", + } +} + +// GetMappingIpSecConnectionTunnelRoutingEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpSecConnectionTunnelRoutingEnum(val string) (IpSecConnectionTunnelRoutingEnum, bool) { + enum, ok := mappingIpSecConnectionTunnelRoutingEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// IpSecConnectionTunnelOracleCanInitiateEnum Enum with underlying type: string +type IpSecConnectionTunnelOracleCanInitiateEnum string + +// Set of constants representing the allowable values for IpSecConnectionTunnelOracleCanInitiateEnum +const ( + IpSecConnectionTunnelOracleCanInitiateInitiatorOrResponder IpSecConnectionTunnelOracleCanInitiateEnum = "INITIATOR_OR_RESPONDER" + IpSecConnectionTunnelOracleCanInitiateResponderOnly IpSecConnectionTunnelOracleCanInitiateEnum = "RESPONDER_ONLY" +) + +var mappingIpSecConnectionTunnelOracleCanInitiateEnum = map[string]IpSecConnectionTunnelOracleCanInitiateEnum{ + "INITIATOR_OR_RESPONDER": IpSecConnectionTunnelOracleCanInitiateInitiatorOrResponder, + "RESPONDER_ONLY": IpSecConnectionTunnelOracleCanInitiateResponderOnly, +} + +var mappingIpSecConnectionTunnelOracleCanInitiateEnumLowerCase = map[string]IpSecConnectionTunnelOracleCanInitiateEnum{ + "initiator_or_responder": IpSecConnectionTunnelOracleCanInitiateInitiatorOrResponder, + "responder_only": IpSecConnectionTunnelOracleCanInitiateResponderOnly, +} + +// GetIpSecConnectionTunnelOracleCanInitiateEnumValues Enumerates the set of values for IpSecConnectionTunnelOracleCanInitiateEnum +func GetIpSecConnectionTunnelOracleCanInitiateEnumValues() []IpSecConnectionTunnelOracleCanInitiateEnum { + values := make([]IpSecConnectionTunnelOracleCanInitiateEnum, 0) + for _, v := range mappingIpSecConnectionTunnelOracleCanInitiateEnum { + values = append(values, v) + } + return values +} + +// GetIpSecConnectionTunnelOracleCanInitiateEnumStringValues Enumerates the set of values in String for IpSecConnectionTunnelOracleCanInitiateEnum +func GetIpSecConnectionTunnelOracleCanInitiateEnumStringValues() []string { + return []string{ + "INITIATOR_OR_RESPONDER", + "RESPONDER_ONLY", + } +} + +// GetMappingIpSecConnectionTunnelOracleCanInitiateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpSecConnectionTunnelOracleCanInitiateEnum(val string) (IpSecConnectionTunnelOracleCanInitiateEnum, bool) { + enum, ok := mappingIpSecConnectionTunnelOracleCanInitiateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// IpSecConnectionTunnelNatTranslationEnabledEnum Enum with underlying type: string +type IpSecConnectionTunnelNatTranslationEnabledEnum string + +// Set of constants representing the allowable values for IpSecConnectionTunnelNatTranslationEnabledEnum +const ( + IpSecConnectionTunnelNatTranslationEnabledEnabled IpSecConnectionTunnelNatTranslationEnabledEnum = "ENABLED" + IpSecConnectionTunnelNatTranslationEnabledDisabled IpSecConnectionTunnelNatTranslationEnabledEnum = "DISABLED" + IpSecConnectionTunnelNatTranslationEnabledAuto IpSecConnectionTunnelNatTranslationEnabledEnum = "AUTO" +) + +var mappingIpSecConnectionTunnelNatTranslationEnabledEnum = map[string]IpSecConnectionTunnelNatTranslationEnabledEnum{ + "ENABLED": IpSecConnectionTunnelNatTranslationEnabledEnabled, + "DISABLED": IpSecConnectionTunnelNatTranslationEnabledDisabled, + "AUTO": IpSecConnectionTunnelNatTranslationEnabledAuto, +} + +var mappingIpSecConnectionTunnelNatTranslationEnabledEnumLowerCase = map[string]IpSecConnectionTunnelNatTranslationEnabledEnum{ + "enabled": IpSecConnectionTunnelNatTranslationEnabledEnabled, + "disabled": IpSecConnectionTunnelNatTranslationEnabledDisabled, + "auto": IpSecConnectionTunnelNatTranslationEnabledAuto, +} + +// GetIpSecConnectionTunnelNatTranslationEnabledEnumValues Enumerates the set of values for IpSecConnectionTunnelNatTranslationEnabledEnum +func GetIpSecConnectionTunnelNatTranslationEnabledEnumValues() []IpSecConnectionTunnelNatTranslationEnabledEnum { + values := make([]IpSecConnectionTunnelNatTranslationEnabledEnum, 0) + for _, v := range mappingIpSecConnectionTunnelNatTranslationEnabledEnum { + values = append(values, v) + } + return values +} + +// GetIpSecConnectionTunnelNatTranslationEnabledEnumStringValues Enumerates the set of values in String for IpSecConnectionTunnelNatTranslationEnabledEnum +func GetIpSecConnectionTunnelNatTranslationEnabledEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + "AUTO", + } +} + +// GetMappingIpSecConnectionTunnelNatTranslationEnabledEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpSecConnectionTunnelNatTranslationEnabledEnum(val string) (IpSecConnectionTunnelNatTranslationEnabledEnum, bool) { + enum, ok := mappingIpSecConnectionTunnelNatTranslationEnabledEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// IpSecConnectionTunnelDpdModeEnum Enum with underlying type: string +type IpSecConnectionTunnelDpdModeEnum string + +// Set of constants representing the allowable values for IpSecConnectionTunnelDpdModeEnum +const ( + IpSecConnectionTunnelDpdModeInitiateAndRespond IpSecConnectionTunnelDpdModeEnum = "INITIATE_AND_RESPOND" + IpSecConnectionTunnelDpdModeRespondOnly IpSecConnectionTunnelDpdModeEnum = "RESPOND_ONLY" +) + +var mappingIpSecConnectionTunnelDpdModeEnum = map[string]IpSecConnectionTunnelDpdModeEnum{ + "INITIATE_AND_RESPOND": IpSecConnectionTunnelDpdModeInitiateAndRespond, + "RESPOND_ONLY": IpSecConnectionTunnelDpdModeRespondOnly, +} + +var mappingIpSecConnectionTunnelDpdModeEnumLowerCase = map[string]IpSecConnectionTunnelDpdModeEnum{ + "initiate_and_respond": IpSecConnectionTunnelDpdModeInitiateAndRespond, + "respond_only": IpSecConnectionTunnelDpdModeRespondOnly, +} + +// GetIpSecConnectionTunnelDpdModeEnumValues Enumerates the set of values for IpSecConnectionTunnelDpdModeEnum +func GetIpSecConnectionTunnelDpdModeEnumValues() []IpSecConnectionTunnelDpdModeEnum { + values := make([]IpSecConnectionTunnelDpdModeEnum, 0) + for _, v := range mappingIpSecConnectionTunnelDpdModeEnum { + values = append(values, v) + } + return values +} + +// GetIpSecConnectionTunnelDpdModeEnumStringValues Enumerates the set of values in String for IpSecConnectionTunnelDpdModeEnum +func GetIpSecConnectionTunnelDpdModeEnumStringValues() []string { + return []string{ + "INITIATE_AND_RESPOND", + "RESPOND_ONLY", + } +} + +// GetMappingIpSecConnectionTunnelDpdModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpSecConnectionTunnelDpdModeEnum(val string) (IpSecConnectionTunnelDpdModeEnum, bool) { + enum, ok := mappingIpSecConnectionTunnelDpdModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_tunnel_error_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_tunnel_error_details.go new file mode 100644 index 000000000..e11d79636 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_tunnel_error_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpSecConnectionTunnelErrorDetails Details for an error on an IPSec tunnel. +type IpSecConnectionTunnelErrorDetails struct { + + // Unique ID generated for each error report. + Id *string `mandatory:"true" json:"id"` + + // Unique code describes the error type. + ErrorCode *string `mandatory:"true" json:"errorCode"` + + // A detailed description of the error. + ErrorDescription *string `mandatory:"true" json:"errorDescription"` + + // Resolution for the error. + Solution *string `mandatory:"true" json:"solution"` + + // Link to more Oracle resources or relevant documentation. + OciResourcesLink *string `mandatory:"true" json:"ociResourcesLink"` + + // Timestamp when the error occurred. + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` +} + +func (m IpSecConnectionTunnelErrorDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpSecConnectionTunnelErrorDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_tunnel_shared_secret.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_tunnel_shared_secret.go new file mode 100644 index 000000000..2124edcec --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_sec_connection_tunnel_shared_secret.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpSecConnectionTunnelSharedSecret The tunnel's shared secret (pre-shared key). +type IpSecConnectionTunnelSharedSecret struct { + + // The tunnel's shared secret (pre-shared key). + SharedSecret *string `mandatory:"true" json:"sharedSecret"` +} + +func (m IpSecConnectionTunnelSharedSecret) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpSecConnectionTunnelSharedSecret) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ipam.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipam.go new file mode 100644 index 000000000..adbb0a354 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipam.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Ipam An IPAM refers to a group of VCNs, subnets, IP resources +// +// and its related properties. +type Ipam struct { + + // Placeholder for description + Placeholder *string `mandatory:"false" json:"placeholder"` +} + +func (m Ipam) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Ipam) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ipsec_tunnel_drg_attachment_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipsec_tunnel_drg_attachment_network_details.go new file mode 100644 index 000000000..f36f6a82b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipsec_tunnel_drg_attachment_network_details.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpsecTunnelDrgAttachmentNetworkDetails Specifies the IPSec tunnel attached to the DRG. +type IpsecTunnelDrgAttachmentNetworkDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. + Id *string `mandatory:"false" json:"id"` + + // The IPSec connection that contains the attached IPSec tunnel. + IpsecConnectionId *string `mandatory:"false" json:"ipsecConnectionId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit's DRG attachment. + TransportAttachmentId *string `mandatory:"false" json:"transportAttachmentId"` +} + +// GetId returns Id +func (m IpsecTunnelDrgAttachmentNetworkDetails) GetId() *string { + return m.Id +} + +func (m IpsecTunnelDrgAttachmentNetworkDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpsecTunnelDrgAttachmentNetworkDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m IpsecTunnelDrgAttachmentNetworkDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeIpsecTunnelDrgAttachmentNetworkDetails IpsecTunnelDrgAttachmentNetworkDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeIpsecTunnelDrgAttachmentNetworkDetails + }{ + "IPSEC_TUNNEL", + (MarshalTypeIpsecTunnelDrgAttachmentNetworkDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6.go new file mode 100644 index 000000000..a76a8cdc1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6.go @@ -0,0 +1,249 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Ipv6 An *IPv6* is a conceptual term that refers to an IPv6 address and related properties. +// The `IPv6` object is the API representation of an IPv6. +// You can create and assign an IPv6 to any VNIC that is in an IPv6-enabled subnet in an +// IPv6-enabled VCN. +// **Note:** IPv6 addressing is supported for all commercial and government regions. For important +// details about IPv6 addressing in a VCN, see IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). +type Ipv6 struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the IPv6. + // This is the same as the VNIC's compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPv6. + Id *string `mandatory:"true" json:"id"` + + // The IPv6 address of the `IPv6` object. The address is within the IPv6 prefix of the VNIC's subnet + // (see the `ipv6CidrBlock` attribute for the Subnet object. + // Example: `2001:0db8:0123:1111:abcd:ef01:2345:6789` + IpAddress *string `mandatory:"true" json:"ipAddress"` + + // The IPv6's current state. + LifecycleState Ipv6LifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet the VNIC is in. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // The date and time the IPv6 was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Length of cidr range. Optional field to specify flexible cidr. + CidrPrefixLength *int `mandatory:"false" json:"cidrPrefixLength"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC the IPv6 is assigned to. + // The VNIC and IPv6 must be in the same subnet. + VnicId *string `mandatory:"false" json:"vnicId"` + + // State of the IP address. If an IP address is assigned to a VNIC it is ASSIGNED, otherwise it is AVAILABLE. + IpState Ipv6IpStateEnum `mandatory:"false" json:"ipState,omitempty"` + + // Lifetime of the IP address. + // There are two types of IPs: + // - Ephemeral + // - Reserved + Lifetime Ipv6LifetimeEnum `mandatory:"false" json:"lifetime,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see + // Per-resource Routing (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing). + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // The hostname associated with the IPv6 address. Only the hostname label, not the FQDN. + Hostname *string `mandatory:"false" json:"hostname"` +} + +func (m Ipv6) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Ipv6) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingIpv6LifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetIpv6LifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingIpv6IpStateEnum(string(m.IpState)); !ok && m.IpState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IpState: %s. Supported values are: %s.", m.IpState, strings.Join(GetIpv6IpStateEnumStringValues(), ","))) + } + if _, ok := GetMappingIpv6LifetimeEnum(string(m.Lifetime)); !ok && m.Lifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Lifetime: %s. Supported values are: %s.", m.Lifetime, strings.Join(GetIpv6LifetimeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// Ipv6LifecycleStateEnum Enum with underlying type: string +type Ipv6LifecycleStateEnum string + +// Set of constants representing the allowable values for Ipv6LifecycleStateEnum +const ( + Ipv6LifecycleStateProvisioning Ipv6LifecycleStateEnum = "PROVISIONING" + Ipv6LifecycleStateAvailable Ipv6LifecycleStateEnum = "AVAILABLE" + Ipv6LifecycleStateTerminating Ipv6LifecycleStateEnum = "TERMINATING" + Ipv6LifecycleStateTerminated Ipv6LifecycleStateEnum = "TERMINATED" +) + +var mappingIpv6LifecycleStateEnum = map[string]Ipv6LifecycleStateEnum{ + "PROVISIONING": Ipv6LifecycleStateProvisioning, + "AVAILABLE": Ipv6LifecycleStateAvailable, + "TERMINATING": Ipv6LifecycleStateTerminating, + "TERMINATED": Ipv6LifecycleStateTerminated, +} + +var mappingIpv6LifecycleStateEnumLowerCase = map[string]Ipv6LifecycleStateEnum{ + "provisioning": Ipv6LifecycleStateProvisioning, + "available": Ipv6LifecycleStateAvailable, + "terminating": Ipv6LifecycleStateTerminating, + "terminated": Ipv6LifecycleStateTerminated, +} + +// GetIpv6LifecycleStateEnumValues Enumerates the set of values for Ipv6LifecycleStateEnum +func GetIpv6LifecycleStateEnumValues() []Ipv6LifecycleStateEnum { + values := make([]Ipv6LifecycleStateEnum, 0) + for _, v := range mappingIpv6LifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetIpv6LifecycleStateEnumStringValues Enumerates the set of values in String for Ipv6LifecycleStateEnum +func GetIpv6LifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingIpv6LifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpv6LifecycleStateEnum(val string) (Ipv6LifecycleStateEnum, bool) { + enum, ok := mappingIpv6LifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// Ipv6IpStateEnum Enum with underlying type: string +type Ipv6IpStateEnum string + +// Set of constants representing the allowable values for Ipv6IpStateEnum +const ( + Ipv6IpStateAssigned Ipv6IpStateEnum = "ASSIGNED" + Ipv6IpStateAvailable Ipv6IpStateEnum = "AVAILABLE" +) + +var mappingIpv6IpStateEnum = map[string]Ipv6IpStateEnum{ + "ASSIGNED": Ipv6IpStateAssigned, + "AVAILABLE": Ipv6IpStateAvailable, +} + +var mappingIpv6IpStateEnumLowerCase = map[string]Ipv6IpStateEnum{ + "assigned": Ipv6IpStateAssigned, + "available": Ipv6IpStateAvailable, +} + +// GetIpv6IpStateEnumValues Enumerates the set of values for Ipv6IpStateEnum +func GetIpv6IpStateEnumValues() []Ipv6IpStateEnum { + values := make([]Ipv6IpStateEnum, 0) + for _, v := range mappingIpv6IpStateEnum { + values = append(values, v) + } + return values +} + +// GetIpv6IpStateEnumStringValues Enumerates the set of values in String for Ipv6IpStateEnum +func GetIpv6IpStateEnumStringValues() []string { + return []string{ + "ASSIGNED", + "AVAILABLE", + } +} + +// GetMappingIpv6IpStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpv6IpStateEnum(val string) (Ipv6IpStateEnum, bool) { + enum, ok := mappingIpv6IpStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// Ipv6LifetimeEnum Enum with underlying type: string +type Ipv6LifetimeEnum string + +// Set of constants representing the allowable values for Ipv6LifetimeEnum +const ( + Ipv6LifetimeEphemeral Ipv6LifetimeEnum = "EPHEMERAL" + Ipv6LifetimeReserved Ipv6LifetimeEnum = "RESERVED" +) + +var mappingIpv6LifetimeEnum = map[string]Ipv6LifetimeEnum{ + "EPHEMERAL": Ipv6LifetimeEphemeral, + "RESERVED": Ipv6LifetimeReserved, +} + +var mappingIpv6LifetimeEnumLowerCase = map[string]Ipv6LifetimeEnum{ + "ephemeral": Ipv6LifetimeEphemeral, + "reserved": Ipv6LifetimeReserved, +} + +// GetIpv6LifetimeEnumValues Enumerates the set of values for Ipv6LifetimeEnum +func GetIpv6LifetimeEnumValues() []Ipv6LifetimeEnum { + values := make([]Ipv6LifetimeEnum, 0) + for _, v := range mappingIpv6LifetimeEnum { + values = append(values, v) + } + return values +} + +// GetIpv6LifetimeEnumStringValues Enumerates the set of values in String for Ipv6LifetimeEnum +func GetIpv6LifetimeEnumStringValues() []string { + return []string{ + "EPHEMERAL", + "RESERVED", + } +} + +// GetMappingIpv6LifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpv6LifetimeEnum(val string) (Ipv6LifetimeEnum, bool) { + enum, ok := mappingIpv6LifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6_address_ipv6_subnet_cidr_pair_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6_address_ipv6_subnet_cidr_pair_details.go new file mode 100644 index 000000000..f08578fa4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6_address_ipv6_subnet_cidr_pair_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Ipv6AddressIpv6SubnetCidrPairDetails Details to assign an IPv6 subnet prefix and IPv6 address on VNIC creation. +type Ipv6AddressIpv6SubnetCidrPairDetails struct { + + // An OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that specifies a previously-reserved ipv6 to use. + Ipv6Id *string `mandatory:"false" json:"ipv6Id"` + + // The IPv6 prefix allocated to the subnet. + Ipv6SubnetCidr *string `mandatory:"false" json:"ipv6SubnetCidr"` + + // An IPv6 address of your choice. Must be an available IPv6 address within the subnet's prefix. + // If an IPv6 address is not provided: + // - Oracle will automatically assign an IPv6 address from the subnet's IPv6 prefix if and only if there is only one IPv6 prefix on the subnet. + // - Oracle will automatically assign an IPv6 address from the subnet's IPv6 Oracle GUA prefix if it exists on the subnet. + Ipv6Address *string `mandatory:"false" json:"ipv6Address"` +} + +func (m Ipv6AddressIpv6SubnetCidrPairDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Ipv6AddressIpv6SubnetCidrPairDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6_vnic_detach_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6_vnic_detach_request_response.go new file mode 100644 index 000000000..21248d95a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipv6_vnic_detach_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// Ipv6VnicDetachRequest wrapper for the Ipv6VnicDetach operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/Ipv6VnicDetach.go.html to see an example of how to use Ipv6VnicDetachRequest. +type Ipv6VnicDetachRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPv6. + Ipv6Id *string `mandatory:"true" contributesTo:"path" name:"ipv6Id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request Ipv6VnicDetachRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request Ipv6VnicDetachRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request Ipv6VnicDetachRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request Ipv6VnicDetachRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request Ipv6VnicDetachRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// Ipv6VnicDetachResponse wrapper for the Ipv6VnicDetach operation +type Ipv6VnicDetachResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Ipv6 instance + Ipv6 `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response Ipv6VnicDetachResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response Ipv6VnicDetachResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_i_scsi_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_i_scsi_volume_details.go new file mode 100644 index 000000000..11df2a64a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_i_scsi_volume_details.go @@ -0,0 +1,169 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchAttachIScsiVolumeDetails Details specific to ISCSI type volume attachments. +type LaunchAttachIScsiVolumeDetails struct { + + // The device name. To retrieve a list of devices for a given instance, see ListInstanceDevices. + Device *string `mandatory:"false" json:"device"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether the attachment was created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + IsShareable *bool `mandatory:"false" json:"isShareable"` + + // The OCID of the volume. If CreateVolumeDetails is specified, this field must be omitted from the request. + VolumeId *string `mandatory:"false" json:"volumeId"` + + LaunchCreateVolumeDetails LaunchCreateVolumeDetails `mandatory:"false" json:"launchCreateVolumeDetails"` + + // Whether to use CHAP authentication for the volume attachment. Defaults to false. + UseChap *bool `mandatory:"false" json:"useChap"` + + // Whether to enable Oracle Cloud Agent to perform the iSCSI login and logout commands after the volume attach or detach operations for non multipath-enabled iSCSI attachments. + IsAgentAutoIscsiLoginEnabled *bool `mandatory:"false" json:"isAgentAutoIscsiLoginEnabled"` + + // Refer the top-level definition of encryptionInTransitType. + // The default value is NONE. + EncryptionInTransitType EncryptionInTransitTypeEnum `mandatory:"false" json:"encryptionInTransitType,omitempty"` +} + +// GetDevice returns Device +func (m LaunchAttachIScsiVolumeDetails) GetDevice() *string { + return m.Device +} + +// GetDisplayName returns DisplayName +func (m LaunchAttachIScsiVolumeDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetIsReadOnly returns IsReadOnly +func (m LaunchAttachIScsiVolumeDetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetIsShareable returns IsShareable +func (m LaunchAttachIScsiVolumeDetails) GetIsShareable() *bool { + return m.IsShareable +} + +// GetVolumeId returns VolumeId +func (m LaunchAttachIScsiVolumeDetails) GetVolumeId() *string { + return m.VolumeId +} + +// GetLaunchCreateVolumeDetails returns LaunchCreateVolumeDetails +func (m LaunchAttachIScsiVolumeDetails) GetLaunchCreateVolumeDetails() LaunchCreateVolumeDetails { + return m.LaunchCreateVolumeDetails +} + +func (m LaunchAttachIScsiVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LaunchAttachIScsiVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingEncryptionInTransitTypeEnum(string(m.EncryptionInTransitType)); !ok && m.EncryptionInTransitType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncryptionInTransitType: %s. Supported values are: %s.", m.EncryptionInTransitType, strings.Join(GetEncryptionInTransitTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m LaunchAttachIScsiVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLaunchAttachIScsiVolumeDetails LaunchAttachIScsiVolumeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeLaunchAttachIScsiVolumeDetails + }{ + "iscsi", + (MarshalTypeLaunchAttachIScsiVolumeDetails)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *LaunchAttachIScsiVolumeDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Device *string `json:"device"` + DisplayName *string `json:"displayName"` + IsReadOnly *bool `json:"isReadOnly"` + IsShareable *bool `json:"isShareable"` + VolumeId *string `json:"volumeId"` + LaunchCreateVolumeDetails launchcreatevolumedetails `json:"launchCreateVolumeDetails"` + UseChap *bool `json:"useChap"` + EncryptionInTransitType EncryptionInTransitTypeEnum `json:"encryptionInTransitType"` + IsAgentAutoIscsiLoginEnabled *bool `json:"isAgentAutoIscsiLoginEnabled"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Device = model.Device + + m.DisplayName = model.DisplayName + + m.IsReadOnly = model.IsReadOnly + + m.IsShareable = model.IsShareable + + m.VolumeId = model.VolumeId + + nn, e = model.LaunchCreateVolumeDetails.UnmarshalPolymorphicJSON(model.LaunchCreateVolumeDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.LaunchCreateVolumeDetails = nn.(LaunchCreateVolumeDetails) + } else { + m.LaunchCreateVolumeDetails = nil + } + + m.UseChap = model.UseChap + + m.EncryptionInTransitType = model.EncryptionInTransitType + + m.IsAgentAutoIscsiLoginEnabled = model.IsAgentAutoIscsiLoginEnabled + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_paravirtualized_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_paravirtualized_volume_details.go new file mode 100644 index 000000000..ae11c7122 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_paravirtualized_volume_details.go @@ -0,0 +1,153 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchAttachParavirtualizedVolumeDetails Details specific to PV type volume attachments. +type LaunchAttachParavirtualizedVolumeDetails struct { + + // The device name. To retrieve a list of devices for a given instance, see ListInstanceDevices. + Device *string `mandatory:"false" json:"device"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether the attachment was created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + IsShareable *bool `mandatory:"false" json:"isShareable"` + + // The OCID of the volume. If CreateVolumeDetails is specified, this field must be omitted from the request. + VolumeId *string `mandatory:"false" json:"volumeId"` + + LaunchCreateVolumeDetails LaunchCreateVolumeDetails `mandatory:"false" json:"launchCreateVolumeDetails"` + + // Whether to enable in-transit encryption for the data volume's paravirtualized attachment. The default value is false. + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` +} + +// GetDevice returns Device +func (m LaunchAttachParavirtualizedVolumeDetails) GetDevice() *string { + return m.Device +} + +// GetDisplayName returns DisplayName +func (m LaunchAttachParavirtualizedVolumeDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetIsReadOnly returns IsReadOnly +func (m LaunchAttachParavirtualizedVolumeDetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetIsShareable returns IsShareable +func (m LaunchAttachParavirtualizedVolumeDetails) GetIsShareable() *bool { + return m.IsShareable +} + +// GetVolumeId returns VolumeId +func (m LaunchAttachParavirtualizedVolumeDetails) GetVolumeId() *string { + return m.VolumeId +} + +// GetLaunchCreateVolumeDetails returns LaunchCreateVolumeDetails +func (m LaunchAttachParavirtualizedVolumeDetails) GetLaunchCreateVolumeDetails() LaunchCreateVolumeDetails { + return m.LaunchCreateVolumeDetails +} + +func (m LaunchAttachParavirtualizedVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LaunchAttachParavirtualizedVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m LaunchAttachParavirtualizedVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLaunchAttachParavirtualizedVolumeDetails LaunchAttachParavirtualizedVolumeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeLaunchAttachParavirtualizedVolumeDetails + }{ + "paravirtualized", + (MarshalTypeLaunchAttachParavirtualizedVolumeDetails)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *LaunchAttachParavirtualizedVolumeDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Device *string `json:"device"` + DisplayName *string `json:"displayName"` + IsReadOnly *bool `json:"isReadOnly"` + IsShareable *bool `json:"isShareable"` + VolumeId *string `json:"volumeId"` + LaunchCreateVolumeDetails launchcreatevolumedetails `json:"launchCreateVolumeDetails"` + IsPvEncryptionInTransitEnabled *bool `json:"isPvEncryptionInTransitEnabled"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Device = model.Device + + m.DisplayName = model.DisplayName + + m.IsReadOnly = model.IsReadOnly + + m.IsShareable = model.IsShareable + + m.VolumeId = model.VolumeId + + nn, e = model.LaunchCreateVolumeDetails.UnmarshalPolymorphicJSON(model.LaunchCreateVolumeDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.LaunchCreateVolumeDetails = nn.(LaunchCreateVolumeDetails) + } else { + m.LaunchCreateVolumeDetails = nil + } + + m.IsPvEncryptionInTransitEnabled = model.IsPvEncryptionInTransitEnabled + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_volume_details.go new file mode 100644 index 000000000..3ddd9afd5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_volume_details.go @@ -0,0 +1,150 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchAttachVolumeDetails The details of the volume to attach. +type LaunchAttachVolumeDetails interface { + + // The device name. To retrieve a list of devices for a given instance, see ListInstanceDevices. + GetDevice() *string + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + GetDisplayName() *string + + // Whether the attachment was created in read-only mode. + GetIsReadOnly() *bool + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + GetIsShareable() *bool + + // The OCID of the volume. If CreateVolumeDetails is specified, this field must be omitted from the request. + GetVolumeId() *string + + GetLaunchCreateVolumeDetails() LaunchCreateVolumeDetails +} + +type launchattachvolumedetails struct { + JsonData []byte + Device *string `mandatory:"false" json:"device"` + DisplayName *string `mandatory:"false" json:"displayName"` + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + IsShareable *bool `mandatory:"false" json:"isShareable"` + VolumeId *string `mandatory:"false" json:"volumeId"` + LaunchCreateVolumeDetails launchcreatevolumedetails `mandatory:"false" json:"launchCreateVolumeDetails"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *launchattachvolumedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerlaunchattachvolumedetails launchattachvolumedetails + s := struct { + Model Unmarshalerlaunchattachvolumedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Device = s.Model.Device + m.DisplayName = s.Model.DisplayName + m.IsReadOnly = s.Model.IsReadOnly + m.IsShareable = s.Model.IsShareable + m.VolumeId = s.Model.VolumeId + m.LaunchCreateVolumeDetails = s.Model.LaunchCreateVolumeDetails + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *launchattachvolumedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "paravirtualized": + mm := LaunchAttachParavirtualizedVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "iscsi": + mm := LaunchAttachIScsiVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for LaunchAttachVolumeDetails: %s.", m.Type) + return *m, nil + } +} + +// GetDevice returns Device +func (m launchattachvolumedetails) GetDevice() *string { + return m.Device +} + +// GetDisplayName returns DisplayName +func (m launchattachvolumedetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetIsReadOnly returns IsReadOnly +func (m launchattachvolumedetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetIsShareable returns IsShareable +func (m launchattachvolumedetails) GetIsShareable() *bool { + return m.IsShareable +} + +// GetVolumeId returns VolumeId +func (m launchattachvolumedetails) GetVolumeId() *string { + return m.VolumeId +} + +// GetLaunchCreateVolumeDetails returns LaunchCreateVolumeDetails +func (m launchattachvolumedetails) GetLaunchCreateVolumeDetails() launchcreatevolumedetails { + return m.LaunchCreateVolumeDetails +} + +func (m launchattachvolumedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m launchattachvolumedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_create_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_create_volume_details.go new file mode 100644 index 000000000..db619fdfe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_create_volume_details.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchCreateVolumeDetails Define a volume that will be created and attached or attached to an instance on creation. +type LaunchCreateVolumeDetails interface { +} + +type launchcreatevolumedetails struct { + JsonData []byte + VolumeCreationType string `json:"volumeCreationType"` +} + +// UnmarshalJSON unmarshals json +func (m *launchcreatevolumedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerlaunchcreatevolumedetails launchcreatevolumedetails + s := struct { + Model Unmarshalerlaunchcreatevolumedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.VolumeCreationType = s.Model.VolumeCreationType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *launchcreatevolumedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.VolumeCreationType { + case "ATTRIBUTES": + mm := LaunchCreateVolumeFromAttributes{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for LaunchCreateVolumeDetails: %s.", m.VolumeCreationType) + return *m, nil + } +} + +func (m launchcreatevolumedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m launchcreatevolumedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// LaunchCreateVolumeDetailsVolumeCreationTypeEnum Enum with underlying type: string +type LaunchCreateVolumeDetailsVolumeCreationTypeEnum string + +// Set of constants representing the allowable values for LaunchCreateVolumeDetailsVolumeCreationTypeEnum +const ( + LaunchCreateVolumeDetailsVolumeCreationTypeAttributes LaunchCreateVolumeDetailsVolumeCreationTypeEnum = "ATTRIBUTES" +) + +var mappingLaunchCreateVolumeDetailsVolumeCreationTypeEnum = map[string]LaunchCreateVolumeDetailsVolumeCreationTypeEnum{ + "ATTRIBUTES": LaunchCreateVolumeDetailsVolumeCreationTypeAttributes, +} + +var mappingLaunchCreateVolumeDetailsVolumeCreationTypeEnumLowerCase = map[string]LaunchCreateVolumeDetailsVolumeCreationTypeEnum{ + "attributes": LaunchCreateVolumeDetailsVolumeCreationTypeAttributes, +} + +// GetLaunchCreateVolumeDetailsVolumeCreationTypeEnumValues Enumerates the set of values for LaunchCreateVolumeDetailsVolumeCreationTypeEnum +func GetLaunchCreateVolumeDetailsVolumeCreationTypeEnumValues() []LaunchCreateVolumeDetailsVolumeCreationTypeEnum { + values := make([]LaunchCreateVolumeDetailsVolumeCreationTypeEnum, 0) + for _, v := range mappingLaunchCreateVolumeDetailsVolumeCreationTypeEnum { + values = append(values, v) + } + return values +} + +// GetLaunchCreateVolumeDetailsVolumeCreationTypeEnumStringValues Enumerates the set of values in String for LaunchCreateVolumeDetailsVolumeCreationTypeEnum +func GetLaunchCreateVolumeDetailsVolumeCreationTypeEnumStringValues() []string { + return []string{ + "ATTRIBUTES", + } +} + +// GetMappingLaunchCreateVolumeDetailsVolumeCreationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLaunchCreateVolumeDetailsVolumeCreationTypeEnum(val string) (LaunchCreateVolumeDetailsVolumeCreationTypeEnum, bool) { + enum, ok := mappingLaunchCreateVolumeDetailsVolumeCreationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_create_volume_from_attributes.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_create_volume_from_attributes.go new file mode 100644 index 000000000..ad5045a64 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_create_volume_from_attributes.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchCreateVolumeFromAttributes The details of the volume to create for CreateVolume operation. +type LaunchCreateVolumeFromAttributes struct { + + // The size of the volume in GBs. + SizeInGBs *int64 `mandatory:"true" json:"sizeInGBs"` + + // The OCID of the compartment that contains the volume. If not provided, + // it will be inherited from the instance. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID of the Vault service key to assign as the master encryption key + // for the volume. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // The number of volume performance units (VPUs) that will be applied to this volume per GB, + // representing the Block Volume service's elastic performance options. + // See Block Volume Performance Levels (https://docs.oracle.com/iaas/Content/Block/Concepts/blockvolumeperformance.htm#perf_levels) for more information. + // Allowed values: + // * `0`: Represents Lower Cost option. + // * `10`: Represents Balanced option. + // * `20`: Represents Higher Performance option. + // * `30`-`120`: Represents the Ultra High Performance option. + VpusPerGB *int64 `mandatory:"false" json:"vpusPerGB"` +} + +func (m LaunchCreateVolumeFromAttributes) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LaunchCreateVolumeFromAttributes) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m LaunchCreateVolumeFromAttributes) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLaunchCreateVolumeFromAttributes LaunchCreateVolumeFromAttributes + s := struct { + DiscriminatorParam string `json:"volumeCreationType"` + MarshalTypeLaunchCreateVolumeFromAttributes + }{ + "ATTRIBUTES", + (MarshalTypeLaunchCreateVolumeFromAttributes)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_agent_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_agent_config_details.go new file mode 100644 index 000000000..521b4b081 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_agent_config_details.go @@ -0,0 +1,79 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchInstanceAgentConfigDetails Configuration options for the Oracle Cloud Agent software running on the instance. +type LaunchInstanceAgentConfigDetails struct { + + // Whether Oracle Cloud Agent can gather performance metrics and monitor the instance using the + // monitoring plugins. Default value is false (monitoring plugins are enabled). + // These are the monitoring plugins: Compute Instance Monitoring + // and Custom Logs Monitoring. + // The monitoring plugins are controlled by this parameter and by the per-plugin + // configuration in the `pluginsConfig` object. + // - If `isMonitoringDisabled` is true, all of the monitoring plugins are disabled, regardless of + // the per-plugin configuration. + // - If `isMonitoringDisabled` is false, all of the monitoring plugins are enabled. You + // can optionally disable individual monitoring plugins by providing a value in the `pluginsConfig` + // object. + IsMonitoringDisabled *bool `mandatory:"false" json:"isMonitoringDisabled"` + + // Whether Oracle Cloud Agent can run all the available management plugins. + // Default value is false (management plugins are enabled). + // These are the management plugins: OS Management Service Agent and Compute Instance + // Run Command. + // The management plugins are controlled by this parameter and by the per-plugin + // configuration in the `pluginsConfig` object. + // - If `isManagementDisabled` is true, all of the management plugins are disabled, regardless of + // the per-plugin configuration. + // - If `isManagementDisabled` is false, all of the management plugins are enabled. You + // can optionally disable individual management plugins by providing a value in the `pluginsConfig` + // object. + IsManagementDisabled *bool `mandatory:"false" json:"isManagementDisabled"` + + // Whether Oracle Cloud Agent can run all the available plugins. + // This includes the management and monitoring plugins. + // To get a list of available plugins, use the + // ListInstanceagentAvailablePlugins + // operation in the Oracle Cloud Agent API. For more information about the available plugins, see + // Managing Plugins with Oracle Cloud Agent (https://docs.oracle.com/iaas/Content/Compute/Tasks/manage-plugins.htm). + AreAllPluginsDisabled *bool `mandatory:"false" json:"areAllPluginsDisabled"` + + // The configuration of plugins associated with this instance. + PluginsConfig []InstanceAgentPluginConfigDetails `mandatory:"false" json:"pluginsConfig"` +} + +func (m LaunchInstanceAgentConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LaunchInstanceAgentConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_availability_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_availability_config_details.go new file mode 100644 index 000000000..b2d1ad4b9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_availability_config_details.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchInstanceAvailabilityConfigDetails Options for VM migration during infrastructure maintenance events and for defining +// the availability of a VM instance after a maintenance event that impacts the underlying hardware. +type LaunchInstanceAvailabilityConfigDetails struct { + + // Whether to live migrate supported VM instances to a healthy physical VM host without + // disrupting running instances during infrastructure maintenance events. If null, Oracle + // chooses the best option for migrating the VM during infrastructure maintenance events. + IsLiveMigrationPreferred *bool `mandatory:"false" json:"isLiveMigrationPreferred"` + + // The lifecycle state for an instance when it is recovered after infrastructure maintenance. + // * `RESTORE_INSTANCE` - The instance is restored to the lifecycle state it was in before the maintenance event. + // If the instance was running, it is automatically rebooted. This is the default action when a value is not set. + // * `STOP_INSTANCE` - The instance is recovered in the stopped state. + RecoveryAction LaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum `mandatory:"false" json:"recoveryAction,omitempty"` +} + +func (m LaunchInstanceAvailabilityConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LaunchInstanceAvailabilityConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum(string(m.RecoveryAction)); !ok && m.RecoveryAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RecoveryAction: %s. Supported values are: %s.", m.RecoveryAction, strings.Join(GetLaunchInstanceAvailabilityConfigDetailsRecoveryActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// LaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum Enum with underlying type: string +type LaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum string + +// Set of constants representing the allowable values for LaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum +const ( + LaunchInstanceAvailabilityConfigDetailsRecoveryActionRestoreInstance LaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum = "RESTORE_INSTANCE" + LaunchInstanceAvailabilityConfigDetailsRecoveryActionStopInstance LaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum = "STOP_INSTANCE" +) + +var mappingLaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum = map[string]LaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum{ + "RESTORE_INSTANCE": LaunchInstanceAvailabilityConfigDetailsRecoveryActionRestoreInstance, + "STOP_INSTANCE": LaunchInstanceAvailabilityConfigDetailsRecoveryActionStopInstance, +} + +var mappingLaunchInstanceAvailabilityConfigDetailsRecoveryActionEnumLowerCase = map[string]LaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum{ + "restore_instance": LaunchInstanceAvailabilityConfigDetailsRecoveryActionRestoreInstance, + "stop_instance": LaunchInstanceAvailabilityConfigDetailsRecoveryActionStopInstance, +} + +// GetLaunchInstanceAvailabilityConfigDetailsRecoveryActionEnumValues Enumerates the set of values for LaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum +func GetLaunchInstanceAvailabilityConfigDetailsRecoveryActionEnumValues() []LaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum { + values := make([]LaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum, 0) + for _, v := range mappingLaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum { + values = append(values, v) + } + return values +} + +// GetLaunchInstanceAvailabilityConfigDetailsRecoveryActionEnumStringValues Enumerates the set of values in String for LaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum +func GetLaunchInstanceAvailabilityConfigDetailsRecoveryActionEnumStringValues() []string { + return []string{ + "RESTORE_INSTANCE", + "STOP_INSTANCE", + } +} + +// GetMappingLaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum(val string) (LaunchInstanceAvailabilityConfigDetailsRecoveryActionEnum, bool) { + enum, ok := mappingLaunchInstanceAvailabilityConfigDetailsRecoveryActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_configuration_request_response.go new file mode 100644 index 000000000..15ccd60e6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_configuration_request_response.go @@ -0,0 +1,113 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// LaunchInstanceConfigurationRequest wrapper for the LaunchInstanceConfiguration operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/LaunchInstanceConfiguration.go.html to see an example of how to use LaunchInstanceConfigurationRequest. +type LaunchInstanceConfigurationRequest struct { + + // The OCID of the instance configuration. + InstanceConfigurationId *string `mandatory:"true" contributesTo:"path" name:"instanceConfigurationId"` + + // Instance configuration Instance Details + InstanceConfiguration InstanceConfigurationInstanceDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the + // compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) that the instance will be created in. + OpcComputeClusterId *string `mandatory:"false" contributesTo:"header" name:"opc-compute-cluster-id"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request LaunchInstanceConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request LaunchInstanceConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request LaunchInstanceConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request LaunchInstanceConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request LaunchInstanceConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// LaunchInstanceConfigurationResponse wrapper for the LaunchInstanceConfiguration operation +type LaunchInstanceConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Instance instance + Instance `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response LaunchInstanceConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response LaunchInstanceConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_details.go new file mode 100644 index 000000000..67be788e8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_details.go @@ -0,0 +1,380 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchInstanceDetails Instance launch details. +// Use the `sourceDetails` parameter to specify whether a boot volume or an image should be used to launch a new instance. +type LaunchInstanceDetails struct { + + // The availability domain of the instance. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the compute capacity reservation this instance is launched under. + // You can opt out of all default reservations by specifying an empty string as input for this field. + // For more information, see Capacity Reservations (https://docs.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm#default). + CapacityReservationId *string `mandatory:"false" json:"capacityReservationId"` + + CreateVnicDetails *CreateVnicDetails `mandatory:"false" json:"createVnicDetails"` + + // The OCID of the dedicated virtual machine host to place the instance on. + DedicatedVmHostId *string `mandatory:"false" json:"dedicatedVmHostId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Security attributes (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels + // for a resource that can be referenced in a Zero Trust Packet Routing (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) + // (ZPR) policy to control access to ZPR-supported resources. + // Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` + SecurityAttributes map[string]map[string]interface{} `mandatory:"false" json:"securityAttributes"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Additional metadata key/value pairs that you provide. They serve the same purpose and + // functionality as fields in the `metadata` object. + // They are distinguished from `metadata` fields in that these can be nested JSON objects + // (whereas `metadata` fields are string/string maps only). + // The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of + // 32,000 bytes. + ExtendedMetadata map[string]interface{} `mandatory:"false" json:"extendedMetadata"` + + // A fault domain is a grouping of hardware and infrastructure within an availability domain. + // Each availability domain contains three fault domains. Fault domains let you distribute your + // instances so that they are not on the same physical hardware within a single availability domain. + // A hardware failure or Compute hardware maintenance that affects one fault domain does not affect + // instances in other fault domains. + // If you do not specify the fault domain, the system selects one for you. + // + // To get a list of fault domains, use the + // ListFaultDomains operation in the + // Identity and Access Management Service API. + // Example: `FAULT-DOMAIN-1` + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + // The OCID of the cluster placement group of the instance. + ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the + // compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) that the instance will be created in. + ComputeClusterId *string `mandatory:"false" json:"computeClusterId"` + + // Deprecated. Instead use `hostnameLabel` in + // CreateVnicDetails. + // If you provide both, the values must match. + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // Deprecated. Use `sourceDetails` with InstanceSourceViaImageDetails + // source type instead. If you specify values for both, the values must match. + ImageId *string `mandatory:"false" json:"imageId"` + + // This is an advanced option. + // When a bare metal or virtual machine + // instance boots, the iPXE firmware that runs on the instance is + // configured to run an iPXE script to continue the boot process. + // If you want more control over the boot process, you can provide + // your own custom iPXE script that will run when the instance boots. + // Be aware that the same iPXE script will run + // every time an instance boots, not only after the initial + // LaunchInstance call. + // The default iPXE script connects to the instance's local boot + // volume over iSCSI and performs a network boot. If you use a custom iPXE + // script and want to network-boot from the instance's local boot volume + // over iSCSI the same way as the default iPXE script, use the + // following iSCSI IP address: 169.254.0.2, and boot volume IQN: + // iqn.2015-02.oracle.boot. + // If your instance boot volume attachment type is paravirtualized, + // the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. + // If your instance boot volume attachment type is paravirtualized + // and you use custom iPXE to network boot into your instance, + // the primary boot volume is attached as a data volume through virtio-scsi drive. + // For more information about the Bring Your Own Image feature of + // Oracle Cloud Infrastructure, see + // Bring Your Own Image (https://docs.oracle.com/iaas/Content/Compute/References/bringyourownimage.htm). + // For more information about iPXE, see http://ipxe.org. + IpxeScript *string `mandatory:"false" json:"ipxeScript"` + + LaunchOptions *LaunchOptions `mandatory:"false" json:"launchOptions"` + + InstanceOptions *InstanceOptions `mandatory:"false" json:"instanceOptions"` + + AvailabilityConfig *LaunchInstanceAvailabilityConfigDetails `mandatory:"false" json:"availabilityConfig"` + + PreemptibleInstanceConfig *PreemptibleInstanceConfigDetails `mandatory:"false" json:"preemptibleInstanceConfig"` + + // Custom metadata key/value pairs that you provide, such as the SSH public key + // required to connect to the instance. + // A metadata service runs on every launched instance. The service is an HTTP + // endpoint listening on 169.254.169.254. You can use the service to: + // * Provide information to Cloud-Init (https://cloudinit.readthedocs.org/en/latest/) + // to be used for various system initialization tasks. + // * Get information about the instance, including the custom metadata that you + // provide when you launch the instance. + // **Providing Cloud-Init Metadata** + // You can use the following metadata key names to provide information to + // Cloud-Init: + // **"ssh_authorized_keys"** - Provide one or more public SSH keys to be + // included in the `~/.ssh/authorized_keys` file for the default user on the + // instance. Use a newline character to separate multiple keys. The SSH + // keys must be in the format necessary for the `authorized_keys` file, as shown + // in the example below. + // **"user_data"** - Provide your own base64-encoded data to be used by + // Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. For + // information about how to take advantage of user data, see the + // Cloud-Init Documentation (http://cloudinit.readthedocs.org/en/latest/topics/format.html). + // **Metadata Example** + // "metadata" : { + // "quake_bot_level" : "Severe", + // "ssh_authorized_keys" : "ssh-rsa == rsa-key-20160227", + // "user_data" : "==" + // } + // **Getting Metadata on the Instance** + // To get information about your instance, connect to the instance using SSH and issue any of the + // following GET requests: + // curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/ + // curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/metadata/ + // curl -H "Authorization: Bearer Oracle" http://169.254.169.254/opc/v2/instance/metadata/ + // You'll get back a response that includes all the instance information; only the metadata information; or + // the metadata information for the specified key name, respectively. + // The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of 32,000 bytes. + Metadata map[string]string `mandatory:"false" json:"metadata"` + + AgentConfig *LaunchInstanceAgentConfigDetails `mandatory:"false" json:"agentConfig"` + + // The shape of an instance. The shape determines the number of CPUs, amount of memory, + // and other resources allocated to the instance. + // You can enumerate all available shapes by calling ListShapes. + Shape *string `mandatory:"false" json:"shape"` + + ShapeConfig *LaunchInstanceShapeConfigDetails `mandatory:"false" json:"shapeConfig"` + + SourceDetails InstanceSourceDetails `mandatory:"false" json:"sourceDetails"` + + // Deprecated. Instead use `subnetId` in + // CreateVnicDetails. + // At least one of them is required; if you provide both, the values must match. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // Volume attachments to create as part of the launch instance operation. + LaunchVolumeAttachments []LaunchAttachVolumeDetails `mandatory:"false" json:"launchVolumeAttachments"` + + // Whether to enable in-transit encryption for the data volume's paravirtualized attachment. This field applies to both block volumes and boot volumes. The default value is false. + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` + + PlatformConfig LaunchInstancePlatformConfig `mandatory:"false" json:"platformConfig"` + + PlacementConstraintDetails PlacementConstraintDetails `mandatory:"false" json:"placementConstraintDetails"` + + // Whether to enable AI enterprise on the instance. + IsAIEnterpriseEnabled *bool `mandatory:"false" json:"isAIEnterpriseEnabled"` + + // The OCID of the Instance Configuration containing instance launch details. Any other fields supplied in this instance launch request will override the details stored in the Instance Configuration for this instance launch. + InstanceConfigurationId *string `mandatory:"false" json:"instanceConfigurationId"` + + // List of licensing configurations associated with target launch values. + LicensingConfigs []LaunchInstanceLicensingConfig `mandatory:"false" json:"licensingConfigs"` +} + +func (m LaunchInstanceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LaunchInstanceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *LaunchInstanceDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + CapacityReservationId *string `json:"capacityReservationId"` + CreateVnicDetails *CreateVnicDetails `json:"createVnicDetails"` + DedicatedVmHostId *string `json:"dedicatedVmHostId"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + DisplayName *string `json:"displayName"` + ExtendedMetadata map[string]interface{} `json:"extendedMetadata"` + FaultDomain *string `json:"faultDomain"` + ClusterPlacementGroupId *string `json:"clusterPlacementGroupId"` + FreeformTags map[string]string `json:"freeformTags"` + ComputeClusterId *string `json:"computeClusterId"` + HostnameLabel *string `json:"hostnameLabel"` + ImageId *string `json:"imageId"` + IpxeScript *string `json:"ipxeScript"` + LaunchOptions *LaunchOptions `json:"launchOptions"` + InstanceOptions *InstanceOptions `json:"instanceOptions"` + AvailabilityConfig *LaunchInstanceAvailabilityConfigDetails `json:"availabilityConfig"` + PreemptibleInstanceConfig *PreemptibleInstanceConfigDetails `json:"preemptibleInstanceConfig"` + Metadata map[string]string `json:"metadata"` + AgentConfig *LaunchInstanceAgentConfigDetails `json:"agentConfig"` + Shape *string `json:"shape"` + ShapeConfig *LaunchInstanceShapeConfigDetails `json:"shapeConfig"` + SourceDetails instancesourcedetails `json:"sourceDetails"` + SubnetId *string `json:"subnetId"` + LaunchVolumeAttachments []launchattachvolumedetails `json:"launchVolumeAttachments"` + IsPvEncryptionInTransitEnabled *bool `json:"isPvEncryptionInTransitEnabled"` + PlatformConfig launchinstanceplatformconfig `json:"platformConfig"` + PlacementConstraintDetails placementconstraintdetails `json:"placementConstraintDetails"` + IsAIEnterpriseEnabled *bool `json:"isAIEnterpriseEnabled"` + InstanceConfigurationId *string `json:"instanceConfigurationId"` + LicensingConfigs []launchinstancelicensingconfig `json:"licensingConfigs"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.CapacityReservationId = model.CapacityReservationId + + m.CreateVnicDetails = model.CreateVnicDetails + + m.DedicatedVmHostId = model.DedicatedVmHostId + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.DisplayName = model.DisplayName + + m.ExtendedMetadata = model.ExtendedMetadata + + m.FaultDomain = model.FaultDomain + + m.ClusterPlacementGroupId = model.ClusterPlacementGroupId + + m.FreeformTags = model.FreeformTags + + m.ComputeClusterId = model.ComputeClusterId + + m.HostnameLabel = model.HostnameLabel + + m.ImageId = model.ImageId + + m.IpxeScript = model.IpxeScript + + m.LaunchOptions = model.LaunchOptions + + m.InstanceOptions = model.InstanceOptions + + m.AvailabilityConfig = model.AvailabilityConfig + + m.PreemptibleInstanceConfig = model.PreemptibleInstanceConfig + + m.Metadata = model.Metadata + + m.AgentConfig = model.AgentConfig + + m.Shape = model.Shape + + m.ShapeConfig = model.ShapeConfig + + nn, e = model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.SourceDetails = nn.(InstanceSourceDetails) + } else { + m.SourceDetails = nil + } + + m.SubnetId = model.SubnetId + + m.LaunchVolumeAttachments = make([]LaunchAttachVolumeDetails, len(model.LaunchVolumeAttachments)) + for i, n := range model.LaunchVolumeAttachments { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.LaunchVolumeAttachments[i] = nn.(LaunchAttachVolumeDetails) + } else { + m.LaunchVolumeAttachments[i] = nil + } + } + m.IsPvEncryptionInTransitEnabled = model.IsPvEncryptionInTransitEnabled + + nn, e = model.PlatformConfig.UnmarshalPolymorphicJSON(model.PlatformConfig.JsonData) + if e != nil { + return + } + if nn != nil { + m.PlatformConfig = nn.(LaunchInstancePlatformConfig) + } else { + m.PlatformConfig = nil + } + + nn, e = model.PlacementConstraintDetails.UnmarshalPolymorphicJSON(model.PlacementConstraintDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.PlacementConstraintDetails = nn.(PlacementConstraintDetails) + } else { + m.PlacementConstraintDetails = nil + } + + m.IsAIEnterpriseEnabled = model.IsAIEnterpriseEnabled + + m.InstanceConfigurationId = model.InstanceConfigurationId + + m.LicensingConfigs = make([]LaunchInstanceLicensingConfig, len(model.LicensingConfigs)) + for i, n := range model.LicensingConfigs { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.LicensingConfigs[i] = nn.(LaunchInstanceLicensingConfig) + } else { + m.LicensingConfigs[i] = nil + } + } + m.AvailabilityDomain = model.AvailabilityDomain + + m.CompartmentId = model.CompartmentId + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_licensing_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_licensing_config.go new file mode 100644 index 000000000..704a4eada --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_licensing_config.go @@ -0,0 +1,183 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchInstanceLicensingConfig The license config requested for the instance. +type LaunchInstanceLicensingConfig interface { + + // License Type for the OS license. + // * `OCI_PROVIDED` - OCI provided license (e.g. metered $/OCPU-hour). + // * `BRING_YOUR_OWN_LICENSE` - Bring your own license. + // * `PARTNER_PROVIDED` - Partner provided license. + GetLicenseType() LaunchInstanceLicensingConfigLicenseTypeEnum +} + +type launchinstancelicensingconfig struct { + JsonData []byte + LicenseType LaunchInstanceLicensingConfigLicenseTypeEnum `mandatory:"false" json:"licenseType,omitempty"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *launchinstancelicensingconfig) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerlaunchinstancelicensingconfig launchinstancelicensingconfig + s := struct { + Model Unmarshalerlaunchinstancelicensingconfig + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.LicenseType = s.Model.LicenseType + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *launchinstancelicensingconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "WINDOWS": + mm := LaunchInstanceWindowsLicensingConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for LaunchInstanceLicensingConfig: %s.", m.Type) + return *m, nil + } +} + +// GetLicenseType returns LicenseType +func (m launchinstancelicensingconfig) GetLicenseType() LaunchInstanceLicensingConfigLicenseTypeEnum { + return m.LicenseType +} + +func (m launchinstancelicensingconfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m launchinstancelicensingconfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLaunchInstanceLicensingConfigLicenseTypeEnum(string(m.LicenseType)); !ok && m.LicenseType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseType: %s. Supported values are: %s.", m.LicenseType, strings.Join(GetLaunchInstanceLicensingConfigLicenseTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// LaunchInstanceLicensingConfigLicenseTypeEnum Enum with underlying type: string +type LaunchInstanceLicensingConfigLicenseTypeEnum string + +// Set of constants representing the allowable values for LaunchInstanceLicensingConfigLicenseTypeEnum +const ( + LaunchInstanceLicensingConfigLicenseTypeOciProvided LaunchInstanceLicensingConfigLicenseTypeEnum = "OCI_PROVIDED" + LaunchInstanceLicensingConfigLicenseTypeBringYourOwnLicense LaunchInstanceLicensingConfigLicenseTypeEnum = "BRING_YOUR_OWN_LICENSE" + LaunchInstanceLicensingConfigLicenseTypePartnerProvided LaunchInstanceLicensingConfigLicenseTypeEnum = "PARTNER_PROVIDED" +) + +var mappingLaunchInstanceLicensingConfigLicenseTypeEnum = map[string]LaunchInstanceLicensingConfigLicenseTypeEnum{ + "OCI_PROVIDED": LaunchInstanceLicensingConfigLicenseTypeOciProvided, + "BRING_YOUR_OWN_LICENSE": LaunchInstanceLicensingConfigLicenseTypeBringYourOwnLicense, + "PARTNER_PROVIDED": LaunchInstanceLicensingConfigLicenseTypePartnerProvided, +} + +var mappingLaunchInstanceLicensingConfigLicenseTypeEnumLowerCase = map[string]LaunchInstanceLicensingConfigLicenseTypeEnum{ + "oci_provided": LaunchInstanceLicensingConfigLicenseTypeOciProvided, + "bring_your_own_license": LaunchInstanceLicensingConfigLicenseTypeBringYourOwnLicense, + "partner_provided": LaunchInstanceLicensingConfigLicenseTypePartnerProvided, +} + +// GetLaunchInstanceLicensingConfigLicenseTypeEnumValues Enumerates the set of values for LaunchInstanceLicensingConfigLicenseTypeEnum +func GetLaunchInstanceLicensingConfigLicenseTypeEnumValues() []LaunchInstanceLicensingConfigLicenseTypeEnum { + values := make([]LaunchInstanceLicensingConfigLicenseTypeEnum, 0) + for _, v := range mappingLaunchInstanceLicensingConfigLicenseTypeEnum { + values = append(values, v) + } + return values +} + +// GetLaunchInstanceLicensingConfigLicenseTypeEnumStringValues Enumerates the set of values in String for LaunchInstanceLicensingConfigLicenseTypeEnum +func GetLaunchInstanceLicensingConfigLicenseTypeEnumStringValues() []string { + return []string{ + "OCI_PROVIDED", + "BRING_YOUR_OWN_LICENSE", + "PARTNER_PROVIDED", + } +} + +// GetMappingLaunchInstanceLicensingConfigLicenseTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLaunchInstanceLicensingConfigLicenseTypeEnum(val string) (LaunchInstanceLicensingConfigLicenseTypeEnum, bool) { + enum, ok := mappingLaunchInstanceLicensingConfigLicenseTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// LaunchInstanceLicensingConfigTypeEnum Enum with underlying type: string +type LaunchInstanceLicensingConfigTypeEnum string + +// Set of constants representing the allowable values for LaunchInstanceLicensingConfigTypeEnum +const ( + LaunchInstanceLicensingConfigTypeWindows LaunchInstanceLicensingConfigTypeEnum = "WINDOWS" +) + +var mappingLaunchInstanceLicensingConfigTypeEnum = map[string]LaunchInstanceLicensingConfigTypeEnum{ + "WINDOWS": LaunchInstanceLicensingConfigTypeWindows, +} + +var mappingLaunchInstanceLicensingConfigTypeEnumLowerCase = map[string]LaunchInstanceLicensingConfigTypeEnum{ + "windows": LaunchInstanceLicensingConfigTypeWindows, +} + +// GetLaunchInstanceLicensingConfigTypeEnumValues Enumerates the set of values for LaunchInstanceLicensingConfigTypeEnum +func GetLaunchInstanceLicensingConfigTypeEnumValues() []LaunchInstanceLicensingConfigTypeEnum { + values := make([]LaunchInstanceLicensingConfigTypeEnum, 0) + for _, v := range mappingLaunchInstanceLicensingConfigTypeEnum { + values = append(values, v) + } + return values +} + +// GetLaunchInstanceLicensingConfigTypeEnumStringValues Enumerates the set of values in String for LaunchInstanceLicensingConfigTypeEnum +func GetLaunchInstanceLicensingConfigTypeEnumStringValues() []string { + return []string{ + "WINDOWS", + } +} + +// GetMappingLaunchInstanceLicensingConfigTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLaunchInstanceLicensingConfigTypeEnum(val string) (LaunchInstanceLicensingConfigTypeEnum, bool) { + enum, ok := mappingLaunchInstanceLicensingConfigTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_platform_config.go new file mode 100644 index 000000000..96d767562 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_platform_config.go @@ -0,0 +1,234 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchInstancePlatformConfig The platform configuration requested for the instance. +// If you provide the parameter, the instance is created with the platform configuration that you specify. +// For any values that you omit, the instance uses the default configuration values for the `shape` that you +// specify. If you don't provide the parameter, the default values for the `shape` are used. +// Each shape only supports certain configurable values. If the values that you provide are not valid for the +// specified `shape`, an error is returned. +// For more information about shielded instances, see +// Shielded Instances (https://docs.oracle.com/iaas/Content/Compute/References/shielded-instances.htm). +// For more information about BIOS settings for bare metal instances, see +// BIOS Settings for Bare Metal Instances (https://docs.oracle.com/iaas/Content/Compute/References/bios-settings.htm). +type LaunchInstancePlatformConfig interface { + + // Whether Secure Boot is enabled on the instance. + GetIsSecureBootEnabled() *bool + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + GetIsTrustedPlatformModuleEnabled() *bool + + // Whether the Measured Boot feature is enabled on the instance. + GetIsMeasuredBootEnabled() *bool + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + GetIsMemoryEncryptionEnabled() *bool +} + +type launchinstanceplatformconfig struct { + JsonData []byte + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *launchinstanceplatformconfig) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerlaunchinstanceplatformconfig launchinstanceplatformconfig + s := struct { + Model Unmarshalerlaunchinstanceplatformconfig + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.IsSecureBootEnabled = s.Model.IsSecureBootEnabled + m.IsTrustedPlatformModuleEnabled = s.Model.IsTrustedPlatformModuleEnabled + m.IsMeasuredBootEnabled = s.Model.IsMeasuredBootEnabled + m.IsMemoryEncryptionEnabled = s.Model.IsMemoryEncryptionEnabled + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *launchinstanceplatformconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "AMD_ROME_BM_GPU": + mm := AmdRomeBmGpuLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AMD_ROME_BM": + mm := AmdRomeBmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INTEL_ICELAKE_BM": + mm := IntelIcelakeBmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AMD_VM": + mm := AmdVmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INTEL_VM": + mm := IntelVmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INTEL_SKYLAKE_BM": + mm := IntelSkylakeBmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AMD_MILAN_BM": + mm := AmdMilanBmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "GENERIC_BM": + mm := GenericBmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AMD_MILAN_BM_GPU": + mm := AmdMilanBmGpuLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for LaunchInstancePlatformConfig: %s.", m.Type) + return *m, nil + } +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m launchinstanceplatformconfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m launchinstanceplatformconfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m launchinstanceplatformconfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m launchinstanceplatformconfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m launchinstanceplatformconfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m launchinstanceplatformconfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// LaunchInstancePlatformConfigTypeEnum Enum with underlying type: string +type LaunchInstancePlatformConfigTypeEnum string + +// Set of constants representing the allowable values for LaunchInstancePlatformConfigTypeEnum +const ( + LaunchInstancePlatformConfigTypeAmdMilanBm LaunchInstancePlatformConfigTypeEnum = "AMD_MILAN_BM" + LaunchInstancePlatformConfigTypeAmdMilanBmGpu LaunchInstancePlatformConfigTypeEnum = "AMD_MILAN_BM_GPU" + LaunchInstancePlatformConfigTypeAmdRomeBm LaunchInstancePlatformConfigTypeEnum = "AMD_ROME_BM" + LaunchInstancePlatformConfigTypeAmdRomeBmGpu LaunchInstancePlatformConfigTypeEnum = "AMD_ROME_BM_GPU" + LaunchInstancePlatformConfigTypeGenericBm LaunchInstancePlatformConfigTypeEnum = "GENERIC_BM" + LaunchInstancePlatformConfigTypeIntelIcelakeBm LaunchInstancePlatformConfigTypeEnum = "INTEL_ICELAKE_BM" + LaunchInstancePlatformConfigTypeIntelSkylakeBm LaunchInstancePlatformConfigTypeEnum = "INTEL_SKYLAKE_BM" + LaunchInstancePlatformConfigTypeAmdVm LaunchInstancePlatformConfigTypeEnum = "AMD_VM" + LaunchInstancePlatformConfigTypeIntelVm LaunchInstancePlatformConfigTypeEnum = "INTEL_VM" +) + +var mappingLaunchInstancePlatformConfigTypeEnum = map[string]LaunchInstancePlatformConfigTypeEnum{ + "AMD_MILAN_BM": LaunchInstancePlatformConfigTypeAmdMilanBm, + "AMD_MILAN_BM_GPU": LaunchInstancePlatformConfigTypeAmdMilanBmGpu, + "AMD_ROME_BM": LaunchInstancePlatformConfigTypeAmdRomeBm, + "AMD_ROME_BM_GPU": LaunchInstancePlatformConfigTypeAmdRomeBmGpu, + "GENERIC_BM": LaunchInstancePlatformConfigTypeGenericBm, + "INTEL_ICELAKE_BM": LaunchInstancePlatformConfigTypeIntelIcelakeBm, + "INTEL_SKYLAKE_BM": LaunchInstancePlatformConfigTypeIntelSkylakeBm, + "AMD_VM": LaunchInstancePlatformConfigTypeAmdVm, + "INTEL_VM": LaunchInstancePlatformConfigTypeIntelVm, +} + +var mappingLaunchInstancePlatformConfigTypeEnumLowerCase = map[string]LaunchInstancePlatformConfigTypeEnum{ + "amd_milan_bm": LaunchInstancePlatformConfigTypeAmdMilanBm, + "amd_milan_bm_gpu": LaunchInstancePlatformConfigTypeAmdMilanBmGpu, + "amd_rome_bm": LaunchInstancePlatformConfigTypeAmdRomeBm, + "amd_rome_bm_gpu": LaunchInstancePlatformConfigTypeAmdRomeBmGpu, + "generic_bm": LaunchInstancePlatformConfigTypeGenericBm, + "intel_icelake_bm": LaunchInstancePlatformConfigTypeIntelIcelakeBm, + "intel_skylake_bm": LaunchInstancePlatformConfigTypeIntelSkylakeBm, + "amd_vm": LaunchInstancePlatformConfigTypeAmdVm, + "intel_vm": LaunchInstancePlatformConfigTypeIntelVm, +} + +// GetLaunchInstancePlatformConfigTypeEnumValues Enumerates the set of values for LaunchInstancePlatformConfigTypeEnum +func GetLaunchInstancePlatformConfigTypeEnumValues() []LaunchInstancePlatformConfigTypeEnum { + values := make([]LaunchInstancePlatformConfigTypeEnum, 0) + for _, v := range mappingLaunchInstancePlatformConfigTypeEnum { + values = append(values, v) + } + return values +} + +// GetLaunchInstancePlatformConfigTypeEnumStringValues Enumerates the set of values in String for LaunchInstancePlatformConfigTypeEnum +func GetLaunchInstancePlatformConfigTypeEnumStringValues() []string { + return []string{ + "AMD_MILAN_BM", + "AMD_MILAN_BM_GPU", + "AMD_ROME_BM", + "AMD_ROME_BM_GPU", + "GENERIC_BM", + "INTEL_ICELAKE_BM", + "INTEL_SKYLAKE_BM", + "AMD_VM", + "INTEL_VM", + } +} + +// GetMappingLaunchInstancePlatformConfigTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLaunchInstancePlatformConfigTypeEnum(val string) (LaunchInstancePlatformConfigTypeEnum, bool) { + enum, ok := mappingLaunchInstancePlatformConfigTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_request_response.go new file mode 100644 index 000000000..764a813ec --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// LaunchInstanceRequest wrapper for the LaunchInstance operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/LaunchInstance.go.html to see an example of how to use LaunchInstanceRequest. +type LaunchInstanceRequest struct { + + // Instance details + LaunchInstanceDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request LaunchInstanceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request LaunchInstanceRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request LaunchInstanceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request LaunchInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request LaunchInstanceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// LaunchInstanceResponse wrapper for the LaunchInstance operation +type LaunchInstanceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Instance instance + Instance `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response LaunchInstanceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response LaunchInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_shape_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_shape_config_details.go new file mode 100644 index 000000000..a7cd789c8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_shape_config_details.go @@ -0,0 +1,171 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchInstanceShapeConfigDetails The shape configuration requested for the instance. +// If the parameter is provided, the instance is created with the resources that you specify. If some +// properties are missing or the entire parameter is not provided, the instance is created +// with the default configuration values for the `shape` that you specify. +// Each shape only supports certain configurable values. If the values that you provide are not valid for the +// specified `shape`, an error is returned. +type LaunchInstanceShapeConfigDetails struct { + + // The total number of OCPUs available to the instance. + Ocpus *float32 `mandatory:"false" json:"ocpus"` + + // The total number of VCPUs available to the instance. This can be used instead of OCPUs, + // in which case the actual number of OCPUs will be calculated based on this value + // and the actual hardware. This must be a multiple of 2. + Vcpus *int `mandatory:"false" json:"vcpus"` + + // The total amount of memory available to the instance, in gigabytes. + MemoryInGBs *float32 `mandatory:"false" json:"memoryInGBs"` + + // The baseline OCPU utilization for a subcore burstable VM instance. Leave this attribute blank for a + // non-burstable instance, or explicitly specify non-burstable with `BASELINE_1_1`. + // The following values are supported: + // - `BASELINE_1_8` - baseline usage is 1/8 of an OCPU. + // - `BASELINE_1_2` - baseline usage is 1/2 of an OCPU. + // - `BASELINE_1_1` - baseline usage is an entire OCPU. This represents a non-burstable instance. + BaselineOcpuUtilization LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum `mandatory:"false" json:"baselineOcpuUtilization,omitempty"` + + // The number of NVMe drives to be used for storage. A single drive has 6.8 TB available. + Nvmes *int `mandatory:"false" json:"nvmes"` + + // This field is reserved for internal use. + ResourceManagement LaunchInstanceShapeConfigDetailsResourceManagementEnum `mandatory:"false" json:"resourceManagement,omitempty"` + + // The NVMe-backed local storage capacity, in GB, for flexible dense (DenseLV) VM shapes. If the selected shape + // is DenseLV, the value must be greater than 0. For all other shapes, the value must be null (if specified); + // any non-null value for a non-DenseLV shape results in an error. + LocalVolumeSizeInGBs *int `mandatory:"false" json:"localVolumeSizeInGBs"` +} + +func (m LaunchInstanceShapeConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LaunchInstanceShapeConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum(string(m.BaselineOcpuUtilization)); !ok && m.BaselineOcpuUtilization != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BaselineOcpuUtilization: %s. Supported values are: %s.", m.BaselineOcpuUtilization, strings.Join(GetLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumStringValues(), ","))) + } + if _, ok := GetMappingLaunchInstanceShapeConfigDetailsResourceManagementEnum(string(m.ResourceManagement)); !ok && m.ResourceManagement != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceManagement: %s. Supported values are: %s.", m.ResourceManagement, strings.Join(GetLaunchInstanceShapeConfigDetailsResourceManagementEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum Enum with underlying type: string +type LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum string + +// Set of constants representing the allowable values for LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum +const ( + LaunchInstanceShapeConfigDetailsBaselineOcpuUtilization8 LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum = "BASELINE_1_8" + LaunchInstanceShapeConfigDetailsBaselineOcpuUtilization2 LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum = "BASELINE_1_2" + LaunchInstanceShapeConfigDetailsBaselineOcpuUtilization1 LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum = "BASELINE_1_1" +) + +var mappingLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum = map[string]LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum{ + "BASELINE_1_8": LaunchInstanceShapeConfigDetailsBaselineOcpuUtilization8, + "BASELINE_1_2": LaunchInstanceShapeConfigDetailsBaselineOcpuUtilization2, + "BASELINE_1_1": LaunchInstanceShapeConfigDetailsBaselineOcpuUtilization1, +} + +var mappingLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumLowerCase = map[string]LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum{ + "baseline_1_8": LaunchInstanceShapeConfigDetailsBaselineOcpuUtilization8, + "baseline_1_2": LaunchInstanceShapeConfigDetailsBaselineOcpuUtilization2, + "baseline_1_1": LaunchInstanceShapeConfigDetailsBaselineOcpuUtilization1, +} + +// GetLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumValues Enumerates the set of values for LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum +func GetLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumValues() []LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum { + values := make([]LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum, 0) + for _, v := range mappingLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum { + values = append(values, v) + } + return values +} + +// GetLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumStringValues Enumerates the set of values in String for LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum +func GetLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumStringValues() []string { + return []string{ + "BASELINE_1_8", + "BASELINE_1_2", + "BASELINE_1_1", + } +} + +// GetMappingLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum(val string) (LaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum, bool) { + enum, ok := mappingLaunchInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// LaunchInstanceShapeConfigDetailsResourceManagementEnum Enum with underlying type: string +type LaunchInstanceShapeConfigDetailsResourceManagementEnum string + +// Set of constants representing the allowable values for LaunchInstanceShapeConfigDetailsResourceManagementEnum +const ( + LaunchInstanceShapeConfigDetailsResourceManagementDynamic LaunchInstanceShapeConfigDetailsResourceManagementEnum = "DYNAMIC" + LaunchInstanceShapeConfigDetailsResourceManagementStatic LaunchInstanceShapeConfigDetailsResourceManagementEnum = "STATIC" +) + +var mappingLaunchInstanceShapeConfigDetailsResourceManagementEnum = map[string]LaunchInstanceShapeConfigDetailsResourceManagementEnum{ + "DYNAMIC": LaunchInstanceShapeConfigDetailsResourceManagementDynamic, + "STATIC": LaunchInstanceShapeConfigDetailsResourceManagementStatic, +} + +var mappingLaunchInstanceShapeConfigDetailsResourceManagementEnumLowerCase = map[string]LaunchInstanceShapeConfigDetailsResourceManagementEnum{ + "dynamic": LaunchInstanceShapeConfigDetailsResourceManagementDynamic, + "static": LaunchInstanceShapeConfigDetailsResourceManagementStatic, +} + +// GetLaunchInstanceShapeConfigDetailsResourceManagementEnumValues Enumerates the set of values for LaunchInstanceShapeConfigDetailsResourceManagementEnum +func GetLaunchInstanceShapeConfigDetailsResourceManagementEnumValues() []LaunchInstanceShapeConfigDetailsResourceManagementEnum { + values := make([]LaunchInstanceShapeConfigDetailsResourceManagementEnum, 0) + for _, v := range mappingLaunchInstanceShapeConfigDetailsResourceManagementEnum { + values = append(values, v) + } + return values +} + +// GetLaunchInstanceShapeConfigDetailsResourceManagementEnumStringValues Enumerates the set of values in String for LaunchInstanceShapeConfigDetailsResourceManagementEnum +func GetLaunchInstanceShapeConfigDetailsResourceManagementEnumStringValues() []string { + return []string{ + "DYNAMIC", + "STATIC", + } +} + +// GetMappingLaunchInstanceShapeConfigDetailsResourceManagementEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLaunchInstanceShapeConfigDetailsResourceManagementEnum(val string) (LaunchInstanceShapeConfigDetailsResourceManagementEnum, bool) { + enum, ok := mappingLaunchInstanceShapeConfigDetailsResourceManagementEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_windows_licensing_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_windows_licensing_config.go new file mode 100644 index 000000000..c8aca81ba --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_instance_windows_licensing_config.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchInstanceWindowsLicensingConfig The default windows licensing config. +type LaunchInstanceWindowsLicensingConfig struct { + + // License Type for the OS license. + // * `OCI_PROVIDED` - OCI provided license (e.g. metered $/OCPU-hour). + // * `BRING_YOUR_OWN_LICENSE` - Bring your own license. + // * `PARTNER_PROVIDED` - Partner provided license. + LicenseType LaunchInstanceLicensingConfigLicenseTypeEnum `mandatory:"false" json:"licenseType,omitempty"` +} + +// GetLicenseType returns LicenseType +func (m LaunchInstanceWindowsLicensingConfig) GetLicenseType() LaunchInstanceLicensingConfigLicenseTypeEnum { + return m.LicenseType +} + +func (m LaunchInstanceWindowsLicensingConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LaunchInstanceWindowsLicensingConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLaunchInstanceLicensingConfigLicenseTypeEnum(string(m.LicenseType)); !ok && m.LicenseType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseType: %s. Supported values are: %s.", m.LicenseType, strings.Join(GetLaunchInstanceLicensingConfigLicenseTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m LaunchInstanceWindowsLicensingConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLaunchInstanceWindowsLicensingConfig LaunchInstanceWindowsLicensingConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeLaunchInstanceWindowsLicensingConfig + }{ + "WINDOWS", + (MarshalTypeLaunchInstanceWindowsLicensingConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_options.go new file mode 100644 index 000000000..26012fc4b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_options.go @@ -0,0 +1,297 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchOptions Options for tuning the compatibility and performance of VM shapes. The values that you specify override any +// default values. +type LaunchOptions struct { + + // Emulation type for the boot volume. + // * `ISCSI` - ISCSI attached block storage device. + // * `SCSI` - Emulated SCSI disk. + // * `IDE` - Emulated IDE disk. + // * `VFIO` - Direct attached Virtual Function storage. This is the default option for local data + // volumes on platform images. + // * `PARAVIRTUALIZED` - Paravirtualized disk. This is the default for boot volumes and remote block + // storage volumes on platform images. + BootVolumeType LaunchOptionsBootVolumeTypeEnum `mandatory:"false" json:"bootVolumeType,omitempty"` + + // Firmware used to boot VM. Select the option that matches your operating system. + // * `BIOS` - Boot VM using BIOS style firmware. This is compatible with both 32 bit and 64 bit operating + // systems that boot using MBR style bootloaders. + // * `UEFI_64` - Boot VM using UEFI style firmware compatible with 64 bit operating systems. This is the + // default for platform images. + Firmware LaunchOptionsFirmwareEnum `mandatory:"false" json:"firmware,omitempty"` + + // Emulation type for the physical network interface card (NIC). + // * `E1000` - Emulated Gigabit ethernet controller. Compatible with Linux e1000 network driver. + // * `VFIO` - Direct attached Virtual Function network controller. This is the networking type + // when you launch an instance using hardware-assisted (SR-IOV) networking. + // * `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using VirtIO drivers. + // * `ACCELERATEDPV` - VM instances launch with accelerated paravirtualized networking type. + NetworkType LaunchOptionsNetworkTypeEnum `mandatory:"false" json:"networkType,omitempty"` + + // Emulation type for volume. + // * `ISCSI` - ISCSI attached block storage device. + // * `SCSI` - Emulated SCSI disk. + // * `IDE` - Emulated IDE disk. + // * `VFIO` - Direct attached Virtual Function storage. This is the default option for local data + // volumes on platform images. + // * `PARAVIRTUALIZED` - Paravirtualized disk. This is the default for boot volumes and remote block + // storage volumes on platform images. + RemoteDataVolumeType LaunchOptionsRemoteDataVolumeTypeEnum `mandatory:"false" json:"remoteDataVolumeType,omitempty"` + + // Deprecated. Instead use `isPvEncryptionInTransitEnabled` in + // LaunchInstanceDetails. + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` + + // Whether to enable consistent volume naming feature. Defaults to false. + IsConsistentVolumeNamingEnabled *bool `mandatory:"false" json:"isConsistentVolumeNamingEnabled"` +} + +func (m LaunchOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LaunchOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLaunchOptionsBootVolumeTypeEnum(string(m.BootVolumeType)); !ok && m.BootVolumeType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BootVolumeType: %s. Supported values are: %s.", m.BootVolumeType, strings.Join(GetLaunchOptionsBootVolumeTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingLaunchOptionsFirmwareEnum(string(m.Firmware)); !ok && m.Firmware != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Firmware: %s. Supported values are: %s.", m.Firmware, strings.Join(GetLaunchOptionsFirmwareEnumStringValues(), ","))) + } + if _, ok := GetMappingLaunchOptionsNetworkTypeEnum(string(m.NetworkType)); !ok && m.NetworkType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NetworkType: %s. Supported values are: %s.", m.NetworkType, strings.Join(GetLaunchOptionsNetworkTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingLaunchOptionsRemoteDataVolumeTypeEnum(string(m.RemoteDataVolumeType)); !ok && m.RemoteDataVolumeType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RemoteDataVolumeType: %s. Supported values are: %s.", m.RemoteDataVolumeType, strings.Join(GetLaunchOptionsRemoteDataVolumeTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// LaunchOptionsBootVolumeTypeEnum Enum with underlying type: string +type LaunchOptionsBootVolumeTypeEnum string + +// Set of constants representing the allowable values for LaunchOptionsBootVolumeTypeEnum +const ( + LaunchOptionsBootVolumeTypeIscsi LaunchOptionsBootVolumeTypeEnum = "ISCSI" + LaunchOptionsBootVolumeTypeScsi LaunchOptionsBootVolumeTypeEnum = "SCSI" + LaunchOptionsBootVolumeTypeIde LaunchOptionsBootVolumeTypeEnum = "IDE" + LaunchOptionsBootVolumeTypeVfio LaunchOptionsBootVolumeTypeEnum = "VFIO" + LaunchOptionsBootVolumeTypeParavirtualized LaunchOptionsBootVolumeTypeEnum = "PARAVIRTUALIZED" +) + +var mappingLaunchOptionsBootVolumeTypeEnum = map[string]LaunchOptionsBootVolumeTypeEnum{ + "ISCSI": LaunchOptionsBootVolumeTypeIscsi, + "SCSI": LaunchOptionsBootVolumeTypeScsi, + "IDE": LaunchOptionsBootVolumeTypeIde, + "VFIO": LaunchOptionsBootVolumeTypeVfio, + "PARAVIRTUALIZED": LaunchOptionsBootVolumeTypeParavirtualized, +} + +var mappingLaunchOptionsBootVolumeTypeEnumLowerCase = map[string]LaunchOptionsBootVolumeTypeEnum{ + "iscsi": LaunchOptionsBootVolumeTypeIscsi, + "scsi": LaunchOptionsBootVolumeTypeScsi, + "ide": LaunchOptionsBootVolumeTypeIde, + "vfio": LaunchOptionsBootVolumeTypeVfio, + "paravirtualized": LaunchOptionsBootVolumeTypeParavirtualized, +} + +// GetLaunchOptionsBootVolumeTypeEnumValues Enumerates the set of values for LaunchOptionsBootVolumeTypeEnum +func GetLaunchOptionsBootVolumeTypeEnumValues() []LaunchOptionsBootVolumeTypeEnum { + values := make([]LaunchOptionsBootVolumeTypeEnum, 0) + for _, v := range mappingLaunchOptionsBootVolumeTypeEnum { + values = append(values, v) + } + return values +} + +// GetLaunchOptionsBootVolumeTypeEnumStringValues Enumerates the set of values in String for LaunchOptionsBootVolumeTypeEnum +func GetLaunchOptionsBootVolumeTypeEnumStringValues() []string { + return []string{ + "ISCSI", + "SCSI", + "IDE", + "VFIO", + "PARAVIRTUALIZED", + } +} + +// GetMappingLaunchOptionsBootVolumeTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLaunchOptionsBootVolumeTypeEnum(val string) (LaunchOptionsBootVolumeTypeEnum, bool) { + enum, ok := mappingLaunchOptionsBootVolumeTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// LaunchOptionsFirmwareEnum Enum with underlying type: string +type LaunchOptionsFirmwareEnum string + +// Set of constants representing the allowable values for LaunchOptionsFirmwareEnum +const ( + LaunchOptionsFirmwareBios LaunchOptionsFirmwareEnum = "BIOS" + LaunchOptionsFirmwareUefi64 LaunchOptionsFirmwareEnum = "UEFI_64" +) + +var mappingLaunchOptionsFirmwareEnum = map[string]LaunchOptionsFirmwareEnum{ + "BIOS": LaunchOptionsFirmwareBios, + "UEFI_64": LaunchOptionsFirmwareUefi64, +} + +var mappingLaunchOptionsFirmwareEnumLowerCase = map[string]LaunchOptionsFirmwareEnum{ + "bios": LaunchOptionsFirmwareBios, + "uefi_64": LaunchOptionsFirmwareUefi64, +} + +// GetLaunchOptionsFirmwareEnumValues Enumerates the set of values for LaunchOptionsFirmwareEnum +func GetLaunchOptionsFirmwareEnumValues() []LaunchOptionsFirmwareEnum { + values := make([]LaunchOptionsFirmwareEnum, 0) + for _, v := range mappingLaunchOptionsFirmwareEnum { + values = append(values, v) + } + return values +} + +// GetLaunchOptionsFirmwareEnumStringValues Enumerates the set of values in String for LaunchOptionsFirmwareEnum +func GetLaunchOptionsFirmwareEnumStringValues() []string { + return []string{ + "BIOS", + "UEFI_64", + } +} + +// GetMappingLaunchOptionsFirmwareEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLaunchOptionsFirmwareEnum(val string) (LaunchOptionsFirmwareEnum, bool) { + enum, ok := mappingLaunchOptionsFirmwareEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// LaunchOptionsNetworkTypeEnum Enum with underlying type: string +type LaunchOptionsNetworkTypeEnum string + +// Set of constants representing the allowable values for LaunchOptionsNetworkTypeEnum +const ( + LaunchOptionsNetworkTypeE1000 LaunchOptionsNetworkTypeEnum = "E1000" + LaunchOptionsNetworkTypeVfio LaunchOptionsNetworkTypeEnum = "VFIO" + LaunchOptionsNetworkTypeParavirtualized LaunchOptionsNetworkTypeEnum = "PARAVIRTUALIZED" + LaunchOptionsNetworkTypeAcceleratedpv LaunchOptionsNetworkTypeEnum = "ACCELERATEDPV" +) + +var mappingLaunchOptionsNetworkTypeEnum = map[string]LaunchOptionsNetworkTypeEnum{ + "E1000": LaunchOptionsNetworkTypeE1000, + "VFIO": LaunchOptionsNetworkTypeVfio, + "PARAVIRTUALIZED": LaunchOptionsNetworkTypeParavirtualized, + "ACCELERATEDPV": LaunchOptionsNetworkTypeAcceleratedpv, +} + +var mappingLaunchOptionsNetworkTypeEnumLowerCase = map[string]LaunchOptionsNetworkTypeEnum{ + "e1000": LaunchOptionsNetworkTypeE1000, + "vfio": LaunchOptionsNetworkTypeVfio, + "paravirtualized": LaunchOptionsNetworkTypeParavirtualized, + "acceleratedpv": LaunchOptionsNetworkTypeAcceleratedpv, +} + +// GetLaunchOptionsNetworkTypeEnumValues Enumerates the set of values for LaunchOptionsNetworkTypeEnum +func GetLaunchOptionsNetworkTypeEnumValues() []LaunchOptionsNetworkTypeEnum { + values := make([]LaunchOptionsNetworkTypeEnum, 0) + for _, v := range mappingLaunchOptionsNetworkTypeEnum { + values = append(values, v) + } + return values +} + +// GetLaunchOptionsNetworkTypeEnumStringValues Enumerates the set of values in String for LaunchOptionsNetworkTypeEnum +func GetLaunchOptionsNetworkTypeEnumStringValues() []string { + return []string{ + "E1000", + "VFIO", + "PARAVIRTUALIZED", + "ACCELERATEDPV", + } +} + +// GetMappingLaunchOptionsNetworkTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLaunchOptionsNetworkTypeEnum(val string) (LaunchOptionsNetworkTypeEnum, bool) { + enum, ok := mappingLaunchOptionsNetworkTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// LaunchOptionsRemoteDataVolumeTypeEnum Enum with underlying type: string +type LaunchOptionsRemoteDataVolumeTypeEnum string + +// Set of constants representing the allowable values for LaunchOptionsRemoteDataVolumeTypeEnum +const ( + LaunchOptionsRemoteDataVolumeTypeIscsi LaunchOptionsRemoteDataVolumeTypeEnum = "ISCSI" + LaunchOptionsRemoteDataVolumeTypeScsi LaunchOptionsRemoteDataVolumeTypeEnum = "SCSI" + LaunchOptionsRemoteDataVolumeTypeIde LaunchOptionsRemoteDataVolumeTypeEnum = "IDE" + LaunchOptionsRemoteDataVolumeTypeVfio LaunchOptionsRemoteDataVolumeTypeEnum = "VFIO" + LaunchOptionsRemoteDataVolumeTypeParavirtualized LaunchOptionsRemoteDataVolumeTypeEnum = "PARAVIRTUALIZED" +) + +var mappingLaunchOptionsRemoteDataVolumeTypeEnum = map[string]LaunchOptionsRemoteDataVolumeTypeEnum{ + "ISCSI": LaunchOptionsRemoteDataVolumeTypeIscsi, + "SCSI": LaunchOptionsRemoteDataVolumeTypeScsi, + "IDE": LaunchOptionsRemoteDataVolumeTypeIde, + "VFIO": LaunchOptionsRemoteDataVolumeTypeVfio, + "PARAVIRTUALIZED": LaunchOptionsRemoteDataVolumeTypeParavirtualized, +} + +var mappingLaunchOptionsRemoteDataVolumeTypeEnumLowerCase = map[string]LaunchOptionsRemoteDataVolumeTypeEnum{ + "iscsi": LaunchOptionsRemoteDataVolumeTypeIscsi, + "scsi": LaunchOptionsRemoteDataVolumeTypeScsi, + "ide": LaunchOptionsRemoteDataVolumeTypeIde, + "vfio": LaunchOptionsRemoteDataVolumeTypeVfio, + "paravirtualized": LaunchOptionsRemoteDataVolumeTypeParavirtualized, +} + +// GetLaunchOptionsRemoteDataVolumeTypeEnumValues Enumerates the set of values for LaunchOptionsRemoteDataVolumeTypeEnum +func GetLaunchOptionsRemoteDataVolumeTypeEnumValues() []LaunchOptionsRemoteDataVolumeTypeEnum { + values := make([]LaunchOptionsRemoteDataVolumeTypeEnum, 0) + for _, v := range mappingLaunchOptionsRemoteDataVolumeTypeEnum { + values = append(values, v) + } + return values +} + +// GetLaunchOptionsRemoteDataVolumeTypeEnumStringValues Enumerates the set of values in String for LaunchOptionsRemoteDataVolumeTypeEnum +func GetLaunchOptionsRemoteDataVolumeTypeEnumStringValues() []string { + return []string{ + "ISCSI", + "SCSI", + "IDE", + "VFIO", + "PARAVIRTUALIZED", + } +} + +// GetMappingLaunchOptionsRemoteDataVolumeTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLaunchOptionsRemoteDataVolumeTypeEnum(val string) (LaunchOptionsRemoteDataVolumeTypeEnum, bool) { + enum, ok := mappingLaunchOptionsRemoteDataVolumeTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/letter_of_authority.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/letter_of_authority.go new file mode 100644 index 000000000..17515b2e9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/letter_of_authority.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LetterOfAuthority The Letter of Authority for the cross-connect. You must submit this letter when +// requesting cabling for the cross-connect at the FastConnect location. +type LetterOfAuthority struct { + + // The name of the entity authorized by this Letter of Authority. + AuthorizedEntityName *string `mandatory:"false" json:"authorizedEntityName"` + + // The type of cross-connect fiber, termination, and optical specification. + CircuitType LetterOfAuthorityCircuitTypeEnum `mandatory:"false" json:"circuitType,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect. + CrossConnectId *string `mandatory:"false" json:"crossConnectId"` + + // The address of the FastConnect location. + FacilityLocation *string `mandatory:"false" json:"facilityLocation"` + + // The meet-me room port for this cross-connect. + PortName *string `mandatory:"false" json:"portName"` + + // The date and time when the Letter of Authority expires, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeExpires *common.SDKTime `mandatory:"false" json:"timeExpires"` + + // The date and time the Letter of Authority was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeIssued *common.SDKTime `mandatory:"false" json:"timeIssued"` +} + +func (m LetterOfAuthority) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LetterOfAuthority) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLetterOfAuthorityCircuitTypeEnum(string(m.CircuitType)); !ok && m.CircuitType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CircuitType: %s. Supported values are: %s.", m.CircuitType, strings.Join(GetLetterOfAuthorityCircuitTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// LetterOfAuthorityCircuitTypeEnum Enum with underlying type: string +type LetterOfAuthorityCircuitTypeEnum string + +// Set of constants representing the allowable values for LetterOfAuthorityCircuitTypeEnum +const ( + LetterOfAuthorityCircuitTypeLc LetterOfAuthorityCircuitTypeEnum = "Single_mode_LC" + LetterOfAuthorityCircuitTypeSc LetterOfAuthorityCircuitTypeEnum = "Single_mode_SC" +) + +var mappingLetterOfAuthorityCircuitTypeEnum = map[string]LetterOfAuthorityCircuitTypeEnum{ + "Single_mode_LC": LetterOfAuthorityCircuitTypeLc, + "Single_mode_SC": LetterOfAuthorityCircuitTypeSc, +} + +var mappingLetterOfAuthorityCircuitTypeEnumLowerCase = map[string]LetterOfAuthorityCircuitTypeEnum{ + "single_mode_lc": LetterOfAuthorityCircuitTypeLc, + "single_mode_sc": LetterOfAuthorityCircuitTypeSc, +} + +// GetLetterOfAuthorityCircuitTypeEnumValues Enumerates the set of values for LetterOfAuthorityCircuitTypeEnum +func GetLetterOfAuthorityCircuitTypeEnumValues() []LetterOfAuthorityCircuitTypeEnum { + values := make([]LetterOfAuthorityCircuitTypeEnum, 0) + for _, v := range mappingLetterOfAuthorityCircuitTypeEnum { + values = append(values, v) + } + return values +} + +// GetLetterOfAuthorityCircuitTypeEnumStringValues Enumerates the set of values in String for LetterOfAuthorityCircuitTypeEnum +func GetLetterOfAuthorityCircuitTypeEnumStringValues() []string { + return []string{ + "Single_mode_LC", + "Single_mode_SC", + } +} + +// GetMappingLetterOfAuthorityCircuitTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLetterOfAuthorityCircuitTypeEnum(val string) (LetterOfAuthorityCircuitTypeEnum, bool) { + enum, ok := mappingLetterOfAuthorityCircuitTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/licensing_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/licensing_config.go new file mode 100644 index 000000000..ec14b2e4f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/licensing_config.go @@ -0,0 +1,144 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LicensingConfig Configuration of the Operating System license. +type LicensingConfig struct { + + // Operating System type of the Configuration. + Type LicensingConfigTypeEnum `mandatory:"false" json:"type,omitempty"` + + // License Type for the OS license. + // * `OCI_PROVIDED` - OCI provided license (e.g. metered $/OCPU-hour). + // * `BRING_YOUR_OWN_LICENSE` - Bring your own license. + // * `PARTNER_PROVIDED` - Partner provided license. + LicenseType LicensingConfigLicenseTypeEnum `mandatory:"false" json:"licenseType,omitempty"` + + // The Operating System version of the license config. + OsVersion *string `mandatory:"false" json:"osVersion"` +} + +func (m LicensingConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LicensingConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLicensingConfigTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetLicensingConfigTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingLicensingConfigLicenseTypeEnum(string(m.LicenseType)); !ok && m.LicenseType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseType: %s. Supported values are: %s.", m.LicenseType, strings.Join(GetLicensingConfigLicenseTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// LicensingConfigTypeEnum Enum with underlying type: string +type LicensingConfigTypeEnum string + +// Set of constants representing the allowable values for LicensingConfigTypeEnum +const ( + LicensingConfigTypeWindows LicensingConfigTypeEnum = "WINDOWS" +) + +var mappingLicensingConfigTypeEnum = map[string]LicensingConfigTypeEnum{ + "WINDOWS": LicensingConfigTypeWindows, +} + +var mappingLicensingConfigTypeEnumLowerCase = map[string]LicensingConfigTypeEnum{ + "windows": LicensingConfigTypeWindows, +} + +// GetLicensingConfigTypeEnumValues Enumerates the set of values for LicensingConfigTypeEnum +func GetLicensingConfigTypeEnumValues() []LicensingConfigTypeEnum { + values := make([]LicensingConfigTypeEnum, 0) + for _, v := range mappingLicensingConfigTypeEnum { + values = append(values, v) + } + return values +} + +// GetLicensingConfigTypeEnumStringValues Enumerates the set of values in String for LicensingConfigTypeEnum +func GetLicensingConfigTypeEnumStringValues() []string { + return []string{ + "WINDOWS", + } +} + +// GetMappingLicensingConfigTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLicensingConfigTypeEnum(val string) (LicensingConfigTypeEnum, bool) { + enum, ok := mappingLicensingConfigTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// LicensingConfigLicenseTypeEnum Enum with underlying type: string +type LicensingConfigLicenseTypeEnum string + +// Set of constants representing the allowable values for LicensingConfigLicenseTypeEnum +const ( + LicensingConfigLicenseTypeOciProvided LicensingConfigLicenseTypeEnum = "OCI_PROVIDED" + LicensingConfigLicenseTypeBringYourOwnLicense LicensingConfigLicenseTypeEnum = "BRING_YOUR_OWN_LICENSE" + LicensingConfigLicenseTypePartnerProvided LicensingConfigLicenseTypeEnum = "PARTNER_PROVIDED" +) + +var mappingLicensingConfigLicenseTypeEnum = map[string]LicensingConfigLicenseTypeEnum{ + "OCI_PROVIDED": LicensingConfigLicenseTypeOciProvided, + "BRING_YOUR_OWN_LICENSE": LicensingConfigLicenseTypeBringYourOwnLicense, + "PARTNER_PROVIDED": LicensingConfigLicenseTypePartnerProvided, +} + +var mappingLicensingConfigLicenseTypeEnumLowerCase = map[string]LicensingConfigLicenseTypeEnum{ + "oci_provided": LicensingConfigLicenseTypeOciProvided, + "bring_your_own_license": LicensingConfigLicenseTypeBringYourOwnLicense, + "partner_provided": LicensingConfigLicenseTypePartnerProvided, +} + +// GetLicensingConfigLicenseTypeEnumValues Enumerates the set of values for LicensingConfigLicenseTypeEnum +func GetLicensingConfigLicenseTypeEnumValues() []LicensingConfigLicenseTypeEnum { + values := make([]LicensingConfigLicenseTypeEnum, 0) + for _, v := range mappingLicensingConfigLicenseTypeEnum { + values = append(values, v) + } + return values +} + +// GetLicensingConfigLicenseTypeEnumStringValues Enumerates the set of values in String for LicensingConfigLicenseTypeEnum +func GetLicensingConfigLicenseTypeEnumStringValues() []string { + return []string{ + "OCI_PROVIDED", + "BRING_YOUR_OWN_LICENSE", + "PARTNER_PROVIDED", + } +} + +// GetMappingLicensingConfigLicenseTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLicensingConfigLicenseTypeEnum(val string) (LicensingConfigLicenseTypeEnum, bool) { + enum, ok := mappingLicensingConfigLicenseTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_allowed_peer_regions_for_remote_peering_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_allowed_peer_regions_for_remote_peering_request_response.go new file mode 100644 index 000000000..b948143ae --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_allowed_peer_regions_for_remote_peering_request_response.go @@ -0,0 +1,88 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAllowedPeerRegionsForRemotePeeringRequest wrapper for the ListAllowedPeerRegionsForRemotePeering operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListAllowedPeerRegionsForRemotePeering.go.html to see an example of how to use ListAllowedPeerRegionsForRemotePeeringRequest. +type ListAllowedPeerRegionsForRemotePeeringRequest struct { + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListAllowedPeerRegionsForRemotePeeringRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAllowedPeerRegionsForRemotePeeringRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListAllowedPeerRegionsForRemotePeeringRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAllowedPeerRegionsForRemotePeeringRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListAllowedPeerRegionsForRemotePeeringRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAllowedPeerRegionsForRemotePeeringResponse wrapper for the ListAllowedPeerRegionsForRemotePeering operation +type ListAllowedPeerRegionsForRemotePeeringResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []PeerRegionForRemotePeering instance + Items []PeerRegionForRemotePeering `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListAllowedPeerRegionsForRemotePeeringResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAllowedPeerRegionsForRemotePeeringResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_app_catalog_listing_resource_versions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_app_catalog_listing_resource_versions_request_response.go new file mode 100644 index 000000000..e094f3f5e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_app_catalog_listing_resource_versions_request_response.go @@ -0,0 +1,156 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAppCatalogListingResourceVersionsRequest wrapper for the ListAppCatalogListingResourceVersions operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListAppCatalogListingResourceVersions.go.html to see an example of how to use ListAppCatalogListingResourceVersionsRequest. +type ListAppCatalogListingResourceVersionsRequest struct { + + // The OCID of the listing. + ListingId *string `mandatory:"true" contributesTo:"path" name:"listingId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListAppCatalogListingResourceVersionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListAppCatalogListingResourceVersionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAppCatalogListingResourceVersionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListAppCatalogListingResourceVersionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAppCatalogListingResourceVersionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListAppCatalogListingResourceVersionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListAppCatalogListingResourceVersionsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListAppCatalogListingResourceVersionsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAppCatalogListingResourceVersionsResponse wrapper for the ListAppCatalogListingResourceVersions operation +type ListAppCatalogListingResourceVersionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []AppCatalogListingResourceVersionSummary instances + Items []AppCatalogListingResourceVersionSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListAppCatalogListingResourceVersionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAppCatalogListingResourceVersionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListAppCatalogListingResourceVersionsSortOrderEnum Enum with underlying type: string +type ListAppCatalogListingResourceVersionsSortOrderEnum string + +// Set of constants representing the allowable values for ListAppCatalogListingResourceVersionsSortOrderEnum +const ( + ListAppCatalogListingResourceVersionsSortOrderAsc ListAppCatalogListingResourceVersionsSortOrderEnum = "ASC" + ListAppCatalogListingResourceVersionsSortOrderDesc ListAppCatalogListingResourceVersionsSortOrderEnum = "DESC" +) + +var mappingListAppCatalogListingResourceVersionsSortOrderEnum = map[string]ListAppCatalogListingResourceVersionsSortOrderEnum{ + "ASC": ListAppCatalogListingResourceVersionsSortOrderAsc, + "DESC": ListAppCatalogListingResourceVersionsSortOrderDesc, +} + +var mappingListAppCatalogListingResourceVersionsSortOrderEnumLowerCase = map[string]ListAppCatalogListingResourceVersionsSortOrderEnum{ + "asc": ListAppCatalogListingResourceVersionsSortOrderAsc, + "desc": ListAppCatalogListingResourceVersionsSortOrderDesc, +} + +// GetListAppCatalogListingResourceVersionsSortOrderEnumValues Enumerates the set of values for ListAppCatalogListingResourceVersionsSortOrderEnum +func GetListAppCatalogListingResourceVersionsSortOrderEnumValues() []ListAppCatalogListingResourceVersionsSortOrderEnum { + values := make([]ListAppCatalogListingResourceVersionsSortOrderEnum, 0) + for _, v := range mappingListAppCatalogListingResourceVersionsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListAppCatalogListingResourceVersionsSortOrderEnumStringValues Enumerates the set of values in String for ListAppCatalogListingResourceVersionsSortOrderEnum +func GetListAppCatalogListingResourceVersionsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListAppCatalogListingResourceVersionsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAppCatalogListingResourceVersionsSortOrderEnum(val string) (ListAppCatalogListingResourceVersionsSortOrderEnum, bool) { + enum, ok := mappingListAppCatalogListingResourceVersionsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_app_catalog_listings_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_app_catalog_listings_request_response.go new file mode 100644 index 000000000..e47ec2c36 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_app_catalog_listings_request_response.go @@ -0,0 +1,162 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAppCatalogListingsRequest wrapper for the ListAppCatalogListings operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListAppCatalogListings.go.html to see an example of how to use ListAppCatalogListingsRequest. +type ListAppCatalogListingsRequest struct { + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListAppCatalogListingsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to return only the publisher that matches the given publisher name exactly. + PublisherName *string `mandatory:"false" contributesTo:"query" name:"publisherName"` + + // A filter to return only publishers that match the given publisher type exactly. Valid types are OCI, ORACLE, TRUSTED, STANDARD. + PublisherType *string `mandatory:"false" contributesTo:"query" name:"publisherType"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListAppCatalogListingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAppCatalogListingsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListAppCatalogListingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAppCatalogListingsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListAppCatalogListingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListAppCatalogListingsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListAppCatalogListingsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAppCatalogListingsResponse wrapper for the ListAppCatalogListings operation +type ListAppCatalogListingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []AppCatalogListingSummary instances + Items []AppCatalogListingSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListAppCatalogListingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAppCatalogListingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListAppCatalogListingsSortOrderEnum Enum with underlying type: string +type ListAppCatalogListingsSortOrderEnum string + +// Set of constants representing the allowable values for ListAppCatalogListingsSortOrderEnum +const ( + ListAppCatalogListingsSortOrderAsc ListAppCatalogListingsSortOrderEnum = "ASC" + ListAppCatalogListingsSortOrderDesc ListAppCatalogListingsSortOrderEnum = "DESC" +) + +var mappingListAppCatalogListingsSortOrderEnum = map[string]ListAppCatalogListingsSortOrderEnum{ + "ASC": ListAppCatalogListingsSortOrderAsc, + "DESC": ListAppCatalogListingsSortOrderDesc, +} + +var mappingListAppCatalogListingsSortOrderEnumLowerCase = map[string]ListAppCatalogListingsSortOrderEnum{ + "asc": ListAppCatalogListingsSortOrderAsc, + "desc": ListAppCatalogListingsSortOrderDesc, +} + +// GetListAppCatalogListingsSortOrderEnumValues Enumerates the set of values for ListAppCatalogListingsSortOrderEnum +func GetListAppCatalogListingsSortOrderEnumValues() []ListAppCatalogListingsSortOrderEnum { + values := make([]ListAppCatalogListingsSortOrderEnum, 0) + for _, v := range mappingListAppCatalogListingsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListAppCatalogListingsSortOrderEnumStringValues Enumerates the set of values in String for ListAppCatalogListingsSortOrderEnum +func GetListAppCatalogListingsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListAppCatalogListingsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAppCatalogListingsSortOrderEnum(val string) (ListAppCatalogListingsSortOrderEnum, bool) { + enum, ok := mappingListAppCatalogListingsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_app_catalog_subscriptions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_app_catalog_subscriptions_request_response.go new file mode 100644 index 000000000..e70f40dcd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_app_catalog_subscriptions_request_response.go @@ -0,0 +1,213 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAppCatalogSubscriptionsRequest wrapper for the ListAppCatalogSubscriptions operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListAppCatalogSubscriptions.go.html to see an example of how to use ListAppCatalogSubscriptionsRequest. +type ListAppCatalogSubscriptionsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListAppCatalogSubscriptionsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListAppCatalogSubscriptionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to return only the listings that matches the given listing id. + ListingId *string `mandatory:"false" contributesTo:"query" name:"listingId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListAppCatalogSubscriptionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAppCatalogSubscriptionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListAppCatalogSubscriptionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAppCatalogSubscriptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListAppCatalogSubscriptionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListAppCatalogSubscriptionsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListAppCatalogSubscriptionsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListAppCatalogSubscriptionsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListAppCatalogSubscriptionsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAppCatalogSubscriptionsResponse wrapper for the ListAppCatalogSubscriptions operation +type ListAppCatalogSubscriptionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []AppCatalogSubscriptionSummary instances + Items []AppCatalogSubscriptionSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListAppCatalogSubscriptionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAppCatalogSubscriptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListAppCatalogSubscriptionsSortByEnum Enum with underlying type: string +type ListAppCatalogSubscriptionsSortByEnum string + +// Set of constants representing the allowable values for ListAppCatalogSubscriptionsSortByEnum +const ( + ListAppCatalogSubscriptionsSortByTimecreated ListAppCatalogSubscriptionsSortByEnum = "TIMECREATED" + ListAppCatalogSubscriptionsSortByDisplayname ListAppCatalogSubscriptionsSortByEnum = "DISPLAYNAME" +) + +var mappingListAppCatalogSubscriptionsSortByEnum = map[string]ListAppCatalogSubscriptionsSortByEnum{ + "TIMECREATED": ListAppCatalogSubscriptionsSortByTimecreated, + "DISPLAYNAME": ListAppCatalogSubscriptionsSortByDisplayname, +} + +var mappingListAppCatalogSubscriptionsSortByEnumLowerCase = map[string]ListAppCatalogSubscriptionsSortByEnum{ + "timecreated": ListAppCatalogSubscriptionsSortByTimecreated, + "displayname": ListAppCatalogSubscriptionsSortByDisplayname, +} + +// GetListAppCatalogSubscriptionsSortByEnumValues Enumerates the set of values for ListAppCatalogSubscriptionsSortByEnum +func GetListAppCatalogSubscriptionsSortByEnumValues() []ListAppCatalogSubscriptionsSortByEnum { + values := make([]ListAppCatalogSubscriptionsSortByEnum, 0) + for _, v := range mappingListAppCatalogSubscriptionsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListAppCatalogSubscriptionsSortByEnumStringValues Enumerates the set of values in String for ListAppCatalogSubscriptionsSortByEnum +func GetListAppCatalogSubscriptionsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListAppCatalogSubscriptionsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAppCatalogSubscriptionsSortByEnum(val string) (ListAppCatalogSubscriptionsSortByEnum, bool) { + enum, ok := mappingListAppCatalogSubscriptionsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAppCatalogSubscriptionsSortOrderEnum Enum with underlying type: string +type ListAppCatalogSubscriptionsSortOrderEnum string + +// Set of constants representing the allowable values for ListAppCatalogSubscriptionsSortOrderEnum +const ( + ListAppCatalogSubscriptionsSortOrderAsc ListAppCatalogSubscriptionsSortOrderEnum = "ASC" + ListAppCatalogSubscriptionsSortOrderDesc ListAppCatalogSubscriptionsSortOrderEnum = "DESC" +) + +var mappingListAppCatalogSubscriptionsSortOrderEnum = map[string]ListAppCatalogSubscriptionsSortOrderEnum{ + "ASC": ListAppCatalogSubscriptionsSortOrderAsc, + "DESC": ListAppCatalogSubscriptionsSortOrderDesc, +} + +var mappingListAppCatalogSubscriptionsSortOrderEnumLowerCase = map[string]ListAppCatalogSubscriptionsSortOrderEnum{ + "asc": ListAppCatalogSubscriptionsSortOrderAsc, + "desc": ListAppCatalogSubscriptionsSortOrderDesc, +} + +// GetListAppCatalogSubscriptionsSortOrderEnumValues Enumerates the set of values for ListAppCatalogSubscriptionsSortOrderEnum +func GetListAppCatalogSubscriptionsSortOrderEnumValues() []ListAppCatalogSubscriptionsSortOrderEnum { + values := make([]ListAppCatalogSubscriptionsSortOrderEnum, 0) + for _, v := range mappingListAppCatalogSubscriptionsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListAppCatalogSubscriptionsSortOrderEnumStringValues Enumerates the set of values in String for ListAppCatalogSubscriptionsSortOrderEnum +func GetListAppCatalogSubscriptionsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListAppCatalogSubscriptionsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAppCatalogSubscriptionsSortOrderEnum(val string) (ListAppCatalogSubscriptionsSortOrderEnum, bool) { + enum, ok := mappingListAppCatalogSubscriptionsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_block_volume_replicas_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_block_volume_replicas_request_response.go new file mode 100644 index 000000000..c52f16db7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_block_volume_replicas_request_response.go @@ -0,0 +1,226 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListBlockVolumeReplicasRequest wrapper for the ListBlockVolumeReplicas operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBlockVolumeReplicas.go.html to see an example of how to use ListBlockVolumeReplicasRequest. +type ListBlockVolumeReplicasRequest struct { + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The OCID of the volume group replica. + VolumeGroupReplicaId *string `mandatory:"false" contributesTo:"query" name:"volumeGroupReplicaId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListBlockVolumeReplicasSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListBlockVolumeReplicasSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + LifecycleState BlockVolumeReplicaLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListBlockVolumeReplicasRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListBlockVolumeReplicasRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListBlockVolumeReplicasRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBlockVolumeReplicasRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListBlockVolumeReplicasRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListBlockVolumeReplicasSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListBlockVolumeReplicasSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListBlockVolumeReplicasSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListBlockVolumeReplicasSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingBlockVolumeReplicaLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetBlockVolumeReplicaLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListBlockVolumeReplicasResponse wrapper for the ListBlockVolumeReplicas operation +type ListBlockVolumeReplicasResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []BlockVolumeReplica instances + Items []BlockVolumeReplica `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListBlockVolumeReplicasResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListBlockVolumeReplicasResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListBlockVolumeReplicasSortByEnum Enum with underlying type: string +type ListBlockVolumeReplicasSortByEnum string + +// Set of constants representing the allowable values for ListBlockVolumeReplicasSortByEnum +const ( + ListBlockVolumeReplicasSortByTimecreated ListBlockVolumeReplicasSortByEnum = "TIMECREATED" + ListBlockVolumeReplicasSortByDisplayname ListBlockVolumeReplicasSortByEnum = "DISPLAYNAME" +) + +var mappingListBlockVolumeReplicasSortByEnum = map[string]ListBlockVolumeReplicasSortByEnum{ + "TIMECREATED": ListBlockVolumeReplicasSortByTimecreated, + "DISPLAYNAME": ListBlockVolumeReplicasSortByDisplayname, +} + +var mappingListBlockVolumeReplicasSortByEnumLowerCase = map[string]ListBlockVolumeReplicasSortByEnum{ + "timecreated": ListBlockVolumeReplicasSortByTimecreated, + "displayname": ListBlockVolumeReplicasSortByDisplayname, +} + +// GetListBlockVolumeReplicasSortByEnumValues Enumerates the set of values for ListBlockVolumeReplicasSortByEnum +func GetListBlockVolumeReplicasSortByEnumValues() []ListBlockVolumeReplicasSortByEnum { + values := make([]ListBlockVolumeReplicasSortByEnum, 0) + for _, v := range mappingListBlockVolumeReplicasSortByEnum { + values = append(values, v) + } + return values +} + +// GetListBlockVolumeReplicasSortByEnumStringValues Enumerates the set of values in String for ListBlockVolumeReplicasSortByEnum +func GetListBlockVolumeReplicasSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListBlockVolumeReplicasSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBlockVolumeReplicasSortByEnum(val string) (ListBlockVolumeReplicasSortByEnum, bool) { + enum, ok := mappingListBlockVolumeReplicasSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListBlockVolumeReplicasSortOrderEnum Enum with underlying type: string +type ListBlockVolumeReplicasSortOrderEnum string + +// Set of constants representing the allowable values for ListBlockVolumeReplicasSortOrderEnum +const ( + ListBlockVolumeReplicasSortOrderAsc ListBlockVolumeReplicasSortOrderEnum = "ASC" + ListBlockVolumeReplicasSortOrderDesc ListBlockVolumeReplicasSortOrderEnum = "DESC" +) + +var mappingListBlockVolumeReplicasSortOrderEnum = map[string]ListBlockVolumeReplicasSortOrderEnum{ + "ASC": ListBlockVolumeReplicasSortOrderAsc, + "DESC": ListBlockVolumeReplicasSortOrderDesc, +} + +var mappingListBlockVolumeReplicasSortOrderEnumLowerCase = map[string]ListBlockVolumeReplicasSortOrderEnum{ + "asc": ListBlockVolumeReplicasSortOrderAsc, + "desc": ListBlockVolumeReplicasSortOrderDesc, +} + +// GetListBlockVolumeReplicasSortOrderEnumValues Enumerates the set of values for ListBlockVolumeReplicasSortOrderEnum +func GetListBlockVolumeReplicasSortOrderEnumValues() []ListBlockVolumeReplicasSortOrderEnum { + values := make([]ListBlockVolumeReplicasSortOrderEnum, 0) + for _, v := range mappingListBlockVolumeReplicasSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListBlockVolumeReplicasSortOrderEnumStringValues Enumerates the set of values in String for ListBlockVolumeReplicasSortOrderEnum +func GetListBlockVolumeReplicasSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListBlockVolumeReplicasSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBlockVolumeReplicasSortOrderEnum(val string) (ListBlockVolumeReplicasSortOrderEnum, bool) { + enum, ok := mappingListBlockVolumeReplicasSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_boot_volume_attachments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_boot_volume_attachments_request_response.go new file mode 100644 index 000000000..dc95fa67b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_boot_volume_attachments_request_response.go @@ -0,0 +1,117 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListBootVolumeAttachmentsRequest wrapper for the ListBootVolumeAttachments operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBootVolumeAttachments.go.html to see an example of how to use ListBootVolumeAttachmentsRequest. +type ListBootVolumeAttachmentsRequest struct { + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID of the instance. + InstanceId *string `mandatory:"false" contributesTo:"query" name:"instanceId"` + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"false" contributesTo:"query" name:"bootVolumeId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListBootVolumeAttachmentsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListBootVolumeAttachmentsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListBootVolumeAttachmentsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBootVolumeAttachmentsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListBootVolumeAttachmentsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListBootVolumeAttachmentsResponse wrapper for the ListBootVolumeAttachments operation +type ListBootVolumeAttachmentsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []BootVolumeAttachment instances + Items []BootVolumeAttachment `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListBootVolumeAttachmentsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListBootVolumeAttachmentsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_boot_volume_backups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_boot_volume_backups_request_response.go new file mode 100644 index 000000000..b4c9998f1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_boot_volume_backups_request_response.go @@ -0,0 +1,226 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListBootVolumeBackupsRequest wrapper for the ListBootVolumeBackups operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBootVolumeBackups.go.html to see an example of how to use ListBootVolumeBackupsRequest. +type ListBootVolumeBackupsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"false" contributesTo:"query" name:"bootVolumeId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // A filter to return only resources that originated from the given source boot volume backup. + SourceBootVolumeBackupId *string `mandatory:"false" contributesTo:"query" name:"sourceBootVolumeBackupId"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListBootVolumeBackupsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListBootVolumeBackupsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle state. The state value is + // case-insensitive. + LifecycleState BootVolumeBackupLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListBootVolumeBackupsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListBootVolumeBackupsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListBootVolumeBackupsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBootVolumeBackupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListBootVolumeBackupsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListBootVolumeBackupsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListBootVolumeBackupsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListBootVolumeBackupsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListBootVolumeBackupsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingBootVolumeBackupLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetBootVolumeBackupLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListBootVolumeBackupsResponse wrapper for the ListBootVolumeBackups operation +type ListBootVolumeBackupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []BootVolumeBackup instances + Items []BootVolumeBackup `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListBootVolumeBackupsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListBootVolumeBackupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListBootVolumeBackupsSortByEnum Enum with underlying type: string +type ListBootVolumeBackupsSortByEnum string + +// Set of constants representing the allowable values for ListBootVolumeBackupsSortByEnum +const ( + ListBootVolumeBackupsSortByTimecreated ListBootVolumeBackupsSortByEnum = "TIMECREATED" + ListBootVolumeBackupsSortByDisplayname ListBootVolumeBackupsSortByEnum = "DISPLAYNAME" +) + +var mappingListBootVolumeBackupsSortByEnum = map[string]ListBootVolumeBackupsSortByEnum{ + "TIMECREATED": ListBootVolumeBackupsSortByTimecreated, + "DISPLAYNAME": ListBootVolumeBackupsSortByDisplayname, +} + +var mappingListBootVolumeBackupsSortByEnumLowerCase = map[string]ListBootVolumeBackupsSortByEnum{ + "timecreated": ListBootVolumeBackupsSortByTimecreated, + "displayname": ListBootVolumeBackupsSortByDisplayname, +} + +// GetListBootVolumeBackupsSortByEnumValues Enumerates the set of values for ListBootVolumeBackupsSortByEnum +func GetListBootVolumeBackupsSortByEnumValues() []ListBootVolumeBackupsSortByEnum { + values := make([]ListBootVolumeBackupsSortByEnum, 0) + for _, v := range mappingListBootVolumeBackupsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListBootVolumeBackupsSortByEnumStringValues Enumerates the set of values in String for ListBootVolumeBackupsSortByEnum +func GetListBootVolumeBackupsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListBootVolumeBackupsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBootVolumeBackupsSortByEnum(val string) (ListBootVolumeBackupsSortByEnum, bool) { + enum, ok := mappingListBootVolumeBackupsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListBootVolumeBackupsSortOrderEnum Enum with underlying type: string +type ListBootVolumeBackupsSortOrderEnum string + +// Set of constants representing the allowable values for ListBootVolumeBackupsSortOrderEnum +const ( + ListBootVolumeBackupsSortOrderAsc ListBootVolumeBackupsSortOrderEnum = "ASC" + ListBootVolumeBackupsSortOrderDesc ListBootVolumeBackupsSortOrderEnum = "DESC" +) + +var mappingListBootVolumeBackupsSortOrderEnum = map[string]ListBootVolumeBackupsSortOrderEnum{ + "ASC": ListBootVolumeBackupsSortOrderAsc, + "DESC": ListBootVolumeBackupsSortOrderDesc, +} + +var mappingListBootVolumeBackupsSortOrderEnumLowerCase = map[string]ListBootVolumeBackupsSortOrderEnum{ + "asc": ListBootVolumeBackupsSortOrderAsc, + "desc": ListBootVolumeBackupsSortOrderDesc, +} + +// GetListBootVolumeBackupsSortOrderEnumValues Enumerates the set of values for ListBootVolumeBackupsSortOrderEnum +func GetListBootVolumeBackupsSortOrderEnumValues() []ListBootVolumeBackupsSortOrderEnum { + values := make([]ListBootVolumeBackupsSortOrderEnum, 0) + for _, v := range mappingListBootVolumeBackupsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListBootVolumeBackupsSortOrderEnumStringValues Enumerates the set of values in String for ListBootVolumeBackupsSortOrderEnum +func GetListBootVolumeBackupsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListBootVolumeBackupsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBootVolumeBackupsSortOrderEnum(val string) (ListBootVolumeBackupsSortOrderEnum, bool) { + enum, ok := mappingListBootVolumeBackupsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_boot_volume_replicas_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_boot_volume_replicas_request_response.go new file mode 100644 index 000000000..e8bb9cf6a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_boot_volume_replicas_request_response.go @@ -0,0 +1,226 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListBootVolumeReplicasRequest wrapper for the ListBootVolumeReplicas operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBootVolumeReplicas.go.html to see an example of how to use ListBootVolumeReplicasRequest. +type ListBootVolumeReplicasRequest struct { + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The OCID of the volume group replica. + VolumeGroupReplicaId *string `mandatory:"false" contributesTo:"query" name:"volumeGroupReplicaId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListBootVolumeReplicasSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListBootVolumeReplicasSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + LifecycleState BootVolumeReplicaLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListBootVolumeReplicasRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListBootVolumeReplicasRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListBootVolumeReplicasRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBootVolumeReplicasRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListBootVolumeReplicasRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListBootVolumeReplicasSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListBootVolumeReplicasSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListBootVolumeReplicasSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListBootVolumeReplicasSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingBootVolumeReplicaLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetBootVolumeReplicaLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListBootVolumeReplicasResponse wrapper for the ListBootVolumeReplicas operation +type ListBootVolumeReplicasResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []BootVolumeReplica instances + Items []BootVolumeReplica `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListBootVolumeReplicasResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListBootVolumeReplicasResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListBootVolumeReplicasSortByEnum Enum with underlying type: string +type ListBootVolumeReplicasSortByEnum string + +// Set of constants representing the allowable values for ListBootVolumeReplicasSortByEnum +const ( + ListBootVolumeReplicasSortByTimecreated ListBootVolumeReplicasSortByEnum = "TIMECREATED" + ListBootVolumeReplicasSortByDisplayname ListBootVolumeReplicasSortByEnum = "DISPLAYNAME" +) + +var mappingListBootVolumeReplicasSortByEnum = map[string]ListBootVolumeReplicasSortByEnum{ + "TIMECREATED": ListBootVolumeReplicasSortByTimecreated, + "DISPLAYNAME": ListBootVolumeReplicasSortByDisplayname, +} + +var mappingListBootVolumeReplicasSortByEnumLowerCase = map[string]ListBootVolumeReplicasSortByEnum{ + "timecreated": ListBootVolumeReplicasSortByTimecreated, + "displayname": ListBootVolumeReplicasSortByDisplayname, +} + +// GetListBootVolumeReplicasSortByEnumValues Enumerates the set of values for ListBootVolumeReplicasSortByEnum +func GetListBootVolumeReplicasSortByEnumValues() []ListBootVolumeReplicasSortByEnum { + values := make([]ListBootVolumeReplicasSortByEnum, 0) + for _, v := range mappingListBootVolumeReplicasSortByEnum { + values = append(values, v) + } + return values +} + +// GetListBootVolumeReplicasSortByEnumStringValues Enumerates the set of values in String for ListBootVolumeReplicasSortByEnum +func GetListBootVolumeReplicasSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListBootVolumeReplicasSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBootVolumeReplicasSortByEnum(val string) (ListBootVolumeReplicasSortByEnum, bool) { + enum, ok := mappingListBootVolumeReplicasSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListBootVolumeReplicasSortOrderEnum Enum with underlying type: string +type ListBootVolumeReplicasSortOrderEnum string + +// Set of constants representing the allowable values for ListBootVolumeReplicasSortOrderEnum +const ( + ListBootVolumeReplicasSortOrderAsc ListBootVolumeReplicasSortOrderEnum = "ASC" + ListBootVolumeReplicasSortOrderDesc ListBootVolumeReplicasSortOrderEnum = "DESC" +) + +var mappingListBootVolumeReplicasSortOrderEnum = map[string]ListBootVolumeReplicasSortOrderEnum{ + "ASC": ListBootVolumeReplicasSortOrderAsc, + "DESC": ListBootVolumeReplicasSortOrderDesc, +} + +var mappingListBootVolumeReplicasSortOrderEnumLowerCase = map[string]ListBootVolumeReplicasSortOrderEnum{ + "asc": ListBootVolumeReplicasSortOrderAsc, + "desc": ListBootVolumeReplicasSortOrderDesc, +} + +// GetListBootVolumeReplicasSortOrderEnumValues Enumerates the set of values for ListBootVolumeReplicasSortOrderEnum +func GetListBootVolumeReplicasSortOrderEnumValues() []ListBootVolumeReplicasSortOrderEnum { + values := make([]ListBootVolumeReplicasSortOrderEnum, 0) + for _, v := range mappingListBootVolumeReplicasSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListBootVolumeReplicasSortOrderEnumStringValues Enumerates the set of values in String for ListBootVolumeReplicasSortOrderEnum +func GetListBootVolumeReplicasSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListBootVolumeReplicasSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBootVolumeReplicasSortOrderEnum(val string) (ListBootVolumeReplicasSortOrderEnum, bool) { + enum, ok := mappingListBootVolumeReplicasSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_boot_volumes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_boot_volumes_request_response.go new file mode 100644 index 000000000..20cf65575 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_boot_volumes_request_response.go @@ -0,0 +1,114 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListBootVolumesRequest wrapper for the ListBootVolumes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListBootVolumes.go.html to see an example of how to use ListBootVolumesRequest. +type ListBootVolumesRequest struct { + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID of the volume group. + VolumeGroupId *string `mandatory:"false" contributesTo:"query" name:"volumeGroupId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListBootVolumesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListBootVolumesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListBootVolumesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBootVolumesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListBootVolumesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListBootVolumesResponse wrapper for the ListBootVolumes operation +type ListBootVolumesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []BootVolume instances + Items []BootVolume `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListBootVolumesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListBootVolumesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_byoasns_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_byoasns_request_response.go new file mode 100644 index 000000000..6d0eb397d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_byoasns_request_response.go @@ -0,0 +1,210 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListByoasnsRequest wrapper for the ListByoasns operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListByoasns.go.html to see an example of how to use ListByoasnsRequest. +type ListByoasnsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // A filter to return only resources that match the given lifecycle state name exactly. + LifecycleState *string `mandatory:"false" contributesTo:"query" name:"lifecycleState"` + + // The field to sort by, for byoasn List operation. + SortBy ListByoasnsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListByoasnsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListByoasnsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListByoasnsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListByoasnsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListByoasnsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListByoasnsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListByoasnsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListByoasnsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListByoasnsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListByoasnsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListByoasnsResponse wrapper for the ListByoasns operation +type ListByoasnsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ByoasnCollection instances + ByoasnCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListByoasnsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListByoasnsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListByoasnsSortByEnum Enum with underlying type: string +type ListByoasnsSortByEnum string + +// Set of constants representing the allowable values for ListByoasnsSortByEnum +const ( + ListByoasnsSortByTimecreated ListByoasnsSortByEnum = "TIMECREATED" + ListByoasnsSortByDisplayname ListByoasnsSortByEnum = "DISPLAYNAME" +) + +var mappingListByoasnsSortByEnum = map[string]ListByoasnsSortByEnum{ + "TIMECREATED": ListByoasnsSortByTimecreated, + "DISPLAYNAME": ListByoasnsSortByDisplayname, +} + +var mappingListByoasnsSortByEnumLowerCase = map[string]ListByoasnsSortByEnum{ + "timecreated": ListByoasnsSortByTimecreated, + "displayname": ListByoasnsSortByDisplayname, +} + +// GetListByoasnsSortByEnumValues Enumerates the set of values for ListByoasnsSortByEnum +func GetListByoasnsSortByEnumValues() []ListByoasnsSortByEnum { + values := make([]ListByoasnsSortByEnum, 0) + for _, v := range mappingListByoasnsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListByoasnsSortByEnumStringValues Enumerates the set of values in String for ListByoasnsSortByEnum +func GetListByoasnsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListByoasnsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListByoasnsSortByEnum(val string) (ListByoasnsSortByEnum, bool) { + enum, ok := mappingListByoasnsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListByoasnsSortOrderEnum Enum with underlying type: string +type ListByoasnsSortOrderEnum string + +// Set of constants representing the allowable values for ListByoasnsSortOrderEnum +const ( + ListByoasnsSortOrderAsc ListByoasnsSortOrderEnum = "ASC" + ListByoasnsSortOrderDesc ListByoasnsSortOrderEnum = "DESC" +) + +var mappingListByoasnsSortOrderEnum = map[string]ListByoasnsSortOrderEnum{ + "ASC": ListByoasnsSortOrderAsc, + "DESC": ListByoasnsSortOrderDesc, +} + +var mappingListByoasnsSortOrderEnumLowerCase = map[string]ListByoasnsSortOrderEnum{ + "asc": ListByoasnsSortOrderAsc, + "desc": ListByoasnsSortOrderDesc, +} + +// GetListByoasnsSortOrderEnumValues Enumerates the set of values for ListByoasnsSortOrderEnum +func GetListByoasnsSortOrderEnumValues() []ListByoasnsSortOrderEnum { + values := make([]ListByoasnsSortOrderEnum, 0) + for _, v := range mappingListByoasnsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListByoasnsSortOrderEnumStringValues Enumerates the set of values in String for ListByoasnsSortOrderEnum +func GetListByoasnsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListByoasnsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListByoasnsSortOrderEnum(val string) (ListByoasnsSortOrderEnum, bool) { + enum, ok := mappingListByoasnsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_byoip_allocated_ranges_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_byoip_allocated_ranges_request_response.go new file mode 100644 index 000000000..ce189aa1c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_byoip_allocated_ranges_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListByoipAllocatedRangesRequest wrapper for the ListByoipAllocatedRanges operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListByoipAllocatedRanges.go.html to see an example of how to use ListByoipAllocatedRangesRequest. +type ListByoipAllocatedRangesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource containing the BYOIP CIDR block. + ByoipRangeId *string `mandatory:"true" contributesTo:"path" name:"byoipRangeId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListByoipAllocatedRangesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListByoipAllocatedRangesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListByoipAllocatedRangesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListByoipAllocatedRangesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListByoipAllocatedRangesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListByoipAllocatedRangesResponse wrapper for the ListByoipAllocatedRanges operation +type ListByoipAllocatedRangesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ByoipAllocatedRangeCollection instances + ByoipAllocatedRangeCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListByoipAllocatedRangesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListByoipAllocatedRangesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_byoip_ranges_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_byoip_ranges_request_response.go new file mode 100644 index 000000000..1929998db --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_byoip_ranges_request_response.go @@ -0,0 +1,216 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListByoipRangesRequest wrapper for the ListByoipRanges operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListByoipRanges.go.html to see an example of how to use ListByoipRangesRequest. +type ListByoipRangesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // A filter to return only resources that match the given lifecycle state name exactly. + LifecycleState *string `mandatory:"false" contributesTo:"query" name:"lifecycleState"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListByoipRangesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListByoipRangesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListByoipRangesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListByoipRangesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListByoipRangesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListByoipRangesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListByoipRangesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListByoipRangesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListByoipRangesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListByoipRangesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListByoipRangesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListByoipRangesResponse wrapper for the ListByoipRanges operation +type ListByoipRangesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ByoipRangeCollection instances + ByoipRangeCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListByoipRangesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListByoipRangesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListByoipRangesSortByEnum Enum with underlying type: string +type ListByoipRangesSortByEnum string + +// Set of constants representing the allowable values for ListByoipRangesSortByEnum +const ( + ListByoipRangesSortByTimecreated ListByoipRangesSortByEnum = "TIMECREATED" + ListByoipRangesSortByDisplayname ListByoipRangesSortByEnum = "DISPLAYNAME" +) + +var mappingListByoipRangesSortByEnum = map[string]ListByoipRangesSortByEnum{ + "TIMECREATED": ListByoipRangesSortByTimecreated, + "DISPLAYNAME": ListByoipRangesSortByDisplayname, +} + +var mappingListByoipRangesSortByEnumLowerCase = map[string]ListByoipRangesSortByEnum{ + "timecreated": ListByoipRangesSortByTimecreated, + "displayname": ListByoipRangesSortByDisplayname, +} + +// GetListByoipRangesSortByEnumValues Enumerates the set of values for ListByoipRangesSortByEnum +func GetListByoipRangesSortByEnumValues() []ListByoipRangesSortByEnum { + values := make([]ListByoipRangesSortByEnum, 0) + for _, v := range mappingListByoipRangesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListByoipRangesSortByEnumStringValues Enumerates the set of values in String for ListByoipRangesSortByEnum +func GetListByoipRangesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListByoipRangesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListByoipRangesSortByEnum(val string) (ListByoipRangesSortByEnum, bool) { + enum, ok := mappingListByoipRangesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListByoipRangesSortOrderEnum Enum with underlying type: string +type ListByoipRangesSortOrderEnum string + +// Set of constants representing the allowable values for ListByoipRangesSortOrderEnum +const ( + ListByoipRangesSortOrderAsc ListByoipRangesSortOrderEnum = "ASC" + ListByoipRangesSortOrderDesc ListByoipRangesSortOrderEnum = "DESC" +) + +var mappingListByoipRangesSortOrderEnum = map[string]ListByoipRangesSortOrderEnum{ + "ASC": ListByoipRangesSortOrderAsc, + "DESC": ListByoipRangesSortOrderDesc, +} + +var mappingListByoipRangesSortOrderEnumLowerCase = map[string]ListByoipRangesSortOrderEnum{ + "asc": ListByoipRangesSortOrderAsc, + "desc": ListByoipRangesSortOrderDesc, +} + +// GetListByoipRangesSortOrderEnumValues Enumerates the set of values for ListByoipRangesSortOrderEnum +func GetListByoipRangesSortOrderEnumValues() []ListByoipRangesSortOrderEnum { + values := make([]ListByoipRangesSortOrderEnum, 0) + for _, v := range mappingListByoipRangesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListByoipRangesSortOrderEnumStringValues Enumerates the set of values in String for ListByoipRangesSortOrderEnum +func GetListByoipRangesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListByoipRangesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListByoipRangesSortOrderEnum(val string) (ListByoipRangesSortOrderEnum, bool) { + enum, ok := mappingListByoipRangesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_capture_filters_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_capture_filters_request_response.go new file mode 100644 index 000000000..8fd4a0ad8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_capture_filters_request_response.go @@ -0,0 +1,226 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListCaptureFiltersRequest wrapper for the ListCaptureFilters operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCaptureFilters.go.html to see an example of how to use ListCaptureFiltersRequest. +type ListCaptureFiltersRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListCaptureFiltersSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListCaptureFiltersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // A filter to return only resources that match the given capture filter lifecycle state. + // The state value is case-insensitive. + LifecycleState CaptureFilterLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to only return resources that match the given capture `filterType`. The `filterType` value is the string representation of enum - `VTAP`, `FLOWLOG`. + FilterType CaptureFilterFilterTypeEnum `mandatory:"false" contributesTo:"query" name:"filterType" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListCaptureFiltersRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListCaptureFiltersRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListCaptureFiltersRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCaptureFiltersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListCaptureFiltersRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListCaptureFiltersSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListCaptureFiltersSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListCaptureFiltersSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListCaptureFiltersSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingCaptureFilterLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetCaptureFilterLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingCaptureFilterFilterTypeEnum(string(request.FilterType)); !ok && request.FilterType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FilterType: %s. Supported values are: %s.", request.FilterType, strings.Join(GetCaptureFilterFilterTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListCaptureFiltersResponse wrapper for the ListCaptureFilters operation +type ListCaptureFiltersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []CaptureFilter instances + Items []CaptureFilter `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListCaptureFiltersResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListCaptureFiltersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListCaptureFiltersSortByEnum Enum with underlying type: string +type ListCaptureFiltersSortByEnum string + +// Set of constants representing the allowable values for ListCaptureFiltersSortByEnum +const ( + ListCaptureFiltersSortByTimecreated ListCaptureFiltersSortByEnum = "TIMECREATED" + ListCaptureFiltersSortByDisplayname ListCaptureFiltersSortByEnum = "DISPLAYNAME" +) + +var mappingListCaptureFiltersSortByEnum = map[string]ListCaptureFiltersSortByEnum{ + "TIMECREATED": ListCaptureFiltersSortByTimecreated, + "DISPLAYNAME": ListCaptureFiltersSortByDisplayname, +} + +var mappingListCaptureFiltersSortByEnumLowerCase = map[string]ListCaptureFiltersSortByEnum{ + "timecreated": ListCaptureFiltersSortByTimecreated, + "displayname": ListCaptureFiltersSortByDisplayname, +} + +// GetListCaptureFiltersSortByEnumValues Enumerates the set of values for ListCaptureFiltersSortByEnum +func GetListCaptureFiltersSortByEnumValues() []ListCaptureFiltersSortByEnum { + values := make([]ListCaptureFiltersSortByEnum, 0) + for _, v := range mappingListCaptureFiltersSortByEnum { + values = append(values, v) + } + return values +} + +// GetListCaptureFiltersSortByEnumStringValues Enumerates the set of values in String for ListCaptureFiltersSortByEnum +func GetListCaptureFiltersSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListCaptureFiltersSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListCaptureFiltersSortByEnum(val string) (ListCaptureFiltersSortByEnum, bool) { + enum, ok := mappingListCaptureFiltersSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListCaptureFiltersSortOrderEnum Enum with underlying type: string +type ListCaptureFiltersSortOrderEnum string + +// Set of constants representing the allowable values for ListCaptureFiltersSortOrderEnum +const ( + ListCaptureFiltersSortOrderAsc ListCaptureFiltersSortOrderEnum = "ASC" + ListCaptureFiltersSortOrderDesc ListCaptureFiltersSortOrderEnum = "DESC" +) + +var mappingListCaptureFiltersSortOrderEnum = map[string]ListCaptureFiltersSortOrderEnum{ + "ASC": ListCaptureFiltersSortOrderAsc, + "DESC": ListCaptureFiltersSortOrderDesc, +} + +var mappingListCaptureFiltersSortOrderEnumLowerCase = map[string]ListCaptureFiltersSortOrderEnum{ + "asc": ListCaptureFiltersSortOrderAsc, + "desc": ListCaptureFiltersSortOrderDesc, +} + +// GetListCaptureFiltersSortOrderEnumValues Enumerates the set of values for ListCaptureFiltersSortOrderEnum +func GetListCaptureFiltersSortOrderEnumValues() []ListCaptureFiltersSortOrderEnum { + values := make([]ListCaptureFiltersSortOrderEnum, 0) + for _, v := range mappingListCaptureFiltersSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListCaptureFiltersSortOrderEnumStringValues Enumerates the set of values in String for ListCaptureFiltersSortOrderEnum +func GetListCaptureFiltersSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListCaptureFiltersSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListCaptureFiltersSortOrderEnum(val string) (ListCaptureFiltersSortOrderEnum, bool) { + enum, ok := mappingListCaptureFiltersSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cluster_network_instances_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cluster_network_instances_request_response.go new file mode 100644 index 000000000..a9aa6a953 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cluster_network_instances_request_response.go @@ -0,0 +1,216 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListClusterNetworkInstancesRequest wrapper for the ListClusterNetworkInstances operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListClusterNetworkInstances.go.html to see an example of how to use ListClusterNetworkInstancesRequest. +type ListClusterNetworkInstancesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster network. + ClusterNetworkId *string `mandatory:"true" contributesTo:"path" name:"clusterNetworkId"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListClusterNetworkInstancesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListClusterNetworkInstancesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListClusterNetworkInstancesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListClusterNetworkInstancesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListClusterNetworkInstancesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListClusterNetworkInstancesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListClusterNetworkInstancesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListClusterNetworkInstancesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListClusterNetworkInstancesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListClusterNetworkInstancesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListClusterNetworkInstancesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListClusterNetworkInstancesResponse wrapper for the ListClusterNetworkInstances operation +type ListClusterNetworkInstancesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []InstanceSummary instances + Items []InstanceSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListClusterNetworkInstancesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListClusterNetworkInstancesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListClusterNetworkInstancesSortByEnum Enum with underlying type: string +type ListClusterNetworkInstancesSortByEnum string + +// Set of constants representing the allowable values for ListClusterNetworkInstancesSortByEnum +const ( + ListClusterNetworkInstancesSortByTimecreated ListClusterNetworkInstancesSortByEnum = "TIMECREATED" + ListClusterNetworkInstancesSortByDisplayname ListClusterNetworkInstancesSortByEnum = "DISPLAYNAME" +) + +var mappingListClusterNetworkInstancesSortByEnum = map[string]ListClusterNetworkInstancesSortByEnum{ + "TIMECREATED": ListClusterNetworkInstancesSortByTimecreated, + "DISPLAYNAME": ListClusterNetworkInstancesSortByDisplayname, +} + +var mappingListClusterNetworkInstancesSortByEnumLowerCase = map[string]ListClusterNetworkInstancesSortByEnum{ + "timecreated": ListClusterNetworkInstancesSortByTimecreated, + "displayname": ListClusterNetworkInstancesSortByDisplayname, +} + +// GetListClusterNetworkInstancesSortByEnumValues Enumerates the set of values for ListClusterNetworkInstancesSortByEnum +func GetListClusterNetworkInstancesSortByEnumValues() []ListClusterNetworkInstancesSortByEnum { + values := make([]ListClusterNetworkInstancesSortByEnum, 0) + for _, v := range mappingListClusterNetworkInstancesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListClusterNetworkInstancesSortByEnumStringValues Enumerates the set of values in String for ListClusterNetworkInstancesSortByEnum +func GetListClusterNetworkInstancesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListClusterNetworkInstancesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListClusterNetworkInstancesSortByEnum(val string) (ListClusterNetworkInstancesSortByEnum, bool) { + enum, ok := mappingListClusterNetworkInstancesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListClusterNetworkInstancesSortOrderEnum Enum with underlying type: string +type ListClusterNetworkInstancesSortOrderEnum string + +// Set of constants representing the allowable values for ListClusterNetworkInstancesSortOrderEnum +const ( + ListClusterNetworkInstancesSortOrderAsc ListClusterNetworkInstancesSortOrderEnum = "ASC" + ListClusterNetworkInstancesSortOrderDesc ListClusterNetworkInstancesSortOrderEnum = "DESC" +) + +var mappingListClusterNetworkInstancesSortOrderEnum = map[string]ListClusterNetworkInstancesSortOrderEnum{ + "ASC": ListClusterNetworkInstancesSortOrderAsc, + "DESC": ListClusterNetworkInstancesSortOrderDesc, +} + +var mappingListClusterNetworkInstancesSortOrderEnumLowerCase = map[string]ListClusterNetworkInstancesSortOrderEnum{ + "asc": ListClusterNetworkInstancesSortOrderAsc, + "desc": ListClusterNetworkInstancesSortOrderDesc, +} + +// GetListClusterNetworkInstancesSortOrderEnumValues Enumerates the set of values for ListClusterNetworkInstancesSortOrderEnum +func GetListClusterNetworkInstancesSortOrderEnumValues() []ListClusterNetworkInstancesSortOrderEnum { + values := make([]ListClusterNetworkInstancesSortOrderEnum, 0) + for _, v := range mappingListClusterNetworkInstancesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListClusterNetworkInstancesSortOrderEnumStringValues Enumerates the set of values in String for ListClusterNetworkInstancesSortOrderEnum +func GetListClusterNetworkInstancesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListClusterNetworkInstancesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListClusterNetworkInstancesSortOrderEnum(val string) (ListClusterNetworkInstancesSortOrderEnum, bool) { + enum, ok := mappingListClusterNetworkInstancesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cluster_networks_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cluster_networks_request_response.go new file mode 100644 index 000000000..48db1c65f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cluster_networks_request_response.go @@ -0,0 +1,220 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListClusterNetworksRequest wrapper for the ListClusterNetworks operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListClusterNetworks.go.html to see an example of how to use ListClusterNetworksRequest. +type ListClusterNetworksRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListClusterNetworksSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListClusterNetworksSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle + // state. The state value is case-insensitive. + LifecycleState ClusterNetworkSummaryLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListClusterNetworksRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListClusterNetworksRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListClusterNetworksRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListClusterNetworksRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListClusterNetworksRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListClusterNetworksSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListClusterNetworksSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListClusterNetworksSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListClusterNetworksSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingClusterNetworkSummaryLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetClusterNetworkSummaryLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListClusterNetworksResponse wrapper for the ListClusterNetworks operation +type ListClusterNetworksResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ClusterNetworkSummary instances + Items []ClusterNetworkSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListClusterNetworksResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListClusterNetworksResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListClusterNetworksSortByEnum Enum with underlying type: string +type ListClusterNetworksSortByEnum string + +// Set of constants representing the allowable values for ListClusterNetworksSortByEnum +const ( + ListClusterNetworksSortByTimecreated ListClusterNetworksSortByEnum = "TIMECREATED" + ListClusterNetworksSortByDisplayname ListClusterNetworksSortByEnum = "DISPLAYNAME" +) + +var mappingListClusterNetworksSortByEnum = map[string]ListClusterNetworksSortByEnum{ + "TIMECREATED": ListClusterNetworksSortByTimecreated, + "DISPLAYNAME": ListClusterNetworksSortByDisplayname, +} + +var mappingListClusterNetworksSortByEnumLowerCase = map[string]ListClusterNetworksSortByEnum{ + "timecreated": ListClusterNetworksSortByTimecreated, + "displayname": ListClusterNetworksSortByDisplayname, +} + +// GetListClusterNetworksSortByEnumValues Enumerates the set of values for ListClusterNetworksSortByEnum +func GetListClusterNetworksSortByEnumValues() []ListClusterNetworksSortByEnum { + values := make([]ListClusterNetworksSortByEnum, 0) + for _, v := range mappingListClusterNetworksSortByEnum { + values = append(values, v) + } + return values +} + +// GetListClusterNetworksSortByEnumStringValues Enumerates the set of values in String for ListClusterNetworksSortByEnum +func GetListClusterNetworksSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListClusterNetworksSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListClusterNetworksSortByEnum(val string) (ListClusterNetworksSortByEnum, bool) { + enum, ok := mappingListClusterNetworksSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListClusterNetworksSortOrderEnum Enum with underlying type: string +type ListClusterNetworksSortOrderEnum string + +// Set of constants representing the allowable values for ListClusterNetworksSortOrderEnum +const ( + ListClusterNetworksSortOrderAsc ListClusterNetworksSortOrderEnum = "ASC" + ListClusterNetworksSortOrderDesc ListClusterNetworksSortOrderEnum = "DESC" +) + +var mappingListClusterNetworksSortOrderEnum = map[string]ListClusterNetworksSortOrderEnum{ + "ASC": ListClusterNetworksSortOrderAsc, + "DESC": ListClusterNetworksSortOrderDesc, +} + +var mappingListClusterNetworksSortOrderEnumLowerCase = map[string]ListClusterNetworksSortOrderEnum{ + "asc": ListClusterNetworksSortOrderAsc, + "desc": ListClusterNetworksSortOrderDesc, +} + +// GetListClusterNetworksSortOrderEnumValues Enumerates the set of values for ListClusterNetworksSortOrderEnum +func GetListClusterNetworksSortOrderEnumValues() []ListClusterNetworksSortOrderEnum { + values := make([]ListClusterNetworksSortOrderEnum, 0) + for _, v := range mappingListClusterNetworksSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListClusterNetworksSortOrderEnumStringValues Enumerates the set of values in String for ListClusterNetworksSortOrderEnum +func GetListClusterNetworksSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListClusterNetworksSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListClusterNetworksSortOrderEnum(val string) (ListClusterNetworksSortOrderEnum, bool) { + enum, ok := mappingListClusterNetworksSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_reservation_instance_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_reservation_instance_shapes_request_response.go new file mode 100644 index 000000000..309ec6809 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_reservation_instance_shapes_request_response.go @@ -0,0 +1,217 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeCapacityReservationInstanceShapesRequest wrapper for the ListComputeCapacityReservationInstanceShapes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityReservationInstanceShapes.go.html to see an example of how to use ListComputeCapacityReservationInstanceShapesRequest. +type ListComputeCapacityReservationInstanceShapesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeCapacityReservationInstanceShapesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeCapacityReservationInstanceShapesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeCapacityReservationInstanceShapesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeCapacityReservationInstanceShapesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeCapacityReservationInstanceShapesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeCapacityReservationInstanceShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeCapacityReservationInstanceShapesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeCapacityReservationInstanceShapesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeCapacityReservationInstanceShapesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeCapacityReservationInstanceShapesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeCapacityReservationInstanceShapesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeCapacityReservationInstanceShapesResponse wrapper for the ListComputeCapacityReservationInstanceShapes operation +type ListComputeCapacityReservationInstanceShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ComputeCapacityReservationInstanceShapeSummary instances + Items []ComputeCapacityReservationInstanceShapeSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeCapacityReservationInstanceShapesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeCapacityReservationInstanceShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeCapacityReservationInstanceShapesSortByEnum Enum with underlying type: string +type ListComputeCapacityReservationInstanceShapesSortByEnum string + +// Set of constants representing the allowable values for ListComputeCapacityReservationInstanceShapesSortByEnum +const ( + ListComputeCapacityReservationInstanceShapesSortByTimecreated ListComputeCapacityReservationInstanceShapesSortByEnum = "TIMECREATED" + ListComputeCapacityReservationInstanceShapesSortByDisplayname ListComputeCapacityReservationInstanceShapesSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeCapacityReservationInstanceShapesSortByEnum = map[string]ListComputeCapacityReservationInstanceShapesSortByEnum{ + "TIMECREATED": ListComputeCapacityReservationInstanceShapesSortByTimecreated, + "DISPLAYNAME": ListComputeCapacityReservationInstanceShapesSortByDisplayname, +} + +var mappingListComputeCapacityReservationInstanceShapesSortByEnumLowerCase = map[string]ListComputeCapacityReservationInstanceShapesSortByEnum{ + "timecreated": ListComputeCapacityReservationInstanceShapesSortByTimecreated, + "displayname": ListComputeCapacityReservationInstanceShapesSortByDisplayname, +} + +// GetListComputeCapacityReservationInstanceShapesSortByEnumValues Enumerates the set of values for ListComputeCapacityReservationInstanceShapesSortByEnum +func GetListComputeCapacityReservationInstanceShapesSortByEnumValues() []ListComputeCapacityReservationInstanceShapesSortByEnum { + values := make([]ListComputeCapacityReservationInstanceShapesSortByEnum, 0) + for _, v := range mappingListComputeCapacityReservationInstanceShapesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityReservationInstanceShapesSortByEnumStringValues Enumerates the set of values in String for ListComputeCapacityReservationInstanceShapesSortByEnum +func GetListComputeCapacityReservationInstanceShapesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeCapacityReservationInstanceShapesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityReservationInstanceShapesSortByEnum(val string) (ListComputeCapacityReservationInstanceShapesSortByEnum, bool) { + enum, ok := mappingListComputeCapacityReservationInstanceShapesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeCapacityReservationInstanceShapesSortOrderEnum Enum with underlying type: string +type ListComputeCapacityReservationInstanceShapesSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeCapacityReservationInstanceShapesSortOrderEnum +const ( + ListComputeCapacityReservationInstanceShapesSortOrderAsc ListComputeCapacityReservationInstanceShapesSortOrderEnum = "ASC" + ListComputeCapacityReservationInstanceShapesSortOrderDesc ListComputeCapacityReservationInstanceShapesSortOrderEnum = "DESC" +) + +var mappingListComputeCapacityReservationInstanceShapesSortOrderEnum = map[string]ListComputeCapacityReservationInstanceShapesSortOrderEnum{ + "ASC": ListComputeCapacityReservationInstanceShapesSortOrderAsc, + "DESC": ListComputeCapacityReservationInstanceShapesSortOrderDesc, +} + +var mappingListComputeCapacityReservationInstanceShapesSortOrderEnumLowerCase = map[string]ListComputeCapacityReservationInstanceShapesSortOrderEnum{ + "asc": ListComputeCapacityReservationInstanceShapesSortOrderAsc, + "desc": ListComputeCapacityReservationInstanceShapesSortOrderDesc, +} + +// GetListComputeCapacityReservationInstanceShapesSortOrderEnumValues Enumerates the set of values for ListComputeCapacityReservationInstanceShapesSortOrderEnum +func GetListComputeCapacityReservationInstanceShapesSortOrderEnumValues() []ListComputeCapacityReservationInstanceShapesSortOrderEnum { + values := make([]ListComputeCapacityReservationInstanceShapesSortOrderEnum, 0) + for _, v := range mappingListComputeCapacityReservationInstanceShapesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityReservationInstanceShapesSortOrderEnumStringValues Enumerates the set of values in String for ListComputeCapacityReservationInstanceShapesSortOrderEnum +func GetListComputeCapacityReservationInstanceShapesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeCapacityReservationInstanceShapesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityReservationInstanceShapesSortOrderEnum(val string) (ListComputeCapacityReservationInstanceShapesSortOrderEnum, bool) { + enum, ok := mappingListComputeCapacityReservationInstanceShapesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_reservation_instances_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_reservation_instances_request_response.go new file mode 100644 index 000000000..00a18c606 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_reservation_instances_request_response.go @@ -0,0 +1,217 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeCapacityReservationInstancesRequest wrapper for the ListComputeCapacityReservationInstances operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityReservationInstances.go.html to see an example of how to use ListComputeCapacityReservationInstancesRequest. +type ListComputeCapacityReservationInstancesRequest struct { + + // The OCID of the compute capacity reservation. + CapacityReservationId *string `mandatory:"true" contributesTo:"path" name:"capacityReservationId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeCapacityReservationInstancesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeCapacityReservationInstancesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeCapacityReservationInstancesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeCapacityReservationInstancesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeCapacityReservationInstancesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeCapacityReservationInstancesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeCapacityReservationInstancesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeCapacityReservationInstancesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeCapacityReservationInstancesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeCapacityReservationInstancesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeCapacityReservationInstancesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeCapacityReservationInstancesResponse wrapper for the ListComputeCapacityReservationInstances operation +type ListComputeCapacityReservationInstancesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []CapacityReservationInstanceSummary instances + Items []CapacityReservationInstanceSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeCapacityReservationInstancesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeCapacityReservationInstancesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeCapacityReservationInstancesSortByEnum Enum with underlying type: string +type ListComputeCapacityReservationInstancesSortByEnum string + +// Set of constants representing the allowable values for ListComputeCapacityReservationInstancesSortByEnum +const ( + ListComputeCapacityReservationInstancesSortByTimecreated ListComputeCapacityReservationInstancesSortByEnum = "TIMECREATED" + ListComputeCapacityReservationInstancesSortByDisplayname ListComputeCapacityReservationInstancesSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeCapacityReservationInstancesSortByEnum = map[string]ListComputeCapacityReservationInstancesSortByEnum{ + "TIMECREATED": ListComputeCapacityReservationInstancesSortByTimecreated, + "DISPLAYNAME": ListComputeCapacityReservationInstancesSortByDisplayname, +} + +var mappingListComputeCapacityReservationInstancesSortByEnumLowerCase = map[string]ListComputeCapacityReservationInstancesSortByEnum{ + "timecreated": ListComputeCapacityReservationInstancesSortByTimecreated, + "displayname": ListComputeCapacityReservationInstancesSortByDisplayname, +} + +// GetListComputeCapacityReservationInstancesSortByEnumValues Enumerates the set of values for ListComputeCapacityReservationInstancesSortByEnum +func GetListComputeCapacityReservationInstancesSortByEnumValues() []ListComputeCapacityReservationInstancesSortByEnum { + values := make([]ListComputeCapacityReservationInstancesSortByEnum, 0) + for _, v := range mappingListComputeCapacityReservationInstancesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityReservationInstancesSortByEnumStringValues Enumerates the set of values in String for ListComputeCapacityReservationInstancesSortByEnum +func GetListComputeCapacityReservationInstancesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeCapacityReservationInstancesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityReservationInstancesSortByEnum(val string) (ListComputeCapacityReservationInstancesSortByEnum, bool) { + enum, ok := mappingListComputeCapacityReservationInstancesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeCapacityReservationInstancesSortOrderEnum Enum with underlying type: string +type ListComputeCapacityReservationInstancesSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeCapacityReservationInstancesSortOrderEnum +const ( + ListComputeCapacityReservationInstancesSortOrderAsc ListComputeCapacityReservationInstancesSortOrderEnum = "ASC" + ListComputeCapacityReservationInstancesSortOrderDesc ListComputeCapacityReservationInstancesSortOrderEnum = "DESC" +) + +var mappingListComputeCapacityReservationInstancesSortOrderEnum = map[string]ListComputeCapacityReservationInstancesSortOrderEnum{ + "ASC": ListComputeCapacityReservationInstancesSortOrderAsc, + "DESC": ListComputeCapacityReservationInstancesSortOrderDesc, +} + +var mappingListComputeCapacityReservationInstancesSortOrderEnumLowerCase = map[string]ListComputeCapacityReservationInstancesSortOrderEnum{ + "asc": ListComputeCapacityReservationInstancesSortOrderAsc, + "desc": ListComputeCapacityReservationInstancesSortOrderDesc, +} + +// GetListComputeCapacityReservationInstancesSortOrderEnumValues Enumerates the set of values for ListComputeCapacityReservationInstancesSortOrderEnum +func GetListComputeCapacityReservationInstancesSortOrderEnumValues() []ListComputeCapacityReservationInstancesSortOrderEnum { + values := make([]ListComputeCapacityReservationInstancesSortOrderEnum, 0) + for _, v := range mappingListComputeCapacityReservationInstancesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityReservationInstancesSortOrderEnumStringValues Enumerates the set of values in String for ListComputeCapacityReservationInstancesSortOrderEnum +func GetListComputeCapacityReservationInstancesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeCapacityReservationInstancesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityReservationInstancesSortOrderEnum(val string) (ListComputeCapacityReservationInstancesSortOrderEnum, bool) { + enum, ok := mappingListComputeCapacityReservationInstancesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_reservations_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_reservations_request_response.go new file mode 100644 index 000000000..eac425e6c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_reservations_request_response.go @@ -0,0 +1,223 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeCapacityReservationsRequest wrapper for the ListComputeCapacityReservations operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityReservations.go.html to see an example of how to use ListComputeCapacityReservationsRequest. +type ListComputeCapacityReservationsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // A filter to only return resources that match the given lifecycle state. + LifecycleState ComputeCapacityReservationLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeCapacityReservationsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeCapacityReservationsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeCapacityReservationsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeCapacityReservationsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeCapacityReservationsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeCapacityReservationsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeCapacityReservationsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeCapacityReservationLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetComputeCapacityReservationLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeCapacityReservationsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeCapacityReservationsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeCapacityReservationsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeCapacityReservationsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeCapacityReservationsResponse wrapper for the ListComputeCapacityReservations operation +type ListComputeCapacityReservationsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ComputeCapacityReservationSummary instances + Items []ComputeCapacityReservationSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeCapacityReservationsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeCapacityReservationsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeCapacityReservationsSortByEnum Enum with underlying type: string +type ListComputeCapacityReservationsSortByEnum string + +// Set of constants representing the allowable values for ListComputeCapacityReservationsSortByEnum +const ( + ListComputeCapacityReservationsSortByTimecreated ListComputeCapacityReservationsSortByEnum = "TIMECREATED" + ListComputeCapacityReservationsSortByDisplayname ListComputeCapacityReservationsSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeCapacityReservationsSortByEnum = map[string]ListComputeCapacityReservationsSortByEnum{ + "TIMECREATED": ListComputeCapacityReservationsSortByTimecreated, + "DISPLAYNAME": ListComputeCapacityReservationsSortByDisplayname, +} + +var mappingListComputeCapacityReservationsSortByEnumLowerCase = map[string]ListComputeCapacityReservationsSortByEnum{ + "timecreated": ListComputeCapacityReservationsSortByTimecreated, + "displayname": ListComputeCapacityReservationsSortByDisplayname, +} + +// GetListComputeCapacityReservationsSortByEnumValues Enumerates the set of values for ListComputeCapacityReservationsSortByEnum +func GetListComputeCapacityReservationsSortByEnumValues() []ListComputeCapacityReservationsSortByEnum { + values := make([]ListComputeCapacityReservationsSortByEnum, 0) + for _, v := range mappingListComputeCapacityReservationsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityReservationsSortByEnumStringValues Enumerates the set of values in String for ListComputeCapacityReservationsSortByEnum +func GetListComputeCapacityReservationsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeCapacityReservationsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityReservationsSortByEnum(val string) (ListComputeCapacityReservationsSortByEnum, bool) { + enum, ok := mappingListComputeCapacityReservationsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeCapacityReservationsSortOrderEnum Enum with underlying type: string +type ListComputeCapacityReservationsSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeCapacityReservationsSortOrderEnum +const ( + ListComputeCapacityReservationsSortOrderAsc ListComputeCapacityReservationsSortOrderEnum = "ASC" + ListComputeCapacityReservationsSortOrderDesc ListComputeCapacityReservationsSortOrderEnum = "DESC" +) + +var mappingListComputeCapacityReservationsSortOrderEnum = map[string]ListComputeCapacityReservationsSortOrderEnum{ + "ASC": ListComputeCapacityReservationsSortOrderAsc, + "DESC": ListComputeCapacityReservationsSortOrderDesc, +} + +var mappingListComputeCapacityReservationsSortOrderEnumLowerCase = map[string]ListComputeCapacityReservationsSortOrderEnum{ + "asc": ListComputeCapacityReservationsSortOrderAsc, + "desc": ListComputeCapacityReservationsSortOrderDesc, +} + +// GetListComputeCapacityReservationsSortOrderEnumValues Enumerates the set of values for ListComputeCapacityReservationsSortOrderEnum +func GetListComputeCapacityReservationsSortOrderEnumValues() []ListComputeCapacityReservationsSortOrderEnum { + values := make([]ListComputeCapacityReservationsSortOrderEnum, 0) + for _, v := range mappingListComputeCapacityReservationsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityReservationsSortOrderEnumStringValues Enumerates the set of values in String for ListComputeCapacityReservationsSortOrderEnum +func GetListComputeCapacityReservationsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeCapacityReservationsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityReservationsSortOrderEnum(val string) (ListComputeCapacityReservationsSortOrderEnum, bool) { + enum, ok := mappingListComputeCapacityReservationsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_topologies_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_topologies_request_response.go new file mode 100644 index 000000000..61a19e198 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_topologies_request_response.go @@ -0,0 +1,217 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeCapacityTopologiesRequest wrapper for the ListComputeCapacityTopologies operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologies.go.html to see an example of how to use ListComputeCapacityTopologiesRequest. +type ListComputeCapacityTopologiesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeCapacityTopologiesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeCapacityTopologiesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeCapacityTopologiesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeCapacityTopologiesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeCapacityTopologiesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeCapacityTopologiesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeCapacityTopologiesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeCapacityTopologiesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeCapacityTopologiesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeCapacityTopologiesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeCapacityTopologiesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeCapacityTopologiesResponse wrapper for the ListComputeCapacityTopologies operation +type ListComputeCapacityTopologiesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComputeCapacityTopologyCollection instances + ComputeCapacityTopologyCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeCapacityTopologiesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeCapacityTopologiesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeCapacityTopologiesSortByEnum Enum with underlying type: string +type ListComputeCapacityTopologiesSortByEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologiesSortByEnum +const ( + ListComputeCapacityTopologiesSortByTimecreated ListComputeCapacityTopologiesSortByEnum = "TIMECREATED" + ListComputeCapacityTopologiesSortByDisplayname ListComputeCapacityTopologiesSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeCapacityTopologiesSortByEnum = map[string]ListComputeCapacityTopologiesSortByEnum{ + "TIMECREATED": ListComputeCapacityTopologiesSortByTimecreated, + "DISPLAYNAME": ListComputeCapacityTopologiesSortByDisplayname, +} + +var mappingListComputeCapacityTopologiesSortByEnumLowerCase = map[string]ListComputeCapacityTopologiesSortByEnum{ + "timecreated": ListComputeCapacityTopologiesSortByTimecreated, + "displayname": ListComputeCapacityTopologiesSortByDisplayname, +} + +// GetListComputeCapacityTopologiesSortByEnumValues Enumerates the set of values for ListComputeCapacityTopologiesSortByEnum +func GetListComputeCapacityTopologiesSortByEnumValues() []ListComputeCapacityTopologiesSortByEnum { + values := make([]ListComputeCapacityTopologiesSortByEnum, 0) + for _, v := range mappingListComputeCapacityTopologiesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologiesSortByEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologiesSortByEnum +func GetListComputeCapacityTopologiesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeCapacityTopologiesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologiesSortByEnum(val string) (ListComputeCapacityTopologiesSortByEnum, bool) { + enum, ok := mappingListComputeCapacityTopologiesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeCapacityTopologiesSortOrderEnum Enum with underlying type: string +type ListComputeCapacityTopologiesSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologiesSortOrderEnum +const ( + ListComputeCapacityTopologiesSortOrderAsc ListComputeCapacityTopologiesSortOrderEnum = "ASC" + ListComputeCapacityTopologiesSortOrderDesc ListComputeCapacityTopologiesSortOrderEnum = "DESC" +) + +var mappingListComputeCapacityTopologiesSortOrderEnum = map[string]ListComputeCapacityTopologiesSortOrderEnum{ + "ASC": ListComputeCapacityTopologiesSortOrderAsc, + "DESC": ListComputeCapacityTopologiesSortOrderDesc, +} + +var mappingListComputeCapacityTopologiesSortOrderEnumLowerCase = map[string]ListComputeCapacityTopologiesSortOrderEnum{ + "asc": ListComputeCapacityTopologiesSortOrderAsc, + "desc": ListComputeCapacityTopologiesSortOrderDesc, +} + +// GetListComputeCapacityTopologiesSortOrderEnumValues Enumerates the set of values for ListComputeCapacityTopologiesSortOrderEnum +func GetListComputeCapacityTopologiesSortOrderEnumValues() []ListComputeCapacityTopologiesSortOrderEnum { + values := make([]ListComputeCapacityTopologiesSortOrderEnum, 0) + for _, v := range mappingListComputeCapacityTopologiesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologiesSortOrderEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologiesSortOrderEnum +func GetListComputeCapacityTopologiesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeCapacityTopologiesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologiesSortOrderEnum(val string) (ListComputeCapacityTopologiesSortOrderEnum, bool) { + enum, ok := mappingListComputeCapacityTopologiesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_topology_compute_bare_metal_hosts_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_topology_compute_bare_metal_hosts_request_response.go new file mode 100644 index 000000000..ede59be27 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_topology_compute_bare_metal_hosts_request_response.go @@ -0,0 +1,226 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeCapacityTopologyComputeBareMetalHostsRequest wrapper for the ListComputeCapacityTopologyComputeBareMetalHosts operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologyComputeBareMetalHosts.go.html to see an example of how to use ListComputeCapacityTopologyComputeBareMetalHostsRequest. +type ListComputeCapacityTopologyComputeBareMetalHostsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" contributesTo:"path" name:"computeCapacityTopologyId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + ComputeHpcIslandId *string `mandatory:"false" contributesTo:"query" name:"computeHpcIslandId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + ComputeNetworkBlockId *string `mandatory:"false" contributesTo:"query" name:"computeNetworkBlockId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute local block. + ComputeLocalBlockId *string `mandatory:"false" contributesTo:"query" name:"computeLocalBlockId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeCapacityTopologyComputeBareMetalHostsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeCapacityTopologyComputeBareMetalHostsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeCapacityTopologyComputeBareMetalHostsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeCapacityTopologyComputeBareMetalHostsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeCapacityTopologyComputeBareMetalHostsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeCapacityTopologyComputeBareMetalHostsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeCapacityTopologyComputeBareMetalHostsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeCapacityTopologyComputeBareMetalHostsResponse wrapper for the ListComputeCapacityTopologyComputeBareMetalHosts operation +type ListComputeCapacityTopologyComputeBareMetalHostsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComputeBareMetalHostCollection instances + ComputeBareMetalHostCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeCapacityTopologyComputeBareMetalHostsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeCapacityTopologyComputeBareMetalHostsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum Enum with underlying type: string +type ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum +const ( + ListComputeCapacityTopologyComputeBareMetalHostsSortByTimecreated ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum = "TIMECREATED" + ListComputeCapacityTopologyComputeBareMetalHostsSortByDisplayname ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeCapacityTopologyComputeBareMetalHostsSortByEnum = map[string]ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum{ + "TIMECREATED": ListComputeCapacityTopologyComputeBareMetalHostsSortByTimecreated, + "DISPLAYNAME": ListComputeCapacityTopologyComputeBareMetalHostsSortByDisplayname, +} + +var mappingListComputeCapacityTopologyComputeBareMetalHostsSortByEnumLowerCase = map[string]ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum{ + "timecreated": ListComputeCapacityTopologyComputeBareMetalHostsSortByTimecreated, + "displayname": ListComputeCapacityTopologyComputeBareMetalHostsSortByDisplayname, +} + +// GetListComputeCapacityTopologyComputeBareMetalHostsSortByEnumValues Enumerates the set of values for ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum +func GetListComputeCapacityTopologyComputeBareMetalHostsSortByEnumValues() []ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum { + values := make([]ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum, 0) + for _, v := range mappingListComputeCapacityTopologyComputeBareMetalHostsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologyComputeBareMetalHostsSortByEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum +func GetListComputeCapacityTopologyComputeBareMetalHostsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeCapacityTopologyComputeBareMetalHostsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologyComputeBareMetalHostsSortByEnum(val string) (ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum, bool) { + enum, ok := mappingListComputeCapacityTopologyComputeBareMetalHostsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum Enum with underlying type: string +type ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum +const ( + ListComputeCapacityTopologyComputeBareMetalHostsSortOrderAsc ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum = "ASC" + ListComputeCapacityTopologyComputeBareMetalHostsSortOrderDesc ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum = "DESC" +) + +var mappingListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum = map[string]ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum{ + "ASC": ListComputeCapacityTopologyComputeBareMetalHostsSortOrderAsc, + "DESC": ListComputeCapacityTopologyComputeBareMetalHostsSortOrderDesc, +} + +var mappingListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnumLowerCase = map[string]ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum{ + "asc": ListComputeCapacityTopologyComputeBareMetalHostsSortOrderAsc, + "desc": ListComputeCapacityTopologyComputeBareMetalHostsSortOrderDesc, +} + +// GetListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnumValues Enumerates the set of values for ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum +func GetListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnumValues() []ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum { + values := make([]ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum, 0) + for _, v := range mappingListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum +func GetListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum(val string) (ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum, bool) { + enum, ok := mappingListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_topology_compute_hpc_islands_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_topology_compute_hpc_islands_request_response.go new file mode 100644 index 000000000..c602f083d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_topology_compute_hpc_islands_request_response.go @@ -0,0 +1,217 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeCapacityTopologyComputeHpcIslandsRequest wrapper for the ListComputeCapacityTopologyComputeHpcIslands operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologyComputeHpcIslands.go.html to see an example of how to use ListComputeCapacityTopologyComputeHpcIslandsRequest. +type ListComputeCapacityTopologyComputeHpcIslandsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" contributesTo:"path" name:"computeCapacityTopologyId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeCapacityTopologyComputeHpcIslandsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeCapacityTopologyComputeHpcIslandsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeCapacityTopologyComputeHpcIslandsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeCapacityTopologyComputeHpcIslandsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeCapacityTopologyComputeHpcIslandsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeCapacityTopologyComputeHpcIslandsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeCapacityTopologyComputeHpcIslandsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeCapacityTopologyComputeHpcIslandsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeCapacityTopologyComputeHpcIslandsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeCapacityTopologyComputeHpcIslandsResponse wrapper for the ListComputeCapacityTopologyComputeHpcIslands operation +type ListComputeCapacityTopologyComputeHpcIslandsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComputeHpcIslandCollection instances + ComputeHpcIslandCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeCapacityTopologyComputeHpcIslandsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeCapacityTopologyComputeHpcIslandsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeCapacityTopologyComputeHpcIslandsSortByEnum Enum with underlying type: string +type ListComputeCapacityTopologyComputeHpcIslandsSortByEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologyComputeHpcIslandsSortByEnum +const ( + ListComputeCapacityTopologyComputeHpcIslandsSortByTimecreated ListComputeCapacityTopologyComputeHpcIslandsSortByEnum = "TIMECREATED" + ListComputeCapacityTopologyComputeHpcIslandsSortByDisplayname ListComputeCapacityTopologyComputeHpcIslandsSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeCapacityTopologyComputeHpcIslandsSortByEnum = map[string]ListComputeCapacityTopologyComputeHpcIslandsSortByEnum{ + "TIMECREATED": ListComputeCapacityTopologyComputeHpcIslandsSortByTimecreated, + "DISPLAYNAME": ListComputeCapacityTopologyComputeHpcIslandsSortByDisplayname, +} + +var mappingListComputeCapacityTopologyComputeHpcIslandsSortByEnumLowerCase = map[string]ListComputeCapacityTopologyComputeHpcIslandsSortByEnum{ + "timecreated": ListComputeCapacityTopologyComputeHpcIslandsSortByTimecreated, + "displayname": ListComputeCapacityTopologyComputeHpcIslandsSortByDisplayname, +} + +// GetListComputeCapacityTopologyComputeHpcIslandsSortByEnumValues Enumerates the set of values for ListComputeCapacityTopologyComputeHpcIslandsSortByEnum +func GetListComputeCapacityTopologyComputeHpcIslandsSortByEnumValues() []ListComputeCapacityTopologyComputeHpcIslandsSortByEnum { + values := make([]ListComputeCapacityTopologyComputeHpcIslandsSortByEnum, 0) + for _, v := range mappingListComputeCapacityTopologyComputeHpcIslandsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologyComputeHpcIslandsSortByEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologyComputeHpcIslandsSortByEnum +func GetListComputeCapacityTopologyComputeHpcIslandsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeCapacityTopologyComputeHpcIslandsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologyComputeHpcIslandsSortByEnum(val string) (ListComputeCapacityTopologyComputeHpcIslandsSortByEnum, bool) { + enum, ok := mappingListComputeCapacityTopologyComputeHpcIslandsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum Enum with underlying type: string +type ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum +const ( + ListComputeCapacityTopologyComputeHpcIslandsSortOrderAsc ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum = "ASC" + ListComputeCapacityTopologyComputeHpcIslandsSortOrderDesc ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum = "DESC" +) + +var mappingListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum = map[string]ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum{ + "ASC": ListComputeCapacityTopologyComputeHpcIslandsSortOrderAsc, + "DESC": ListComputeCapacityTopologyComputeHpcIslandsSortOrderDesc, +} + +var mappingListComputeCapacityTopologyComputeHpcIslandsSortOrderEnumLowerCase = map[string]ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum{ + "asc": ListComputeCapacityTopologyComputeHpcIslandsSortOrderAsc, + "desc": ListComputeCapacityTopologyComputeHpcIslandsSortOrderDesc, +} + +// GetListComputeCapacityTopologyComputeHpcIslandsSortOrderEnumValues Enumerates the set of values for ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum +func GetListComputeCapacityTopologyComputeHpcIslandsSortOrderEnumValues() []ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum { + values := make([]ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum, 0) + for _, v := range mappingListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologyComputeHpcIslandsSortOrderEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum +func GetListComputeCapacityTopologyComputeHpcIslandsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum(val string) (ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum, bool) { + enum, ok := mappingListComputeCapacityTopologyComputeHpcIslandsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_topology_compute_network_blocks_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_topology_compute_network_blocks_request_response.go new file mode 100644 index 000000000..73a36cf12 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_capacity_topology_compute_network_blocks_request_response.go @@ -0,0 +1,220 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeCapacityTopologyComputeNetworkBlocksRequest wrapper for the ListComputeCapacityTopologyComputeNetworkBlocks operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologyComputeNetworkBlocks.go.html to see an example of how to use ListComputeCapacityTopologyComputeNetworkBlocksRequest. +type ListComputeCapacityTopologyComputeNetworkBlocksRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" contributesTo:"path" name:"computeCapacityTopologyId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + ComputeHpcIslandId *string `mandatory:"false" contributesTo:"query" name:"computeHpcIslandId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeCapacityTopologyComputeNetworkBlocksRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeCapacityTopologyComputeNetworkBlocksRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeCapacityTopologyComputeNetworkBlocksRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeCapacityTopologyComputeNetworkBlocksRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeCapacityTopologyComputeNetworkBlocksRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeCapacityTopologyComputeNetworkBlocksSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeCapacityTopologyComputeNetworkBlocksSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeCapacityTopologyComputeNetworkBlocksResponse wrapper for the ListComputeCapacityTopologyComputeNetworkBlocks operation +type ListComputeCapacityTopologyComputeNetworkBlocksResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComputeNetworkBlockCollection instances + ComputeNetworkBlockCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeCapacityTopologyComputeNetworkBlocksResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeCapacityTopologyComputeNetworkBlocksResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum Enum with underlying type: string +type ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum +const ( + ListComputeCapacityTopologyComputeNetworkBlocksSortByTimecreated ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum = "TIMECREATED" + ListComputeCapacityTopologyComputeNetworkBlocksSortByDisplayname ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeCapacityTopologyComputeNetworkBlocksSortByEnum = map[string]ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum{ + "TIMECREATED": ListComputeCapacityTopologyComputeNetworkBlocksSortByTimecreated, + "DISPLAYNAME": ListComputeCapacityTopologyComputeNetworkBlocksSortByDisplayname, +} + +var mappingListComputeCapacityTopologyComputeNetworkBlocksSortByEnumLowerCase = map[string]ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum{ + "timecreated": ListComputeCapacityTopologyComputeNetworkBlocksSortByTimecreated, + "displayname": ListComputeCapacityTopologyComputeNetworkBlocksSortByDisplayname, +} + +// GetListComputeCapacityTopologyComputeNetworkBlocksSortByEnumValues Enumerates the set of values for ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum +func GetListComputeCapacityTopologyComputeNetworkBlocksSortByEnumValues() []ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum { + values := make([]ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum, 0) + for _, v := range mappingListComputeCapacityTopologyComputeNetworkBlocksSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologyComputeNetworkBlocksSortByEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum +func GetListComputeCapacityTopologyComputeNetworkBlocksSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeCapacityTopologyComputeNetworkBlocksSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologyComputeNetworkBlocksSortByEnum(val string) (ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum, bool) { + enum, ok := mappingListComputeCapacityTopologyComputeNetworkBlocksSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum Enum with underlying type: string +type ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum +const ( + ListComputeCapacityTopologyComputeNetworkBlocksSortOrderAsc ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum = "ASC" + ListComputeCapacityTopologyComputeNetworkBlocksSortOrderDesc ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum = "DESC" +) + +var mappingListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum = map[string]ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum{ + "ASC": ListComputeCapacityTopologyComputeNetworkBlocksSortOrderAsc, + "DESC": ListComputeCapacityTopologyComputeNetworkBlocksSortOrderDesc, +} + +var mappingListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnumLowerCase = map[string]ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum{ + "asc": ListComputeCapacityTopologyComputeNetworkBlocksSortOrderAsc, + "desc": ListComputeCapacityTopologyComputeNetworkBlocksSortOrderDesc, +} + +// GetListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnumValues Enumerates the set of values for ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum +func GetListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnumValues() []ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum { + values := make([]ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum, 0) + for _, v := range mappingListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum +func GetListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum(val string) (ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum, bool) { + enum, ok := mappingListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_clusters_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_clusters_request_response.go new file mode 100644 index 000000000..e10475fff --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_clusters_request_response.go @@ -0,0 +1,217 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeClustersRequest wrapper for the ListComputeClusters operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeClusters.go.html to see an example of how to use ListComputeClustersRequest. +type ListComputeClustersRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeClustersSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeClustersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeClustersRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeClustersRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeClustersRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeClustersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeClustersRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeClustersSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeClustersSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeClustersSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeClustersSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeClustersResponse wrapper for the ListComputeClusters operation +type ListComputeClustersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComputeClusterCollection instances + ComputeClusterCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeClustersResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeClustersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeClustersSortByEnum Enum with underlying type: string +type ListComputeClustersSortByEnum string + +// Set of constants representing the allowable values for ListComputeClustersSortByEnum +const ( + ListComputeClustersSortByTimecreated ListComputeClustersSortByEnum = "TIMECREATED" + ListComputeClustersSortByDisplayname ListComputeClustersSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeClustersSortByEnum = map[string]ListComputeClustersSortByEnum{ + "TIMECREATED": ListComputeClustersSortByTimecreated, + "DISPLAYNAME": ListComputeClustersSortByDisplayname, +} + +var mappingListComputeClustersSortByEnumLowerCase = map[string]ListComputeClustersSortByEnum{ + "timecreated": ListComputeClustersSortByTimecreated, + "displayname": ListComputeClustersSortByDisplayname, +} + +// GetListComputeClustersSortByEnumValues Enumerates the set of values for ListComputeClustersSortByEnum +func GetListComputeClustersSortByEnumValues() []ListComputeClustersSortByEnum { + values := make([]ListComputeClustersSortByEnum, 0) + for _, v := range mappingListComputeClustersSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeClustersSortByEnumStringValues Enumerates the set of values in String for ListComputeClustersSortByEnum +func GetListComputeClustersSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeClustersSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeClustersSortByEnum(val string) (ListComputeClustersSortByEnum, bool) { + enum, ok := mappingListComputeClustersSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeClustersSortOrderEnum Enum with underlying type: string +type ListComputeClustersSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeClustersSortOrderEnum +const ( + ListComputeClustersSortOrderAsc ListComputeClustersSortOrderEnum = "ASC" + ListComputeClustersSortOrderDesc ListComputeClustersSortOrderEnum = "DESC" +) + +var mappingListComputeClustersSortOrderEnum = map[string]ListComputeClustersSortOrderEnum{ + "ASC": ListComputeClustersSortOrderAsc, + "DESC": ListComputeClustersSortOrderDesc, +} + +var mappingListComputeClustersSortOrderEnumLowerCase = map[string]ListComputeClustersSortOrderEnum{ + "asc": ListComputeClustersSortOrderAsc, + "desc": ListComputeClustersSortOrderDesc, +} + +// GetListComputeClustersSortOrderEnumValues Enumerates the set of values for ListComputeClustersSortOrderEnum +func GetListComputeClustersSortOrderEnumValues() []ListComputeClustersSortOrderEnum { + values := make([]ListComputeClustersSortOrderEnum, 0) + for _, v := range mappingListComputeClustersSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeClustersSortOrderEnumStringValues Enumerates the set of values in String for ListComputeClustersSortOrderEnum +func GetListComputeClustersSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeClustersSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeClustersSortOrderEnum(val string) (ListComputeClustersSortOrderEnum, bool) { + enum, ok := mappingListComputeClustersSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_global_image_capability_schema_versions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_global_image_capability_schema_versions_request_response.go new file mode 100644 index 000000000..64ad5e2fc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_global_image_capability_schema_versions_request_response.go @@ -0,0 +1,213 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeGlobalImageCapabilitySchemaVersionsRequest wrapper for the ListComputeGlobalImageCapabilitySchemaVersions operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeGlobalImageCapabilitySchemaVersions.go.html to see an example of how to use ListComputeGlobalImageCapabilitySchemaVersionsRequest. +type ListComputeGlobalImageCapabilitySchemaVersionsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute global image capability schema + ComputeGlobalImageCapabilitySchemaId *string `mandatory:"true" contributesTo:"path" name:"computeGlobalImageCapabilitySchemaId"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeGlobalImageCapabilitySchemaVersionsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeGlobalImageCapabilitySchemaVersionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeGlobalImageCapabilitySchemaVersionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeGlobalImageCapabilitySchemaVersionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeGlobalImageCapabilitySchemaVersionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeGlobalImageCapabilitySchemaVersionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeGlobalImageCapabilitySchemaVersionsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeGlobalImageCapabilitySchemaVersionsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeGlobalImageCapabilitySchemaVersionsResponse wrapper for the ListComputeGlobalImageCapabilitySchemaVersions operation +type ListComputeGlobalImageCapabilitySchemaVersionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ComputeGlobalImageCapabilitySchemaVersionSummary instances + Items []ComputeGlobalImageCapabilitySchemaVersionSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeGlobalImageCapabilitySchemaVersionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeGlobalImageCapabilitySchemaVersionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeGlobalImageCapabilitySchemaVersionsSortByEnum Enum with underlying type: string +type ListComputeGlobalImageCapabilitySchemaVersionsSortByEnum string + +// Set of constants representing the allowable values for ListComputeGlobalImageCapabilitySchemaVersionsSortByEnum +const ( + ListComputeGlobalImageCapabilitySchemaVersionsSortByTimecreated ListComputeGlobalImageCapabilitySchemaVersionsSortByEnum = "TIMECREATED" + ListComputeGlobalImageCapabilitySchemaVersionsSortByDisplayname ListComputeGlobalImageCapabilitySchemaVersionsSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeGlobalImageCapabilitySchemaVersionsSortByEnum = map[string]ListComputeGlobalImageCapabilitySchemaVersionsSortByEnum{ + "TIMECREATED": ListComputeGlobalImageCapabilitySchemaVersionsSortByTimecreated, + "DISPLAYNAME": ListComputeGlobalImageCapabilitySchemaVersionsSortByDisplayname, +} + +var mappingListComputeGlobalImageCapabilitySchemaVersionsSortByEnumLowerCase = map[string]ListComputeGlobalImageCapabilitySchemaVersionsSortByEnum{ + "timecreated": ListComputeGlobalImageCapabilitySchemaVersionsSortByTimecreated, + "displayname": ListComputeGlobalImageCapabilitySchemaVersionsSortByDisplayname, +} + +// GetListComputeGlobalImageCapabilitySchemaVersionsSortByEnumValues Enumerates the set of values for ListComputeGlobalImageCapabilitySchemaVersionsSortByEnum +func GetListComputeGlobalImageCapabilitySchemaVersionsSortByEnumValues() []ListComputeGlobalImageCapabilitySchemaVersionsSortByEnum { + values := make([]ListComputeGlobalImageCapabilitySchemaVersionsSortByEnum, 0) + for _, v := range mappingListComputeGlobalImageCapabilitySchemaVersionsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeGlobalImageCapabilitySchemaVersionsSortByEnumStringValues Enumerates the set of values in String for ListComputeGlobalImageCapabilitySchemaVersionsSortByEnum +func GetListComputeGlobalImageCapabilitySchemaVersionsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeGlobalImageCapabilitySchemaVersionsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeGlobalImageCapabilitySchemaVersionsSortByEnum(val string) (ListComputeGlobalImageCapabilitySchemaVersionsSortByEnum, bool) { + enum, ok := mappingListComputeGlobalImageCapabilitySchemaVersionsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum Enum with underlying type: string +type ListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum +const ( + ListComputeGlobalImageCapabilitySchemaVersionsSortOrderAsc ListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum = "ASC" + ListComputeGlobalImageCapabilitySchemaVersionsSortOrderDesc ListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum = "DESC" +) + +var mappingListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum = map[string]ListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum{ + "ASC": ListComputeGlobalImageCapabilitySchemaVersionsSortOrderAsc, + "DESC": ListComputeGlobalImageCapabilitySchemaVersionsSortOrderDesc, +} + +var mappingListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnumLowerCase = map[string]ListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum{ + "asc": ListComputeGlobalImageCapabilitySchemaVersionsSortOrderAsc, + "desc": ListComputeGlobalImageCapabilitySchemaVersionsSortOrderDesc, +} + +// GetListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnumValues Enumerates the set of values for ListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum +func GetListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnumValues() []ListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum { + values := make([]ListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum, 0) + for _, v := range mappingListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnumStringValues Enumerates the set of values in String for ListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum +func GetListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum(val string) (ListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnum, bool) { + enum, ok := mappingListComputeGlobalImageCapabilitySchemaVersionsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_global_image_capability_schemas_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_global_image_capability_schemas_request_response.go new file mode 100644 index 000000000..568fb09c2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_global_image_capability_schemas_request_response.go @@ -0,0 +1,213 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeGlobalImageCapabilitySchemasRequest wrapper for the ListComputeGlobalImageCapabilitySchemas operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeGlobalImageCapabilitySchemas.go.html to see an example of how to use ListComputeGlobalImageCapabilitySchemasRequest. +type ListComputeGlobalImageCapabilitySchemasRequest struct { + + // A filter to return only resources that match the given compartment OCID exactly. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeGlobalImageCapabilitySchemasSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeGlobalImageCapabilitySchemasSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeGlobalImageCapabilitySchemasRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeGlobalImageCapabilitySchemasRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeGlobalImageCapabilitySchemasRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeGlobalImageCapabilitySchemasRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeGlobalImageCapabilitySchemasRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeGlobalImageCapabilitySchemasSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeGlobalImageCapabilitySchemasSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeGlobalImageCapabilitySchemasSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeGlobalImageCapabilitySchemasSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeGlobalImageCapabilitySchemasResponse wrapper for the ListComputeGlobalImageCapabilitySchemas operation +type ListComputeGlobalImageCapabilitySchemasResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ComputeGlobalImageCapabilitySchemaSummary instances + Items []ComputeGlobalImageCapabilitySchemaSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeGlobalImageCapabilitySchemasResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeGlobalImageCapabilitySchemasResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeGlobalImageCapabilitySchemasSortByEnum Enum with underlying type: string +type ListComputeGlobalImageCapabilitySchemasSortByEnum string + +// Set of constants representing the allowable values for ListComputeGlobalImageCapabilitySchemasSortByEnum +const ( + ListComputeGlobalImageCapabilitySchemasSortByTimecreated ListComputeGlobalImageCapabilitySchemasSortByEnum = "TIMECREATED" + ListComputeGlobalImageCapabilitySchemasSortByDisplayname ListComputeGlobalImageCapabilitySchemasSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeGlobalImageCapabilitySchemasSortByEnum = map[string]ListComputeGlobalImageCapabilitySchemasSortByEnum{ + "TIMECREATED": ListComputeGlobalImageCapabilitySchemasSortByTimecreated, + "DISPLAYNAME": ListComputeGlobalImageCapabilitySchemasSortByDisplayname, +} + +var mappingListComputeGlobalImageCapabilitySchemasSortByEnumLowerCase = map[string]ListComputeGlobalImageCapabilitySchemasSortByEnum{ + "timecreated": ListComputeGlobalImageCapabilitySchemasSortByTimecreated, + "displayname": ListComputeGlobalImageCapabilitySchemasSortByDisplayname, +} + +// GetListComputeGlobalImageCapabilitySchemasSortByEnumValues Enumerates the set of values for ListComputeGlobalImageCapabilitySchemasSortByEnum +func GetListComputeGlobalImageCapabilitySchemasSortByEnumValues() []ListComputeGlobalImageCapabilitySchemasSortByEnum { + values := make([]ListComputeGlobalImageCapabilitySchemasSortByEnum, 0) + for _, v := range mappingListComputeGlobalImageCapabilitySchemasSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeGlobalImageCapabilitySchemasSortByEnumStringValues Enumerates the set of values in String for ListComputeGlobalImageCapabilitySchemasSortByEnum +func GetListComputeGlobalImageCapabilitySchemasSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeGlobalImageCapabilitySchemasSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeGlobalImageCapabilitySchemasSortByEnum(val string) (ListComputeGlobalImageCapabilitySchemasSortByEnum, bool) { + enum, ok := mappingListComputeGlobalImageCapabilitySchemasSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeGlobalImageCapabilitySchemasSortOrderEnum Enum with underlying type: string +type ListComputeGlobalImageCapabilitySchemasSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeGlobalImageCapabilitySchemasSortOrderEnum +const ( + ListComputeGlobalImageCapabilitySchemasSortOrderAsc ListComputeGlobalImageCapabilitySchemasSortOrderEnum = "ASC" + ListComputeGlobalImageCapabilitySchemasSortOrderDesc ListComputeGlobalImageCapabilitySchemasSortOrderEnum = "DESC" +) + +var mappingListComputeGlobalImageCapabilitySchemasSortOrderEnum = map[string]ListComputeGlobalImageCapabilitySchemasSortOrderEnum{ + "ASC": ListComputeGlobalImageCapabilitySchemasSortOrderAsc, + "DESC": ListComputeGlobalImageCapabilitySchemasSortOrderDesc, +} + +var mappingListComputeGlobalImageCapabilitySchemasSortOrderEnumLowerCase = map[string]ListComputeGlobalImageCapabilitySchemasSortOrderEnum{ + "asc": ListComputeGlobalImageCapabilitySchemasSortOrderAsc, + "desc": ListComputeGlobalImageCapabilitySchemasSortOrderDesc, +} + +// GetListComputeGlobalImageCapabilitySchemasSortOrderEnumValues Enumerates the set of values for ListComputeGlobalImageCapabilitySchemasSortOrderEnum +func GetListComputeGlobalImageCapabilitySchemasSortOrderEnumValues() []ListComputeGlobalImageCapabilitySchemasSortOrderEnum { + values := make([]ListComputeGlobalImageCapabilitySchemasSortOrderEnum, 0) + for _, v := range mappingListComputeGlobalImageCapabilitySchemasSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeGlobalImageCapabilitySchemasSortOrderEnumStringValues Enumerates the set of values in String for ListComputeGlobalImageCapabilitySchemasSortOrderEnum +func GetListComputeGlobalImageCapabilitySchemasSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeGlobalImageCapabilitySchemasSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeGlobalImageCapabilitySchemasSortOrderEnum(val string) (ListComputeGlobalImageCapabilitySchemasSortOrderEnum, bool) { + enum, ok := mappingListComputeGlobalImageCapabilitySchemasSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_gpu_memory_cluster_instances_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_gpu_memory_cluster_instances_request_response.go new file mode 100644 index 000000000..3a6903eb7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_gpu_memory_cluster_instances_request_response.go @@ -0,0 +1,213 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeGpuMemoryClusterInstancesRequest wrapper for the ListComputeGpuMemoryClusterInstances operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeGpuMemoryClusterInstances.go.html to see an example of how to use ListComputeGpuMemoryClusterInstancesRequest. +type ListComputeGpuMemoryClusterInstancesRequest struct { + + // The OCID of the compute GPU memory cluster. + ComputeGpuMemoryClusterId *string `mandatory:"true" contributesTo:"path" name:"computeGpuMemoryClusterId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeGpuMemoryClusterInstancesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeGpuMemoryClusterInstancesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeGpuMemoryClusterInstancesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeGpuMemoryClusterInstancesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeGpuMemoryClusterInstancesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeGpuMemoryClusterInstancesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeGpuMemoryClusterInstancesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeGpuMemoryClusterInstancesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeGpuMemoryClusterInstancesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeGpuMemoryClusterInstancesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeGpuMemoryClusterInstancesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeGpuMemoryClusterInstancesResponse wrapper for the ListComputeGpuMemoryClusterInstances operation +type ListComputeGpuMemoryClusterInstancesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComputeGpuMemoryClusterInstanceCollection instances + ComputeGpuMemoryClusterInstanceCollection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeGpuMemoryClusterInstancesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeGpuMemoryClusterInstancesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeGpuMemoryClusterInstancesSortByEnum Enum with underlying type: string +type ListComputeGpuMemoryClusterInstancesSortByEnum string + +// Set of constants representing the allowable values for ListComputeGpuMemoryClusterInstancesSortByEnum +const ( + ListComputeGpuMemoryClusterInstancesSortByTimecreated ListComputeGpuMemoryClusterInstancesSortByEnum = "TIMECREATED" + ListComputeGpuMemoryClusterInstancesSortByDisplayname ListComputeGpuMemoryClusterInstancesSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeGpuMemoryClusterInstancesSortByEnum = map[string]ListComputeGpuMemoryClusterInstancesSortByEnum{ + "TIMECREATED": ListComputeGpuMemoryClusterInstancesSortByTimecreated, + "DISPLAYNAME": ListComputeGpuMemoryClusterInstancesSortByDisplayname, +} + +var mappingListComputeGpuMemoryClusterInstancesSortByEnumLowerCase = map[string]ListComputeGpuMemoryClusterInstancesSortByEnum{ + "timecreated": ListComputeGpuMemoryClusterInstancesSortByTimecreated, + "displayname": ListComputeGpuMemoryClusterInstancesSortByDisplayname, +} + +// GetListComputeGpuMemoryClusterInstancesSortByEnumValues Enumerates the set of values for ListComputeGpuMemoryClusterInstancesSortByEnum +func GetListComputeGpuMemoryClusterInstancesSortByEnumValues() []ListComputeGpuMemoryClusterInstancesSortByEnum { + values := make([]ListComputeGpuMemoryClusterInstancesSortByEnum, 0) + for _, v := range mappingListComputeGpuMemoryClusterInstancesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeGpuMemoryClusterInstancesSortByEnumStringValues Enumerates the set of values in String for ListComputeGpuMemoryClusterInstancesSortByEnum +func GetListComputeGpuMemoryClusterInstancesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeGpuMemoryClusterInstancesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeGpuMemoryClusterInstancesSortByEnum(val string) (ListComputeGpuMemoryClusterInstancesSortByEnum, bool) { + enum, ok := mappingListComputeGpuMemoryClusterInstancesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeGpuMemoryClusterInstancesSortOrderEnum Enum with underlying type: string +type ListComputeGpuMemoryClusterInstancesSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeGpuMemoryClusterInstancesSortOrderEnum +const ( + ListComputeGpuMemoryClusterInstancesSortOrderAsc ListComputeGpuMemoryClusterInstancesSortOrderEnum = "ASC" + ListComputeGpuMemoryClusterInstancesSortOrderDesc ListComputeGpuMemoryClusterInstancesSortOrderEnum = "DESC" +) + +var mappingListComputeGpuMemoryClusterInstancesSortOrderEnum = map[string]ListComputeGpuMemoryClusterInstancesSortOrderEnum{ + "ASC": ListComputeGpuMemoryClusterInstancesSortOrderAsc, + "DESC": ListComputeGpuMemoryClusterInstancesSortOrderDesc, +} + +var mappingListComputeGpuMemoryClusterInstancesSortOrderEnumLowerCase = map[string]ListComputeGpuMemoryClusterInstancesSortOrderEnum{ + "asc": ListComputeGpuMemoryClusterInstancesSortOrderAsc, + "desc": ListComputeGpuMemoryClusterInstancesSortOrderDesc, +} + +// GetListComputeGpuMemoryClusterInstancesSortOrderEnumValues Enumerates the set of values for ListComputeGpuMemoryClusterInstancesSortOrderEnum +func GetListComputeGpuMemoryClusterInstancesSortOrderEnumValues() []ListComputeGpuMemoryClusterInstancesSortOrderEnum { + values := make([]ListComputeGpuMemoryClusterInstancesSortOrderEnum, 0) + for _, v := range mappingListComputeGpuMemoryClusterInstancesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeGpuMemoryClusterInstancesSortOrderEnumStringValues Enumerates the set of values in String for ListComputeGpuMemoryClusterInstancesSortOrderEnum +func GetListComputeGpuMemoryClusterInstancesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeGpuMemoryClusterInstancesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeGpuMemoryClusterInstancesSortOrderEnum(val string) (ListComputeGpuMemoryClusterInstancesSortOrderEnum, bool) { + enum, ok := mappingListComputeGpuMemoryClusterInstancesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_gpu_memory_clusters_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_gpu_memory_clusters_request_response.go new file mode 100644 index 000000000..d45c16e5e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_gpu_memory_clusters_request_response.go @@ -0,0 +1,231 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeGpuMemoryClustersRequest wrapper for the ListComputeGpuMemoryClusters operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeGpuMemoryClusters.go.html to see an example of how to use ListComputeGpuMemoryClustersRequest. +type ListComputeGpuMemoryClustersRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A filter to return only the listings that matches the given GPU memory cluster id. + ComputeGpuMemoryClusterId *string `mandatory:"false" contributesTo:"query" name:"computeGpuMemoryClusterId"` + + // A filter to return only the listings that matches the given GPU memory fabric id. + ComputeGpuMemoryFabricId *string `mandatory:"false" contributesTo:"query" name:"computeGpuMemoryFabricId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + // A compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + // access (RDMA) network group. + ComputeClusterId *string `mandatory:"false" contributesTo:"query" name:"computeClusterId"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeGpuMemoryClustersSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeGpuMemoryClustersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeGpuMemoryClustersRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeGpuMemoryClustersRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeGpuMemoryClustersRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeGpuMemoryClustersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeGpuMemoryClustersRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeGpuMemoryClustersSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeGpuMemoryClustersSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeGpuMemoryClustersSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeGpuMemoryClustersSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeGpuMemoryClustersResponse wrapper for the ListComputeGpuMemoryClusters operation +type ListComputeGpuMemoryClustersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComputeGpuMemoryClusterCollection instances + ComputeGpuMemoryClusterCollection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeGpuMemoryClustersResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeGpuMemoryClustersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeGpuMemoryClustersSortByEnum Enum with underlying type: string +type ListComputeGpuMemoryClustersSortByEnum string + +// Set of constants representing the allowable values for ListComputeGpuMemoryClustersSortByEnum +const ( + ListComputeGpuMemoryClustersSortByTimecreated ListComputeGpuMemoryClustersSortByEnum = "TIMECREATED" + ListComputeGpuMemoryClustersSortByDisplayname ListComputeGpuMemoryClustersSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeGpuMemoryClustersSortByEnum = map[string]ListComputeGpuMemoryClustersSortByEnum{ + "TIMECREATED": ListComputeGpuMemoryClustersSortByTimecreated, + "DISPLAYNAME": ListComputeGpuMemoryClustersSortByDisplayname, +} + +var mappingListComputeGpuMemoryClustersSortByEnumLowerCase = map[string]ListComputeGpuMemoryClustersSortByEnum{ + "timecreated": ListComputeGpuMemoryClustersSortByTimecreated, + "displayname": ListComputeGpuMemoryClustersSortByDisplayname, +} + +// GetListComputeGpuMemoryClustersSortByEnumValues Enumerates the set of values for ListComputeGpuMemoryClustersSortByEnum +func GetListComputeGpuMemoryClustersSortByEnumValues() []ListComputeGpuMemoryClustersSortByEnum { + values := make([]ListComputeGpuMemoryClustersSortByEnum, 0) + for _, v := range mappingListComputeGpuMemoryClustersSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeGpuMemoryClustersSortByEnumStringValues Enumerates the set of values in String for ListComputeGpuMemoryClustersSortByEnum +func GetListComputeGpuMemoryClustersSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeGpuMemoryClustersSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeGpuMemoryClustersSortByEnum(val string) (ListComputeGpuMemoryClustersSortByEnum, bool) { + enum, ok := mappingListComputeGpuMemoryClustersSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeGpuMemoryClustersSortOrderEnum Enum with underlying type: string +type ListComputeGpuMemoryClustersSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeGpuMemoryClustersSortOrderEnum +const ( + ListComputeGpuMemoryClustersSortOrderAsc ListComputeGpuMemoryClustersSortOrderEnum = "ASC" + ListComputeGpuMemoryClustersSortOrderDesc ListComputeGpuMemoryClustersSortOrderEnum = "DESC" +) + +var mappingListComputeGpuMemoryClustersSortOrderEnum = map[string]ListComputeGpuMemoryClustersSortOrderEnum{ + "ASC": ListComputeGpuMemoryClustersSortOrderAsc, + "DESC": ListComputeGpuMemoryClustersSortOrderDesc, +} + +var mappingListComputeGpuMemoryClustersSortOrderEnumLowerCase = map[string]ListComputeGpuMemoryClustersSortOrderEnum{ + "asc": ListComputeGpuMemoryClustersSortOrderAsc, + "desc": ListComputeGpuMemoryClustersSortOrderDesc, +} + +// GetListComputeGpuMemoryClustersSortOrderEnumValues Enumerates the set of values for ListComputeGpuMemoryClustersSortOrderEnum +func GetListComputeGpuMemoryClustersSortOrderEnumValues() []ListComputeGpuMemoryClustersSortOrderEnum { + values := make([]ListComputeGpuMemoryClustersSortOrderEnum, 0) + for _, v := range mappingListComputeGpuMemoryClustersSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeGpuMemoryClustersSortOrderEnumStringValues Enumerates the set of values in String for ListComputeGpuMemoryClustersSortOrderEnum +func GetListComputeGpuMemoryClustersSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeGpuMemoryClustersSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeGpuMemoryClustersSortOrderEnum(val string) (ListComputeGpuMemoryClustersSortOrderEnum, bool) { + enum, ok := mappingListComputeGpuMemoryClustersSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_gpu_memory_fabrics_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_gpu_memory_fabrics_request_response.go new file mode 100644 index 000000000..dab149551 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_gpu_memory_fabrics_request_response.go @@ -0,0 +1,238 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeGpuMemoryFabricsRequest wrapper for the ListComputeGpuMemoryFabrics operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeGpuMemoryFabrics.go.html to see an example of how to use ListComputeGpuMemoryFabricsRequest. +type ListComputeGpuMemoryFabricsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A filter to return only the listings that matches the given GPU memory fabric id. + ComputeGpuMemoryFabricId *string `mandatory:"false" contributesTo:"query" name:"computeGpuMemoryFabricId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + ComputeHpcIslandId *string `mandatory:"false" contributesTo:"query" name:"computeHpcIslandId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + ComputeNetworkBlockId *string `mandatory:"false" contributesTo:"query" name:"computeNetworkBlockId"` + + // A filter to return ComputeGpuMemoryFabricSummary resources that match the given lifecycle state. + ComputeGpuMemoryFabricLifecycleState ComputeGpuMemoryFabricLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"computeGpuMemoryFabricLifecycleState" omitEmpty:"true"` + + // A filter to return ComputeGpuMemoryFabricSummary resources that match the given fabric health. + ComputeGpuMemoryFabricHealth ComputeGpuMemoryFabricFabricHealthEnum `mandatory:"false" contributesTo:"query" name:"computeGpuMemoryFabricHealth" omitEmpty:"true"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeGpuMemoryFabricsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeGpuMemoryFabricsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeGpuMemoryFabricsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeGpuMemoryFabricsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeGpuMemoryFabricsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeGpuMemoryFabricsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeGpuMemoryFabricsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeGpuMemoryFabricLifecycleStateEnum(string(request.ComputeGpuMemoryFabricLifecycleState)); !ok && request.ComputeGpuMemoryFabricLifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComputeGpuMemoryFabricLifecycleState: %s. Supported values are: %s.", request.ComputeGpuMemoryFabricLifecycleState, strings.Join(GetComputeGpuMemoryFabricLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingComputeGpuMemoryFabricFabricHealthEnum(string(request.ComputeGpuMemoryFabricHealth)); !ok && request.ComputeGpuMemoryFabricHealth != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComputeGpuMemoryFabricHealth: %s. Supported values are: %s.", request.ComputeGpuMemoryFabricHealth, strings.Join(GetComputeGpuMemoryFabricFabricHealthEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeGpuMemoryFabricsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeGpuMemoryFabricsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeGpuMemoryFabricsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeGpuMemoryFabricsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeGpuMemoryFabricsResponse wrapper for the ListComputeGpuMemoryFabrics operation +type ListComputeGpuMemoryFabricsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComputeGpuMemoryFabricCollection instances + ComputeGpuMemoryFabricCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeGpuMemoryFabricsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeGpuMemoryFabricsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeGpuMemoryFabricsSortByEnum Enum with underlying type: string +type ListComputeGpuMemoryFabricsSortByEnum string + +// Set of constants representing the allowable values for ListComputeGpuMemoryFabricsSortByEnum +const ( + ListComputeGpuMemoryFabricsSortByTimecreated ListComputeGpuMemoryFabricsSortByEnum = "TIMECREATED" + ListComputeGpuMemoryFabricsSortByDisplayname ListComputeGpuMemoryFabricsSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeGpuMemoryFabricsSortByEnum = map[string]ListComputeGpuMemoryFabricsSortByEnum{ + "TIMECREATED": ListComputeGpuMemoryFabricsSortByTimecreated, + "DISPLAYNAME": ListComputeGpuMemoryFabricsSortByDisplayname, +} + +var mappingListComputeGpuMemoryFabricsSortByEnumLowerCase = map[string]ListComputeGpuMemoryFabricsSortByEnum{ + "timecreated": ListComputeGpuMemoryFabricsSortByTimecreated, + "displayname": ListComputeGpuMemoryFabricsSortByDisplayname, +} + +// GetListComputeGpuMemoryFabricsSortByEnumValues Enumerates the set of values for ListComputeGpuMemoryFabricsSortByEnum +func GetListComputeGpuMemoryFabricsSortByEnumValues() []ListComputeGpuMemoryFabricsSortByEnum { + values := make([]ListComputeGpuMemoryFabricsSortByEnum, 0) + for _, v := range mappingListComputeGpuMemoryFabricsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeGpuMemoryFabricsSortByEnumStringValues Enumerates the set of values in String for ListComputeGpuMemoryFabricsSortByEnum +func GetListComputeGpuMemoryFabricsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeGpuMemoryFabricsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeGpuMemoryFabricsSortByEnum(val string) (ListComputeGpuMemoryFabricsSortByEnum, bool) { + enum, ok := mappingListComputeGpuMemoryFabricsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeGpuMemoryFabricsSortOrderEnum Enum with underlying type: string +type ListComputeGpuMemoryFabricsSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeGpuMemoryFabricsSortOrderEnum +const ( + ListComputeGpuMemoryFabricsSortOrderAsc ListComputeGpuMemoryFabricsSortOrderEnum = "ASC" + ListComputeGpuMemoryFabricsSortOrderDesc ListComputeGpuMemoryFabricsSortOrderEnum = "DESC" +) + +var mappingListComputeGpuMemoryFabricsSortOrderEnum = map[string]ListComputeGpuMemoryFabricsSortOrderEnum{ + "ASC": ListComputeGpuMemoryFabricsSortOrderAsc, + "DESC": ListComputeGpuMemoryFabricsSortOrderDesc, +} + +var mappingListComputeGpuMemoryFabricsSortOrderEnumLowerCase = map[string]ListComputeGpuMemoryFabricsSortOrderEnum{ + "asc": ListComputeGpuMemoryFabricsSortOrderAsc, + "desc": ListComputeGpuMemoryFabricsSortOrderDesc, +} + +// GetListComputeGpuMemoryFabricsSortOrderEnumValues Enumerates the set of values for ListComputeGpuMemoryFabricsSortOrderEnum +func GetListComputeGpuMemoryFabricsSortOrderEnumValues() []ListComputeGpuMemoryFabricsSortOrderEnum { + values := make([]ListComputeGpuMemoryFabricsSortOrderEnum, 0) + for _, v := range mappingListComputeGpuMemoryFabricsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeGpuMemoryFabricsSortOrderEnumStringValues Enumerates the set of values in String for ListComputeGpuMemoryFabricsSortOrderEnum +func GetListComputeGpuMemoryFabricsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeGpuMemoryFabricsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeGpuMemoryFabricsSortOrderEnum(val string) (ListComputeGpuMemoryFabricsSortOrderEnum, bool) { + enum, ok := mappingListComputeGpuMemoryFabricsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_host_groups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_host_groups_request_response.go new file mode 100644 index 000000000..386a2e8bf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_host_groups_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeHostGroupsRequest wrapper for the ListComputeHostGroups operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeHostGroups.go.html to see an example of how to use ListComputeHostGroupsRequest. +type ListComputeHostGroupsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeHostGroupsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeHostGroupsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeHostGroupsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeHostGroupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeHostGroupsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeHostGroupsResponse wrapper for the ListComputeHostGroups operation +type ListComputeHostGroupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComputeHostGroupCollection instances + ComputeHostGroupCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeHostGroupsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeHostGroupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_hosts_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_hosts_request_response.go new file mode 100644 index 000000000..2d79558cb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_hosts_request_response.go @@ -0,0 +1,237 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeHostsRequest wrapper for the ListComputeHosts operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeHosts.go.html to see an example of how to use ListComputeHostsRequest. +type ListComputeHostsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host network resoruce. + // - Customer-unique HPC island ID + // - Customer-unique network block ID + // - Customer-unique local block ID + NetworkResourceId *string `mandatory:"false" contributesTo:"query" name:"networkResourceId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeHostsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeHostsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to return only ComputeHostSummary resources that match the given Compute Host lifecycle State OCID exactly. + ComputeHostLifecycleState *string `mandatory:"false" contributesTo:"query" name:"computeHostLifecycleState"` + + // A filter to return only ComputeHostSummary resources that match the given Compute Host health State OCID exactly. + ComputeHostHealth *string `mandatory:"false" contributesTo:"query" name:"computeHostHealth"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host group. + ComputeHostGroupId *string `mandatory:"false" contributesTo:"query" name:"computeHostGroupId"` + + // When set to true, all the compartments in the tenancy are traversed + // and the hosts in the specified tenancy and its compartments are fetched. + // Default is false. + ComputeHostInSubtree *bool `mandatory:"false" contributesTo:"query" name:"computeHostInSubtree"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeHostsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeHostsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeHostsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeHostsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeHostsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeHostsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeHostsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeHostsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeHostsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeHostsResponse wrapper for the ListComputeHosts operation +type ListComputeHostsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComputeHostCollection instances + ComputeHostCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeHostsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeHostsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeHostsSortByEnum Enum with underlying type: string +type ListComputeHostsSortByEnum string + +// Set of constants representing the allowable values for ListComputeHostsSortByEnum +const ( + ListComputeHostsSortByTimecreated ListComputeHostsSortByEnum = "TIMECREATED" + ListComputeHostsSortByDisplayname ListComputeHostsSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeHostsSortByEnum = map[string]ListComputeHostsSortByEnum{ + "TIMECREATED": ListComputeHostsSortByTimecreated, + "DISPLAYNAME": ListComputeHostsSortByDisplayname, +} + +var mappingListComputeHostsSortByEnumLowerCase = map[string]ListComputeHostsSortByEnum{ + "timecreated": ListComputeHostsSortByTimecreated, + "displayname": ListComputeHostsSortByDisplayname, +} + +// GetListComputeHostsSortByEnumValues Enumerates the set of values for ListComputeHostsSortByEnum +func GetListComputeHostsSortByEnumValues() []ListComputeHostsSortByEnum { + values := make([]ListComputeHostsSortByEnum, 0) + for _, v := range mappingListComputeHostsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeHostsSortByEnumStringValues Enumerates the set of values in String for ListComputeHostsSortByEnum +func GetListComputeHostsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeHostsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeHostsSortByEnum(val string) (ListComputeHostsSortByEnum, bool) { + enum, ok := mappingListComputeHostsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeHostsSortOrderEnum Enum with underlying type: string +type ListComputeHostsSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeHostsSortOrderEnum +const ( + ListComputeHostsSortOrderAsc ListComputeHostsSortOrderEnum = "ASC" + ListComputeHostsSortOrderDesc ListComputeHostsSortOrderEnum = "DESC" +) + +var mappingListComputeHostsSortOrderEnum = map[string]ListComputeHostsSortOrderEnum{ + "ASC": ListComputeHostsSortOrderAsc, + "DESC": ListComputeHostsSortOrderDesc, +} + +var mappingListComputeHostsSortOrderEnumLowerCase = map[string]ListComputeHostsSortOrderEnum{ + "asc": ListComputeHostsSortOrderAsc, + "desc": ListComputeHostsSortOrderDesc, +} + +// GetListComputeHostsSortOrderEnumValues Enumerates the set of values for ListComputeHostsSortOrderEnum +func GetListComputeHostsSortOrderEnumValues() []ListComputeHostsSortOrderEnum { + values := make([]ListComputeHostsSortOrderEnum, 0) + for _, v := range mappingListComputeHostsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeHostsSortOrderEnumStringValues Enumerates the set of values in String for ListComputeHostsSortOrderEnum +func GetListComputeHostsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeHostsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeHostsSortOrderEnum(val string) (ListComputeHostsSortOrderEnum, bool) { + enum, ok := mappingListComputeHostsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_image_capability_schemas_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_image_capability_schemas_request_response.go new file mode 100644 index 000000000..9706366ad --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_compute_image_capability_schemas_request_response.go @@ -0,0 +1,216 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComputeImageCapabilitySchemasRequest wrapper for the ListComputeImageCapabilitySchemas operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeImageCapabilitySchemas.go.html to see an example of how to use ListComputeImageCapabilitySchemasRequest. +type ListComputeImageCapabilitySchemasRequest struct { + + // A filter to return only resources that match the given compartment OCID exactly. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of an image. + ImageId *string `mandatory:"false" contributesTo:"query" name:"imageId"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeImageCapabilitySchemasSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeImageCapabilitySchemasSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeImageCapabilitySchemasRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeImageCapabilitySchemasRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeImageCapabilitySchemasRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeImageCapabilitySchemasRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeImageCapabilitySchemasRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeImageCapabilitySchemasSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeImageCapabilitySchemasSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeImageCapabilitySchemasSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeImageCapabilitySchemasSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeImageCapabilitySchemasResponse wrapper for the ListComputeImageCapabilitySchemas operation +type ListComputeImageCapabilitySchemasResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ComputeImageCapabilitySchemaSummary instances + Items []ComputeImageCapabilitySchemaSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeImageCapabilitySchemasResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeImageCapabilitySchemasResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeImageCapabilitySchemasSortByEnum Enum with underlying type: string +type ListComputeImageCapabilitySchemasSortByEnum string + +// Set of constants representing the allowable values for ListComputeImageCapabilitySchemasSortByEnum +const ( + ListComputeImageCapabilitySchemasSortByTimecreated ListComputeImageCapabilitySchemasSortByEnum = "TIMECREATED" + ListComputeImageCapabilitySchemasSortByDisplayname ListComputeImageCapabilitySchemasSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeImageCapabilitySchemasSortByEnum = map[string]ListComputeImageCapabilitySchemasSortByEnum{ + "TIMECREATED": ListComputeImageCapabilitySchemasSortByTimecreated, + "DISPLAYNAME": ListComputeImageCapabilitySchemasSortByDisplayname, +} + +var mappingListComputeImageCapabilitySchemasSortByEnumLowerCase = map[string]ListComputeImageCapabilitySchemasSortByEnum{ + "timecreated": ListComputeImageCapabilitySchemasSortByTimecreated, + "displayname": ListComputeImageCapabilitySchemasSortByDisplayname, +} + +// GetListComputeImageCapabilitySchemasSortByEnumValues Enumerates the set of values for ListComputeImageCapabilitySchemasSortByEnum +func GetListComputeImageCapabilitySchemasSortByEnumValues() []ListComputeImageCapabilitySchemasSortByEnum { + values := make([]ListComputeImageCapabilitySchemasSortByEnum, 0) + for _, v := range mappingListComputeImageCapabilitySchemasSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeImageCapabilitySchemasSortByEnumStringValues Enumerates the set of values in String for ListComputeImageCapabilitySchemasSortByEnum +func GetListComputeImageCapabilitySchemasSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeImageCapabilitySchemasSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeImageCapabilitySchemasSortByEnum(val string) (ListComputeImageCapabilitySchemasSortByEnum, bool) { + enum, ok := mappingListComputeImageCapabilitySchemasSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeImageCapabilitySchemasSortOrderEnum Enum with underlying type: string +type ListComputeImageCapabilitySchemasSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeImageCapabilitySchemasSortOrderEnum +const ( + ListComputeImageCapabilitySchemasSortOrderAsc ListComputeImageCapabilitySchemasSortOrderEnum = "ASC" + ListComputeImageCapabilitySchemasSortOrderDesc ListComputeImageCapabilitySchemasSortOrderEnum = "DESC" +) + +var mappingListComputeImageCapabilitySchemasSortOrderEnum = map[string]ListComputeImageCapabilitySchemasSortOrderEnum{ + "ASC": ListComputeImageCapabilitySchemasSortOrderAsc, + "DESC": ListComputeImageCapabilitySchemasSortOrderDesc, +} + +var mappingListComputeImageCapabilitySchemasSortOrderEnumLowerCase = map[string]ListComputeImageCapabilitySchemasSortOrderEnum{ + "asc": ListComputeImageCapabilitySchemasSortOrderAsc, + "desc": ListComputeImageCapabilitySchemasSortOrderDesc, +} + +// GetListComputeImageCapabilitySchemasSortOrderEnumValues Enumerates the set of values for ListComputeImageCapabilitySchemasSortOrderEnum +func GetListComputeImageCapabilitySchemasSortOrderEnumValues() []ListComputeImageCapabilitySchemasSortOrderEnum { + values := make([]ListComputeImageCapabilitySchemasSortOrderEnum, 0) + for _, v := range mappingListComputeImageCapabilitySchemasSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeImageCapabilitySchemasSortOrderEnumStringValues Enumerates the set of values in String for ListComputeImageCapabilitySchemasSortOrderEnum +func GetListComputeImageCapabilitySchemasSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeImageCapabilitySchemasSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeImageCapabilitySchemasSortOrderEnum(val string) (ListComputeImageCapabilitySchemasSortOrderEnum, bool) { + enum, ok := mappingListComputeImageCapabilitySchemasSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_console_histories_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_console_histories_request_response.go new file mode 100644 index 000000000..cd2b57ca9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_console_histories_request_response.go @@ -0,0 +1,224 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListConsoleHistoriesRequest wrapper for the ListConsoleHistories operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListConsoleHistories.go.html to see an example of how to use ListConsoleHistoriesRequest. +type ListConsoleHistoriesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID of the instance. + InstanceId *string `mandatory:"false" contributesTo:"query" name:"instanceId"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListConsoleHistoriesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListConsoleHistoriesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle state. The state + // value is case-insensitive. + LifecycleState ConsoleHistoryLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListConsoleHistoriesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListConsoleHistoriesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListConsoleHistoriesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListConsoleHistoriesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListConsoleHistoriesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListConsoleHistoriesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListConsoleHistoriesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListConsoleHistoriesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListConsoleHistoriesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingConsoleHistoryLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetConsoleHistoryLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListConsoleHistoriesResponse wrapper for the ListConsoleHistories operation +type ListConsoleHistoriesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ConsoleHistory instances + Items []ConsoleHistory `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListConsoleHistoriesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListConsoleHistoriesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListConsoleHistoriesSortByEnum Enum with underlying type: string +type ListConsoleHistoriesSortByEnum string + +// Set of constants representing the allowable values for ListConsoleHistoriesSortByEnum +const ( + ListConsoleHistoriesSortByTimecreated ListConsoleHistoriesSortByEnum = "TIMECREATED" + ListConsoleHistoriesSortByDisplayname ListConsoleHistoriesSortByEnum = "DISPLAYNAME" +) + +var mappingListConsoleHistoriesSortByEnum = map[string]ListConsoleHistoriesSortByEnum{ + "TIMECREATED": ListConsoleHistoriesSortByTimecreated, + "DISPLAYNAME": ListConsoleHistoriesSortByDisplayname, +} + +var mappingListConsoleHistoriesSortByEnumLowerCase = map[string]ListConsoleHistoriesSortByEnum{ + "timecreated": ListConsoleHistoriesSortByTimecreated, + "displayname": ListConsoleHistoriesSortByDisplayname, +} + +// GetListConsoleHistoriesSortByEnumValues Enumerates the set of values for ListConsoleHistoriesSortByEnum +func GetListConsoleHistoriesSortByEnumValues() []ListConsoleHistoriesSortByEnum { + values := make([]ListConsoleHistoriesSortByEnum, 0) + for _, v := range mappingListConsoleHistoriesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListConsoleHistoriesSortByEnumStringValues Enumerates the set of values in String for ListConsoleHistoriesSortByEnum +func GetListConsoleHistoriesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListConsoleHistoriesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListConsoleHistoriesSortByEnum(val string) (ListConsoleHistoriesSortByEnum, bool) { + enum, ok := mappingListConsoleHistoriesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListConsoleHistoriesSortOrderEnum Enum with underlying type: string +type ListConsoleHistoriesSortOrderEnum string + +// Set of constants representing the allowable values for ListConsoleHistoriesSortOrderEnum +const ( + ListConsoleHistoriesSortOrderAsc ListConsoleHistoriesSortOrderEnum = "ASC" + ListConsoleHistoriesSortOrderDesc ListConsoleHistoriesSortOrderEnum = "DESC" +) + +var mappingListConsoleHistoriesSortOrderEnum = map[string]ListConsoleHistoriesSortOrderEnum{ + "ASC": ListConsoleHistoriesSortOrderAsc, + "DESC": ListConsoleHistoriesSortOrderDesc, +} + +var mappingListConsoleHistoriesSortOrderEnumLowerCase = map[string]ListConsoleHistoriesSortOrderEnum{ + "asc": ListConsoleHistoriesSortOrderAsc, + "desc": ListConsoleHistoriesSortOrderDesc, +} + +// GetListConsoleHistoriesSortOrderEnumValues Enumerates the set of values for ListConsoleHistoriesSortOrderEnum +func GetListConsoleHistoriesSortOrderEnumValues() []ListConsoleHistoriesSortOrderEnum { + values := make([]ListConsoleHistoriesSortOrderEnum, 0) + for _, v := range mappingListConsoleHistoriesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListConsoleHistoriesSortOrderEnumStringValues Enumerates the set of values in String for ListConsoleHistoriesSortOrderEnum +func GetListConsoleHistoriesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListConsoleHistoriesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListConsoleHistoriesSortOrderEnum(val string) (ListConsoleHistoriesSortOrderEnum, bool) { + enum, ok := mappingListConsoleHistoriesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cpe_device_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cpe_device_shapes_request_response.go new file mode 100644 index 000000000..c32dc5bb4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cpe_device_shapes_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListCpeDeviceShapesRequest wrapper for the ListCpeDeviceShapes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCpeDeviceShapes.go.html to see an example of how to use ListCpeDeviceShapesRequest. +type ListCpeDeviceShapesRequest struct { + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListCpeDeviceShapesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListCpeDeviceShapesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListCpeDeviceShapesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCpeDeviceShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListCpeDeviceShapesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListCpeDeviceShapesResponse wrapper for the ListCpeDeviceShapes operation +type ListCpeDeviceShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []CpeDeviceShapeSummary instances + Items []CpeDeviceShapeSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListCpeDeviceShapesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListCpeDeviceShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cpes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cpes_request_response.go new file mode 100644 index 000000000..2a795137a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cpes_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListCpesRequest wrapper for the ListCpes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCpes.go.html to see an example of how to use ListCpesRequest. +type ListCpesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListCpesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListCpesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListCpesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCpesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListCpesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListCpesResponse wrapper for the ListCpes operation +type ListCpesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []Cpe instances + Items []Cpe `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListCpesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListCpesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cross_connect_groups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cross_connect_groups_request_response.go new file mode 100644 index 000000000..c7d85eabd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cross_connect_groups_request_response.go @@ -0,0 +1,220 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListCrossConnectGroupsRequest wrapper for the ListCrossConnectGroups operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossConnectGroups.go.html to see an example of how to use ListCrossConnectGroupsRequest. +type ListCrossConnectGroupsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListCrossConnectGroupsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListCrossConnectGroupsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to return only resources that match the specified lifecycle + // state. The value is case insensitive. + LifecycleState CrossConnectGroupLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListCrossConnectGroupsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListCrossConnectGroupsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListCrossConnectGroupsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCrossConnectGroupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListCrossConnectGroupsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListCrossConnectGroupsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListCrossConnectGroupsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListCrossConnectGroupsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListCrossConnectGroupsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingCrossConnectGroupLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetCrossConnectGroupLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListCrossConnectGroupsResponse wrapper for the ListCrossConnectGroups operation +type ListCrossConnectGroupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []CrossConnectGroup instances + Items []CrossConnectGroup `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListCrossConnectGroupsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListCrossConnectGroupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListCrossConnectGroupsSortByEnum Enum with underlying type: string +type ListCrossConnectGroupsSortByEnum string + +// Set of constants representing the allowable values for ListCrossConnectGroupsSortByEnum +const ( + ListCrossConnectGroupsSortByTimecreated ListCrossConnectGroupsSortByEnum = "TIMECREATED" + ListCrossConnectGroupsSortByDisplayname ListCrossConnectGroupsSortByEnum = "DISPLAYNAME" +) + +var mappingListCrossConnectGroupsSortByEnum = map[string]ListCrossConnectGroupsSortByEnum{ + "TIMECREATED": ListCrossConnectGroupsSortByTimecreated, + "DISPLAYNAME": ListCrossConnectGroupsSortByDisplayname, +} + +var mappingListCrossConnectGroupsSortByEnumLowerCase = map[string]ListCrossConnectGroupsSortByEnum{ + "timecreated": ListCrossConnectGroupsSortByTimecreated, + "displayname": ListCrossConnectGroupsSortByDisplayname, +} + +// GetListCrossConnectGroupsSortByEnumValues Enumerates the set of values for ListCrossConnectGroupsSortByEnum +func GetListCrossConnectGroupsSortByEnumValues() []ListCrossConnectGroupsSortByEnum { + values := make([]ListCrossConnectGroupsSortByEnum, 0) + for _, v := range mappingListCrossConnectGroupsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListCrossConnectGroupsSortByEnumStringValues Enumerates the set of values in String for ListCrossConnectGroupsSortByEnum +func GetListCrossConnectGroupsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListCrossConnectGroupsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListCrossConnectGroupsSortByEnum(val string) (ListCrossConnectGroupsSortByEnum, bool) { + enum, ok := mappingListCrossConnectGroupsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListCrossConnectGroupsSortOrderEnum Enum with underlying type: string +type ListCrossConnectGroupsSortOrderEnum string + +// Set of constants representing the allowable values for ListCrossConnectGroupsSortOrderEnum +const ( + ListCrossConnectGroupsSortOrderAsc ListCrossConnectGroupsSortOrderEnum = "ASC" + ListCrossConnectGroupsSortOrderDesc ListCrossConnectGroupsSortOrderEnum = "DESC" +) + +var mappingListCrossConnectGroupsSortOrderEnum = map[string]ListCrossConnectGroupsSortOrderEnum{ + "ASC": ListCrossConnectGroupsSortOrderAsc, + "DESC": ListCrossConnectGroupsSortOrderDesc, +} + +var mappingListCrossConnectGroupsSortOrderEnumLowerCase = map[string]ListCrossConnectGroupsSortOrderEnum{ + "asc": ListCrossConnectGroupsSortOrderAsc, + "desc": ListCrossConnectGroupsSortOrderDesc, +} + +// GetListCrossConnectGroupsSortOrderEnumValues Enumerates the set of values for ListCrossConnectGroupsSortOrderEnum +func GetListCrossConnectGroupsSortOrderEnumValues() []ListCrossConnectGroupsSortOrderEnum { + values := make([]ListCrossConnectGroupsSortOrderEnum, 0) + for _, v := range mappingListCrossConnectGroupsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListCrossConnectGroupsSortOrderEnumStringValues Enumerates the set of values in String for ListCrossConnectGroupsSortOrderEnum +func GetListCrossConnectGroupsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListCrossConnectGroupsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListCrossConnectGroupsSortOrderEnum(val string) (ListCrossConnectGroupsSortOrderEnum, bool) { + enum, ok := mappingListCrossConnectGroupsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cross_connect_locations_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cross_connect_locations_request_response.go new file mode 100644 index 000000000..f7684d92f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cross_connect_locations_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListCrossConnectLocationsRequest wrapper for the ListCrossConnectLocations operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossConnectLocations.go.html to see an example of how to use ListCrossConnectLocationsRequest. +type ListCrossConnectLocationsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListCrossConnectLocationsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListCrossConnectLocationsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListCrossConnectLocationsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCrossConnectLocationsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListCrossConnectLocationsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListCrossConnectLocationsResponse wrapper for the ListCrossConnectLocations operation +type ListCrossConnectLocationsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []CrossConnectLocation instances + Items []CrossConnectLocation `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListCrossConnectLocationsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListCrossConnectLocationsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cross_connect_mappings_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cross_connect_mappings_request_response.go new file mode 100644 index 000000000..aea013779 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cross_connect_mappings_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListCrossConnectMappingsRequest wrapper for the ListCrossConnectMappings operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossConnectMappings.go.html to see an example of how to use ListCrossConnectMappingsRequest. +type ListCrossConnectMappingsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit. + VirtualCircuitId *string `mandatory:"true" contributesTo:"path" name:"virtualCircuitId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListCrossConnectMappingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListCrossConnectMappingsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListCrossConnectMappingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCrossConnectMappingsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListCrossConnectMappingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListCrossConnectMappingsResponse wrapper for the ListCrossConnectMappings operation +type ListCrossConnectMappingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CrossConnectMappingDetailsCollection instance + CrossConnectMappingDetailsCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListCrossConnectMappingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListCrossConnectMappingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cross_connects_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cross_connects_request_response.go new file mode 100644 index 000000000..4b40b36fc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_cross_connects_request_response.go @@ -0,0 +1,223 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListCrossConnectsRequest wrapper for the ListCrossConnects operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossConnects.go.html to see an example of how to use ListCrossConnectsRequest. +type ListCrossConnectsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect group. + CrossConnectGroupId *string `mandatory:"false" contributesTo:"query" name:"crossConnectGroupId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListCrossConnectsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListCrossConnectsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to return only resources that match the specified lifecycle + // state. The value is case insensitive. + LifecycleState CrossConnectLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListCrossConnectsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListCrossConnectsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListCrossConnectsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCrossConnectsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListCrossConnectsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListCrossConnectsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListCrossConnectsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListCrossConnectsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListCrossConnectsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingCrossConnectLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetCrossConnectLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListCrossConnectsResponse wrapper for the ListCrossConnects operation +type ListCrossConnectsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []CrossConnect instances + Items []CrossConnect `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListCrossConnectsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListCrossConnectsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListCrossConnectsSortByEnum Enum with underlying type: string +type ListCrossConnectsSortByEnum string + +// Set of constants representing the allowable values for ListCrossConnectsSortByEnum +const ( + ListCrossConnectsSortByTimecreated ListCrossConnectsSortByEnum = "TIMECREATED" + ListCrossConnectsSortByDisplayname ListCrossConnectsSortByEnum = "DISPLAYNAME" +) + +var mappingListCrossConnectsSortByEnum = map[string]ListCrossConnectsSortByEnum{ + "TIMECREATED": ListCrossConnectsSortByTimecreated, + "DISPLAYNAME": ListCrossConnectsSortByDisplayname, +} + +var mappingListCrossConnectsSortByEnumLowerCase = map[string]ListCrossConnectsSortByEnum{ + "timecreated": ListCrossConnectsSortByTimecreated, + "displayname": ListCrossConnectsSortByDisplayname, +} + +// GetListCrossConnectsSortByEnumValues Enumerates the set of values for ListCrossConnectsSortByEnum +func GetListCrossConnectsSortByEnumValues() []ListCrossConnectsSortByEnum { + values := make([]ListCrossConnectsSortByEnum, 0) + for _, v := range mappingListCrossConnectsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListCrossConnectsSortByEnumStringValues Enumerates the set of values in String for ListCrossConnectsSortByEnum +func GetListCrossConnectsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListCrossConnectsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListCrossConnectsSortByEnum(val string) (ListCrossConnectsSortByEnum, bool) { + enum, ok := mappingListCrossConnectsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListCrossConnectsSortOrderEnum Enum with underlying type: string +type ListCrossConnectsSortOrderEnum string + +// Set of constants representing the allowable values for ListCrossConnectsSortOrderEnum +const ( + ListCrossConnectsSortOrderAsc ListCrossConnectsSortOrderEnum = "ASC" + ListCrossConnectsSortOrderDesc ListCrossConnectsSortOrderEnum = "DESC" +) + +var mappingListCrossConnectsSortOrderEnum = map[string]ListCrossConnectsSortOrderEnum{ + "ASC": ListCrossConnectsSortOrderAsc, + "DESC": ListCrossConnectsSortOrderDesc, +} + +var mappingListCrossConnectsSortOrderEnumLowerCase = map[string]ListCrossConnectsSortOrderEnum{ + "asc": ListCrossConnectsSortOrderAsc, + "desc": ListCrossConnectsSortOrderDesc, +} + +// GetListCrossConnectsSortOrderEnumValues Enumerates the set of values for ListCrossConnectsSortOrderEnum +func GetListCrossConnectsSortOrderEnumValues() []ListCrossConnectsSortOrderEnum { + values := make([]ListCrossConnectsSortOrderEnum, 0) + for _, v := range mappingListCrossConnectsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListCrossConnectsSortOrderEnumStringValues Enumerates the set of values in String for ListCrossConnectsSortOrderEnum +func GetListCrossConnectsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListCrossConnectsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListCrossConnectsSortOrderEnum(val string) (ListCrossConnectsSortOrderEnum, bool) { + enum, ok := mappingListCrossConnectsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_crossconnect_port_speed_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_crossconnect_port_speed_shapes_request_response.go new file mode 100644 index 000000000..142882c06 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_crossconnect_port_speed_shapes_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListCrossconnectPortSpeedShapesRequest wrapper for the ListCrossconnectPortSpeedShapes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListCrossconnectPortSpeedShapes.go.html to see an example of how to use ListCrossconnectPortSpeedShapesRequest. +type ListCrossconnectPortSpeedShapesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListCrossconnectPortSpeedShapesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListCrossconnectPortSpeedShapesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListCrossconnectPortSpeedShapesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCrossconnectPortSpeedShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListCrossconnectPortSpeedShapesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListCrossconnectPortSpeedShapesResponse wrapper for the ListCrossconnectPortSpeedShapes operation +type ListCrossconnectPortSpeedShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []CrossConnectPortSpeedShape instances + Items []CrossConnectPortSpeedShape `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListCrossconnectPortSpeedShapesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListCrossconnectPortSpeedShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dedicated_vm_host_instance_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dedicated_vm_host_instance_shapes_request_response.go new file mode 100644 index 000000000..97279176f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dedicated_vm_host_instance_shapes_request_response.go @@ -0,0 +1,114 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDedicatedVmHostInstanceShapesRequest wrapper for the ListDedicatedVmHostInstanceShapes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDedicatedVmHostInstanceShapes.go.html to see an example of how to use ListDedicatedVmHostInstanceShapesRequest. +type ListDedicatedVmHostInstanceShapesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // Dedicated VM host shape name + DedicatedVmHostShape *string `mandatory:"false" contributesTo:"query" name:"dedicatedVmHostShape"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListDedicatedVmHostInstanceShapesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDedicatedVmHostInstanceShapesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListDedicatedVmHostInstanceShapesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDedicatedVmHostInstanceShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListDedicatedVmHostInstanceShapesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDedicatedVmHostInstanceShapesResponse wrapper for the ListDedicatedVmHostInstanceShapes operation +type ListDedicatedVmHostInstanceShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []DedicatedVmHostInstanceShapeSummary instances + Items []DedicatedVmHostInstanceShapeSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListDedicatedVmHostInstanceShapesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDedicatedVmHostInstanceShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dedicated_vm_host_instances_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dedicated_vm_host_instances_request_response.go new file mode 100644 index 000000000..126b6b062 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dedicated_vm_host_instances_request_response.go @@ -0,0 +1,220 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDedicatedVmHostInstancesRequest wrapper for the ListDedicatedVmHostInstances operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDedicatedVmHostInstances.go.html to see an example of how to use ListDedicatedVmHostInstancesRequest. +type ListDedicatedVmHostInstancesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the dedicated VM host. + DedicatedVmHostId *string `mandatory:"true" contributesTo:"path" name:"dedicatedVmHostId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // A filter to return only confidential Dedicated VM hosts (DVMH) or confidential VM instances on DVMH. + IsMemoryEncryptionEnabled *bool `mandatory:"false" contributesTo:"query" name:"isMemoryEncryptionEnabled"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListDedicatedVmHostInstancesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListDedicatedVmHostInstancesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListDedicatedVmHostInstancesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDedicatedVmHostInstancesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListDedicatedVmHostInstancesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDedicatedVmHostInstancesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListDedicatedVmHostInstancesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListDedicatedVmHostInstancesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListDedicatedVmHostInstancesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListDedicatedVmHostInstancesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListDedicatedVmHostInstancesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDedicatedVmHostInstancesResponse wrapper for the ListDedicatedVmHostInstances operation +type ListDedicatedVmHostInstancesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []DedicatedVmHostInstanceSummary instances + Items []DedicatedVmHostInstanceSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListDedicatedVmHostInstancesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDedicatedVmHostInstancesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListDedicatedVmHostInstancesSortByEnum Enum with underlying type: string +type ListDedicatedVmHostInstancesSortByEnum string + +// Set of constants representing the allowable values for ListDedicatedVmHostInstancesSortByEnum +const ( + ListDedicatedVmHostInstancesSortByTimecreated ListDedicatedVmHostInstancesSortByEnum = "TIMECREATED" + ListDedicatedVmHostInstancesSortByDisplayname ListDedicatedVmHostInstancesSortByEnum = "DISPLAYNAME" +) + +var mappingListDedicatedVmHostInstancesSortByEnum = map[string]ListDedicatedVmHostInstancesSortByEnum{ + "TIMECREATED": ListDedicatedVmHostInstancesSortByTimecreated, + "DISPLAYNAME": ListDedicatedVmHostInstancesSortByDisplayname, +} + +var mappingListDedicatedVmHostInstancesSortByEnumLowerCase = map[string]ListDedicatedVmHostInstancesSortByEnum{ + "timecreated": ListDedicatedVmHostInstancesSortByTimecreated, + "displayname": ListDedicatedVmHostInstancesSortByDisplayname, +} + +// GetListDedicatedVmHostInstancesSortByEnumValues Enumerates the set of values for ListDedicatedVmHostInstancesSortByEnum +func GetListDedicatedVmHostInstancesSortByEnumValues() []ListDedicatedVmHostInstancesSortByEnum { + values := make([]ListDedicatedVmHostInstancesSortByEnum, 0) + for _, v := range mappingListDedicatedVmHostInstancesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListDedicatedVmHostInstancesSortByEnumStringValues Enumerates the set of values in String for ListDedicatedVmHostInstancesSortByEnum +func GetListDedicatedVmHostInstancesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListDedicatedVmHostInstancesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDedicatedVmHostInstancesSortByEnum(val string) (ListDedicatedVmHostInstancesSortByEnum, bool) { + enum, ok := mappingListDedicatedVmHostInstancesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListDedicatedVmHostInstancesSortOrderEnum Enum with underlying type: string +type ListDedicatedVmHostInstancesSortOrderEnum string + +// Set of constants representing the allowable values for ListDedicatedVmHostInstancesSortOrderEnum +const ( + ListDedicatedVmHostInstancesSortOrderAsc ListDedicatedVmHostInstancesSortOrderEnum = "ASC" + ListDedicatedVmHostInstancesSortOrderDesc ListDedicatedVmHostInstancesSortOrderEnum = "DESC" +) + +var mappingListDedicatedVmHostInstancesSortOrderEnum = map[string]ListDedicatedVmHostInstancesSortOrderEnum{ + "ASC": ListDedicatedVmHostInstancesSortOrderAsc, + "DESC": ListDedicatedVmHostInstancesSortOrderDesc, +} + +var mappingListDedicatedVmHostInstancesSortOrderEnumLowerCase = map[string]ListDedicatedVmHostInstancesSortOrderEnum{ + "asc": ListDedicatedVmHostInstancesSortOrderAsc, + "desc": ListDedicatedVmHostInstancesSortOrderDesc, +} + +// GetListDedicatedVmHostInstancesSortOrderEnumValues Enumerates the set of values for ListDedicatedVmHostInstancesSortOrderEnum +func GetListDedicatedVmHostInstancesSortOrderEnumValues() []ListDedicatedVmHostInstancesSortOrderEnum { + values := make([]ListDedicatedVmHostInstancesSortOrderEnum, 0) + for _, v := range mappingListDedicatedVmHostInstancesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListDedicatedVmHostInstancesSortOrderEnumStringValues Enumerates the set of values in String for ListDedicatedVmHostInstancesSortOrderEnum +func GetListDedicatedVmHostInstancesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListDedicatedVmHostInstancesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDedicatedVmHostInstancesSortOrderEnum(val string) (ListDedicatedVmHostInstancesSortOrderEnum, bool) { + enum, ok := mappingListDedicatedVmHostInstancesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dedicated_vm_host_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dedicated_vm_host_shapes_request_response.go new file mode 100644 index 000000000..dca7a37d6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dedicated_vm_host_shapes_request_response.go @@ -0,0 +1,114 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDedicatedVmHostShapesRequest wrapper for the ListDedicatedVmHostShapes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDedicatedVmHostShapes.go.html to see an example of how to use ListDedicatedVmHostShapesRequest. +type ListDedicatedVmHostShapesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The name for the instance's shape. + InstanceShapeName *string `mandatory:"false" contributesTo:"query" name:"instanceShapeName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListDedicatedVmHostShapesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDedicatedVmHostShapesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListDedicatedVmHostShapesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDedicatedVmHostShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListDedicatedVmHostShapesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDedicatedVmHostShapesResponse wrapper for the ListDedicatedVmHostShapes operation +type ListDedicatedVmHostShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []DedicatedVmHostShapeSummary instances + Items []DedicatedVmHostShapeSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListDedicatedVmHostShapesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDedicatedVmHostShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dedicated_vm_hosts_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dedicated_vm_hosts_request_response.go new file mode 100644 index 000000000..b70213fda --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dedicated_vm_hosts_request_response.go @@ -0,0 +1,296 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDedicatedVmHostsRequest wrapper for the ListDedicatedVmHosts operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDedicatedVmHosts.go.html to see an example of how to use ListDedicatedVmHostsRequest. +type ListDedicatedVmHostsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // A filter to only return resources that match the given lifecycle state. + LifecycleState ListDedicatedVmHostsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The name for the instance's shape. + InstanceShapeName *string `mandatory:"false" contributesTo:"query" name:"instanceShapeName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListDedicatedVmHostsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListDedicatedVmHostsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The remaining memory of the dedicated VM host, in GBs. + RemainingMemoryInGBsGreaterThanOrEqualTo *float32 `mandatory:"false" contributesTo:"query" name:"remainingMemoryInGBsGreaterThanOrEqualTo"` + + // The available OCPUs of the dedicated VM host. + RemainingOcpusGreaterThanOrEqualTo *float32 `mandatory:"false" contributesTo:"query" name:"remainingOcpusGreaterThanOrEqualTo"` + + // The remaining local volume of the dedicated VM host, in GBs. + RemainingLocalVolumeInGBsGreaterThanOrEqualTo *float32 `mandatory:"false" contributesTo:"query" name:"remainingLocalVolumeInGBsGreaterThanOrEqualTo"` + + // A filter to return only confidential Dedicated VM hosts (DVMH) or confidential VM instances on DVMH. + IsMemoryEncryptionEnabled *bool `mandatory:"false" contributesTo:"query" name:"isMemoryEncryptionEnabled"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListDedicatedVmHostsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDedicatedVmHostsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListDedicatedVmHostsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDedicatedVmHostsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListDedicatedVmHostsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListDedicatedVmHostsLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetListDedicatedVmHostsLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListDedicatedVmHostsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListDedicatedVmHostsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListDedicatedVmHostsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListDedicatedVmHostsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDedicatedVmHostsResponse wrapper for the ListDedicatedVmHosts operation +type ListDedicatedVmHostsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []DedicatedVmHostSummary instances + Items []DedicatedVmHostSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListDedicatedVmHostsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDedicatedVmHostsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListDedicatedVmHostsLifecycleStateEnum Enum with underlying type: string +type ListDedicatedVmHostsLifecycleStateEnum string + +// Set of constants representing the allowable values for ListDedicatedVmHostsLifecycleStateEnum +const ( + ListDedicatedVmHostsLifecycleStateCreating ListDedicatedVmHostsLifecycleStateEnum = "CREATING" + ListDedicatedVmHostsLifecycleStateActive ListDedicatedVmHostsLifecycleStateEnum = "ACTIVE" + ListDedicatedVmHostsLifecycleStateUpdating ListDedicatedVmHostsLifecycleStateEnum = "UPDATING" + ListDedicatedVmHostsLifecycleStateDeleting ListDedicatedVmHostsLifecycleStateEnum = "DELETING" + ListDedicatedVmHostsLifecycleStateDeleted ListDedicatedVmHostsLifecycleStateEnum = "DELETED" + ListDedicatedVmHostsLifecycleStateFailed ListDedicatedVmHostsLifecycleStateEnum = "FAILED" +) + +var mappingListDedicatedVmHostsLifecycleStateEnum = map[string]ListDedicatedVmHostsLifecycleStateEnum{ + "CREATING": ListDedicatedVmHostsLifecycleStateCreating, + "ACTIVE": ListDedicatedVmHostsLifecycleStateActive, + "UPDATING": ListDedicatedVmHostsLifecycleStateUpdating, + "DELETING": ListDedicatedVmHostsLifecycleStateDeleting, + "DELETED": ListDedicatedVmHostsLifecycleStateDeleted, + "FAILED": ListDedicatedVmHostsLifecycleStateFailed, +} + +var mappingListDedicatedVmHostsLifecycleStateEnumLowerCase = map[string]ListDedicatedVmHostsLifecycleStateEnum{ + "creating": ListDedicatedVmHostsLifecycleStateCreating, + "active": ListDedicatedVmHostsLifecycleStateActive, + "updating": ListDedicatedVmHostsLifecycleStateUpdating, + "deleting": ListDedicatedVmHostsLifecycleStateDeleting, + "deleted": ListDedicatedVmHostsLifecycleStateDeleted, + "failed": ListDedicatedVmHostsLifecycleStateFailed, +} + +// GetListDedicatedVmHostsLifecycleStateEnumValues Enumerates the set of values for ListDedicatedVmHostsLifecycleStateEnum +func GetListDedicatedVmHostsLifecycleStateEnumValues() []ListDedicatedVmHostsLifecycleStateEnum { + values := make([]ListDedicatedVmHostsLifecycleStateEnum, 0) + for _, v := range mappingListDedicatedVmHostsLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetListDedicatedVmHostsLifecycleStateEnumStringValues Enumerates the set of values in String for ListDedicatedVmHostsLifecycleStateEnum +func GetListDedicatedVmHostsLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingListDedicatedVmHostsLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDedicatedVmHostsLifecycleStateEnum(val string) (ListDedicatedVmHostsLifecycleStateEnum, bool) { + enum, ok := mappingListDedicatedVmHostsLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListDedicatedVmHostsSortByEnum Enum with underlying type: string +type ListDedicatedVmHostsSortByEnum string + +// Set of constants representing the allowable values for ListDedicatedVmHostsSortByEnum +const ( + ListDedicatedVmHostsSortByTimecreated ListDedicatedVmHostsSortByEnum = "TIMECREATED" + ListDedicatedVmHostsSortByDisplayname ListDedicatedVmHostsSortByEnum = "DISPLAYNAME" +) + +var mappingListDedicatedVmHostsSortByEnum = map[string]ListDedicatedVmHostsSortByEnum{ + "TIMECREATED": ListDedicatedVmHostsSortByTimecreated, + "DISPLAYNAME": ListDedicatedVmHostsSortByDisplayname, +} + +var mappingListDedicatedVmHostsSortByEnumLowerCase = map[string]ListDedicatedVmHostsSortByEnum{ + "timecreated": ListDedicatedVmHostsSortByTimecreated, + "displayname": ListDedicatedVmHostsSortByDisplayname, +} + +// GetListDedicatedVmHostsSortByEnumValues Enumerates the set of values for ListDedicatedVmHostsSortByEnum +func GetListDedicatedVmHostsSortByEnumValues() []ListDedicatedVmHostsSortByEnum { + values := make([]ListDedicatedVmHostsSortByEnum, 0) + for _, v := range mappingListDedicatedVmHostsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListDedicatedVmHostsSortByEnumStringValues Enumerates the set of values in String for ListDedicatedVmHostsSortByEnum +func GetListDedicatedVmHostsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListDedicatedVmHostsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDedicatedVmHostsSortByEnum(val string) (ListDedicatedVmHostsSortByEnum, bool) { + enum, ok := mappingListDedicatedVmHostsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListDedicatedVmHostsSortOrderEnum Enum with underlying type: string +type ListDedicatedVmHostsSortOrderEnum string + +// Set of constants representing the allowable values for ListDedicatedVmHostsSortOrderEnum +const ( + ListDedicatedVmHostsSortOrderAsc ListDedicatedVmHostsSortOrderEnum = "ASC" + ListDedicatedVmHostsSortOrderDesc ListDedicatedVmHostsSortOrderEnum = "DESC" +) + +var mappingListDedicatedVmHostsSortOrderEnum = map[string]ListDedicatedVmHostsSortOrderEnum{ + "ASC": ListDedicatedVmHostsSortOrderAsc, + "DESC": ListDedicatedVmHostsSortOrderDesc, +} + +var mappingListDedicatedVmHostsSortOrderEnumLowerCase = map[string]ListDedicatedVmHostsSortOrderEnum{ + "asc": ListDedicatedVmHostsSortOrderAsc, + "desc": ListDedicatedVmHostsSortOrderDesc, +} + +// GetListDedicatedVmHostsSortOrderEnumValues Enumerates the set of values for ListDedicatedVmHostsSortOrderEnum +func GetListDedicatedVmHostsSortOrderEnumValues() []ListDedicatedVmHostsSortOrderEnum { + values := make([]ListDedicatedVmHostsSortOrderEnum, 0) + for _, v := range mappingListDedicatedVmHostsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListDedicatedVmHostsSortOrderEnumStringValues Enumerates the set of values in String for ListDedicatedVmHostsSortOrderEnum +func GetListDedicatedVmHostsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListDedicatedVmHostsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDedicatedVmHostsSortOrderEnum(val string) (ListDedicatedVmHostsSortOrderEnum, bool) { + enum, ok := mappingListDedicatedVmHostsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dhcp_options_request_response.go new file mode 100644 index 000000000..56d00ca90 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_dhcp_options_request_response.go @@ -0,0 +1,223 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDhcpOptionsRequest wrapper for the ListDhcpOptions operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDhcpOptions.go.html to see an example of how to use ListDhcpOptionsRequest. +type ListDhcpOptionsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"false" contributesTo:"query" name:"vcnId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListDhcpOptionsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListDhcpOptionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle + // state. The state value is case-insensitive. + LifecycleState DhcpOptionsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListDhcpOptionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDhcpOptionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListDhcpOptionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDhcpOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListDhcpOptionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListDhcpOptionsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListDhcpOptionsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListDhcpOptionsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListDhcpOptionsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingDhcpOptionsLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetDhcpOptionsLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDhcpOptionsResponse wrapper for the ListDhcpOptions operation +type ListDhcpOptionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []DhcpOptions instances + Items []DhcpOptions `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListDhcpOptionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDhcpOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListDhcpOptionsSortByEnum Enum with underlying type: string +type ListDhcpOptionsSortByEnum string + +// Set of constants representing the allowable values for ListDhcpOptionsSortByEnum +const ( + ListDhcpOptionsSortByTimecreated ListDhcpOptionsSortByEnum = "TIMECREATED" + ListDhcpOptionsSortByDisplayname ListDhcpOptionsSortByEnum = "DISPLAYNAME" +) + +var mappingListDhcpOptionsSortByEnum = map[string]ListDhcpOptionsSortByEnum{ + "TIMECREATED": ListDhcpOptionsSortByTimecreated, + "DISPLAYNAME": ListDhcpOptionsSortByDisplayname, +} + +var mappingListDhcpOptionsSortByEnumLowerCase = map[string]ListDhcpOptionsSortByEnum{ + "timecreated": ListDhcpOptionsSortByTimecreated, + "displayname": ListDhcpOptionsSortByDisplayname, +} + +// GetListDhcpOptionsSortByEnumValues Enumerates the set of values for ListDhcpOptionsSortByEnum +func GetListDhcpOptionsSortByEnumValues() []ListDhcpOptionsSortByEnum { + values := make([]ListDhcpOptionsSortByEnum, 0) + for _, v := range mappingListDhcpOptionsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListDhcpOptionsSortByEnumStringValues Enumerates the set of values in String for ListDhcpOptionsSortByEnum +func GetListDhcpOptionsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListDhcpOptionsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDhcpOptionsSortByEnum(val string) (ListDhcpOptionsSortByEnum, bool) { + enum, ok := mappingListDhcpOptionsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListDhcpOptionsSortOrderEnum Enum with underlying type: string +type ListDhcpOptionsSortOrderEnum string + +// Set of constants representing the allowable values for ListDhcpOptionsSortOrderEnum +const ( + ListDhcpOptionsSortOrderAsc ListDhcpOptionsSortOrderEnum = "ASC" + ListDhcpOptionsSortOrderDesc ListDhcpOptionsSortOrderEnum = "DESC" +) + +var mappingListDhcpOptionsSortOrderEnum = map[string]ListDhcpOptionsSortOrderEnum{ + "ASC": ListDhcpOptionsSortOrderAsc, + "DESC": ListDhcpOptionsSortOrderDesc, +} + +var mappingListDhcpOptionsSortOrderEnumLowerCase = map[string]ListDhcpOptionsSortOrderEnum{ + "asc": ListDhcpOptionsSortOrderAsc, + "desc": ListDhcpOptionsSortOrderDesc, +} + +// GetListDhcpOptionsSortOrderEnumValues Enumerates the set of values for ListDhcpOptionsSortOrderEnum +func GetListDhcpOptionsSortOrderEnumValues() []ListDhcpOptionsSortOrderEnum { + values := make([]ListDhcpOptionsSortOrderEnum, 0) + for _, v := range mappingListDhcpOptionsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListDhcpOptionsSortOrderEnumStringValues Enumerates the set of values in String for ListDhcpOptionsSortOrderEnum +func GetListDhcpOptionsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListDhcpOptionsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDhcpOptionsSortOrderEnum(val string) (ListDhcpOptionsSortOrderEnum, bool) { + enum, ok := mappingListDhcpOptionsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_attachments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_attachments_request_response.go new file mode 100644 index 000000000..4f9c44334 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_attachments_request_response.go @@ -0,0 +1,292 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDrgAttachmentsRequest wrapper for the ListDrgAttachments operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgAttachments.go.html to see an example of how to use ListDrgAttachmentsRequest. +type ListDrgAttachmentsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"false" contributesTo:"query" name:"vcnId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"false" contributesTo:"query" name:"drgId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource (virtual circuit, VCN, IPSec tunnel, or remote peering connection) attached to the DRG. + NetworkId *string `mandatory:"false" contributesTo:"query" name:"networkId"` + + // The type for the network resource attached to the DRG. + AttachmentType ListDrgAttachmentsAttachmentTypeEnum `mandatory:"false" contributesTo:"query" name:"attachmentType" omitEmpty:"true"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table assigned to the DRG attachment. + DrgRouteTableId *string `mandatory:"false" contributesTo:"query" name:"drgRouteTableId"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListDrgAttachmentsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListDrgAttachmentsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to return only resources that match the specified lifecycle + // state. The value is case insensitive. + LifecycleState DrgAttachmentLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListDrgAttachmentsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDrgAttachmentsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListDrgAttachmentsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDrgAttachmentsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListDrgAttachmentsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListDrgAttachmentsAttachmentTypeEnum(string(request.AttachmentType)); !ok && request.AttachmentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttachmentType: %s. Supported values are: %s.", request.AttachmentType, strings.Join(GetListDrgAttachmentsAttachmentTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingListDrgAttachmentsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListDrgAttachmentsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListDrgAttachmentsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListDrgAttachmentsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingDrgAttachmentLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetDrgAttachmentLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDrgAttachmentsResponse wrapper for the ListDrgAttachments operation +type ListDrgAttachmentsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []DrgAttachment instances + Items []DrgAttachment `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListDrgAttachmentsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDrgAttachmentsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListDrgAttachmentsAttachmentTypeEnum Enum with underlying type: string +type ListDrgAttachmentsAttachmentTypeEnum string + +// Set of constants representing the allowable values for ListDrgAttachmentsAttachmentTypeEnum +const ( + ListDrgAttachmentsAttachmentTypeVcn ListDrgAttachmentsAttachmentTypeEnum = "VCN" + ListDrgAttachmentsAttachmentTypeVirtualCircuit ListDrgAttachmentsAttachmentTypeEnum = "VIRTUAL_CIRCUIT" + ListDrgAttachmentsAttachmentTypeRemotePeeringConnection ListDrgAttachmentsAttachmentTypeEnum = "REMOTE_PEERING_CONNECTION" + ListDrgAttachmentsAttachmentTypeIpsecTunnel ListDrgAttachmentsAttachmentTypeEnum = "IPSEC_TUNNEL" + ListDrgAttachmentsAttachmentTypeAll ListDrgAttachmentsAttachmentTypeEnum = "ALL" +) + +var mappingListDrgAttachmentsAttachmentTypeEnum = map[string]ListDrgAttachmentsAttachmentTypeEnum{ + "VCN": ListDrgAttachmentsAttachmentTypeVcn, + "VIRTUAL_CIRCUIT": ListDrgAttachmentsAttachmentTypeVirtualCircuit, + "REMOTE_PEERING_CONNECTION": ListDrgAttachmentsAttachmentTypeRemotePeeringConnection, + "IPSEC_TUNNEL": ListDrgAttachmentsAttachmentTypeIpsecTunnel, + "ALL": ListDrgAttachmentsAttachmentTypeAll, +} + +var mappingListDrgAttachmentsAttachmentTypeEnumLowerCase = map[string]ListDrgAttachmentsAttachmentTypeEnum{ + "vcn": ListDrgAttachmentsAttachmentTypeVcn, + "virtual_circuit": ListDrgAttachmentsAttachmentTypeVirtualCircuit, + "remote_peering_connection": ListDrgAttachmentsAttachmentTypeRemotePeeringConnection, + "ipsec_tunnel": ListDrgAttachmentsAttachmentTypeIpsecTunnel, + "all": ListDrgAttachmentsAttachmentTypeAll, +} + +// GetListDrgAttachmentsAttachmentTypeEnumValues Enumerates the set of values for ListDrgAttachmentsAttachmentTypeEnum +func GetListDrgAttachmentsAttachmentTypeEnumValues() []ListDrgAttachmentsAttachmentTypeEnum { + values := make([]ListDrgAttachmentsAttachmentTypeEnum, 0) + for _, v := range mappingListDrgAttachmentsAttachmentTypeEnum { + values = append(values, v) + } + return values +} + +// GetListDrgAttachmentsAttachmentTypeEnumStringValues Enumerates the set of values in String for ListDrgAttachmentsAttachmentTypeEnum +func GetListDrgAttachmentsAttachmentTypeEnumStringValues() []string { + return []string{ + "VCN", + "VIRTUAL_CIRCUIT", + "REMOTE_PEERING_CONNECTION", + "IPSEC_TUNNEL", + "ALL", + } +} + +// GetMappingListDrgAttachmentsAttachmentTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDrgAttachmentsAttachmentTypeEnum(val string) (ListDrgAttachmentsAttachmentTypeEnum, bool) { + enum, ok := mappingListDrgAttachmentsAttachmentTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListDrgAttachmentsSortByEnum Enum with underlying type: string +type ListDrgAttachmentsSortByEnum string + +// Set of constants representing the allowable values for ListDrgAttachmentsSortByEnum +const ( + ListDrgAttachmentsSortByTimecreated ListDrgAttachmentsSortByEnum = "TIMECREATED" + ListDrgAttachmentsSortByDisplayname ListDrgAttachmentsSortByEnum = "DISPLAYNAME" +) + +var mappingListDrgAttachmentsSortByEnum = map[string]ListDrgAttachmentsSortByEnum{ + "TIMECREATED": ListDrgAttachmentsSortByTimecreated, + "DISPLAYNAME": ListDrgAttachmentsSortByDisplayname, +} + +var mappingListDrgAttachmentsSortByEnumLowerCase = map[string]ListDrgAttachmentsSortByEnum{ + "timecreated": ListDrgAttachmentsSortByTimecreated, + "displayname": ListDrgAttachmentsSortByDisplayname, +} + +// GetListDrgAttachmentsSortByEnumValues Enumerates the set of values for ListDrgAttachmentsSortByEnum +func GetListDrgAttachmentsSortByEnumValues() []ListDrgAttachmentsSortByEnum { + values := make([]ListDrgAttachmentsSortByEnum, 0) + for _, v := range mappingListDrgAttachmentsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListDrgAttachmentsSortByEnumStringValues Enumerates the set of values in String for ListDrgAttachmentsSortByEnum +func GetListDrgAttachmentsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListDrgAttachmentsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDrgAttachmentsSortByEnum(val string) (ListDrgAttachmentsSortByEnum, bool) { + enum, ok := mappingListDrgAttachmentsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListDrgAttachmentsSortOrderEnum Enum with underlying type: string +type ListDrgAttachmentsSortOrderEnum string + +// Set of constants representing the allowable values for ListDrgAttachmentsSortOrderEnum +const ( + ListDrgAttachmentsSortOrderAsc ListDrgAttachmentsSortOrderEnum = "ASC" + ListDrgAttachmentsSortOrderDesc ListDrgAttachmentsSortOrderEnum = "DESC" +) + +var mappingListDrgAttachmentsSortOrderEnum = map[string]ListDrgAttachmentsSortOrderEnum{ + "ASC": ListDrgAttachmentsSortOrderAsc, + "DESC": ListDrgAttachmentsSortOrderDesc, +} + +var mappingListDrgAttachmentsSortOrderEnumLowerCase = map[string]ListDrgAttachmentsSortOrderEnum{ + "asc": ListDrgAttachmentsSortOrderAsc, + "desc": ListDrgAttachmentsSortOrderDesc, +} + +// GetListDrgAttachmentsSortOrderEnumValues Enumerates the set of values for ListDrgAttachmentsSortOrderEnum +func GetListDrgAttachmentsSortOrderEnumValues() []ListDrgAttachmentsSortOrderEnum { + values := make([]ListDrgAttachmentsSortOrderEnum, 0) + for _, v := range mappingListDrgAttachmentsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListDrgAttachmentsSortOrderEnumStringValues Enumerates the set of values in String for ListDrgAttachmentsSortOrderEnum +func GetListDrgAttachmentsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListDrgAttachmentsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDrgAttachmentsSortOrderEnum(val string) (ListDrgAttachmentsSortOrderEnum, bool) { + enum, ok := mappingListDrgAttachmentsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_route_distribution_statements_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_route_distribution_statements_request_response.go new file mode 100644 index 000000000..afb8b5ab6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_route_distribution_statements_request_response.go @@ -0,0 +1,200 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDrgRouteDistributionStatementsRequest wrapper for the ListDrgRouteDistributionStatements operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgRouteDistributionStatements.go.html to see an example of how to use ListDrgRouteDistributionStatementsRequest. +type ListDrgRouteDistributionStatementsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route distribution. + DrgRouteDistributionId *string `mandatory:"true" contributesTo:"path" name:"drgRouteDistributionId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. + SortBy ListDrgRouteDistributionStatementsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListDrgRouteDistributionStatementsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListDrgRouteDistributionStatementsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDrgRouteDistributionStatementsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListDrgRouteDistributionStatementsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDrgRouteDistributionStatementsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListDrgRouteDistributionStatementsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListDrgRouteDistributionStatementsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListDrgRouteDistributionStatementsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListDrgRouteDistributionStatementsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListDrgRouteDistributionStatementsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDrgRouteDistributionStatementsResponse wrapper for the ListDrgRouteDistributionStatements operation +type ListDrgRouteDistributionStatementsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []DrgRouteDistributionStatement instances + Items []DrgRouteDistributionStatement `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListDrgRouteDistributionStatementsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDrgRouteDistributionStatementsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListDrgRouteDistributionStatementsSortByEnum Enum with underlying type: string +type ListDrgRouteDistributionStatementsSortByEnum string + +// Set of constants representing the allowable values for ListDrgRouteDistributionStatementsSortByEnum +const ( + ListDrgRouteDistributionStatementsSortByTimecreated ListDrgRouteDistributionStatementsSortByEnum = "TIMECREATED" +) + +var mappingListDrgRouteDistributionStatementsSortByEnum = map[string]ListDrgRouteDistributionStatementsSortByEnum{ + "TIMECREATED": ListDrgRouteDistributionStatementsSortByTimecreated, +} + +var mappingListDrgRouteDistributionStatementsSortByEnumLowerCase = map[string]ListDrgRouteDistributionStatementsSortByEnum{ + "timecreated": ListDrgRouteDistributionStatementsSortByTimecreated, +} + +// GetListDrgRouteDistributionStatementsSortByEnumValues Enumerates the set of values for ListDrgRouteDistributionStatementsSortByEnum +func GetListDrgRouteDistributionStatementsSortByEnumValues() []ListDrgRouteDistributionStatementsSortByEnum { + values := make([]ListDrgRouteDistributionStatementsSortByEnum, 0) + for _, v := range mappingListDrgRouteDistributionStatementsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListDrgRouteDistributionStatementsSortByEnumStringValues Enumerates the set of values in String for ListDrgRouteDistributionStatementsSortByEnum +func GetListDrgRouteDistributionStatementsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + } +} + +// GetMappingListDrgRouteDistributionStatementsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDrgRouteDistributionStatementsSortByEnum(val string) (ListDrgRouteDistributionStatementsSortByEnum, bool) { + enum, ok := mappingListDrgRouteDistributionStatementsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListDrgRouteDistributionStatementsSortOrderEnum Enum with underlying type: string +type ListDrgRouteDistributionStatementsSortOrderEnum string + +// Set of constants representing the allowable values for ListDrgRouteDistributionStatementsSortOrderEnum +const ( + ListDrgRouteDistributionStatementsSortOrderAsc ListDrgRouteDistributionStatementsSortOrderEnum = "ASC" + ListDrgRouteDistributionStatementsSortOrderDesc ListDrgRouteDistributionStatementsSortOrderEnum = "DESC" +) + +var mappingListDrgRouteDistributionStatementsSortOrderEnum = map[string]ListDrgRouteDistributionStatementsSortOrderEnum{ + "ASC": ListDrgRouteDistributionStatementsSortOrderAsc, + "DESC": ListDrgRouteDistributionStatementsSortOrderDesc, +} + +var mappingListDrgRouteDistributionStatementsSortOrderEnumLowerCase = map[string]ListDrgRouteDistributionStatementsSortOrderEnum{ + "asc": ListDrgRouteDistributionStatementsSortOrderAsc, + "desc": ListDrgRouteDistributionStatementsSortOrderDesc, +} + +// GetListDrgRouteDistributionStatementsSortOrderEnumValues Enumerates the set of values for ListDrgRouteDistributionStatementsSortOrderEnum +func GetListDrgRouteDistributionStatementsSortOrderEnumValues() []ListDrgRouteDistributionStatementsSortOrderEnum { + values := make([]ListDrgRouteDistributionStatementsSortOrderEnum, 0) + for _, v := range mappingListDrgRouteDistributionStatementsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListDrgRouteDistributionStatementsSortOrderEnumStringValues Enumerates the set of values in String for ListDrgRouteDistributionStatementsSortOrderEnum +func GetListDrgRouteDistributionStatementsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListDrgRouteDistributionStatementsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDrgRouteDistributionStatementsSortOrderEnum(val string) (ListDrgRouteDistributionStatementsSortOrderEnum, bool) { + enum, ok := mappingListDrgRouteDistributionStatementsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_route_distributions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_route_distributions_request_response.go new file mode 100644 index 000000000..4df1e39c0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_route_distributions_request_response.go @@ -0,0 +1,220 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDrgRouteDistributionsRequest wrapper for the ListDrgRouteDistributions operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgRouteDistributions.go.html to see an example of how to use ListDrgRouteDistributionsRequest. +type ListDrgRouteDistributionsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"true" contributesTo:"query" name:"drgId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListDrgRouteDistributionsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListDrgRouteDistributionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter that only returns resources that match the specified lifecycle + // state. The value is case insensitive. + LifecycleState DrgRouteDistributionLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListDrgRouteDistributionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDrgRouteDistributionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListDrgRouteDistributionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDrgRouteDistributionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListDrgRouteDistributionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListDrgRouteDistributionsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListDrgRouteDistributionsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListDrgRouteDistributionsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListDrgRouteDistributionsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingDrgRouteDistributionLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetDrgRouteDistributionLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDrgRouteDistributionsResponse wrapper for the ListDrgRouteDistributions operation +type ListDrgRouteDistributionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []DrgRouteDistribution instances + Items []DrgRouteDistribution `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListDrgRouteDistributionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDrgRouteDistributionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListDrgRouteDistributionsSortByEnum Enum with underlying type: string +type ListDrgRouteDistributionsSortByEnum string + +// Set of constants representing the allowable values for ListDrgRouteDistributionsSortByEnum +const ( + ListDrgRouteDistributionsSortByTimecreated ListDrgRouteDistributionsSortByEnum = "TIMECREATED" + ListDrgRouteDistributionsSortByDisplayname ListDrgRouteDistributionsSortByEnum = "DISPLAYNAME" +) + +var mappingListDrgRouteDistributionsSortByEnum = map[string]ListDrgRouteDistributionsSortByEnum{ + "TIMECREATED": ListDrgRouteDistributionsSortByTimecreated, + "DISPLAYNAME": ListDrgRouteDistributionsSortByDisplayname, +} + +var mappingListDrgRouteDistributionsSortByEnumLowerCase = map[string]ListDrgRouteDistributionsSortByEnum{ + "timecreated": ListDrgRouteDistributionsSortByTimecreated, + "displayname": ListDrgRouteDistributionsSortByDisplayname, +} + +// GetListDrgRouteDistributionsSortByEnumValues Enumerates the set of values for ListDrgRouteDistributionsSortByEnum +func GetListDrgRouteDistributionsSortByEnumValues() []ListDrgRouteDistributionsSortByEnum { + values := make([]ListDrgRouteDistributionsSortByEnum, 0) + for _, v := range mappingListDrgRouteDistributionsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListDrgRouteDistributionsSortByEnumStringValues Enumerates the set of values in String for ListDrgRouteDistributionsSortByEnum +func GetListDrgRouteDistributionsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListDrgRouteDistributionsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDrgRouteDistributionsSortByEnum(val string) (ListDrgRouteDistributionsSortByEnum, bool) { + enum, ok := mappingListDrgRouteDistributionsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListDrgRouteDistributionsSortOrderEnum Enum with underlying type: string +type ListDrgRouteDistributionsSortOrderEnum string + +// Set of constants representing the allowable values for ListDrgRouteDistributionsSortOrderEnum +const ( + ListDrgRouteDistributionsSortOrderAsc ListDrgRouteDistributionsSortOrderEnum = "ASC" + ListDrgRouteDistributionsSortOrderDesc ListDrgRouteDistributionsSortOrderEnum = "DESC" +) + +var mappingListDrgRouteDistributionsSortOrderEnum = map[string]ListDrgRouteDistributionsSortOrderEnum{ + "ASC": ListDrgRouteDistributionsSortOrderAsc, + "DESC": ListDrgRouteDistributionsSortOrderDesc, +} + +var mappingListDrgRouteDistributionsSortOrderEnumLowerCase = map[string]ListDrgRouteDistributionsSortOrderEnum{ + "asc": ListDrgRouteDistributionsSortOrderAsc, + "desc": ListDrgRouteDistributionsSortOrderDesc, +} + +// GetListDrgRouteDistributionsSortOrderEnumValues Enumerates the set of values for ListDrgRouteDistributionsSortOrderEnum +func GetListDrgRouteDistributionsSortOrderEnumValues() []ListDrgRouteDistributionsSortOrderEnum { + values := make([]ListDrgRouteDistributionsSortOrderEnum, 0) + for _, v := range mappingListDrgRouteDistributionsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListDrgRouteDistributionsSortOrderEnumStringValues Enumerates the set of values in String for ListDrgRouteDistributionsSortOrderEnum +func GetListDrgRouteDistributionsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListDrgRouteDistributionsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDrgRouteDistributionsSortOrderEnum(val string) (ListDrgRouteDistributionsSortOrderEnum, bool) { + enum, ok := mappingListDrgRouteDistributionsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_route_rules_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_route_rules_request_response.go new file mode 100644 index 000000000..22b29e429 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_route_rules_request_response.go @@ -0,0 +1,156 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDrgRouteRulesRequest wrapper for the ListDrgRouteRules operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgRouteRules.go.html to see an example of how to use ListDrgRouteRulesRequest. +type ListDrgRouteRulesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table. + DrgRouteTableId *string `mandatory:"true" contributesTo:"path" name:"drgRouteTableId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Static routes are specified through the DRG route table API. + // Dynamic routes are learned by the DRG from the DRG attachments through various routing protocols. + RouteType ListDrgRouteRulesRouteTypeEnum `mandatory:"false" contributesTo:"query" name:"routeType" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListDrgRouteRulesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDrgRouteRulesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListDrgRouteRulesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDrgRouteRulesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListDrgRouteRulesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListDrgRouteRulesRouteTypeEnum(string(request.RouteType)); !ok && request.RouteType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RouteType: %s. Supported values are: %s.", request.RouteType, strings.Join(GetListDrgRouteRulesRouteTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDrgRouteRulesResponse wrapper for the ListDrgRouteRules operation +type ListDrgRouteRulesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []DrgRouteRule instances + Items []DrgRouteRule `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListDrgRouteRulesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDrgRouteRulesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListDrgRouteRulesRouteTypeEnum Enum with underlying type: string +type ListDrgRouteRulesRouteTypeEnum string + +// Set of constants representing the allowable values for ListDrgRouteRulesRouteTypeEnum +const ( + ListDrgRouteRulesRouteTypeStatic ListDrgRouteRulesRouteTypeEnum = "STATIC" + ListDrgRouteRulesRouteTypeDynamic ListDrgRouteRulesRouteTypeEnum = "DYNAMIC" +) + +var mappingListDrgRouteRulesRouteTypeEnum = map[string]ListDrgRouteRulesRouteTypeEnum{ + "STATIC": ListDrgRouteRulesRouteTypeStatic, + "DYNAMIC": ListDrgRouteRulesRouteTypeDynamic, +} + +var mappingListDrgRouteRulesRouteTypeEnumLowerCase = map[string]ListDrgRouteRulesRouteTypeEnum{ + "static": ListDrgRouteRulesRouteTypeStatic, + "dynamic": ListDrgRouteRulesRouteTypeDynamic, +} + +// GetListDrgRouteRulesRouteTypeEnumValues Enumerates the set of values for ListDrgRouteRulesRouteTypeEnum +func GetListDrgRouteRulesRouteTypeEnumValues() []ListDrgRouteRulesRouteTypeEnum { + values := make([]ListDrgRouteRulesRouteTypeEnum, 0) + for _, v := range mappingListDrgRouteRulesRouteTypeEnum { + values = append(values, v) + } + return values +} + +// GetListDrgRouteRulesRouteTypeEnumStringValues Enumerates the set of values in String for ListDrgRouteRulesRouteTypeEnum +func GetListDrgRouteRulesRouteTypeEnumStringValues() []string { + return []string{ + "STATIC", + "DYNAMIC", + } +} + +// GetMappingListDrgRouteRulesRouteTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDrgRouteRulesRouteTypeEnum(val string) (ListDrgRouteRulesRouteTypeEnum, bool) { + enum, ok := mappingListDrgRouteRulesRouteTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_route_tables_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_route_tables_request_response.go new file mode 100644 index 000000000..40decc788 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drg_route_tables_request_response.go @@ -0,0 +1,223 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDrgRouteTablesRequest wrapper for the ListDrgRouteTables operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgRouteTables.go.html to see an example of how to use ListDrgRouteTablesRequest. +type ListDrgRouteTablesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"true" contributesTo:"query" name:"drgId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListDrgRouteTablesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListDrgRouteTablesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the import route distribution. + ImportDrgRouteDistributionId *string `mandatory:"false" contributesTo:"query" name:"importDrgRouteDistributionId"` + + // A filter that only returns matches for the specified lifecycle + // state. The value is case insensitive. + LifecycleState DrgRouteTableLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListDrgRouteTablesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDrgRouteTablesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListDrgRouteTablesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDrgRouteTablesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListDrgRouteTablesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListDrgRouteTablesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListDrgRouteTablesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListDrgRouteTablesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListDrgRouteTablesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingDrgRouteTableLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetDrgRouteTableLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDrgRouteTablesResponse wrapper for the ListDrgRouteTables operation +type ListDrgRouteTablesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []DrgRouteTable instances + Items []DrgRouteTable `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListDrgRouteTablesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDrgRouteTablesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListDrgRouteTablesSortByEnum Enum with underlying type: string +type ListDrgRouteTablesSortByEnum string + +// Set of constants representing the allowable values for ListDrgRouteTablesSortByEnum +const ( + ListDrgRouteTablesSortByTimecreated ListDrgRouteTablesSortByEnum = "TIMECREATED" + ListDrgRouteTablesSortByDisplayname ListDrgRouteTablesSortByEnum = "DISPLAYNAME" +) + +var mappingListDrgRouteTablesSortByEnum = map[string]ListDrgRouteTablesSortByEnum{ + "TIMECREATED": ListDrgRouteTablesSortByTimecreated, + "DISPLAYNAME": ListDrgRouteTablesSortByDisplayname, +} + +var mappingListDrgRouteTablesSortByEnumLowerCase = map[string]ListDrgRouteTablesSortByEnum{ + "timecreated": ListDrgRouteTablesSortByTimecreated, + "displayname": ListDrgRouteTablesSortByDisplayname, +} + +// GetListDrgRouteTablesSortByEnumValues Enumerates the set of values for ListDrgRouteTablesSortByEnum +func GetListDrgRouteTablesSortByEnumValues() []ListDrgRouteTablesSortByEnum { + values := make([]ListDrgRouteTablesSortByEnum, 0) + for _, v := range mappingListDrgRouteTablesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListDrgRouteTablesSortByEnumStringValues Enumerates the set of values in String for ListDrgRouteTablesSortByEnum +func GetListDrgRouteTablesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListDrgRouteTablesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDrgRouteTablesSortByEnum(val string) (ListDrgRouteTablesSortByEnum, bool) { + enum, ok := mappingListDrgRouteTablesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListDrgRouteTablesSortOrderEnum Enum with underlying type: string +type ListDrgRouteTablesSortOrderEnum string + +// Set of constants representing the allowable values for ListDrgRouteTablesSortOrderEnum +const ( + ListDrgRouteTablesSortOrderAsc ListDrgRouteTablesSortOrderEnum = "ASC" + ListDrgRouteTablesSortOrderDesc ListDrgRouteTablesSortOrderEnum = "DESC" +) + +var mappingListDrgRouteTablesSortOrderEnum = map[string]ListDrgRouteTablesSortOrderEnum{ + "ASC": ListDrgRouteTablesSortOrderAsc, + "DESC": ListDrgRouteTablesSortOrderDesc, +} + +var mappingListDrgRouteTablesSortOrderEnumLowerCase = map[string]ListDrgRouteTablesSortOrderEnum{ + "asc": ListDrgRouteTablesSortOrderAsc, + "desc": ListDrgRouteTablesSortOrderDesc, +} + +// GetListDrgRouteTablesSortOrderEnumValues Enumerates the set of values for ListDrgRouteTablesSortOrderEnum +func GetListDrgRouteTablesSortOrderEnumValues() []ListDrgRouteTablesSortOrderEnum { + values := make([]ListDrgRouteTablesSortOrderEnum, 0) + for _, v := range mappingListDrgRouteTablesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListDrgRouteTablesSortOrderEnumStringValues Enumerates the set of values in String for ListDrgRouteTablesSortOrderEnum +func GetListDrgRouteTablesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListDrgRouteTablesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDrgRouteTablesSortOrderEnum(val string) (ListDrgRouteTablesSortOrderEnum, bool) { + enum, ok := mappingListDrgRouteTablesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drgs_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drgs_request_response.go new file mode 100644 index 000000000..4fc97325e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_drgs_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDrgsRequest wrapper for the ListDrgs operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListDrgs.go.html to see an example of how to use ListDrgsRequest. +type ListDrgsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListDrgsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDrgsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListDrgsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDrgsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListDrgsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDrgsResponse wrapper for the ListDrgs operation +type ListDrgsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []Drg instances + Items []Drg `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListDrgsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDrgsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_fast_connect_provider_services_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_fast_connect_provider_services_request_response.go new file mode 100644 index 000000000..c6986da81 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_fast_connect_provider_services_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListFastConnectProviderServicesRequest wrapper for the ListFastConnectProviderServices operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListFastConnectProviderServices.go.html to see an example of how to use ListFastConnectProviderServicesRequest. +type ListFastConnectProviderServicesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListFastConnectProviderServicesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListFastConnectProviderServicesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListFastConnectProviderServicesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListFastConnectProviderServicesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListFastConnectProviderServicesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListFastConnectProviderServicesResponse wrapper for the ListFastConnectProviderServices operation +type ListFastConnectProviderServicesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []FastConnectProviderService instances + Items []FastConnectProviderService `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListFastConnectProviderServicesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListFastConnectProviderServicesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_fast_connect_provider_virtual_circuit_bandwidth_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_fast_connect_provider_virtual_circuit_bandwidth_shapes_request_response.go new file mode 100644 index 000000000..29df0cfc6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_fast_connect_provider_virtual_circuit_bandwidth_shapes_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListFastConnectProviderVirtualCircuitBandwidthShapesRequest wrapper for the ListFastConnectProviderVirtualCircuitBandwidthShapes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListFastConnectProviderVirtualCircuitBandwidthShapes.go.html to see an example of how to use ListFastConnectProviderVirtualCircuitBandwidthShapesRequest. +type ListFastConnectProviderVirtualCircuitBandwidthShapesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the provider service. + ProviderServiceId *string `mandatory:"true" contributesTo:"path" name:"providerServiceId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListFastConnectProviderVirtualCircuitBandwidthShapesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListFastConnectProviderVirtualCircuitBandwidthShapesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListFastConnectProviderVirtualCircuitBandwidthShapesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListFastConnectProviderVirtualCircuitBandwidthShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListFastConnectProviderVirtualCircuitBandwidthShapesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListFastConnectProviderVirtualCircuitBandwidthShapesResponse wrapper for the ListFastConnectProviderVirtualCircuitBandwidthShapes operation +type ListFastConnectProviderVirtualCircuitBandwidthShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VirtualCircuitBandwidthShape instances + Items []VirtualCircuitBandwidthShape `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListFastConnectProviderVirtualCircuitBandwidthShapesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListFastConnectProviderVirtualCircuitBandwidthShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_firmware_bundles_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_firmware_bundles_request_response.go new file mode 100644 index 000000000..7b194a68b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_firmware_bundles_request_response.go @@ -0,0 +1,116 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListFirmwareBundlesRequest wrapper for the ListFirmwareBundles operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListFirmwareBundles.go.html to see an example of how to use ListFirmwareBundlesRequest. +type ListFirmwareBundlesRequest struct { + + // platform name + Platform *string `mandatory:"true" contributesTo:"query" name:"platform"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // If true, return only the default firmware bundle for a given platform. Default is false. + IsDefaultBundle *bool `mandatory:"false" contributesTo:"query" name:"isDefaultBundle"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given lifecycle state name exactly. + LifecycleState *string `mandatory:"false" contributesTo:"query" name:"lifecycleState"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListFirmwareBundlesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListFirmwareBundlesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListFirmwareBundlesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListFirmwareBundlesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListFirmwareBundlesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListFirmwareBundlesResponse wrapper for the ListFirmwareBundles operation +type ListFirmwareBundlesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of FirmwareBundlesCollection instances + FirmwareBundlesCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListFirmwareBundlesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListFirmwareBundlesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_i_p_sec_connection_tunnel_routes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_i_p_sec_connection_tunnel_routes_request_response.go new file mode 100644 index 000000000..deff4ddac --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_i_p_sec_connection_tunnel_routes_request_response.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListIPSecConnectionTunnelRoutesRequest wrapper for the ListIPSecConnectionTunnelRoutes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIPSecConnectionTunnelRoutes.go.html to see an example of how to use ListIPSecConnectionTunnelRoutesRequest. +type ListIPSecConnectionTunnelRoutesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tunnel. + TunnelId *string `mandatory:"true" contributesTo:"path" name:"tunnelId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Specifies the advertiser of the routes. If set to `ORACLE`, this returns only the + // routes advertised by Oracle. When set to `CUSTOMER`, this returns only the + // routes advertised by the CPE. + Advertiser TunnelRouteSummaryAdvertiserEnum `mandatory:"false" contributesTo:"query" name:"advertiser" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListIPSecConnectionTunnelRoutesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListIPSecConnectionTunnelRoutesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListIPSecConnectionTunnelRoutesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListIPSecConnectionTunnelRoutesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListIPSecConnectionTunnelRoutesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingTunnelRouteSummaryAdvertiserEnum(string(request.Advertiser)); !ok && request.Advertiser != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Advertiser: %s. Supported values are: %s.", request.Advertiser, strings.Join(GetTunnelRouteSummaryAdvertiserEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListIPSecConnectionTunnelRoutesResponse wrapper for the ListIPSecConnectionTunnelRoutes operation +type ListIPSecConnectionTunnelRoutesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []TunnelRouteSummary instances + Items []TunnelRouteSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. A pagination token to get the total number of results available. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` +} + +func (response ListIPSecConnectionTunnelRoutesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListIPSecConnectionTunnelRoutesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_i_p_sec_connection_tunnel_security_associations_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_i_p_sec_connection_tunnel_security_associations_request_response.go new file mode 100644 index 000000000..5523c6169 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_i_p_sec_connection_tunnel_security_associations_request_response.go @@ -0,0 +1,113 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListIPSecConnectionTunnelSecurityAssociationsRequest wrapper for the ListIPSecConnectionTunnelSecurityAssociations operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIPSecConnectionTunnelSecurityAssociations.go.html to see an example of how to use ListIPSecConnectionTunnelSecurityAssociationsRequest. +type ListIPSecConnectionTunnelSecurityAssociationsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tunnel. + TunnelId *string `mandatory:"true" contributesTo:"path" name:"tunnelId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListIPSecConnectionTunnelSecurityAssociationsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListIPSecConnectionTunnelSecurityAssociationsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListIPSecConnectionTunnelSecurityAssociationsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListIPSecConnectionTunnelSecurityAssociationsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListIPSecConnectionTunnelSecurityAssociationsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListIPSecConnectionTunnelSecurityAssociationsResponse wrapper for the ListIPSecConnectionTunnelSecurityAssociations operation +type ListIPSecConnectionTunnelSecurityAssociationsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []TunnelSecurityAssociationSummary instances + Items []TunnelSecurityAssociationSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. A pagination token to get the total number of results available. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` +} + +func (response ListIPSecConnectionTunnelSecurityAssociationsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListIPSecConnectionTunnelSecurityAssociationsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_i_p_sec_connection_tunnels_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_i_p_sec_connection_tunnels_request_response.go new file mode 100644 index 000000000..46cb74ac3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_i_p_sec_connection_tunnels_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListIPSecConnectionTunnelsRequest wrapper for the ListIPSecConnectionTunnels operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIPSecConnectionTunnels.go.html to see an example of how to use ListIPSecConnectionTunnelsRequest. +type ListIPSecConnectionTunnelsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListIPSecConnectionTunnelsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListIPSecConnectionTunnelsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListIPSecConnectionTunnelsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListIPSecConnectionTunnelsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListIPSecConnectionTunnelsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListIPSecConnectionTunnelsResponse wrapper for the ListIPSecConnectionTunnels operation +type ListIPSecConnectionTunnelsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []IpSecConnectionTunnel instances + Items []IpSecConnectionTunnel `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListIPSecConnectionTunnelsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListIPSecConnectionTunnelsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_i_p_sec_connections_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_i_p_sec_connections_request_response.go new file mode 100644 index 000000000..91121cf17 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_i_p_sec_connections_request_response.go @@ -0,0 +1,113 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListIPSecConnectionsRequest wrapper for the ListIPSecConnections operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIPSecConnections.go.html to see an example of how to use ListIPSecConnectionsRequest. +type ListIPSecConnectionsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"false" contributesTo:"query" name:"drgId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the CPE. + CpeId *string `mandatory:"false" contributesTo:"query" name:"cpeId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListIPSecConnectionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListIPSecConnectionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListIPSecConnectionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListIPSecConnectionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListIPSecConnectionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListIPSecConnectionsResponse wrapper for the ListIPSecConnections operation +type ListIPSecConnectionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []IpSecConnection instances + Items []IpSecConnection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListIPSecConnectionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListIPSecConnectionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_image_shape_compatibility_entries_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_image_shape_compatibility_entries_request_response.go new file mode 100644 index 000000000..6ce33ff9b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_image_shape_compatibility_entries_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListImageShapeCompatibilityEntriesRequest wrapper for the ListImageShapeCompatibilityEntries operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListImageShapeCompatibilityEntries.go.html to see an example of how to use ListImageShapeCompatibilityEntriesRequest. +type ListImageShapeCompatibilityEntriesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. + ImageId *string `mandatory:"true" contributesTo:"path" name:"imageId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListImageShapeCompatibilityEntriesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListImageShapeCompatibilityEntriesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListImageShapeCompatibilityEntriesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListImageShapeCompatibilityEntriesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListImageShapeCompatibilityEntriesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListImageShapeCompatibilityEntriesResponse wrapper for the ListImageShapeCompatibilityEntries operation +type ListImageShapeCompatibilityEntriesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ImageShapeCompatibilitySummary instances + Items []ImageShapeCompatibilitySummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListImageShapeCompatibilityEntriesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListImageShapeCompatibilityEntriesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_images_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_images_request_response.go new file mode 100644 index 000000000..161b50125 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_images_request_response.go @@ -0,0 +1,231 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListImagesRequest wrapper for the ListImages operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListImages.go.html to see an example of how to use ListImagesRequest. +type ListImagesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The image's operating system. + // Example: `Oracle Linux` + OperatingSystem *string `mandatory:"false" contributesTo:"query" name:"operatingSystem"` + + // The image's operating system version. + // Example: `7.2` + OperatingSystemVersion *string `mandatory:"false" contributesTo:"query" name:"operatingSystemVersion"` + + // Shape name. + Shape *string `mandatory:"false" contributesTo:"query" name:"shape"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListImagesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListImagesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle state. The state + // value is case-insensitive. + LifecycleState ImageLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListImagesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListImagesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListImagesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListImagesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListImagesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListImagesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListImagesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListImagesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListImagesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingImageLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetImageLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListImagesResponse wrapper for the ListImages operation +type ListImagesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []Image instances + Items []Image `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListImagesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListImagesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListImagesSortByEnum Enum with underlying type: string +type ListImagesSortByEnum string + +// Set of constants representing the allowable values for ListImagesSortByEnum +const ( + ListImagesSortByTimecreated ListImagesSortByEnum = "TIMECREATED" + ListImagesSortByDisplayname ListImagesSortByEnum = "DISPLAYNAME" +) + +var mappingListImagesSortByEnum = map[string]ListImagesSortByEnum{ + "TIMECREATED": ListImagesSortByTimecreated, + "DISPLAYNAME": ListImagesSortByDisplayname, +} + +var mappingListImagesSortByEnumLowerCase = map[string]ListImagesSortByEnum{ + "timecreated": ListImagesSortByTimecreated, + "displayname": ListImagesSortByDisplayname, +} + +// GetListImagesSortByEnumValues Enumerates the set of values for ListImagesSortByEnum +func GetListImagesSortByEnumValues() []ListImagesSortByEnum { + values := make([]ListImagesSortByEnum, 0) + for _, v := range mappingListImagesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListImagesSortByEnumStringValues Enumerates the set of values in String for ListImagesSortByEnum +func GetListImagesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListImagesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListImagesSortByEnum(val string) (ListImagesSortByEnum, bool) { + enum, ok := mappingListImagesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListImagesSortOrderEnum Enum with underlying type: string +type ListImagesSortOrderEnum string + +// Set of constants representing the allowable values for ListImagesSortOrderEnum +const ( + ListImagesSortOrderAsc ListImagesSortOrderEnum = "ASC" + ListImagesSortOrderDesc ListImagesSortOrderEnum = "DESC" +) + +var mappingListImagesSortOrderEnum = map[string]ListImagesSortOrderEnum{ + "ASC": ListImagesSortOrderAsc, + "DESC": ListImagesSortOrderDesc, +} + +var mappingListImagesSortOrderEnumLowerCase = map[string]ListImagesSortOrderEnum{ + "asc": ListImagesSortOrderAsc, + "desc": ListImagesSortOrderDesc, +} + +// GetListImagesSortOrderEnumValues Enumerates the set of values for ListImagesSortOrderEnum +func GetListImagesSortOrderEnumValues() []ListImagesSortOrderEnum { + values := make([]ListImagesSortOrderEnum, 0) + for _, v := range mappingListImagesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListImagesSortOrderEnumStringValues Enumerates the set of values in String for ListImagesSortOrderEnum +func GetListImagesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListImagesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListImagesSortOrderEnum(val string) (ListImagesSortOrderEnum, bool) { + enum, ok := mappingListImagesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_configurations_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_configurations_request_response.go new file mode 100644 index 000000000..fb4edbca0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_configurations_request_response.go @@ -0,0 +1,210 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListInstanceConfigurationsRequest wrapper for the ListInstanceConfigurations operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstanceConfigurations.go.html to see an example of how to use ListInstanceConfigurationsRequest. +type ListInstanceConfigurationsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListInstanceConfigurationsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListInstanceConfigurationsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListInstanceConfigurationsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListInstanceConfigurationsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListInstanceConfigurationsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListInstanceConfigurationsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListInstanceConfigurationsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListInstanceConfigurationsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListInstanceConfigurationsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListInstanceConfigurationsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListInstanceConfigurationsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListInstanceConfigurationsResponse wrapper for the ListInstanceConfigurations operation +type ListInstanceConfigurationsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []InstanceConfigurationSummary instances + Items []InstanceConfigurationSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListInstanceConfigurationsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListInstanceConfigurationsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListInstanceConfigurationsSortByEnum Enum with underlying type: string +type ListInstanceConfigurationsSortByEnum string + +// Set of constants representing the allowable values for ListInstanceConfigurationsSortByEnum +const ( + ListInstanceConfigurationsSortByTimecreated ListInstanceConfigurationsSortByEnum = "TIMECREATED" + ListInstanceConfigurationsSortByDisplayname ListInstanceConfigurationsSortByEnum = "DISPLAYNAME" +) + +var mappingListInstanceConfigurationsSortByEnum = map[string]ListInstanceConfigurationsSortByEnum{ + "TIMECREATED": ListInstanceConfigurationsSortByTimecreated, + "DISPLAYNAME": ListInstanceConfigurationsSortByDisplayname, +} + +var mappingListInstanceConfigurationsSortByEnumLowerCase = map[string]ListInstanceConfigurationsSortByEnum{ + "timecreated": ListInstanceConfigurationsSortByTimecreated, + "displayname": ListInstanceConfigurationsSortByDisplayname, +} + +// GetListInstanceConfigurationsSortByEnumValues Enumerates the set of values for ListInstanceConfigurationsSortByEnum +func GetListInstanceConfigurationsSortByEnumValues() []ListInstanceConfigurationsSortByEnum { + values := make([]ListInstanceConfigurationsSortByEnum, 0) + for _, v := range mappingListInstanceConfigurationsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListInstanceConfigurationsSortByEnumStringValues Enumerates the set of values in String for ListInstanceConfigurationsSortByEnum +func GetListInstanceConfigurationsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListInstanceConfigurationsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInstanceConfigurationsSortByEnum(val string) (ListInstanceConfigurationsSortByEnum, bool) { + enum, ok := mappingListInstanceConfigurationsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListInstanceConfigurationsSortOrderEnum Enum with underlying type: string +type ListInstanceConfigurationsSortOrderEnum string + +// Set of constants representing the allowable values for ListInstanceConfigurationsSortOrderEnum +const ( + ListInstanceConfigurationsSortOrderAsc ListInstanceConfigurationsSortOrderEnum = "ASC" + ListInstanceConfigurationsSortOrderDesc ListInstanceConfigurationsSortOrderEnum = "DESC" +) + +var mappingListInstanceConfigurationsSortOrderEnum = map[string]ListInstanceConfigurationsSortOrderEnum{ + "ASC": ListInstanceConfigurationsSortOrderAsc, + "DESC": ListInstanceConfigurationsSortOrderDesc, +} + +var mappingListInstanceConfigurationsSortOrderEnumLowerCase = map[string]ListInstanceConfigurationsSortOrderEnum{ + "asc": ListInstanceConfigurationsSortOrderAsc, + "desc": ListInstanceConfigurationsSortOrderDesc, +} + +// GetListInstanceConfigurationsSortOrderEnumValues Enumerates the set of values for ListInstanceConfigurationsSortOrderEnum +func GetListInstanceConfigurationsSortOrderEnumValues() []ListInstanceConfigurationsSortOrderEnum { + values := make([]ListInstanceConfigurationsSortOrderEnum, 0) + for _, v := range mappingListInstanceConfigurationsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListInstanceConfigurationsSortOrderEnumStringValues Enumerates the set of values in String for ListInstanceConfigurationsSortOrderEnum +func GetListInstanceConfigurationsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListInstanceConfigurationsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInstanceConfigurationsSortOrderEnum(val string) (ListInstanceConfigurationsSortOrderEnum, bool) { + enum, ok := mappingListInstanceConfigurationsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_console_connections_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_console_connections_request_response.go new file mode 100644 index 000000000..6ea2076d9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_console_connections_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListInstanceConsoleConnectionsRequest wrapper for the ListInstanceConsoleConnections operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstanceConsoleConnections.go.html to see an example of how to use ListInstanceConsoleConnectionsRequest. +type ListInstanceConsoleConnectionsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the instance. + InstanceId *string `mandatory:"false" contributesTo:"query" name:"instanceId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListInstanceConsoleConnectionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListInstanceConsoleConnectionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListInstanceConsoleConnectionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListInstanceConsoleConnectionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListInstanceConsoleConnectionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListInstanceConsoleConnectionsResponse wrapper for the ListInstanceConsoleConnections operation +type ListInstanceConsoleConnectionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []InstanceConsoleConnection instances + Items []InstanceConsoleConnection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListInstanceConsoleConnectionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListInstanceConsoleConnectionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_devices_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_devices_request_response.go new file mode 100644 index 000000000..c10d6cc40 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_devices_request_response.go @@ -0,0 +1,216 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListInstanceDevicesRequest wrapper for the ListInstanceDevices operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstanceDevices.go.html to see an example of how to use ListInstanceDevicesRequest. +type ListInstanceDevicesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` + + // A filter to return only available devices or only used devices. + IsAvailable *bool `mandatory:"false" contributesTo:"query" name:"isAvailable"` + + // A filter to return only devices that match the given name exactly. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListInstanceDevicesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListInstanceDevicesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListInstanceDevicesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListInstanceDevicesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListInstanceDevicesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListInstanceDevicesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListInstanceDevicesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListInstanceDevicesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListInstanceDevicesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListInstanceDevicesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListInstanceDevicesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListInstanceDevicesResponse wrapper for the ListInstanceDevices operation +type ListInstanceDevicesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []Device instances + Items []Device `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListInstanceDevicesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListInstanceDevicesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListInstanceDevicesSortByEnum Enum with underlying type: string +type ListInstanceDevicesSortByEnum string + +// Set of constants representing the allowable values for ListInstanceDevicesSortByEnum +const ( + ListInstanceDevicesSortByTimecreated ListInstanceDevicesSortByEnum = "TIMECREATED" + ListInstanceDevicesSortByDisplayname ListInstanceDevicesSortByEnum = "DISPLAYNAME" +) + +var mappingListInstanceDevicesSortByEnum = map[string]ListInstanceDevicesSortByEnum{ + "TIMECREATED": ListInstanceDevicesSortByTimecreated, + "DISPLAYNAME": ListInstanceDevicesSortByDisplayname, +} + +var mappingListInstanceDevicesSortByEnumLowerCase = map[string]ListInstanceDevicesSortByEnum{ + "timecreated": ListInstanceDevicesSortByTimecreated, + "displayname": ListInstanceDevicesSortByDisplayname, +} + +// GetListInstanceDevicesSortByEnumValues Enumerates the set of values for ListInstanceDevicesSortByEnum +func GetListInstanceDevicesSortByEnumValues() []ListInstanceDevicesSortByEnum { + values := make([]ListInstanceDevicesSortByEnum, 0) + for _, v := range mappingListInstanceDevicesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListInstanceDevicesSortByEnumStringValues Enumerates the set of values in String for ListInstanceDevicesSortByEnum +func GetListInstanceDevicesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListInstanceDevicesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInstanceDevicesSortByEnum(val string) (ListInstanceDevicesSortByEnum, bool) { + enum, ok := mappingListInstanceDevicesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListInstanceDevicesSortOrderEnum Enum with underlying type: string +type ListInstanceDevicesSortOrderEnum string + +// Set of constants representing the allowable values for ListInstanceDevicesSortOrderEnum +const ( + ListInstanceDevicesSortOrderAsc ListInstanceDevicesSortOrderEnum = "ASC" + ListInstanceDevicesSortOrderDesc ListInstanceDevicesSortOrderEnum = "DESC" +) + +var mappingListInstanceDevicesSortOrderEnum = map[string]ListInstanceDevicesSortOrderEnum{ + "ASC": ListInstanceDevicesSortOrderAsc, + "DESC": ListInstanceDevicesSortOrderDesc, +} + +var mappingListInstanceDevicesSortOrderEnumLowerCase = map[string]ListInstanceDevicesSortOrderEnum{ + "asc": ListInstanceDevicesSortOrderAsc, + "desc": ListInstanceDevicesSortOrderDesc, +} + +// GetListInstanceDevicesSortOrderEnumValues Enumerates the set of values for ListInstanceDevicesSortOrderEnum +func GetListInstanceDevicesSortOrderEnumValues() []ListInstanceDevicesSortOrderEnum { + values := make([]ListInstanceDevicesSortOrderEnum, 0) + for _, v := range mappingListInstanceDevicesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListInstanceDevicesSortOrderEnumStringValues Enumerates the set of values in String for ListInstanceDevicesSortOrderEnum +func GetListInstanceDevicesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListInstanceDevicesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInstanceDevicesSortOrderEnum(val string) (ListInstanceDevicesSortOrderEnum, bool) { + enum, ok := mappingListInstanceDevicesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_maintenance_events_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_maintenance_events_request_response.go new file mode 100644 index 000000000..9ec6d3e2f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_maintenance_events_request_response.go @@ -0,0 +1,231 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListInstanceMaintenanceEventsRequest wrapper for the ListInstanceMaintenanceEvents operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstanceMaintenanceEvents.go.html to see an example of how to use ListInstanceMaintenanceEventsRequest. +type ListInstanceMaintenanceEventsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the instance. + InstanceId *string `mandatory:"false" contributesTo:"query" name:"instanceId"` + + // A filter to only return resources that match the given lifecycle state. + LifecycleState InstanceMaintenanceEventLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to only return resources that have a matching correlationToken. + CorrelationToken *string `mandatory:"false" contributesTo:"query" name:"correlationToken"` + + // A filter to only return resources that match the given instance action. + InstanceAction *string `mandatory:"false" contributesTo:"query" name:"instanceAction"` + + // Starting range to return the maintenances which are not completed (date-time is in RFC3339 (https://tools.ietf.org/html/rfc3339) format). + TimeWindowStartGreaterThanOrEqualTo *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeWindowStartGreaterThanOrEqualTo"` + + // Ending range to return the maintenances which are not completed (date-time is in RFC3339 (https://tools.ietf.org/html/rfc3339) format). + TimeWindowStartLessThanOrEqualTo *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeWindowStartLessThanOrEqualTo"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListInstanceMaintenanceEventsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListInstanceMaintenanceEventsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListInstanceMaintenanceEventsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListInstanceMaintenanceEventsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListInstanceMaintenanceEventsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListInstanceMaintenanceEventsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListInstanceMaintenanceEventsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceMaintenanceEventLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetInstanceMaintenanceEventLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListInstanceMaintenanceEventsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListInstanceMaintenanceEventsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListInstanceMaintenanceEventsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListInstanceMaintenanceEventsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListInstanceMaintenanceEventsResponse wrapper for the ListInstanceMaintenanceEvents operation +type ListInstanceMaintenanceEventsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []InstanceMaintenanceEventSummary instances + Items []InstanceMaintenanceEventSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListInstanceMaintenanceEventsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListInstanceMaintenanceEventsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListInstanceMaintenanceEventsSortByEnum Enum with underlying type: string +type ListInstanceMaintenanceEventsSortByEnum string + +// Set of constants representing the allowable values for ListInstanceMaintenanceEventsSortByEnum +const ( + ListInstanceMaintenanceEventsSortByTimecreated ListInstanceMaintenanceEventsSortByEnum = "TIMECREATED" + ListInstanceMaintenanceEventsSortByDisplayname ListInstanceMaintenanceEventsSortByEnum = "DISPLAYNAME" +) + +var mappingListInstanceMaintenanceEventsSortByEnum = map[string]ListInstanceMaintenanceEventsSortByEnum{ + "TIMECREATED": ListInstanceMaintenanceEventsSortByTimecreated, + "DISPLAYNAME": ListInstanceMaintenanceEventsSortByDisplayname, +} + +var mappingListInstanceMaintenanceEventsSortByEnumLowerCase = map[string]ListInstanceMaintenanceEventsSortByEnum{ + "timecreated": ListInstanceMaintenanceEventsSortByTimecreated, + "displayname": ListInstanceMaintenanceEventsSortByDisplayname, +} + +// GetListInstanceMaintenanceEventsSortByEnumValues Enumerates the set of values for ListInstanceMaintenanceEventsSortByEnum +func GetListInstanceMaintenanceEventsSortByEnumValues() []ListInstanceMaintenanceEventsSortByEnum { + values := make([]ListInstanceMaintenanceEventsSortByEnum, 0) + for _, v := range mappingListInstanceMaintenanceEventsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListInstanceMaintenanceEventsSortByEnumStringValues Enumerates the set of values in String for ListInstanceMaintenanceEventsSortByEnum +func GetListInstanceMaintenanceEventsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListInstanceMaintenanceEventsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInstanceMaintenanceEventsSortByEnum(val string) (ListInstanceMaintenanceEventsSortByEnum, bool) { + enum, ok := mappingListInstanceMaintenanceEventsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListInstanceMaintenanceEventsSortOrderEnum Enum with underlying type: string +type ListInstanceMaintenanceEventsSortOrderEnum string + +// Set of constants representing the allowable values for ListInstanceMaintenanceEventsSortOrderEnum +const ( + ListInstanceMaintenanceEventsSortOrderAsc ListInstanceMaintenanceEventsSortOrderEnum = "ASC" + ListInstanceMaintenanceEventsSortOrderDesc ListInstanceMaintenanceEventsSortOrderEnum = "DESC" +) + +var mappingListInstanceMaintenanceEventsSortOrderEnum = map[string]ListInstanceMaintenanceEventsSortOrderEnum{ + "ASC": ListInstanceMaintenanceEventsSortOrderAsc, + "DESC": ListInstanceMaintenanceEventsSortOrderDesc, +} + +var mappingListInstanceMaintenanceEventsSortOrderEnumLowerCase = map[string]ListInstanceMaintenanceEventsSortOrderEnum{ + "asc": ListInstanceMaintenanceEventsSortOrderAsc, + "desc": ListInstanceMaintenanceEventsSortOrderDesc, +} + +// GetListInstanceMaintenanceEventsSortOrderEnumValues Enumerates the set of values for ListInstanceMaintenanceEventsSortOrderEnum +func GetListInstanceMaintenanceEventsSortOrderEnumValues() []ListInstanceMaintenanceEventsSortOrderEnum { + values := make([]ListInstanceMaintenanceEventsSortOrderEnum, 0) + for _, v := range mappingListInstanceMaintenanceEventsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListInstanceMaintenanceEventsSortOrderEnumStringValues Enumerates the set of values in String for ListInstanceMaintenanceEventsSortOrderEnum +func GetListInstanceMaintenanceEventsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListInstanceMaintenanceEventsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInstanceMaintenanceEventsSortOrderEnum(val string) (ListInstanceMaintenanceEventsSortOrderEnum, bool) { + enum, ok := mappingListInstanceMaintenanceEventsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_pool_instances_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_pool_instances_request_response.go new file mode 100644 index 000000000..558959c5b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_pool_instances_request_response.go @@ -0,0 +1,216 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListInstancePoolInstancesRequest wrapper for the ListInstancePoolInstances operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstancePoolInstances.go.html to see an example of how to use ListInstancePoolInstancesRequest. +type ListInstancePoolInstancesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListInstancePoolInstancesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListInstancePoolInstancesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListInstancePoolInstancesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListInstancePoolInstancesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListInstancePoolInstancesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListInstancePoolInstancesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListInstancePoolInstancesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListInstancePoolInstancesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListInstancePoolInstancesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListInstancePoolInstancesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListInstancePoolInstancesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListInstancePoolInstancesResponse wrapper for the ListInstancePoolInstances operation +type ListInstancePoolInstancesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []InstanceSummary instances + Items []InstanceSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListInstancePoolInstancesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListInstancePoolInstancesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListInstancePoolInstancesSortByEnum Enum with underlying type: string +type ListInstancePoolInstancesSortByEnum string + +// Set of constants representing the allowable values for ListInstancePoolInstancesSortByEnum +const ( + ListInstancePoolInstancesSortByTimecreated ListInstancePoolInstancesSortByEnum = "TIMECREATED" + ListInstancePoolInstancesSortByDisplayname ListInstancePoolInstancesSortByEnum = "DISPLAYNAME" +) + +var mappingListInstancePoolInstancesSortByEnum = map[string]ListInstancePoolInstancesSortByEnum{ + "TIMECREATED": ListInstancePoolInstancesSortByTimecreated, + "DISPLAYNAME": ListInstancePoolInstancesSortByDisplayname, +} + +var mappingListInstancePoolInstancesSortByEnumLowerCase = map[string]ListInstancePoolInstancesSortByEnum{ + "timecreated": ListInstancePoolInstancesSortByTimecreated, + "displayname": ListInstancePoolInstancesSortByDisplayname, +} + +// GetListInstancePoolInstancesSortByEnumValues Enumerates the set of values for ListInstancePoolInstancesSortByEnum +func GetListInstancePoolInstancesSortByEnumValues() []ListInstancePoolInstancesSortByEnum { + values := make([]ListInstancePoolInstancesSortByEnum, 0) + for _, v := range mappingListInstancePoolInstancesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListInstancePoolInstancesSortByEnumStringValues Enumerates the set of values in String for ListInstancePoolInstancesSortByEnum +func GetListInstancePoolInstancesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListInstancePoolInstancesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInstancePoolInstancesSortByEnum(val string) (ListInstancePoolInstancesSortByEnum, bool) { + enum, ok := mappingListInstancePoolInstancesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListInstancePoolInstancesSortOrderEnum Enum with underlying type: string +type ListInstancePoolInstancesSortOrderEnum string + +// Set of constants representing the allowable values for ListInstancePoolInstancesSortOrderEnum +const ( + ListInstancePoolInstancesSortOrderAsc ListInstancePoolInstancesSortOrderEnum = "ASC" + ListInstancePoolInstancesSortOrderDesc ListInstancePoolInstancesSortOrderEnum = "DESC" +) + +var mappingListInstancePoolInstancesSortOrderEnum = map[string]ListInstancePoolInstancesSortOrderEnum{ + "ASC": ListInstancePoolInstancesSortOrderAsc, + "DESC": ListInstancePoolInstancesSortOrderDesc, +} + +var mappingListInstancePoolInstancesSortOrderEnumLowerCase = map[string]ListInstancePoolInstancesSortOrderEnum{ + "asc": ListInstancePoolInstancesSortOrderAsc, + "desc": ListInstancePoolInstancesSortOrderDesc, +} + +// GetListInstancePoolInstancesSortOrderEnumValues Enumerates the set of values for ListInstancePoolInstancesSortOrderEnum +func GetListInstancePoolInstancesSortOrderEnumValues() []ListInstancePoolInstancesSortOrderEnum { + values := make([]ListInstancePoolInstancesSortOrderEnum, 0) + for _, v := range mappingListInstancePoolInstancesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListInstancePoolInstancesSortOrderEnumStringValues Enumerates the set of values in String for ListInstancePoolInstancesSortOrderEnum +func GetListInstancePoolInstancesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListInstancePoolInstancesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInstancePoolInstancesSortOrderEnum(val string) (ListInstancePoolInstancesSortOrderEnum, bool) { + enum, ok := mappingListInstancePoolInstancesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_pools_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_pools_request_response.go new file mode 100644 index 000000000..41c88445e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instance_pools_request_response.go @@ -0,0 +1,220 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListInstancePoolsRequest wrapper for the ListInstancePools operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstancePools.go.html to see an example of how to use ListInstancePoolsRequest. +type ListInstancePoolsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListInstancePoolsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListInstancePoolsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle state. The state + // value is case-insensitive. + LifecycleState InstancePoolSummaryLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListInstancePoolsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListInstancePoolsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListInstancePoolsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListInstancePoolsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListInstancePoolsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListInstancePoolsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListInstancePoolsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListInstancePoolsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListInstancePoolsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingInstancePoolSummaryLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetInstancePoolSummaryLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListInstancePoolsResponse wrapper for the ListInstancePools operation +type ListInstancePoolsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []InstancePoolSummary instances + Items []InstancePoolSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListInstancePoolsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListInstancePoolsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListInstancePoolsSortByEnum Enum with underlying type: string +type ListInstancePoolsSortByEnum string + +// Set of constants representing the allowable values for ListInstancePoolsSortByEnum +const ( + ListInstancePoolsSortByTimecreated ListInstancePoolsSortByEnum = "TIMECREATED" + ListInstancePoolsSortByDisplayname ListInstancePoolsSortByEnum = "DISPLAYNAME" +) + +var mappingListInstancePoolsSortByEnum = map[string]ListInstancePoolsSortByEnum{ + "TIMECREATED": ListInstancePoolsSortByTimecreated, + "DISPLAYNAME": ListInstancePoolsSortByDisplayname, +} + +var mappingListInstancePoolsSortByEnumLowerCase = map[string]ListInstancePoolsSortByEnum{ + "timecreated": ListInstancePoolsSortByTimecreated, + "displayname": ListInstancePoolsSortByDisplayname, +} + +// GetListInstancePoolsSortByEnumValues Enumerates the set of values for ListInstancePoolsSortByEnum +func GetListInstancePoolsSortByEnumValues() []ListInstancePoolsSortByEnum { + values := make([]ListInstancePoolsSortByEnum, 0) + for _, v := range mappingListInstancePoolsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListInstancePoolsSortByEnumStringValues Enumerates the set of values in String for ListInstancePoolsSortByEnum +func GetListInstancePoolsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListInstancePoolsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInstancePoolsSortByEnum(val string) (ListInstancePoolsSortByEnum, bool) { + enum, ok := mappingListInstancePoolsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListInstancePoolsSortOrderEnum Enum with underlying type: string +type ListInstancePoolsSortOrderEnum string + +// Set of constants representing the allowable values for ListInstancePoolsSortOrderEnum +const ( + ListInstancePoolsSortOrderAsc ListInstancePoolsSortOrderEnum = "ASC" + ListInstancePoolsSortOrderDesc ListInstancePoolsSortOrderEnum = "DESC" +) + +var mappingListInstancePoolsSortOrderEnum = map[string]ListInstancePoolsSortOrderEnum{ + "ASC": ListInstancePoolsSortOrderAsc, + "DESC": ListInstancePoolsSortOrderDesc, +} + +var mappingListInstancePoolsSortOrderEnumLowerCase = map[string]ListInstancePoolsSortOrderEnum{ + "asc": ListInstancePoolsSortOrderAsc, + "desc": ListInstancePoolsSortOrderDesc, +} + +// GetListInstancePoolsSortOrderEnumValues Enumerates the set of values for ListInstancePoolsSortOrderEnum +func GetListInstancePoolsSortOrderEnumValues() []ListInstancePoolsSortOrderEnum { + values := make([]ListInstancePoolsSortOrderEnum, 0) + for _, v := range mappingListInstancePoolsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListInstancePoolsSortOrderEnumStringValues Enumerates the set of values in String for ListInstancePoolsSortOrderEnum +func GetListInstancePoolsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListInstancePoolsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInstancePoolsSortOrderEnum(val string) (ListInstancePoolsSortOrderEnum, bool) { + enum, ok := mappingListInstancePoolsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instances_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instances_request_response.go new file mode 100644 index 000000000..54f47c3b0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_instances_request_response.go @@ -0,0 +1,232 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListInstancesRequest wrapper for the ListInstances operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInstances.go.html to see an example of how to use ListInstancesRequest. +type ListInstancesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The OCID of the compute capacity reservation. + CapacityReservationId *string `mandatory:"false" contributesTo:"query" name:"capacityReservationId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + // A compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + // access (RDMA) network group. + ComputeClusterId *string `mandatory:"false" contributesTo:"query" name:"computeClusterId"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListInstancesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListInstancesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle state. The state + // value is case-insensitive. + LifecycleState InstanceLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListInstancesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListInstancesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListInstancesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListInstancesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListInstancesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListInstancesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListInstancesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListInstancesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListInstancesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingInstanceLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetInstanceLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListInstancesResponse wrapper for the ListInstances operation +type ListInstancesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []Instance instances + Items []Instance `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListInstancesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListInstancesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListInstancesSortByEnum Enum with underlying type: string +type ListInstancesSortByEnum string + +// Set of constants representing the allowable values for ListInstancesSortByEnum +const ( + ListInstancesSortByTimecreated ListInstancesSortByEnum = "TIMECREATED" + ListInstancesSortByDisplayname ListInstancesSortByEnum = "DISPLAYNAME" +) + +var mappingListInstancesSortByEnum = map[string]ListInstancesSortByEnum{ + "TIMECREATED": ListInstancesSortByTimecreated, + "DISPLAYNAME": ListInstancesSortByDisplayname, +} + +var mappingListInstancesSortByEnumLowerCase = map[string]ListInstancesSortByEnum{ + "timecreated": ListInstancesSortByTimecreated, + "displayname": ListInstancesSortByDisplayname, +} + +// GetListInstancesSortByEnumValues Enumerates the set of values for ListInstancesSortByEnum +func GetListInstancesSortByEnumValues() []ListInstancesSortByEnum { + values := make([]ListInstancesSortByEnum, 0) + for _, v := range mappingListInstancesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListInstancesSortByEnumStringValues Enumerates the set of values in String for ListInstancesSortByEnum +func GetListInstancesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListInstancesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInstancesSortByEnum(val string) (ListInstancesSortByEnum, bool) { + enum, ok := mappingListInstancesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListInstancesSortOrderEnum Enum with underlying type: string +type ListInstancesSortOrderEnum string + +// Set of constants representing the allowable values for ListInstancesSortOrderEnum +const ( + ListInstancesSortOrderAsc ListInstancesSortOrderEnum = "ASC" + ListInstancesSortOrderDesc ListInstancesSortOrderEnum = "DESC" +) + +var mappingListInstancesSortOrderEnum = map[string]ListInstancesSortOrderEnum{ + "ASC": ListInstancesSortOrderAsc, + "DESC": ListInstancesSortOrderDesc, +} + +var mappingListInstancesSortOrderEnumLowerCase = map[string]ListInstancesSortOrderEnum{ + "asc": ListInstancesSortOrderAsc, + "desc": ListInstancesSortOrderDesc, +} + +// GetListInstancesSortOrderEnumValues Enumerates the set of values for ListInstancesSortOrderEnum +func GetListInstancesSortOrderEnumValues() []ListInstancesSortOrderEnum { + values := make([]ListInstancesSortOrderEnum, 0) + for _, v := range mappingListInstancesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListInstancesSortOrderEnumStringValues Enumerates the set of values in String for ListInstancesSortOrderEnum +func GetListInstancesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListInstancesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInstancesSortOrderEnum(val string) (ListInstancesSortOrderEnum, bool) { + enum, ok := mappingListInstancesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_internet_gateways_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_internet_gateways_request_response.go new file mode 100644 index 000000000..5bfe7bd38 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_internet_gateways_request_response.go @@ -0,0 +1,223 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListInternetGatewaysRequest wrapper for the ListInternetGateways operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListInternetGateways.go.html to see an example of how to use ListInternetGatewaysRequest. +type ListInternetGatewaysRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"false" contributesTo:"query" name:"vcnId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListInternetGatewaysSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListInternetGatewaysSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle + // state. The state value is case-insensitive. + LifecycleState InternetGatewayLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListInternetGatewaysRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListInternetGatewaysRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListInternetGatewaysRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListInternetGatewaysRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListInternetGatewaysRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListInternetGatewaysSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListInternetGatewaysSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListInternetGatewaysSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListInternetGatewaysSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingInternetGatewayLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetInternetGatewayLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListInternetGatewaysResponse wrapper for the ListInternetGateways operation +type ListInternetGatewaysResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []InternetGateway instances + Items []InternetGateway `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListInternetGatewaysResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListInternetGatewaysResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListInternetGatewaysSortByEnum Enum with underlying type: string +type ListInternetGatewaysSortByEnum string + +// Set of constants representing the allowable values for ListInternetGatewaysSortByEnum +const ( + ListInternetGatewaysSortByTimecreated ListInternetGatewaysSortByEnum = "TIMECREATED" + ListInternetGatewaysSortByDisplayname ListInternetGatewaysSortByEnum = "DISPLAYNAME" +) + +var mappingListInternetGatewaysSortByEnum = map[string]ListInternetGatewaysSortByEnum{ + "TIMECREATED": ListInternetGatewaysSortByTimecreated, + "DISPLAYNAME": ListInternetGatewaysSortByDisplayname, +} + +var mappingListInternetGatewaysSortByEnumLowerCase = map[string]ListInternetGatewaysSortByEnum{ + "timecreated": ListInternetGatewaysSortByTimecreated, + "displayname": ListInternetGatewaysSortByDisplayname, +} + +// GetListInternetGatewaysSortByEnumValues Enumerates the set of values for ListInternetGatewaysSortByEnum +func GetListInternetGatewaysSortByEnumValues() []ListInternetGatewaysSortByEnum { + values := make([]ListInternetGatewaysSortByEnum, 0) + for _, v := range mappingListInternetGatewaysSortByEnum { + values = append(values, v) + } + return values +} + +// GetListInternetGatewaysSortByEnumStringValues Enumerates the set of values in String for ListInternetGatewaysSortByEnum +func GetListInternetGatewaysSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListInternetGatewaysSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInternetGatewaysSortByEnum(val string) (ListInternetGatewaysSortByEnum, bool) { + enum, ok := mappingListInternetGatewaysSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListInternetGatewaysSortOrderEnum Enum with underlying type: string +type ListInternetGatewaysSortOrderEnum string + +// Set of constants representing the allowable values for ListInternetGatewaysSortOrderEnum +const ( + ListInternetGatewaysSortOrderAsc ListInternetGatewaysSortOrderEnum = "ASC" + ListInternetGatewaysSortOrderDesc ListInternetGatewaysSortOrderEnum = "DESC" +) + +var mappingListInternetGatewaysSortOrderEnum = map[string]ListInternetGatewaysSortOrderEnum{ + "ASC": ListInternetGatewaysSortOrderAsc, + "DESC": ListInternetGatewaysSortOrderDesc, +} + +var mappingListInternetGatewaysSortOrderEnumLowerCase = map[string]ListInternetGatewaysSortOrderEnum{ + "asc": ListInternetGatewaysSortOrderAsc, + "desc": ListInternetGatewaysSortOrderDesc, +} + +// GetListInternetGatewaysSortOrderEnumValues Enumerates the set of values for ListInternetGatewaysSortOrderEnum +func GetListInternetGatewaysSortOrderEnumValues() []ListInternetGatewaysSortOrderEnum { + values := make([]ListInternetGatewaysSortOrderEnum, 0) + for _, v := range mappingListInternetGatewaysSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListInternetGatewaysSortOrderEnumStringValues Enumerates the set of values in String for ListInternetGatewaysSortOrderEnum +func GetListInternetGatewaysSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListInternetGatewaysSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListInternetGatewaysSortOrderEnum(val string) (ListInternetGatewaysSortOrderEnum, bool) { + enum, ok := mappingListInternetGatewaysSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ip_inventory_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ip_inventory_details.go new file mode 100644 index 000000000..e2830db53 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ip_inventory_details.go @@ -0,0 +1,226 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ListIpInventoryDetails Required input parameters for retrieving IP Inventory data within the specified compartments of a region. +type ListIpInventoryDetails struct { + + // Lists the selected regions. + RegionList []string `mandatory:"true" json:"regionList"` + + // List the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartments. + CompartmentList []string `mandatory:"true" json:"compartmentList"` + + // List of selected filters. + OverrideFilters *bool `mandatory:"false" json:"overrideFilters"` + + // The CIDR utilization of a VCN. + Utilization *float32 `mandatory:"false" json:"utilization"` + + // List of overlapping VCNs. + OverlappingVcnsOnly *bool `mandatory:"false" json:"overlappingVcnsOnly"` + + // List of IP address types used. + AddressTypeList []AddressTypeEnum `mandatory:"false" json:"addressTypeList"` + + // List of VCN resource types. + ResourceTypeList []ListIpInventoryDetailsResourceTypeListEnum `mandatory:"false" json:"resourceTypeList,omitempty"` + + // Filters the results for the specified string. + SearchKeyword *string `mandatory:"false" json:"searchKeyword"` + + // Provide the sort order (`sortOrder`) to sort the fields such as TIMECREATED in descending or descending order, and DISPLAYNAME in case sensitive. + // **Note:** For some "List" operations (for example, `ListInstances`), sort resources by an availability domain when the resources belong to a single availability domain. + // If you sort the "List" operations without specifying + // an availability domain, the resources are grouped by availability domains and then sorted. + SortBy ListIpInventoryDetailsSortByEnum `mandatory:"false" json:"sortBy,omitempty"` + + // Specifies the sort order to use. Select either ascending (`ASC`) or descending (`DESC`) order. The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListIpInventoryDetailsSortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` + + // Most List operations paginate results. Results are paginated for the ListInstances operations. When you call a paginated List operation, the response indicates more pages of results by including the opc-next-page header. + // For more information, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + PaginationOffset *int `mandatory:"false" json:"paginationOffset"` + + // Specifies the maximum number of results displayed per page for a paginated "List" call. For more information, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + PaginationLimit *int `mandatory:"false" json:"paginationLimit"` +} + +func (m ListIpInventoryDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ListIpInventoryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.ResourceTypeList { + if _, ok := GetMappingListIpInventoryDetailsResourceTypeListEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceTypeList: %s. Supported values are: %s.", val, strings.Join(GetListIpInventoryDetailsResourceTypeListEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingListIpInventoryDetailsSortByEnum(string(m.SortBy)); !ok && m.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", m.SortBy, strings.Join(GetListIpInventoryDetailsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListIpInventoryDetailsSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetListIpInventoryDetailsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListIpInventoryDetailsResourceTypeListEnum Enum with underlying type: string +type ListIpInventoryDetailsResourceTypeListEnum string + +// Set of constants representing the allowable values for ListIpInventoryDetailsResourceTypeListEnum +const ( + ListIpInventoryDetailsResourceTypeListResource ListIpInventoryDetailsResourceTypeListEnum = "Resource" +) + +var mappingListIpInventoryDetailsResourceTypeListEnum = map[string]ListIpInventoryDetailsResourceTypeListEnum{ + "Resource": ListIpInventoryDetailsResourceTypeListResource, +} + +var mappingListIpInventoryDetailsResourceTypeListEnumLowerCase = map[string]ListIpInventoryDetailsResourceTypeListEnum{ + "resource": ListIpInventoryDetailsResourceTypeListResource, +} + +// GetListIpInventoryDetailsResourceTypeListEnumValues Enumerates the set of values for ListIpInventoryDetailsResourceTypeListEnum +func GetListIpInventoryDetailsResourceTypeListEnumValues() []ListIpInventoryDetailsResourceTypeListEnum { + values := make([]ListIpInventoryDetailsResourceTypeListEnum, 0) + for _, v := range mappingListIpInventoryDetailsResourceTypeListEnum { + values = append(values, v) + } + return values +} + +// GetListIpInventoryDetailsResourceTypeListEnumStringValues Enumerates the set of values in String for ListIpInventoryDetailsResourceTypeListEnum +func GetListIpInventoryDetailsResourceTypeListEnumStringValues() []string { + return []string{ + "Resource", + } +} + +// GetMappingListIpInventoryDetailsResourceTypeListEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListIpInventoryDetailsResourceTypeListEnum(val string) (ListIpInventoryDetailsResourceTypeListEnum, bool) { + enum, ok := mappingListIpInventoryDetailsResourceTypeListEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListIpInventoryDetailsSortByEnum Enum with underlying type: string +type ListIpInventoryDetailsSortByEnum string + +// Set of constants representing the allowable values for ListIpInventoryDetailsSortByEnum +const ( + ListIpInventoryDetailsSortByDisplayname ListIpInventoryDetailsSortByEnum = "DISPLAYNAME" + ListIpInventoryDetailsSortByUtilization ListIpInventoryDetailsSortByEnum = "UTILIZATION" + ListIpInventoryDetailsSortByDnsHostname ListIpInventoryDetailsSortByEnum = "DNS_HOSTNAME" + ListIpInventoryDetailsSortByRegion ListIpInventoryDetailsSortByEnum = "REGION" +) + +var mappingListIpInventoryDetailsSortByEnum = map[string]ListIpInventoryDetailsSortByEnum{ + "DISPLAYNAME": ListIpInventoryDetailsSortByDisplayname, + "UTILIZATION": ListIpInventoryDetailsSortByUtilization, + "DNS_HOSTNAME": ListIpInventoryDetailsSortByDnsHostname, + "REGION": ListIpInventoryDetailsSortByRegion, +} + +var mappingListIpInventoryDetailsSortByEnumLowerCase = map[string]ListIpInventoryDetailsSortByEnum{ + "displayname": ListIpInventoryDetailsSortByDisplayname, + "utilization": ListIpInventoryDetailsSortByUtilization, + "dns_hostname": ListIpInventoryDetailsSortByDnsHostname, + "region": ListIpInventoryDetailsSortByRegion, +} + +// GetListIpInventoryDetailsSortByEnumValues Enumerates the set of values for ListIpInventoryDetailsSortByEnum +func GetListIpInventoryDetailsSortByEnumValues() []ListIpInventoryDetailsSortByEnum { + values := make([]ListIpInventoryDetailsSortByEnum, 0) + for _, v := range mappingListIpInventoryDetailsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListIpInventoryDetailsSortByEnumStringValues Enumerates the set of values in String for ListIpInventoryDetailsSortByEnum +func GetListIpInventoryDetailsSortByEnumStringValues() []string { + return []string{ + "DISPLAYNAME", + "UTILIZATION", + "DNS_HOSTNAME", + "REGION", + } +} + +// GetMappingListIpInventoryDetailsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListIpInventoryDetailsSortByEnum(val string) (ListIpInventoryDetailsSortByEnum, bool) { + enum, ok := mappingListIpInventoryDetailsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListIpInventoryDetailsSortOrderEnum Enum with underlying type: string +type ListIpInventoryDetailsSortOrderEnum string + +// Set of constants representing the allowable values for ListIpInventoryDetailsSortOrderEnum +const ( + ListIpInventoryDetailsSortOrderAsc ListIpInventoryDetailsSortOrderEnum = "ASC" + ListIpInventoryDetailsSortOrderDesc ListIpInventoryDetailsSortOrderEnum = "DESC" +) + +var mappingListIpInventoryDetailsSortOrderEnum = map[string]ListIpInventoryDetailsSortOrderEnum{ + "ASC": ListIpInventoryDetailsSortOrderAsc, + "DESC": ListIpInventoryDetailsSortOrderDesc, +} + +var mappingListIpInventoryDetailsSortOrderEnumLowerCase = map[string]ListIpInventoryDetailsSortOrderEnum{ + "asc": ListIpInventoryDetailsSortOrderAsc, + "desc": ListIpInventoryDetailsSortOrderDesc, +} + +// GetListIpInventoryDetailsSortOrderEnumValues Enumerates the set of values for ListIpInventoryDetailsSortOrderEnum +func GetListIpInventoryDetailsSortOrderEnumValues() []ListIpInventoryDetailsSortOrderEnum { + values := make([]ListIpInventoryDetailsSortOrderEnum, 0) + for _, v := range mappingListIpInventoryDetailsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListIpInventoryDetailsSortOrderEnumStringValues Enumerates the set of values in String for ListIpInventoryDetailsSortOrderEnum +func GetListIpInventoryDetailsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListIpInventoryDetailsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListIpInventoryDetailsSortOrderEnum(val string) (ListIpInventoryDetailsSortOrderEnum, bool) { + enum, ok := mappingListIpInventoryDetailsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ip_inventory_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ip_inventory_request_response.go new file mode 100644 index 000000000..73e104df8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ip_inventory_request_response.go @@ -0,0 +1,157 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListIpInventoryRequest wrapper for the ListIpInventory operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIpInventory.go.html to see an example of how to use ListIpInventoryRequest. +type ListIpInventoryRequest struct { + + // Details required to list the IP Inventory data. + ListIpInventoryDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListIpInventoryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListIpInventoryRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListIpInventoryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListIpInventoryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListIpInventoryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListIpInventoryResponse wrapper for the ListIpInventory operation +type ListIpInventoryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpInventoryCollection instance + IpInventoryCollection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. A pagination token to get the total number of results available. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // The IpInventory API current state. + LifecycleState ListIpInventoryLifecycleStateEnum `presentIn:"header" name:"lifecycle-state"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the resource. + DataRequestId *string `presentIn:"header" name:"data-request-id"` +} + +func (response ListIpInventoryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListIpInventoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListIpInventoryLifecycleStateEnum Enum with underlying type: string +type ListIpInventoryLifecycleStateEnum string + +// Set of constants representing the allowable values for ListIpInventoryLifecycleStateEnum +const ( + ListIpInventoryLifecycleStateInProgress ListIpInventoryLifecycleStateEnum = "IN_PROGRESS" + ListIpInventoryLifecycleStateDone ListIpInventoryLifecycleStateEnum = "DONE" +) + +var mappingListIpInventoryLifecycleStateEnum = map[string]ListIpInventoryLifecycleStateEnum{ + "IN_PROGRESS": ListIpInventoryLifecycleStateInProgress, + "DONE": ListIpInventoryLifecycleStateDone, +} + +var mappingListIpInventoryLifecycleStateEnumLowerCase = map[string]ListIpInventoryLifecycleStateEnum{ + "in_progress": ListIpInventoryLifecycleStateInProgress, + "done": ListIpInventoryLifecycleStateDone, +} + +// GetListIpInventoryLifecycleStateEnumValues Enumerates the set of values for ListIpInventoryLifecycleStateEnum +func GetListIpInventoryLifecycleStateEnumValues() []ListIpInventoryLifecycleStateEnum { + values := make([]ListIpInventoryLifecycleStateEnum, 0) + for _, v := range mappingListIpInventoryLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetListIpInventoryLifecycleStateEnumStringValues Enumerates the set of values in String for ListIpInventoryLifecycleStateEnum +func GetListIpInventoryLifecycleStateEnumStringValues() []string { + return []string{ + "IN_PROGRESS", + "DONE", + } +} + +// GetMappingListIpInventoryLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListIpInventoryLifecycleStateEnum(val string) (ListIpInventoryLifecycleStateEnum, bool) { + enum, ok := mappingListIpInventoryLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ipv6s_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ipv6s_request_response.go new file mode 100644 index 000000000..85a848ac7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ipv6s_request_response.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListIpv6sRequest wrapper for the ListIpv6s operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIpv6s.go.html to see an example of how to use ListIpv6sRequest. +type ListIpv6sRequest struct { + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // An IP address. This could be either IPv4 or IPv6, depending on the resource. + // Example: `10.0.3.3` + IpAddress *string `mandatory:"false" contributesTo:"query" name:"ipAddress"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"false" contributesTo:"query" name:"subnetId"` + + // The OCID of the VNIC. + VnicId *string `mandatory:"false" contributesTo:"query" name:"vnicId"` + + // State of the IP address. If an IP address is assigned to a VNIC it is ASSIGNED otherwise AVAILABLE + IpState *string `mandatory:"false" contributesTo:"query" name:"ipState"` + + // Lifetime of the IP address. + // There are two types of IPs: + // - Ephemeral + // - Reserved + Lifetime *string `mandatory:"false" contributesTo:"query" name:"lifetime"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListIpv6sRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListIpv6sRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListIpv6sRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListIpv6sRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListIpv6sRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListIpv6sResponse wrapper for the ListIpv6s operation +type ListIpv6sResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []Ipv6 instances + Items []Ipv6 `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListIpv6sResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListIpv6sResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_local_peering_gateways_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_local_peering_gateways_request_response.go new file mode 100644 index 000000000..f1c42433d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_local_peering_gateways_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListLocalPeeringGatewaysRequest wrapper for the ListLocalPeeringGateways operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListLocalPeeringGateways.go.html to see an example of how to use ListLocalPeeringGatewaysRequest. +type ListLocalPeeringGatewaysRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"false" contributesTo:"query" name:"vcnId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListLocalPeeringGatewaysRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListLocalPeeringGatewaysRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListLocalPeeringGatewaysRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListLocalPeeringGatewaysRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListLocalPeeringGatewaysRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListLocalPeeringGatewaysResponse wrapper for the ListLocalPeeringGateways operation +type ListLocalPeeringGatewaysResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []LocalPeeringGateway instances + Items []LocalPeeringGateway `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListLocalPeeringGatewaysResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListLocalPeeringGatewaysResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_nat_gateways_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_nat_gateways_request_response.go new file mode 100644 index 000000000..cc8b954f7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_nat_gateways_request_response.go @@ -0,0 +1,223 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListNatGatewaysRequest wrapper for the ListNatGateways operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListNatGateways.go.html to see an example of how to use ListNatGatewaysRequest. +type ListNatGatewaysRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"false" contributesTo:"query" name:"vcnId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListNatGatewaysSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListNatGatewaysSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to return only resources that match the specified lifecycle + // state. The value is case insensitive. + LifecycleState NatGatewayLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListNatGatewaysRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListNatGatewaysRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListNatGatewaysRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListNatGatewaysRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListNatGatewaysRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListNatGatewaysSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListNatGatewaysSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListNatGatewaysSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListNatGatewaysSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingNatGatewayLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetNatGatewayLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListNatGatewaysResponse wrapper for the ListNatGateways operation +type ListNatGatewaysResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []NatGateway instances + Items []NatGateway `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListNatGatewaysResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListNatGatewaysResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListNatGatewaysSortByEnum Enum with underlying type: string +type ListNatGatewaysSortByEnum string + +// Set of constants representing the allowable values for ListNatGatewaysSortByEnum +const ( + ListNatGatewaysSortByTimecreated ListNatGatewaysSortByEnum = "TIMECREATED" + ListNatGatewaysSortByDisplayname ListNatGatewaysSortByEnum = "DISPLAYNAME" +) + +var mappingListNatGatewaysSortByEnum = map[string]ListNatGatewaysSortByEnum{ + "TIMECREATED": ListNatGatewaysSortByTimecreated, + "DISPLAYNAME": ListNatGatewaysSortByDisplayname, +} + +var mappingListNatGatewaysSortByEnumLowerCase = map[string]ListNatGatewaysSortByEnum{ + "timecreated": ListNatGatewaysSortByTimecreated, + "displayname": ListNatGatewaysSortByDisplayname, +} + +// GetListNatGatewaysSortByEnumValues Enumerates the set of values for ListNatGatewaysSortByEnum +func GetListNatGatewaysSortByEnumValues() []ListNatGatewaysSortByEnum { + values := make([]ListNatGatewaysSortByEnum, 0) + for _, v := range mappingListNatGatewaysSortByEnum { + values = append(values, v) + } + return values +} + +// GetListNatGatewaysSortByEnumStringValues Enumerates the set of values in String for ListNatGatewaysSortByEnum +func GetListNatGatewaysSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListNatGatewaysSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListNatGatewaysSortByEnum(val string) (ListNatGatewaysSortByEnum, bool) { + enum, ok := mappingListNatGatewaysSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListNatGatewaysSortOrderEnum Enum with underlying type: string +type ListNatGatewaysSortOrderEnum string + +// Set of constants representing the allowable values for ListNatGatewaysSortOrderEnum +const ( + ListNatGatewaysSortOrderAsc ListNatGatewaysSortOrderEnum = "ASC" + ListNatGatewaysSortOrderDesc ListNatGatewaysSortOrderEnum = "DESC" +) + +var mappingListNatGatewaysSortOrderEnum = map[string]ListNatGatewaysSortOrderEnum{ + "ASC": ListNatGatewaysSortOrderAsc, + "DESC": ListNatGatewaysSortOrderDesc, +} + +var mappingListNatGatewaysSortOrderEnumLowerCase = map[string]ListNatGatewaysSortOrderEnum{ + "asc": ListNatGatewaysSortOrderAsc, + "desc": ListNatGatewaysSortOrderDesc, +} + +// GetListNatGatewaysSortOrderEnumValues Enumerates the set of values for ListNatGatewaysSortOrderEnum +func GetListNatGatewaysSortOrderEnumValues() []ListNatGatewaysSortOrderEnum { + values := make([]ListNatGatewaysSortOrderEnum, 0) + for _, v := range mappingListNatGatewaysSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListNatGatewaysSortOrderEnumStringValues Enumerates the set of values in String for ListNatGatewaysSortOrderEnum +func GetListNatGatewaysSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListNatGatewaysSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListNatGatewaysSortOrderEnum(val string) (ListNatGatewaysSortOrderEnum, bool) { + enum, ok := mappingListNatGatewaysSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_network_security_group_security_rules_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_network_security_group_security_rules_request_response.go new file mode 100644 index 000000000..9056aa1b7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_network_security_group_security_rules_request_response.go @@ -0,0 +1,249 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListNetworkSecurityGroupSecurityRulesRequest wrapper for the ListNetworkSecurityGroupSecurityRules operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListNetworkSecurityGroupSecurityRules.go.html to see an example of how to use ListNetworkSecurityGroupSecurityRulesRequest. +type ListNetworkSecurityGroupSecurityRulesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security group. + NetworkSecurityGroupId *string `mandatory:"true" contributesTo:"path" name:"networkSecurityGroupId"` + + // Direction of the security rule. Set to `EGRESS` for rules that allow outbound IP packets, + // or `INGRESS` for rules that allow inbound IP packets. + Direction ListNetworkSecurityGroupSecurityRulesDirectionEnum `mandatory:"false" contributesTo:"query" name:"direction" omitEmpty:"true"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. + SortBy ListNetworkSecurityGroupSecurityRulesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListNetworkSecurityGroupSecurityRulesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListNetworkSecurityGroupSecurityRulesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListNetworkSecurityGroupSecurityRulesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListNetworkSecurityGroupSecurityRulesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListNetworkSecurityGroupSecurityRulesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListNetworkSecurityGroupSecurityRulesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListNetworkSecurityGroupSecurityRulesDirectionEnum(string(request.Direction)); !ok && request.Direction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Direction: %s. Supported values are: %s.", request.Direction, strings.Join(GetListNetworkSecurityGroupSecurityRulesDirectionEnumStringValues(), ","))) + } + if _, ok := GetMappingListNetworkSecurityGroupSecurityRulesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListNetworkSecurityGroupSecurityRulesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListNetworkSecurityGroupSecurityRulesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListNetworkSecurityGroupSecurityRulesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListNetworkSecurityGroupSecurityRulesResponse wrapper for the ListNetworkSecurityGroupSecurityRules operation +type ListNetworkSecurityGroupSecurityRulesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []SecurityRule instances + Items []SecurityRule `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListNetworkSecurityGroupSecurityRulesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListNetworkSecurityGroupSecurityRulesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListNetworkSecurityGroupSecurityRulesDirectionEnum Enum with underlying type: string +type ListNetworkSecurityGroupSecurityRulesDirectionEnum string + +// Set of constants representing the allowable values for ListNetworkSecurityGroupSecurityRulesDirectionEnum +const ( + ListNetworkSecurityGroupSecurityRulesDirectionEgress ListNetworkSecurityGroupSecurityRulesDirectionEnum = "EGRESS" + ListNetworkSecurityGroupSecurityRulesDirectionIngress ListNetworkSecurityGroupSecurityRulesDirectionEnum = "INGRESS" +) + +var mappingListNetworkSecurityGroupSecurityRulesDirectionEnum = map[string]ListNetworkSecurityGroupSecurityRulesDirectionEnum{ + "EGRESS": ListNetworkSecurityGroupSecurityRulesDirectionEgress, + "INGRESS": ListNetworkSecurityGroupSecurityRulesDirectionIngress, +} + +var mappingListNetworkSecurityGroupSecurityRulesDirectionEnumLowerCase = map[string]ListNetworkSecurityGroupSecurityRulesDirectionEnum{ + "egress": ListNetworkSecurityGroupSecurityRulesDirectionEgress, + "ingress": ListNetworkSecurityGroupSecurityRulesDirectionIngress, +} + +// GetListNetworkSecurityGroupSecurityRulesDirectionEnumValues Enumerates the set of values for ListNetworkSecurityGroupSecurityRulesDirectionEnum +func GetListNetworkSecurityGroupSecurityRulesDirectionEnumValues() []ListNetworkSecurityGroupSecurityRulesDirectionEnum { + values := make([]ListNetworkSecurityGroupSecurityRulesDirectionEnum, 0) + for _, v := range mappingListNetworkSecurityGroupSecurityRulesDirectionEnum { + values = append(values, v) + } + return values +} + +// GetListNetworkSecurityGroupSecurityRulesDirectionEnumStringValues Enumerates the set of values in String for ListNetworkSecurityGroupSecurityRulesDirectionEnum +func GetListNetworkSecurityGroupSecurityRulesDirectionEnumStringValues() []string { + return []string{ + "EGRESS", + "INGRESS", + } +} + +// GetMappingListNetworkSecurityGroupSecurityRulesDirectionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListNetworkSecurityGroupSecurityRulesDirectionEnum(val string) (ListNetworkSecurityGroupSecurityRulesDirectionEnum, bool) { + enum, ok := mappingListNetworkSecurityGroupSecurityRulesDirectionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListNetworkSecurityGroupSecurityRulesSortByEnum Enum with underlying type: string +type ListNetworkSecurityGroupSecurityRulesSortByEnum string + +// Set of constants representing the allowable values for ListNetworkSecurityGroupSecurityRulesSortByEnum +const ( + ListNetworkSecurityGroupSecurityRulesSortByTimecreated ListNetworkSecurityGroupSecurityRulesSortByEnum = "TIMECREATED" +) + +var mappingListNetworkSecurityGroupSecurityRulesSortByEnum = map[string]ListNetworkSecurityGroupSecurityRulesSortByEnum{ + "TIMECREATED": ListNetworkSecurityGroupSecurityRulesSortByTimecreated, +} + +var mappingListNetworkSecurityGroupSecurityRulesSortByEnumLowerCase = map[string]ListNetworkSecurityGroupSecurityRulesSortByEnum{ + "timecreated": ListNetworkSecurityGroupSecurityRulesSortByTimecreated, +} + +// GetListNetworkSecurityGroupSecurityRulesSortByEnumValues Enumerates the set of values for ListNetworkSecurityGroupSecurityRulesSortByEnum +func GetListNetworkSecurityGroupSecurityRulesSortByEnumValues() []ListNetworkSecurityGroupSecurityRulesSortByEnum { + values := make([]ListNetworkSecurityGroupSecurityRulesSortByEnum, 0) + for _, v := range mappingListNetworkSecurityGroupSecurityRulesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListNetworkSecurityGroupSecurityRulesSortByEnumStringValues Enumerates the set of values in String for ListNetworkSecurityGroupSecurityRulesSortByEnum +func GetListNetworkSecurityGroupSecurityRulesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + } +} + +// GetMappingListNetworkSecurityGroupSecurityRulesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListNetworkSecurityGroupSecurityRulesSortByEnum(val string) (ListNetworkSecurityGroupSecurityRulesSortByEnum, bool) { + enum, ok := mappingListNetworkSecurityGroupSecurityRulesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListNetworkSecurityGroupSecurityRulesSortOrderEnum Enum with underlying type: string +type ListNetworkSecurityGroupSecurityRulesSortOrderEnum string + +// Set of constants representing the allowable values for ListNetworkSecurityGroupSecurityRulesSortOrderEnum +const ( + ListNetworkSecurityGroupSecurityRulesSortOrderAsc ListNetworkSecurityGroupSecurityRulesSortOrderEnum = "ASC" + ListNetworkSecurityGroupSecurityRulesSortOrderDesc ListNetworkSecurityGroupSecurityRulesSortOrderEnum = "DESC" +) + +var mappingListNetworkSecurityGroupSecurityRulesSortOrderEnum = map[string]ListNetworkSecurityGroupSecurityRulesSortOrderEnum{ + "ASC": ListNetworkSecurityGroupSecurityRulesSortOrderAsc, + "DESC": ListNetworkSecurityGroupSecurityRulesSortOrderDesc, +} + +var mappingListNetworkSecurityGroupSecurityRulesSortOrderEnumLowerCase = map[string]ListNetworkSecurityGroupSecurityRulesSortOrderEnum{ + "asc": ListNetworkSecurityGroupSecurityRulesSortOrderAsc, + "desc": ListNetworkSecurityGroupSecurityRulesSortOrderDesc, +} + +// GetListNetworkSecurityGroupSecurityRulesSortOrderEnumValues Enumerates the set of values for ListNetworkSecurityGroupSecurityRulesSortOrderEnum +func GetListNetworkSecurityGroupSecurityRulesSortOrderEnumValues() []ListNetworkSecurityGroupSecurityRulesSortOrderEnum { + values := make([]ListNetworkSecurityGroupSecurityRulesSortOrderEnum, 0) + for _, v := range mappingListNetworkSecurityGroupSecurityRulesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListNetworkSecurityGroupSecurityRulesSortOrderEnumStringValues Enumerates the set of values in String for ListNetworkSecurityGroupSecurityRulesSortOrderEnum +func GetListNetworkSecurityGroupSecurityRulesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListNetworkSecurityGroupSecurityRulesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListNetworkSecurityGroupSecurityRulesSortOrderEnum(val string) (ListNetworkSecurityGroupSecurityRulesSortOrderEnum, bool) { + enum, ok := mappingListNetworkSecurityGroupSecurityRulesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_network_security_group_vnics_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_network_security_group_vnics_request_response.go new file mode 100644 index 000000000..e7c003c05 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_network_security_group_vnics_request_response.go @@ -0,0 +1,200 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListNetworkSecurityGroupVnicsRequest wrapper for the ListNetworkSecurityGroupVnics operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListNetworkSecurityGroupVnics.go.html to see an example of how to use ListNetworkSecurityGroupVnicsRequest. +type ListNetworkSecurityGroupVnicsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security group. + NetworkSecurityGroupId *string `mandatory:"true" contributesTo:"path" name:"networkSecurityGroupId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. + SortBy ListNetworkSecurityGroupVnicsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListNetworkSecurityGroupVnicsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListNetworkSecurityGroupVnicsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListNetworkSecurityGroupVnicsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListNetworkSecurityGroupVnicsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListNetworkSecurityGroupVnicsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListNetworkSecurityGroupVnicsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListNetworkSecurityGroupVnicsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListNetworkSecurityGroupVnicsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListNetworkSecurityGroupVnicsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListNetworkSecurityGroupVnicsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListNetworkSecurityGroupVnicsResponse wrapper for the ListNetworkSecurityGroupVnics operation +type ListNetworkSecurityGroupVnicsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []NetworkSecurityGroupVnic instances + Items []NetworkSecurityGroupVnic `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListNetworkSecurityGroupVnicsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListNetworkSecurityGroupVnicsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListNetworkSecurityGroupVnicsSortByEnum Enum with underlying type: string +type ListNetworkSecurityGroupVnicsSortByEnum string + +// Set of constants representing the allowable values for ListNetworkSecurityGroupVnicsSortByEnum +const ( + ListNetworkSecurityGroupVnicsSortByTimeassociated ListNetworkSecurityGroupVnicsSortByEnum = "TIMEASSOCIATED" +) + +var mappingListNetworkSecurityGroupVnicsSortByEnum = map[string]ListNetworkSecurityGroupVnicsSortByEnum{ + "TIMEASSOCIATED": ListNetworkSecurityGroupVnicsSortByTimeassociated, +} + +var mappingListNetworkSecurityGroupVnicsSortByEnumLowerCase = map[string]ListNetworkSecurityGroupVnicsSortByEnum{ + "timeassociated": ListNetworkSecurityGroupVnicsSortByTimeassociated, +} + +// GetListNetworkSecurityGroupVnicsSortByEnumValues Enumerates the set of values for ListNetworkSecurityGroupVnicsSortByEnum +func GetListNetworkSecurityGroupVnicsSortByEnumValues() []ListNetworkSecurityGroupVnicsSortByEnum { + values := make([]ListNetworkSecurityGroupVnicsSortByEnum, 0) + for _, v := range mappingListNetworkSecurityGroupVnicsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListNetworkSecurityGroupVnicsSortByEnumStringValues Enumerates the set of values in String for ListNetworkSecurityGroupVnicsSortByEnum +func GetListNetworkSecurityGroupVnicsSortByEnumStringValues() []string { + return []string{ + "TIMEASSOCIATED", + } +} + +// GetMappingListNetworkSecurityGroupVnicsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListNetworkSecurityGroupVnicsSortByEnum(val string) (ListNetworkSecurityGroupVnicsSortByEnum, bool) { + enum, ok := mappingListNetworkSecurityGroupVnicsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListNetworkSecurityGroupVnicsSortOrderEnum Enum with underlying type: string +type ListNetworkSecurityGroupVnicsSortOrderEnum string + +// Set of constants representing the allowable values for ListNetworkSecurityGroupVnicsSortOrderEnum +const ( + ListNetworkSecurityGroupVnicsSortOrderAsc ListNetworkSecurityGroupVnicsSortOrderEnum = "ASC" + ListNetworkSecurityGroupVnicsSortOrderDesc ListNetworkSecurityGroupVnicsSortOrderEnum = "DESC" +) + +var mappingListNetworkSecurityGroupVnicsSortOrderEnum = map[string]ListNetworkSecurityGroupVnicsSortOrderEnum{ + "ASC": ListNetworkSecurityGroupVnicsSortOrderAsc, + "DESC": ListNetworkSecurityGroupVnicsSortOrderDesc, +} + +var mappingListNetworkSecurityGroupVnicsSortOrderEnumLowerCase = map[string]ListNetworkSecurityGroupVnicsSortOrderEnum{ + "asc": ListNetworkSecurityGroupVnicsSortOrderAsc, + "desc": ListNetworkSecurityGroupVnicsSortOrderDesc, +} + +// GetListNetworkSecurityGroupVnicsSortOrderEnumValues Enumerates the set of values for ListNetworkSecurityGroupVnicsSortOrderEnum +func GetListNetworkSecurityGroupVnicsSortOrderEnumValues() []ListNetworkSecurityGroupVnicsSortOrderEnum { + values := make([]ListNetworkSecurityGroupVnicsSortOrderEnum, 0) + for _, v := range mappingListNetworkSecurityGroupVnicsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListNetworkSecurityGroupVnicsSortOrderEnumStringValues Enumerates the set of values in String for ListNetworkSecurityGroupVnicsSortOrderEnum +func GetListNetworkSecurityGroupVnicsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListNetworkSecurityGroupVnicsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListNetworkSecurityGroupVnicsSortOrderEnum(val string) (ListNetworkSecurityGroupVnicsSortOrderEnum, bool) { + enum, ok := mappingListNetworkSecurityGroupVnicsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_network_security_groups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_network_security_groups_request_response.go new file mode 100644 index 000000000..a58081354 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_network_security_groups_request_response.go @@ -0,0 +1,226 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListNetworkSecurityGroupsRequest wrapper for the ListNetworkSecurityGroups operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListNetworkSecurityGroups.go.html to see an example of how to use ListNetworkSecurityGroupsRequest. +type ListNetworkSecurityGroupsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VLAN. + VlanId *string `mandatory:"false" contributesTo:"query" name:"vlanId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"false" contributesTo:"query" name:"vcnId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListNetworkSecurityGroupsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListNetworkSecurityGroupsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to return only resources that match the specified lifecycle + // state. The value is case insensitive. + LifecycleState NetworkSecurityGroupLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListNetworkSecurityGroupsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListNetworkSecurityGroupsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListNetworkSecurityGroupsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListNetworkSecurityGroupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListNetworkSecurityGroupsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListNetworkSecurityGroupsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListNetworkSecurityGroupsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListNetworkSecurityGroupsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListNetworkSecurityGroupsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingNetworkSecurityGroupLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetNetworkSecurityGroupLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListNetworkSecurityGroupsResponse wrapper for the ListNetworkSecurityGroups operation +type ListNetworkSecurityGroupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []NetworkSecurityGroup instances + Items []NetworkSecurityGroup `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListNetworkSecurityGroupsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListNetworkSecurityGroupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListNetworkSecurityGroupsSortByEnum Enum with underlying type: string +type ListNetworkSecurityGroupsSortByEnum string + +// Set of constants representing the allowable values for ListNetworkSecurityGroupsSortByEnum +const ( + ListNetworkSecurityGroupsSortByTimecreated ListNetworkSecurityGroupsSortByEnum = "TIMECREATED" + ListNetworkSecurityGroupsSortByDisplayname ListNetworkSecurityGroupsSortByEnum = "DISPLAYNAME" +) + +var mappingListNetworkSecurityGroupsSortByEnum = map[string]ListNetworkSecurityGroupsSortByEnum{ + "TIMECREATED": ListNetworkSecurityGroupsSortByTimecreated, + "DISPLAYNAME": ListNetworkSecurityGroupsSortByDisplayname, +} + +var mappingListNetworkSecurityGroupsSortByEnumLowerCase = map[string]ListNetworkSecurityGroupsSortByEnum{ + "timecreated": ListNetworkSecurityGroupsSortByTimecreated, + "displayname": ListNetworkSecurityGroupsSortByDisplayname, +} + +// GetListNetworkSecurityGroupsSortByEnumValues Enumerates the set of values for ListNetworkSecurityGroupsSortByEnum +func GetListNetworkSecurityGroupsSortByEnumValues() []ListNetworkSecurityGroupsSortByEnum { + values := make([]ListNetworkSecurityGroupsSortByEnum, 0) + for _, v := range mappingListNetworkSecurityGroupsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListNetworkSecurityGroupsSortByEnumStringValues Enumerates the set of values in String for ListNetworkSecurityGroupsSortByEnum +func GetListNetworkSecurityGroupsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListNetworkSecurityGroupsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListNetworkSecurityGroupsSortByEnum(val string) (ListNetworkSecurityGroupsSortByEnum, bool) { + enum, ok := mappingListNetworkSecurityGroupsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListNetworkSecurityGroupsSortOrderEnum Enum with underlying type: string +type ListNetworkSecurityGroupsSortOrderEnum string + +// Set of constants representing the allowable values for ListNetworkSecurityGroupsSortOrderEnum +const ( + ListNetworkSecurityGroupsSortOrderAsc ListNetworkSecurityGroupsSortOrderEnum = "ASC" + ListNetworkSecurityGroupsSortOrderDesc ListNetworkSecurityGroupsSortOrderEnum = "DESC" +) + +var mappingListNetworkSecurityGroupsSortOrderEnum = map[string]ListNetworkSecurityGroupsSortOrderEnum{ + "ASC": ListNetworkSecurityGroupsSortOrderAsc, + "DESC": ListNetworkSecurityGroupsSortOrderDesc, +} + +var mappingListNetworkSecurityGroupsSortOrderEnumLowerCase = map[string]ListNetworkSecurityGroupsSortOrderEnum{ + "asc": ListNetworkSecurityGroupsSortOrderAsc, + "desc": ListNetworkSecurityGroupsSortOrderDesc, +} + +// GetListNetworkSecurityGroupsSortOrderEnumValues Enumerates the set of values for ListNetworkSecurityGroupsSortOrderEnum +func GetListNetworkSecurityGroupsSortOrderEnumValues() []ListNetworkSecurityGroupsSortOrderEnum { + values := make([]ListNetworkSecurityGroupsSortOrderEnum, 0) + for _, v := range mappingListNetworkSecurityGroupsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListNetworkSecurityGroupsSortOrderEnumStringValues Enumerates the set of values in String for ListNetworkSecurityGroupsSortOrderEnum +func GetListNetworkSecurityGroupsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListNetworkSecurityGroupsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListNetworkSecurityGroupsSortOrderEnum(val string) (ListNetworkSecurityGroupsSortOrderEnum, bool) { + enum, ok := mappingListNetworkSecurityGroupsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_private_ips_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_private_ips_request_response.go new file mode 100644 index 000000000..1e27e67da --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_private_ips_request_response.go @@ -0,0 +1,126 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPrivateIpsRequest wrapper for the ListPrivateIps operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListPrivateIps.go.html to see an example of how to use ListPrivateIpsRequest. +type ListPrivateIpsRequest struct { + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // An IP address. This could be either IPv4 or IPv6, depending on the resource. + // Example: `10.0.3.3` + IpAddress *string `mandatory:"false" contributesTo:"query" name:"ipAddress"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"false" contributesTo:"query" name:"subnetId"` + + // The OCID of the VNIC. + VnicId *string `mandatory:"false" contributesTo:"query" name:"vnicId"` + + // State of the IP address. If an IP address is assigned to a VNIC it is ASSIGNED otherwise AVAILABLE + IpState *string `mandatory:"false" contributesTo:"query" name:"ipState"` + + // Lifetime of the IP address. + // There are two types of IPs: + // - Ephemeral + // - Reserved + Lifetime *string `mandatory:"false" contributesTo:"query" name:"lifetime"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VLAN. + VlanId *string `mandatory:"false" contributesTo:"query" name:"vlanId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPrivateIpsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPrivateIpsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPrivateIpsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPrivateIpsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPrivateIpsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPrivateIpsResponse wrapper for the ListPrivateIps operation +type ListPrivateIpsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []PrivateIp instances + Items []PrivateIp `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListPrivateIpsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPrivateIpsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_public_ip_pools_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_public_ip_pools_request_response.go new file mode 100644 index 000000000..f1dae8d0d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_public_ip_pools_request_response.go @@ -0,0 +1,216 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPublicIpPoolsRequest wrapper for the ListPublicIpPools operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListPublicIpPools.go.html to see an example of how to use ListPublicIpPoolsRequest. +type ListPublicIpPoolsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // A filter to return only resources that match the given BYOIP CIDR block. + ByoipRangeId *string `mandatory:"false" contributesTo:"query" name:"byoipRangeId"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListPublicIpPoolsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListPublicIpPoolsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPublicIpPoolsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPublicIpPoolsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPublicIpPoolsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPublicIpPoolsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPublicIpPoolsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListPublicIpPoolsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListPublicIpPoolsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListPublicIpPoolsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListPublicIpPoolsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPublicIpPoolsResponse wrapper for the ListPublicIpPools operation +type ListPublicIpPoolsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PublicIpPoolCollection instances + PublicIpPoolCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListPublicIpPoolsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPublicIpPoolsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPublicIpPoolsSortByEnum Enum with underlying type: string +type ListPublicIpPoolsSortByEnum string + +// Set of constants representing the allowable values for ListPublicIpPoolsSortByEnum +const ( + ListPublicIpPoolsSortByTimecreated ListPublicIpPoolsSortByEnum = "TIMECREATED" + ListPublicIpPoolsSortByDisplayname ListPublicIpPoolsSortByEnum = "DISPLAYNAME" +) + +var mappingListPublicIpPoolsSortByEnum = map[string]ListPublicIpPoolsSortByEnum{ + "TIMECREATED": ListPublicIpPoolsSortByTimecreated, + "DISPLAYNAME": ListPublicIpPoolsSortByDisplayname, +} + +var mappingListPublicIpPoolsSortByEnumLowerCase = map[string]ListPublicIpPoolsSortByEnum{ + "timecreated": ListPublicIpPoolsSortByTimecreated, + "displayname": ListPublicIpPoolsSortByDisplayname, +} + +// GetListPublicIpPoolsSortByEnumValues Enumerates the set of values for ListPublicIpPoolsSortByEnum +func GetListPublicIpPoolsSortByEnumValues() []ListPublicIpPoolsSortByEnum { + values := make([]ListPublicIpPoolsSortByEnum, 0) + for _, v := range mappingListPublicIpPoolsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPublicIpPoolsSortByEnumStringValues Enumerates the set of values in String for ListPublicIpPoolsSortByEnum +func GetListPublicIpPoolsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListPublicIpPoolsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPublicIpPoolsSortByEnum(val string) (ListPublicIpPoolsSortByEnum, bool) { + enum, ok := mappingListPublicIpPoolsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPublicIpPoolsSortOrderEnum Enum with underlying type: string +type ListPublicIpPoolsSortOrderEnum string + +// Set of constants representing the allowable values for ListPublicIpPoolsSortOrderEnum +const ( + ListPublicIpPoolsSortOrderAsc ListPublicIpPoolsSortOrderEnum = "ASC" + ListPublicIpPoolsSortOrderDesc ListPublicIpPoolsSortOrderEnum = "DESC" +) + +var mappingListPublicIpPoolsSortOrderEnum = map[string]ListPublicIpPoolsSortOrderEnum{ + "ASC": ListPublicIpPoolsSortOrderAsc, + "DESC": ListPublicIpPoolsSortOrderDesc, +} + +var mappingListPublicIpPoolsSortOrderEnumLowerCase = map[string]ListPublicIpPoolsSortOrderEnum{ + "asc": ListPublicIpPoolsSortOrderAsc, + "desc": ListPublicIpPoolsSortOrderDesc, +} + +// GetListPublicIpPoolsSortOrderEnumValues Enumerates the set of values for ListPublicIpPoolsSortOrderEnum +func GetListPublicIpPoolsSortOrderEnumValues() []ListPublicIpPoolsSortOrderEnum { + values := make([]ListPublicIpPoolsSortOrderEnum, 0) + for _, v := range mappingListPublicIpPoolsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPublicIpPoolsSortOrderEnumStringValues Enumerates the set of values in String for ListPublicIpPoolsSortOrderEnum +func GetListPublicIpPoolsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPublicIpPoolsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPublicIpPoolsSortOrderEnum(val string) (ListPublicIpPoolsSortOrderEnum, bool) { + enum, ok := mappingListPublicIpPoolsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_public_ips_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_public_ips_request_response.go new file mode 100644 index 000000000..f23e1942b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_public_ips_request_response.go @@ -0,0 +1,217 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPublicIpsRequest wrapper for the ListPublicIps operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListPublicIps.go.html to see an example of how to use ListPublicIpsRequest. +type ListPublicIpsRequest struct { + + // Whether the public IP is regional or specific to a particular availability domain. + // * `REGION`: The public IP exists within a region and is assigned to a regional entity + // (such as a NatGateway), or can be assigned to a private IP + // in any availability domain in the region. Reserved public IPs have `scope` = `REGION`, as do + // ephemeral public IPs assigned to a regional entity. + // * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the entity + // it's assigned to, which is specified by the `availabilityDomain` property of the public IP object. + // Ephemeral public IPs that are assigned to private IPs have `scope` = `AVAILABILITY_DOMAIN`. + Scope ListPublicIpsScopeEnum `mandatory:"true" contributesTo:"query" name:"scope" omitEmpty:"true"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // A filter to return only public IPs that match given lifetime. + Lifetime ListPublicIpsLifetimeEnum `mandatory:"false" contributesTo:"query" name:"lifetime" omitEmpty:"true"` + + // A filter to return only resources that belong to the given public IP pool. + PublicIpPoolId *string `mandatory:"false" contributesTo:"query" name:"publicIpPoolId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPublicIpsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPublicIpsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPublicIpsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPublicIpsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPublicIpsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListPublicIpsScopeEnum(string(request.Scope)); !ok && request.Scope != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Scope: %s. Supported values are: %s.", request.Scope, strings.Join(GetListPublicIpsScopeEnumStringValues(), ","))) + } + if _, ok := GetMappingListPublicIpsLifetimeEnum(string(request.Lifetime)); !ok && request.Lifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Lifetime: %s. Supported values are: %s.", request.Lifetime, strings.Join(GetListPublicIpsLifetimeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPublicIpsResponse wrapper for the ListPublicIps operation +type ListPublicIpsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []PublicIp instances + Items []PublicIp `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListPublicIpsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPublicIpsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPublicIpsScopeEnum Enum with underlying type: string +type ListPublicIpsScopeEnum string + +// Set of constants representing the allowable values for ListPublicIpsScopeEnum +const ( + ListPublicIpsScopeRegion ListPublicIpsScopeEnum = "REGION" + ListPublicIpsScopeAvailabilityDomain ListPublicIpsScopeEnum = "AVAILABILITY_DOMAIN" +) + +var mappingListPublicIpsScopeEnum = map[string]ListPublicIpsScopeEnum{ + "REGION": ListPublicIpsScopeRegion, + "AVAILABILITY_DOMAIN": ListPublicIpsScopeAvailabilityDomain, +} + +var mappingListPublicIpsScopeEnumLowerCase = map[string]ListPublicIpsScopeEnum{ + "region": ListPublicIpsScopeRegion, + "availability_domain": ListPublicIpsScopeAvailabilityDomain, +} + +// GetListPublicIpsScopeEnumValues Enumerates the set of values for ListPublicIpsScopeEnum +func GetListPublicIpsScopeEnumValues() []ListPublicIpsScopeEnum { + values := make([]ListPublicIpsScopeEnum, 0) + for _, v := range mappingListPublicIpsScopeEnum { + values = append(values, v) + } + return values +} + +// GetListPublicIpsScopeEnumStringValues Enumerates the set of values in String for ListPublicIpsScopeEnum +func GetListPublicIpsScopeEnumStringValues() []string { + return []string{ + "REGION", + "AVAILABILITY_DOMAIN", + } +} + +// GetMappingListPublicIpsScopeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPublicIpsScopeEnum(val string) (ListPublicIpsScopeEnum, bool) { + enum, ok := mappingListPublicIpsScopeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPublicIpsLifetimeEnum Enum with underlying type: string +type ListPublicIpsLifetimeEnum string + +// Set of constants representing the allowable values for ListPublicIpsLifetimeEnum +const ( + ListPublicIpsLifetimeEphemeral ListPublicIpsLifetimeEnum = "EPHEMERAL" + ListPublicIpsLifetimeReserved ListPublicIpsLifetimeEnum = "RESERVED" +) + +var mappingListPublicIpsLifetimeEnum = map[string]ListPublicIpsLifetimeEnum{ + "EPHEMERAL": ListPublicIpsLifetimeEphemeral, + "RESERVED": ListPublicIpsLifetimeReserved, +} + +var mappingListPublicIpsLifetimeEnumLowerCase = map[string]ListPublicIpsLifetimeEnum{ + "ephemeral": ListPublicIpsLifetimeEphemeral, + "reserved": ListPublicIpsLifetimeReserved, +} + +// GetListPublicIpsLifetimeEnumValues Enumerates the set of values for ListPublicIpsLifetimeEnum +func GetListPublicIpsLifetimeEnumValues() []ListPublicIpsLifetimeEnum { + values := make([]ListPublicIpsLifetimeEnum, 0) + for _, v := range mappingListPublicIpsLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetListPublicIpsLifetimeEnumStringValues Enumerates the set of values in String for ListPublicIpsLifetimeEnum +func GetListPublicIpsLifetimeEnumStringValues() []string { + return []string{ + "EPHEMERAL", + "RESERVED", + } +} + +// GetMappingListPublicIpsLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPublicIpsLifetimeEnum(val string) (ListPublicIpsLifetimeEnum, bool) { + enum, ok := mappingListPublicIpsLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_remote_peering_connections_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_remote_peering_connections_request_response.go new file mode 100644 index 000000000..85338d004 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_remote_peering_connections_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListRemotePeeringConnectionsRequest wrapper for the ListRemotePeeringConnections operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListRemotePeeringConnections.go.html to see an example of how to use ListRemotePeeringConnectionsRequest. +type ListRemotePeeringConnectionsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"false" contributesTo:"query" name:"drgId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListRemotePeeringConnectionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListRemotePeeringConnectionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListRemotePeeringConnectionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListRemotePeeringConnectionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListRemotePeeringConnectionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListRemotePeeringConnectionsResponse wrapper for the ListRemotePeeringConnections operation +type ListRemotePeeringConnectionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []RemotePeeringConnection instances + Items []RemotePeeringConnection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListRemotePeeringConnectionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListRemotePeeringConnectionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_route_tables_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_route_tables_request_response.go new file mode 100644 index 000000000..113331ad3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_route_tables_request_response.go @@ -0,0 +1,223 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListRouteTablesRequest wrapper for the ListRouteTables operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListRouteTables.go.html to see an example of how to use ListRouteTablesRequest. +type ListRouteTablesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"false" contributesTo:"query" name:"vcnId"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListRouteTablesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListRouteTablesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle + // state. The state value is case-insensitive. + LifecycleState RouteTableLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListRouteTablesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListRouteTablesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListRouteTablesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListRouteTablesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListRouteTablesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListRouteTablesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListRouteTablesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListRouteTablesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListRouteTablesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingRouteTableLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetRouteTableLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListRouteTablesResponse wrapper for the ListRouteTables operation +type ListRouteTablesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []RouteTable instances + Items []RouteTable `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListRouteTablesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListRouteTablesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListRouteTablesSortByEnum Enum with underlying type: string +type ListRouteTablesSortByEnum string + +// Set of constants representing the allowable values for ListRouteTablesSortByEnum +const ( + ListRouteTablesSortByTimecreated ListRouteTablesSortByEnum = "TIMECREATED" + ListRouteTablesSortByDisplayname ListRouteTablesSortByEnum = "DISPLAYNAME" +) + +var mappingListRouteTablesSortByEnum = map[string]ListRouteTablesSortByEnum{ + "TIMECREATED": ListRouteTablesSortByTimecreated, + "DISPLAYNAME": ListRouteTablesSortByDisplayname, +} + +var mappingListRouteTablesSortByEnumLowerCase = map[string]ListRouteTablesSortByEnum{ + "timecreated": ListRouteTablesSortByTimecreated, + "displayname": ListRouteTablesSortByDisplayname, +} + +// GetListRouteTablesSortByEnumValues Enumerates the set of values for ListRouteTablesSortByEnum +func GetListRouteTablesSortByEnumValues() []ListRouteTablesSortByEnum { + values := make([]ListRouteTablesSortByEnum, 0) + for _, v := range mappingListRouteTablesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListRouteTablesSortByEnumStringValues Enumerates the set of values in String for ListRouteTablesSortByEnum +func GetListRouteTablesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListRouteTablesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRouteTablesSortByEnum(val string) (ListRouteTablesSortByEnum, bool) { + enum, ok := mappingListRouteTablesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListRouteTablesSortOrderEnum Enum with underlying type: string +type ListRouteTablesSortOrderEnum string + +// Set of constants representing the allowable values for ListRouteTablesSortOrderEnum +const ( + ListRouteTablesSortOrderAsc ListRouteTablesSortOrderEnum = "ASC" + ListRouteTablesSortOrderDesc ListRouteTablesSortOrderEnum = "DESC" +) + +var mappingListRouteTablesSortOrderEnum = map[string]ListRouteTablesSortOrderEnum{ + "ASC": ListRouteTablesSortOrderAsc, + "DESC": ListRouteTablesSortOrderDesc, +} + +var mappingListRouteTablesSortOrderEnumLowerCase = map[string]ListRouteTablesSortOrderEnum{ + "asc": ListRouteTablesSortOrderAsc, + "desc": ListRouteTablesSortOrderDesc, +} + +// GetListRouteTablesSortOrderEnumValues Enumerates the set of values for ListRouteTablesSortOrderEnum +func GetListRouteTablesSortOrderEnumValues() []ListRouteTablesSortOrderEnum { + values := make([]ListRouteTablesSortOrderEnum, 0) + for _, v := range mappingListRouteTablesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListRouteTablesSortOrderEnumStringValues Enumerates the set of values in String for ListRouteTablesSortOrderEnum +func GetListRouteTablesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListRouteTablesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRouteTablesSortOrderEnum(val string) (ListRouteTablesSortOrderEnum, bool) { + enum, ok := mappingListRouteTablesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_security_lists_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_security_lists_request_response.go new file mode 100644 index 000000000..4245e6de6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_security_lists_request_response.go @@ -0,0 +1,223 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListSecurityListsRequest wrapper for the ListSecurityLists operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListSecurityLists.go.html to see an example of how to use ListSecurityListsRequest. +type ListSecurityListsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"false" contributesTo:"query" name:"vcnId"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListSecurityListsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListSecurityListsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle + // state. The state value is case-insensitive. + LifecycleState SecurityListLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListSecurityListsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSecurityListsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListSecurityListsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSecurityListsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListSecurityListsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListSecurityListsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListSecurityListsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListSecurityListsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListSecurityListsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingSecurityListLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetSecurityListLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListSecurityListsResponse wrapper for the ListSecurityLists operation +type ListSecurityListsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []SecurityList instances + Items []SecurityList `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListSecurityListsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSecurityListsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSecurityListsSortByEnum Enum with underlying type: string +type ListSecurityListsSortByEnum string + +// Set of constants representing the allowable values for ListSecurityListsSortByEnum +const ( + ListSecurityListsSortByTimecreated ListSecurityListsSortByEnum = "TIMECREATED" + ListSecurityListsSortByDisplayname ListSecurityListsSortByEnum = "DISPLAYNAME" +) + +var mappingListSecurityListsSortByEnum = map[string]ListSecurityListsSortByEnum{ + "TIMECREATED": ListSecurityListsSortByTimecreated, + "DISPLAYNAME": ListSecurityListsSortByDisplayname, +} + +var mappingListSecurityListsSortByEnumLowerCase = map[string]ListSecurityListsSortByEnum{ + "timecreated": ListSecurityListsSortByTimecreated, + "displayname": ListSecurityListsSortByDisplayname, +} + +// GetListSecurityListsSortByEnumValues Enumerates the set of values for ListSecurityListsSortByEnum +func GetListSecurityListsSortByEnumValues() []ListSecurityListsSortByEnum { + values := make([]ListSecurityListsSortByEnum, 0) + for _, v := range mappingListSecurityListsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListSecurityListsSortByEnumStringValues Enumerates the set of values in String for ListSecurityListsSortByEnum +func GetListSecurityListsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListSecurityListsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSecurityListsSortByEnum(val string) (ListSecurityListsSortByEnum, bool) { + enum, ok := mappingListSecurityListsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSecurityListsSortOrderEnum Enum with underlying type: string +type ListSecurityListsSortOrderEnum string + +// Set of constants representing the allowable values for ListSecurityListsSortOrderEnum +const ( + ListSecurityListsSortOrderAsc ListSecurityListsSortOrderEnum = "ASC" + ListSecurityListsSortOrderDesc ListSecurityListsSortOrderEnum = "DESC" +) + +var mappingListSecurityListsSortOrderEnum = map[string]ListSecurityListsSortOrderEnum{ + "ASC": ListSecurityListsSortOrderAsc, + "DESC": ListSecurityListsSortOrderDesc, +} + +var mappingListSecurityListsSortOrderEnumLowerCase = map[string]ListSecurityListsSortOrderEnum{ + "asc": ListSecurityListsSortOrderAsc, + "desc": ListSecurityListsSortOrderDesc, +} + +// GetListSecurityListsSortOrderEnumValues Enumerates the set of values for ListSecurityListsSortOrderEnum +func GetListSecurityListsSortOrderEnumValues() []ListSecurityListsSortOrderEnum { + values := make([]ListSecurityListsSortOrderEnum, 0) + for _, v := range mappingListSecurityListsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListSecurityListsSortOrderEnumStringValues Enumerates the set of values in String for ListSecurityListsSortOrderEnum +func GetListSecurityListsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListSecurityListsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSecurityListsSortOrderEnum(val string) (ListSecurityListsSortOrderEnum, bool) { + enum, ok := mappingListSecurityListsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_service_gateways_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_service_gateways_request_response.go new file mode 100644 index 000000000..fb5d2856f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_service_gateways_request_response.go @@ -0,0 +1,220 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListServiceGatewaysRequest wrapper for the ListServiceGateways operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListServiceGateways.go.html to see an example of how to use ListServiceGatewaysRequest. +type ListServiceGatewaysRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"false" contributesTo:"query" name:"vcnId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListServiceGatewaysSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListServiceGatewaysSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to return only resources that match the given lifecycle + // state. The state value is case-insensitive. + LifecycleState ServiceGatewayLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListServiceGatewaysRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListServiceGatewaysRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListServiceGatewaysRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListServiceGatewaysRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListServiceGatewaysRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListServiceGatewaysSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListServiceGatewaysSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListServiceGatewaysSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListServiceGatewaysSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingServiceGatewayLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetServiceGatewayLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListServiceGatewaysResponse wrapper for the ListServiceGateways operation +type ListServiceGatewaysResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ServiceGateway instances + Items []ServiceGateway `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListServiceGatewaysResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListServiceGatewaysResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListServiceGatewaysSortByEnum Enum with underlying type: string +type ListServiceGatewaysSortByEnum string + +// Set of constants representing the allowable values for ListServiceGatewaysSortByEnum +const ( + ListServiceGatewaysSortByTimecreated ListServiceGatewaysSortByEnum = "TIMECREATED" + ListServiceGatewaysSortByDisplayname ListServiceGatewaysSortByEnum = "DISPLAYNAME" +) + +var mappingListServiceGatewaysSortByEnum = map[string]ListServiceGatewaysSortByEnum{ + "TIMECREATED": ListServiceGatewaysSortByTimecreated, + "DISPLAYNAME": ListServiceGatewaysSortByDisplayname, +} + +var mappingListServiceGatewaysSortByEnumLowerCase = map[string]ListServiceGatewaysSortByEnum{ + "timecreated": ListServiceGatewaysSortByTimecreated, + "displayname": ListServiceGatewaysSortByDisplayname, +} + +// GetListServiceGatewaysSortByEnumValues Enumerates the set of values for ListServiceGatewaysSortByEnum +func GetListServiceGatewaysSortByEnumValues() []ListServiceGatewaysSortByEnum { + values := make([]ListServiceGatewaysSortByEnum, 0) + for _, v := range mappingListServiceGatewaysSortByEnum { + values = append(values, v) + } + return values +} + +// GetListServiceGatewaysSortByEnumStringValues Enumerates the set of values in String for ListServiceGatewaysSortByEnum +func GetListServiceGatewaysSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListServiceGatewaysSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListServiceGatewaysSortByEnum(val string) (ListServiceGatewaysSortByEnum, bool) { + enum, ok := mappingListServiceGatewaysSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListServiceGatewaysSortOrderEnum Enum with underlying type: string +type ListServiceGatewaysSortOrderEnum string + +// Set of constants representing the allowable values for ListServiceGatewaysSortOrderEnum +const ( + ListServiceGatewaysSortOrderAsc ListServiceGatewaysSortOrderEnum = "ASC" + ListServiceGatewaysSortOrderDesc ListServiceGatewaysSortOrderEnum = "DESC" +) + +var mappingListServiceGatewaysSortOrderEnum = map[string]ListServiceGatewaysSortOrderEnum{ + "ASC": ListServiceGatewaysSortOrderAsc, + "DESC": ListServiceGatewaysSortOrderDesc, +} + +var mappingListServiceGatewaysSortOrderEnumLowerCase = map[string]ListServiceGatewaysSortOrderEnum{ + "asc": ListServiceGatewaysSortOrderAsc, + "desc": ListServiceGatewaysSortOrderDesc, +} + +// GetListServiceGatewaysSortOrderEnumValues Enumerates the set of values for ListServiceGatewaysSortOrderEnum +func GetListServiceGatewaysSortOrderEnumValues() []ListServiceGatewaysSortOrderEnum { + values := make([]ListServiceGatewaysSortOrderEnum, 0) + for _, v := range mappingListServiceGatewaysSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListServiceGatewaysSortOrderEnumStringValues Enumerates the set of values in String for ListServiceGatewaysSortOrderEnum +func GetListServiceGatewaysSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListServiceGatewaysSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListServiceGatewaysSortOrderEnum(val string) (ListServiceGatewaysSortOrderEnum, bool) { + enum, ok := mappingListServiceGatewaysSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_services_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_services_request_response.go new file mode 100644 index 000000000..c5af28864 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_services_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListServicesRequest wrapper for the ListServices operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListServices.go.html to see an example of how to use ListServicesRequest. +type ListServicesRequest struct { + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListServicesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListServicesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListServicesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListServicesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListServicesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListServicesResponse wrapper for the ListServices operation +type ListServicesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []Service instances + Items []Service `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListServicesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListServicesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_shapes_request_response.go new file mode 100644 index 000000000..f184b70c3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_shapes_request_response.go @@ -0,0 +1,117 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListShapesRequest wrapper for the ListShapes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListShapes.go.html to see an example of how to use ListShapesRequest. +type ListShapesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of an image. + ImageId *string `mandatory:"false" contributesTo:"query" name:"imageId"` + + // Shape name. + Shape *string `mandatory:"false" contributesTo:"query" name:"shape"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListShapesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListShapesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListShapesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListShapesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListShapesResponse wrapper for the ListShapes operation +type ListShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []Shape instances + Items []Shape `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListShapesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_subnets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_subnets_request_response.go new file mode 100644 index 000000000..d2dde77e4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_subnets_request_response.go @@ -0,0 +1,223 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListSubnetsRequest wrapper for the ListSubnets operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListSubnets.go.html to see an example of how to use ListSubnetsRequest. +type ListSubnetsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"false" contributesTo:"query" name:"vcnId"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListSubnetsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListSubnetsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle + // state. The state value is case-insensitive. + LifecycleState SubnetLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListSubnetsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSubnetsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListSubnetsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSubnetsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListSubnetsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListSubnetsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListSubnetsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListSubnetsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListSubnetsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingSubnetLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetSubnetLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListSubnetsResponse wrapper for the ListSubnets operation +type ListSubnetsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []Subnet instances + Items []Subnet `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListSubnetsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSubnetsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSubnetsSortByEnum Enum with underlying type: string +type ListSubnetsSortByEnum string + +// Set of constants representing the allowable values for ListSubnetsSortByEnum +const ( + ListSubnetsSortByTimecreated ListSubnetsSortByEnum = "TIMECREATED" + ListSubnetsSortByDisplayname ListSubnetsSortByEnum = "DISPLAYNAME" +) + +var mappingListSubnetsSortByEnum = map[string]ListSubnetsSortByEnum{ + "TIMECREATED": ListSubnetsSortByTimecreated, + "DISPLAYNAME": ListSubnetsSortByDisplayname, +} + +var mappingListSubnetsSortByEnumLowerCase = map[string]ListSubnetsSortByEnum{ + "timecreated": ListSubnetsSortByTimecreated, + "displayname": ListSubnetsSortByDisplayname, +} + +// GetListSubnetsSortByEnumValues Enumerates the set of values for ListSubnetsSortByEnum +func GetListSubnetsSortByEnumValues() []ListSubnetsSortByEnum { + values := make([]ListSubnetsSortByEnum, 0) + for _, v := range mappingListSubnetsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListSubnetsSortByEnumStringValues Enumerates the set of values in String for ListSubnetsSortByEnum +func GetListSubnetsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListSubnetsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSubnetsSortByEnum(val string) (ListSubnetsSortByEnum, bool) { + enum, ok := mappingListSubnetsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSubnetsSortOrderEnum Enum with underlying type: string +type ListSubnetsSortOrderEnum string + +// Set of constants representing the allowable values for ListSubnetsSortOrderEnum +const ( + ListSubnetsSortOrderAsc ListSubnetsSortOrderEnum = "ASC" + ListSubnetsSortOrderDesc ListSubnetsSortOrderEnum = "DESC" +) + +var mappingListSubnetsSortOrderEnum = map[string]ListSubnetsSortOrderEnum{ + "ASC": ListSubnetsSortOrderAsc, + "DESC": ListSubnetsSortOrderDesc, +} + +var mappingListSubnetsSortOrderEnumLowerCase = map[string]ListSubnetsSortOrderEnum{ + "asc": ListSubnetsSortOrderAsc, + "desc": ListSubnetsSortOrderDesc, +} + +// GetListSubnetsSortOrderEnumValues Enumerates the set of values for ListSubnetsSortOrderEnum +func GetListSubnetsSortOrderEnumValues() []ListSubnetsSortOrderEnum { + values := make([]ListSubnetsSortOrderEnum, 0) + for _, v := range mappingListSubnetsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListSubnetsSortOrderEnumStringValues Enumerates the set of values in String for ListSubnetsSortOrderEnum +func GetListSubnetsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListSubnetsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSubnetsSortOrderEnum(val string) (ListSubnetsSortOrderEnum, bool) { + enum, ok := mappingListSubnetsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_vcns_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_vcns_request_response.go new file mode 100644 index 000000000..1f458d85f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_vcns_request_response.go @@ -0,0 +1,220 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVcnsRequest wrapper for the ListVcns operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVcns.go.html to see an example of how to use ListVcnsRequest. +type ListVcnsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListVcnsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListVcnsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle + // state. The state value is case-insensitive. + LifecycleState VcnLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVcnsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVcnsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVcnsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVcnsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVcnsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListVcnsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListVcnsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListVcnsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListVcnsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingVcnLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetVcnLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVcnsResponse wrapper for the ListVcns operation +type ListVcnsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []Vcn instances + Items []Vcn `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVcnsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVcnsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListVcnsSortByEnum Enum with underlying type: string +type ListVcnsSortByEnum string + +// Set of constants representing the allowable values for ListVcnsSortByEnum +const ( + ListVcnsSortByTimecreated ListVcnsSortByEnum = "TIMECREATED" + ListVcnsSortByDisplayname ListVcnsSortByEnum = "DISPLAYNAME" +) + +var mappingListVcnsSortByEnum = map[string]ListVcnsSortByEnum{ + "TIMECREATED": ListVcnsSortByTimecreated, + "DISPLAYNAME": ListVcnsSortByDisplayname, +} + +var mappingListVcnsSortByEnumLowerCase = map[string]ListVcnsSortByEnum{ + "timecreated": ListVcnsSortByTimecreated, + "displayname": ListVcnsSortByDisplayname, +} + +// GetListVcnsSortByEnumValues Enumerates the set of values for ListVcnsSortByEnum +func GetListVcnsSortByEnumValues() []ListVcnsSortByEnum { + values := make([]ListVcnsSortByEnum, 0) + for _, v := range mappingListVcnsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListVcnsSortByEnumStringValues Enumerates the set of values in String for ListVcnsSortByEnum +func GetListVcnsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListVcnsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVcnsSortByEnum(val string) (ListVcnsSortByEnum, bool) { + enum, ok := mappingListVcnsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListVcnsSortOrderEnum Enum with underlying type: string +type ListVcnsSortOrderEnum string + +// Set of constants representing the allowable values for ListVcnsSortOrderEnum +const ( + ListVcnsSortOrderAsc ListVcnsSortOrderEnum = "ASC" + ListVcnsSortOrderDesc ListVcnsSortOrderEnum = "DESC" +) + +var mappingListVcnsSortOrderEnum = map[string]ListVcnsSortOrderEnum{ + "ASC": ListVcnsSortOrderAsc, + "DESC": ListVcnsSortOrderDesc, +} + +var mappingListVcnsSortOrderEnumLowerCase = map[string]ListVcnsSortOrderEnum{ + "asc": ListVcnsSortOrderAsc, + "desc": ListVcnsSortOrderDesc, +} + +// GetListVcnsSortOrderEnumValues Enumerates the set of values for ListVcnsSortOrderEnum +func GetListVcnsSortOrderEnumValues() []ListVcnsSortOrderEnum { + values := make([]ListVcnsSortOrderEnum, 0) + for _, v := range mappingListVcnsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListVcnsSortOrderEnumStringValues Enumerates the set of values in String for ListVcnsSortOrderEnum +func GetListVcnsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListVcnsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVcnsSortOrderEnum(val string) (ListVcnsSortOrderEnum, bool) { + enum, ok := mappingListVcnsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuit_associated_tunnels_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuit_associated_tunnels_request_response.go new file mode 100644 index 000000000..fe442de35 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuit_associated_tunnels_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVirtualCircuitAssociatedTunnelsRequest wrapper for the ListVirtualCircuitAssociatedTunnels operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuitAssociatedTunnels.go.html to see an example of how to use ListVirtualCircuitAssociatedTunnelsRequest. +type ListVirtualCircuitAssociatedTunnelsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit. + VirtualCircuitId *string `mandatory:"true" contributesTo:"path" name:"virtualCircuitId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVirtualCircuitAssociatedTunnelsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVirtualCircuitAssociatedTunnelsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVirtualCircuitAssociatedTunnelsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVirtualCircuitAssociatedTunnelsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVirtualCircuitAssociatedTunnelsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVirtualCircuitAssociatedTunnelsResponse wrapper for the ListVirtualCircuitAssociatedTunnels operation +type ListVirtualCircuitAssociatedTunnelsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VirtualCircuitAssociatedTunnelDetails instances + Items []VirtualCircuitAssociatedTunnelDetails `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListVirtualCircuitAssociatedTunnelsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVirtualCircuitAssociatedTunnelsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuit_bandwidth_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuit_bandwidth_shapes_request_response.go new file mode 100644 index 000000000..5d89e12eb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuit_bandwidth_shapes_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVirtualCircuitBandwidthShapesRequest wrapper for the ListVirtualCircuitBandwidthShapes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuitBandwidthShapes.go.html to see an example of how to use ListVirtualCircuitBandwidthShapesRequest. +type ListVirtualCircuitBandwidthShapesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVirtualCircuitBandwidthShapesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVirtualCircuitBandwidthShapesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVirtualCircuitBandwidthShapesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVirtualCircuitBandwidthShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVirtualCircuitBandwidthShapesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVirtualCircuitBandwidthShapesResponse wrapper for the ListVirtualCircuitBandwidthShapes operation +type ListVirtualCircuitBandwidthShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VirtualCircuitBandwidthShape instances + Items []VirtualCircuitBandwidthShape `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVirtualCircuitBandwidthShapesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVirtualCircuitBandwidthShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuit_public_prefixes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuit_public_prefixes_request_response.go new file mode 100644 index 000000000..ec24c8a01 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuit_public_prefixes_request_response.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVirtualCircuitPublicPrefixesRequest wrapper for the ListVirtualCircuitPublicPrefixes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuitPublicPrefixes.go.html to see an example of how to use ListVirtualCircuitPublicPrefixesRequest. +type ListVirtualCircuitPublicPrefixesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit. + VirtualCircuitId *string `mandatory:"true" contributesTo:"path" name:"virtualCircuitId"` + + // A filter to only return resources that match the given verification + // state. + // The state value is case-insensitive. + VerificationState VirtualCircuitPublicPrefixVerificationStateEnum `mandatory:"false" contributesTo:"query" name:"verificationState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVirtualCircuitPublicPrefixesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVirtualCircuitPublicPrefixesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVirtualCircuitPublicPrefixesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVirtualCircuitPublicPrefixesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVirtualCircuitPublicPrefixesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVirtualCircuitPublicPrefixVerificationStateEnum(string(request.VerificationState)); !ok && request.VerificationState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for VerificationState: %s. Supported values are: %s.", request.VerificationState, strings.Join(GetVirtualCircuitPublicPrefixVerificationStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVirtualCircuitPublicPrefixesResponse wrapper for the ListVirtualCircuitPublicPrefixes operation +type ListVirtualCircuitPublicPrefixesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []VirtualCircuitPublicPrefix instance + Items []VirtualCircuitPublicPrefix `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVirtualCircuitPublicPrefixesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVirtualCircuitPublicPrefixesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuits_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuits_request_response.go new file mode 100644 index 000000000..3aeef6bc3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_virtual_circuits_request_response.go @@ -0,0 +1,220 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVirtualCircuitsRequest wrapper for the ListVirtualCircuits operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuits.go.html to see an example of how to use ListVirtualCircuitsRequest. +type ListVirtualCircuitsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListVirtualCircuitsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListVirtualCircuitsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to return only resources that match the specified lifecycle + // state. The value is case insensitive. + LifecycleState VirtualCircuitLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVirtualCircuitsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVirtualCircuitsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVirtualCircuitsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVirtualCircuitsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVirtualCircuitsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListVirtualCircuitsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListVirtualCircuitsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListVirtualCircuitsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListVirtualCircuitsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingVirtualCircuitLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetVirtualCircuitLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVirtualCircuitsResponse wrapper for the ListVirtualCircuits operation +type ListVirtualCircuitsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VirtualCircuit instances + Items []VirtualCircuit `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVirtualCircuitsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVirtualCircuitsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListVirtualCircuitsSortByEnum Enum with underlying type: string +type ListVirtualCircuitsSortByEnum string + +// Set of constants representing the allowable values for ListVirtualCircuitsSortByEnum +const ( + ListVirtualCircuitsSortByTimecreated ListVirtualCircuitsSortByEnum = "TIMECREATED" + ListVirtualCircuitsSortByDisplayname ListVirtualCircuitsSortByEnum = "DISPLAYNAME" +) + +var mappingListVirtualCircuitsSortByEnum = map[string]ListVirtualCircuitsSortByEnum{ + "TIMECREATED": ListVirtualCircuitsSortByTimecreated, + "DISPLAYNAME": ListVirtualCircuitsSortByDisplayname, +} + +var mappingListVirtualCircuitsSortByEnumLowerCase = map[string]ListVirtualCircuitsSortByEnum{ + "timecreated": ListVirtualCircuitsSortByTimecreated, + "displayname": ListVirtualCircuitsSortByDisplayname, +} + +// GetListVirtualCircuitsSortByEnumValues Enumerates the set of values for ListVirtualCircuitsSortByEnum +func GetListVirtualCircuitsSortByEnumValues() []ListVirtualCircuitsSortByEnum { + values := make([]ListVirtualCircuitsSortByEnum, 0) + for _, v := range mappingListVirtualCircuitsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListVirtualCircuitsSortByEnumStringValues Enumerates the set of values in String for ListVirtualCircuitsSortByEnum +func GetListVirtualCircuitsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListVirtualCircuitsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVirtualCircuitsSortByEnum(val string) (ListVirtualCircuitsSortByEnum, bool) { + enum, ok := mappingListVirtualCircuitsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListVirtualCircuitsSortOrderEnum Enum with underlying type: string +type ListVirtualCircuitsSortOrderEnum string + +// Set of constants representing the allowable values for ListVirtualCircuitsSortOrderEnum +const ( + ListVirtualCircuitsSortOrderAsc ListVirtualCircuitsSortOrderEnum = "ASC" + ListVirtualCircuitsSortOrderDesc ListVirtualCircuitsSortOrderEnum = "DESC" +) + +var mappingListVirtualCircuitsSortOrderEnum = map[string]ListVirtualCircuitsSortOrderEnum{ + "ASC": ListVirtualCircuitsSortOrderAsc, + "DESC": ListVirtualCircuitsSortOrderDesc, +} + +var mappingListVirtualCircuitsSortOrderEnumLowerCase = map[string]ListVirtualCircuitsSortOrderEnum{ + "asc": ListVirtualCircuitsSortOrderAsc, + "desc": ListVirtualCircuitsSortOrderDesc, +} + +// GetListVirtualCircuitsSortOrderEnumValues Enumerates the set of values for ListVirtualCircuitsSortOrderEnum +func GetListVirtualCircuitsSortOrderEnumValues() []ListVirtualCircuitsSortOrderEnum { + values := make([]ListVirtualCircuitsSortOrderEnum, 0) + for _, v := range mappingListVirtualCircuitsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListVirtualCircuitsSortOrderEnumStringValues Enumerates the set of values in String for ListVirtualCircuitsSortOrderEnum +func GetListVirtualCircuitsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListVirtualCircuitsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVirtualCircuitsSortOrderEnum(val string) (ListVirtualCircuitsSortOrderEnum, bool) { + enum, ok := mappingListVirtualCircuitsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_vlans_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_vlans_request_response.go new file mode 100644 index 000000000..b9a5aefb9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_vlans_request_response.go @@ -0,0 +1,223 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVlansRequest wrapper for the ListVlans operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVlans.go.html to see an example of how to use ListVlansRequest. +type ListVlansRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"false" contributesTo:"query" name:"vcnId"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListVlansSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListVlansSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A filter to only return resources that match the given lifecycle + // state. The state value is case-insensitive. + LifecycleState VlanLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVlansRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVlansRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVlansRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVlansRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVlansRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListVlansSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListVlansSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListVlansSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListVlansSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingVlanLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetVlanLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVlansResponse wrapper for the ListVlans operation +type ListVlansResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []Vlan instances + Items []Vlan `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVlansResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVlansResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListVlansSortByEnum Enum with underlying type: string +type ListVlansSortByEnum string + +// Set of constants representing the allowable values for ListVlansSortByEnum +const ( + ListVlansSortByTimecreated ListVlansSortByEnum = "TIMECREATED" + ListVlansSortByDisplayname ListVlansSortByEnum = "DISPLAYNAME" +) + +var mappingListVlansSortByEnum = map[string]ListVlansSortByEnum{ + "TIMECREATED": ListVlansSortByTimecreated, + "DISPLAYNAME": ListVlansSortByDisplayname, +} + +var mappingListVlansSortByEnumLowerCase = map[string]ListVlansSortByEnum{ + "timecreated": ListVlansSortByTimecreated, + "displayname": ListVlansSortByDisplayname, +} + +// GetListVlansSortByEnumValues Enumerates the set of values for ListVlansSortByEnum +func GetListVlansSortByEnumValues() []ListVlansSortByEnum { + values := make([]ListVlansSortByEnum, 0) + for _, v := range mappingListVlansSortByEnum { + values = append(values, v) + } + return values +} + +// GetListVlansSortByEnumStringValues Enumerates the set of values in String for ListVlansSortByEnum +func GetListVlansSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListVlansSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVlansSortByEnum(val string) (ListVlansSortByEnum, bool) { + enum, ok := mappingListVlansSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListVlansSortOrderEnum Enum with underlying type: string +type ListVlansSortOrderEnum string + +// Set of constants representing the allowable values for ListVlansSortOrderEnum +const ( + ListVlansSortOrderAsc ListVlansSortOrderEnum = "ASC" + ListVlansSortOrderDesc ListVlansSortOrderEnum = "DESC" +) + +var mappingListVlansSortOrderEnum = map[string]ListVlansSortOrderEnum{ + "ASC": ListVlansSortOrderAsc, + "DESC": ListVlansSortOrderDesc, +} + +var mappingListVlansSortOrderEnumLowerCase = map[string]ListVlansSortOrderEnum{ + "asc": ListVlansSortOrderAsc, + "desc": ListVlansSortOrderDesc, +} + +// GetListVlansSortOrderEnumValues Enumerates the set of values for ListVlansSortOrderEnum +func GetListVlansSortOrderEnumValues() []ListVlansSortOrderEnum { + values := make([]ListVlansSortOrderEnum, 0) + for _, v := range mappingListVlansSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListVlansSortOrderEnumStringValues Enumerates the set of values in String for ListVlansSortOrderEnum +func GetListVlansSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListVlansSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVlansSortOrderEnum(val string) (ListVlansSortOrderEnum, bool) { + enum, ok := mappingListVlansSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_vnic_attachments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_vnic_attachments_request_response.go new file mode 100644 index 000000000..7bffa882c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_vnic_attachments_request_response.go @@ -0,0 +1,117 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVnicAttachmentsRequest wrapper for the ListVnicAttachments operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVnicAttachments.go.html to see an example of how to use ListVnicAttachmentsRequest. +type ListVnicAttachmentsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The OCID of the instance. + InstanceId *string `mandatory:"false" contributesTo:"query" name:"instanceId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID of the VNIC. + VnicId *string `mandatory:"false" contributesTo:"query" name:"vnicId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVnicAttachmentsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVnicAttachmentsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVnicAttachmentsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVnicAttachmentsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVnicAttachmentsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVnicAttachmentsResponse wrapper for the ListVnicAttachments operation +type ListVnicAttachmentsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VnicAttachment instances + Items []VnicAttachment `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVnicAttachmentsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVnicAttachmentsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_attachments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_attachments_request_response.go new file mode 100644 index 000000000..64f82e226 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_attachments_request_response.go @@ -0,0 +1,117 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVolumeAttachmentsRequest wrapper for the ListVolumeAttachments operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeAttachments.go.html to see an example of how to use ListVolumeAttachmentsRequest. +type ListVolumeAttachmentsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID of the instance. + InstanceId *string `mandatory:"false" contributesTo:"query" name:"instanceId"` + + // The OCID of the volume. + VolumeId *string `mandatory:"false" contributesTo:"query" name:"volumeId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVolumeAttachmentsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVolumeAttachmentsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVolumeAttachmentsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVolumeAttachmentsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVolumeAttachmentsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVolumeAttachmentsResponse wrapper for the ListVolumeAttachments operation +type ListVolumeAttachmentsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VolumeAttachment instances + Items []VolumeAttachment `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVolumeAttachmentsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVolumeAttachmentsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_backup_policies_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_backup_policies_request_response.go new file mode 100644 index 000000000..5ac6f87ff --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_backup_policies_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVolumeBackupPoliciesRequest wrapper for the ListVolumeBackupPolicies operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeBackupPolicies.go.html to see an example of how to use ListVolumeBackupPoliciesRequest. +type ListVolumeBackupPoliciesRequest struct { + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID of the compartment. + // If no compartment is specified, the Oracle defined backup policies are listed. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVolumeBackupPoliciesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVolumeBackupPoliciesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVolumeBackupPoliciesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVolumeBackupPoliciesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVolumeBackupPoliciesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVolumeBackupPoliciesResponse wrapper for the ListVolumeBackupPolicies operation +type ListVolumeBackupPoliciesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VolumeBackupPolicy instances + Items []VolumeBackupPolicy `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVolumeBackupPoliciesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVolumeBackupPoliciesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_backups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_backups_request_response.go new file mode 100644 index 000000000..8b9010d90 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_backups_request_response.go @@ -0,0 +1,226 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVolumeBackupsRequest wrapper for the ListVolumeBackups operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeBackups.go.html to see an example of how to use ListVolumeBackupsRequest. +type ListVolumeBackupsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the volume. + VolumeId *string `mandatory:"false" contributesTo:"query" name:"volumeId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // A filter to return only resources that originated from the given source volume backup. + SourceVolumeBackupId *string `mandatory:"false" contributesTo:"query" name:"sourceVolumeBackupId"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListVolumeBackupsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListVolumeBackupsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle state. The state + // value is case-insensitive. + LifecycleState VolumeBackupLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVolumeBackupsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVolumeBackupsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVolumeBackupsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVolumeBackupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVolumeBackupsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListVolumeBackupsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListVolumeBackupsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListVolumeBackupsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListVolumeBackupsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingVolumeBackupLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetVolumeBackupLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVolumeBackupsResponse wrapper for the ListVolumeBackups operation +type ListVolumeBackupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VolumeBackup instances + Items []VolumeBackup `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVolumeBackupsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVolumeBackupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListVolumeBackupsSortByEnum Enum with underlying type: string +type ListVolumeBackupsSortByEnum string + +// Set of constants representing the allowable values for ListVolumeBackupsSortByEnum +const ( + ListVolumeBackupsSortByTimecreated ListVolumeBackupsSortByEnum = "TIMECREATED" + ListVolumeBackupsSortByDisplayname ListVolumeBackupsSortByEnum = "DISPLAYNAME" +) + +var mappingListVolumeBackupsSortByEnum = map[string]ListVolumeBackupsSortByEnum{ + "TIMECREATED": ListVolumeBackupsSortByTimecreated, + "DISPLAYNAME": ListVolumeBackupsSortByDisplayname, +} + +var mappingListVolumeBackupsSortByEnumLowerCase = map[string]ListVolumeBackupsSortByEnum{ + "timecreated": ListVolumeBackupsSortByTimecreated, + "displayname": ListVolumeBackupsSortByDisplayname, +} + +// GetListVolumeBackupsSortByEnumValues Enumerates the set of values for ListVolumeBackupsSortByEnum +func GetListVolumeBackupsSortByEnumValues() []ListVolumeBackupsSortByEnum { + values := make([]ListVolumeBackupsSortByEnum, 0) + for _, v := range mappingListVolumeBackupsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListVolumeBackupsSortByEnumStringValues Enumerates the set of values in String for ListVolumeBackupsSortByEnum +func GetListVolumeBackupsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListVolumeBackupsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVolumeBackupsSortByEnum(val string) (ListVolumeBackupsSortByEnum, bool) { + enum, ok := mappingListVolumeBackupsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListVolumeBackupsSortOrderEnum Enum with underlying type: string +type ListVolumeBackupsSortOrderEnum string + +// Set of constants representing the allowable values for ListVolumeBackupsSortOrderEnum +const ( + ListVolumeBackupsSortOrderAsc ListVolumeBackupsSortOrderEnum = "ASC" + ListVolumeBackupsSortOrderDesc ListVolumeBackupsSortOrderEnum = "DESC" +) + +var mappingListVolumeBackupsSortOrderEnum = map[string]ListVolumeBackupsSortOrderEnum{ + "ASC": ListVolumeBackupsSortOrderAsc, + "DESC": ListVolumeBackupsSortOrderDesc, +} + +var mappingListVolumeBackupsSortOrderEnumLowerCase = map[string]ListVolumeBackupsSortOrderEnum{ + "asc": ListVolumeBackupsSortOrderAsc, + "desc": ListVolumeBackupsSortOrderDesc, +} + +// GetListVolumeBackupsSortOrderEnumValues Enumerates the set of values for ListVolumeBackupsSortOrderEnum +func GetListVolumeBackupsSortOrderEnumValues() []ListVolumeBackupsSortOrderEnum { + values := make([]ListVolumeBackupsSortOrderEnum, 0) + for _, v := range mappingListVolumeBackupsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListVolumeBackupsSortOrderEnumStringValues Enumerates the set of values in String for ListVolumeBackupsSortOrderEnum +func GetListVolumeBackupsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListVolumeBackupsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVolumeBackupsSortOrderEnum(val string) (ListVolumeBackupsSortOrderEnum, bool) { + enum, ok := mappingListVolumeBackupsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_group_backups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_group_backups_request_response.go new file mode 100644 index 000000000..712c07fca --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_group_backups_request_response.go @@ -0,0 +1,216 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVolumeGroupBackupsRequest wrapper for the ListVolumeGroupBackups operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeGroupBackups.go.html to see an example of how to use ListVolumeGroupBackupsRequest. +type ListVolumeGroupBackupsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the volume group. + VolumeGroupId *string `mandatory:"false" contributesTo:"query" name:"volumeGroupId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListVolumeGroupBackupsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListVolumeGroupBackupsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVolumeGroupBackupsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVolumeGroupBackupsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVolumeGroupBackupsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVolumeGroupBackupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVolumeGroupBackupsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListVolumeGroupBackupsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListVolumeGroupBackupsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListVolumeGroupBackupsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListVolumeGroupBackupsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVolumeGroupBackupsResponse wrapper for the ListVolumeGroupBackups operation +type ListVolumeGroupBackupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VolumeGroupBackup instances + Items []VolumeGroupBackup `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVolumeGroupBackupsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVolumeGroupBackupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListVolumeGroupBackupsSortByEnum Enum with underlying type: string +type ListVolumeGroupBackupsSortByEnum string + +// Set of constants representing the allowable values for ListVolumeGroupBackupsSortByEnum +const ( + ListVolumeGroupBackupsSortByTimecreated ListVolumeGroupBackupsSortByEnum = "TIMECREATED" + ListVolumeGroupBackupsSortByDisplayname ListVolumeGroupBackupsSortByEnum = "DISPLAYNAME" +) + +var mappingListVolumeGroupBackupsSortByEnum = map[string]ListVolumeGroupBackupsSortByEnum{ + "TIMECREATED": ListVolumeGroupBackupsSortByTimecreated, + "DISPLAYNAME": ListVolumeGroupBackupsSortByDisplayname, +} + +var mappingListVolumeGroupBackupsSortByEnumLowerCase = map[string]ListVolumeGroupBackupsSortByEnum{ + "timecreated": ListVolumeGroupBackupsSortByTimecreated, + "displayname": ListVolumeGroupBackupsSortByDisplayname, +} + +// GetListVolumeGroupBackupsSortByEnumValues Enumerates the set of values for ListVolumeGroupBackupsSortByEnum +func GetListVolumeGroupBackupsSortByEnumValues() []ListVolumeGroupBackupsSortByEnum { + values := make([]ListVolumeGroupBackupsSortByEnum, 0) + for _, v := range mappingListVolumeGroupBackupsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListVolumeGroupBackupsSortByEnumStringValues Enumerates the set of values in String for ListVolumeGroupBackupsSortByEnum +func GetListVolumeGroupBackupsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListVolumeGroupBackupsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVolumeGroupBackupsSortByEnum(val string) (ListVolumeGroupBackupsSortByEnum, bool) { + enum, ok := mappingListVolumeGroupBackupsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListVolumeGroupBackupsSortOrderEnum Enum with underlying type: string +type ListVolumeGroupBackupsSortOrderEnum string + +// Set of constants representing the allowable values for ListVolumeGroupBackupsSortOrderEnum +const ( + ListVolumeGroupBackupsSortOrderAsc ListVolumeGroupBackupsSortOrderEnum = "ASC" + ListVolumeGroupBackupsSortOrderDesc ListVolumeGroupBackupsSortOrderEnum = "DESC" +) + +var mappingListVolumeGroupBackupsSortOrderEnum = map[string]ListVolumeGroupBackupsSortOrderEnum{ + "ASC": ListVolumeGroupBackupsSortOrderAsc, + "DESC": ListVolumeGroupBackupsSortOrderDesc, +} + +var mappingListVolumeGroupBackupsSortOrderEnumLowerCase = map[string]ListVolumeGroupBackupsSortOrderEnum{ + "asc": ListVolumeGroupBackupsSortOrderAsc, + "desc": ListVolumeGroupBackupsSortOrderDesc, +} + +// GetListVolumeGroupBackupsSortOrderEnumValues Enumerates the set of values for ListVolumeGroupBackupsSortOrderEnum +func GetListVolumeGroupBackupsSortOrderEnumValues() []ListVolumeGroupBackupsSortOrderEnum { + values := make([]ListVolumeGroupBackupsSortOrderEnum, 0) + for _, v := range mappingListVolumeGroupBackupsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListVolumeGroupBackupsSortOrderEnumStringValues Enumerates the set of values in String for ListVolumeGroupBackupsSortOrderEnum +func GetListVolumeGroupBackupsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListVolumeGroupBackupsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVolumeGroupBackupsSortOrderEnum(val string) (ListVolumeGroupBackupsSortOrderEnum, bool) { + enum, ok := mappingListVolumeGroupBackupsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_group_replicas_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_group_replicas_request_response.go new file mode 100644 index 000000000..68041e166 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_group_replicas_request_response.go @@ -0,0 +1,223 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVolumeGroupReplicasRequest wrapper for the ListVolumeGroupReplicas operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeGroupReplicas.go.html to see an example of how to use ListVolumeGroupReplicasRequest. +type ListVolumeGroupReplicasRequest struct { + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListVolumeGroupReplicasSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListVolumeGroupReplicasSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. + LifecycleState VolumeGroupReplicaLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVolumeGroupReplicasRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVolumeGroupReplicasRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVolumeGroupReplicasRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVolumeGroupReplicasRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVolumeGroupReplicasRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListVolumeGroupReplicasSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListVolumeGroupReplicasSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListVolumeGroupReplicasSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListVolumeGroupReplicasSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingVolumeGroupReplicaLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetVolumeGroupReplicaLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVolumeGroupReplicasResponse wrapper for the ListVolumeGroupReplicas operation +type ListVolumeGroupReplicasResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VolumeGroupReplica instances + Items []VolumeGroupReplica `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVolumeGroupReplicasResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVolumeGroupReplicasResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListVolumeGroupReplicasSortByEnum Enum with underlying type: string +type ListVolumeGroupReplicasSortByEnum string + +// Set of constants representing the allowable values for ListVolumeGroupReplicasSortByEnum +const ( + ListVolumeGroupReplicasSortByTimecreated ListVolumeGroupReplicasSortByEnum = "TIMECREATED" + ListVolumeGroupReplicasSortByDisplayname ListVolumeGroupReplicasSortByEnum = "DISPLAYNAME" +) + +var mappingListVolumeGroupReplicasSortByEnum = map[string]ListVolumeGroupReplicasSortByEnum{ + "TIMECREATED": ListVolumeGroupReplicasSortByTimecreated, + "DISPLAYNAME": ListVolumeGroupReplicasSortByDisplayname, +} + +var mappingListVolumeGroupReplicasSortByEnumLowerCase = map[string]ListVolumeGroupReplicasSortByEnum{ + "timecreated": ListVolumeGroupReplicasSortByTimecreated, + "displayname": ListVolumeGroupReplicasSortByDisplayname, +} + +// GetListVolumeGroupReplicasSortByEnumValues Enumerates the set of values for ListVolumeGroupReplicasSortByEnum +func GetListVolumeGroupReplicasSortByEnumValues() []ListVolumeGroupReplicasSortByEnum { + values := make([]ListVolumeGroupReplicasSortByEnum, 0) + for _, v := range mappingListVolumeGroupReplicasSortByEnum { + values = append(values, v) + } + return values +} + +// GetListVolumeGroupReplicasSortByEnumStringValues Enumerates the set of values in String for ListVolumeGroupReplicasSortByEnum +func GetListVolumeGroupReplicasSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListVolumeGroupReplicasSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVolumeGroupReplicasSortByEnum(val string) (ListVolumeGroupReplicasSortByEnum, bool) { + enum, ok := mappingListVolumeGroupReplicasSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListVolumeGroupReplicasSortOrderEnum Enum with underlying type: string +type ListVolumeGroupReplicasSortOrderEnum string + +// Set of constants representing the allowable values for ListVolumeGroupReplicasSortOrderEnum +const ( + ListVolumeGroupReplicasSortOrderAsc ListVolumeGroupReplicasSortOrderEnum = "ASC" + ListVolumeGroupReplicasSortOrderDesc ListVolumeGroupReplicasSortOrderEnum = "DESC" +) + +var mappingListVolumeGroupReplicasSortOrderEnum = map[string]ListVolumeGroupReplicasSortOrderEnum{ + "ASC": ListVolumeGroupReplicasSortOrderAsc, + "DESC": ListVolumeGroupReplicasSortOrderDesc, +} + +var mappingListVolumeGroupReplicasSortOrderEnumLowerCase = map[string]ListVolumeGroupReplicasSortOrderEnum{ + "asc": ListVolumeGroupReplicasSortOrderAsc, + "desc": ListVolumeGroupReplicasSortOrderDesc, +} + +// GetListVolumeGroupReplicasSortOrderEnumValues Enumerates the set of values for ListVolumeGroupReplicasSortOrderEnum +func GetListVolumeGroupReplicasSortOrderEnumValues() []ListVolumeGroupReplicasSortOrderEnum { + values := make([]ListVolumeGroupReplicasSortOrderEnum, 0) + for _, v := range mappingListVolumeGroupReplicasSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListVolumeGroupReplicasSortOrderEnumStringValues Enumerates the set of values in String for ListVolumeGroupReplicasSortOrderEnum +func GetListVolumeGroupReplicasSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListVolumeGroupReplicasSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVolumeGroupReplicasSortOrderEnum(val string) (ListVolumeGroupReplicasSortOrderEnum, bool) { + enum, ok := mappingListVolumeGroupReplicasSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_groups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_groups_request_response.go new file mode 100644 index 000000000..4739a0a76 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volume_groups_request_response.go @@ -0,0 +1,224 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVolumeGroupsRequest wrapper for the ListVolumeGroups operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumeGroups.go.html to see an example of how to use ListVolumeGroupsRequest. +type ListVolumeGroupsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListVolumeGroupsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListVolumeGroupsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given lifecycle + // state. The state value is case-insensitive. + LifecycleState VolumeGroupLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVolumeGroupsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVolumeGroupsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVolumeGroupsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVolumeGroupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVolumeGroupsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListVolumeGroupsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListVolumeGroupsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListVolumeGroupsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListVolumeGroupsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingVolumeGroupLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetVolumeGroupLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVolumeGroupsResponse wrapper for the ListVolumeGroups operation +type ListVolumeGroupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VolumeGroup instances + Items []VolumeGroup `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVolumeGroupsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVolumeGroupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListVolumeGroupsSortByEnum Enum with underlying type: string +type ListVolumeGroupsSortByEnum string + +// Set of constants representing the allowable values for ListVolumeGroupsSortByEnum +const ( + ListVolumeGroupsSortByTimecreated ListVolumeGroupsSortByEnum = "TIMECREATED" + ListVolumeGroupsSortByDisplayname ListVolumeGroupsSortByEnum = "DISPLAYNAME" +) + +var mappingListVolumeGroupsSortByEnum = map[string]ListVolumeGroupsSortByEnum{ + "TIMECREATED": ListVolumeGroupsSortByTimecreated, + "DISPLAYNAME": ListVolumeGroupsSortByDisplayname, +} + +var mappingListVolumeGroupsSortByEnumLowerCase = map[string]ListVolumeGroupsSortByEnum{ + "timecreated": ListVolumeGroupsSortByTimecreated, + "displayname": ListVolumeGroupsSortByDisplayname, +} + +// GetListVolumeGroupsSortByEnumValues Enumerates the set of values for ListVolumeGroupsSortByEnum +func GetListVolumeGroupsSortByEnumValues() []ListVolumeGroupsSortByEnum { + values := make([]ListVolumeGroupsSortByEnum, 0) + for _, v := range mappingListVolumeGroupsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListVolumeGroupsSortByEnumStringValues Enumerates the set of values in String for ListVolumeGroupsSortByEnum +func GetListVolumeGroupsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListVolumeGroupsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVolumeGroupsSortByEnum(val string) (ListVolumeGroupsSortByEnum, bool) { + enum, ok := mappingListVolumeGroupsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListVolumeGroupsSortOrderEnum Enum with underlying type: string +type ListVolumeGroupsSortOrderEnum string + +// Set of constants representing the allowable values for ListVolumeGroupsSortOrderEnum +const ( + ListVolumeGroupsSortOrderAsc ListVolumeGroupsSortOrderEnum = "ASC" + ListVolumeGroupsSortOrderDesc ListVolumeGroupsSortOrderEnum = "DESC" +) + +var mappingListVolumeGroupsSortOrderEnum = map[string]ListVolumeGroupsSortOrderEnum{ + "ASC": ListVolumeGroupsSortOrderAsc, + "DESC": ListVolumeGroupsSortOrderDesc, +} + +var mappingListVolumeGroupsSortOrderEnumLowerCase = map[string]ListVolumeGroupsSortOrderEnum{ + "asc": ListVolumeGroupsSortOrderAsc, + "desc": ListVolumeGroupsSortOrderDesc, +} + +// GetListVolumeGroupsSortOrderEnumValues Enumerates the set of values for ListVolumeGroupsSortOrderEnum +func GetListVolumeGroupsSortOrderEnumValues() []ListVolumeGroupsSortOrderEnum { + values := make([]ListVolumeGroupsSortOrderEnum, 0) + for _, v := range mappingListVolumeGroupsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListVolumeGroupsSortOrderEnumStringValues Enumerates the set of values in String for ListVolumeGroupsSortOrderEnum +func GetListVolumeGroupsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListVolumeGroupsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVolumeGroupsSortOrderEnum(val string) (ListVolumeGroupsSortOrderEnum, bool) { + enum, ok := mappingListVolumeGroupsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volumes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volumes_request_response.go new file mode 100644 index 000000000..155625dda --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_volumes_request_response.go @@ -0,0 +1,230 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVolumesRequest wrapper for the ListVolumes operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVolumes.go.html to see an example of how to use ListVolumesRequest. +type ListVolumesRequest struct { + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListVolumesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListVolumesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The OCID of the volume group. + VolumeGroupId *string `mandatory:"false" contributesTo:"query" name:"volumeGroupId"` + + // A filter to return only resources that match the given cluster placement group Id exactly. + ClusterPlacementGroupId *string `mandatory:"false" contributesTo:"query" name:"clusterPlacementGroupId"` + + // A filter to only return resources that match the given lifecycle state. The state + // value is case-insensitive. + LifecycleState VolumeLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVolumesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVolumesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVolumesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVolumesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVolumesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListVolumesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListVolumesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListVolumesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListVolumesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingVolumeLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetVolumeLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVolumesResponse wrapper for the ListVolumes operation +type ListVolumesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []Volume instances + Items []Volume `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVolumesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVolumesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListVolumesSortByEnum Enum with underlying type: string +type ListVolumesSortByEnum string + +// Set of constants representing the allowable values for ListVolumesSortByEnum +const ( + ListVolumesSortByTimecreated ListVolumesSortByEnum = "TIMECREATED" + ListVolumesSortByDisplayname ListVolumesSortByEnum = "DISPLAYNAME" +) + +var mappingListVolumesSortByEnum = map[string]ListVolumesSortByEnum{ + "TIMECREATED": ListVolumesSortByTimecreated, + "DISPLAYNAME": ListVolumesSortByDisplayname, +} + +var mappingListVolumesSortByEnumLowerCase = map[string]ListVolumesSortByEnum{ + "timecreated": ListVolumesSortByTimecreated, + "displayname": ListVolumesSortByDisplayname, +} + +// GetListVolumesSortByEnumValues Enumerates the set of values for ListVolumesSortByEnum +func GetListVolumesSortByEnumValues() []ListVolumesSortByEnum { + values := make([]ListVolumesSortByEnum, 0) + for _, v := range mappingListVolumesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListVolumesSortByEnumStringValues Enumerates the set of values in String for ListVolumesSortByEnum +func GetListVolumesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListVolumesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVolumesSortByEnum(val string) (ListVolumesSortByEnum, bool) { + enum, ok := mappingListVolumesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListVolumesSortOrderEnum Enum with underlying type: string +type ListVolumesSortOrderEnum string + +// Set of constants representing the allowable values for ListVolumesSortOrderEnum +const ( + ListVolumesSortOrderAsc ListVolumesSortOrderEnum = "ASC" + ListVolumesSortOrderDesc ListVolumesSortOrderEnum = "DESC" +) + +var mappingListVolumesSortOrderEnum = map[string]ListVolumesSortOrderEnum{ + "ASC": ListVolumesSortOrderAsc, + "DESC": ListVolumesSortOrderDesc, +} + +var mappingListVolumesSortOrderEnumLowerCase = map[string]ListVolumesSortOrderEnum{ + "asc": ListVolumesSortOrderAsc, + "desc": ListVolumesSortOrderDesc, +} + +// GetListVolumesSortOrderEnumValues Enumerates the set of values for ListVolumesSortOrderEnum +func GetListVolumesSortOrderEnumValues() []ListVolumesSortOrderEnum { + values := make([]ListVolumesSortOrderEnum, 0) + for _, v := range mappingListVolumesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListVolumesSortOrderEnumStringValues Enumerates the set of values in String for ListVolumesSortOrderEnum +func GetListVolumesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListVolumesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVolumesSortOrderEnum(val string) (ListVolumesSortOrderEnum, bool) { + enum, ok := mappingListVolumesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_vtaps_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_vtaps_request_response.go new file mode 100644 index 000000000..2129776c1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_vtaps_request_response.go @@ -0,0 +1,237 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVtapsRequest wrapper for the ListVtaps operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVtaps.go.html to see an example of how to use ListVtapsRequest. +type ListVtapsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"false" contributesTo:"query" name:"vcnId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VTAP source. + Source *string `mandatory:"false" contributesTo:"query" name:"source"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VTAP target. + TargetId *string `mandatory:"false" contributesTo:"query" name:"targetId"` + + // The IP address of the VTAP target. + TargetIp *string `mandatory:"false" contributesTo:"query" name:"targetIp"` + + // Indicates whether to list all VTAPs or only running VTAPs. + // * When `FALSE`, lists ALL running and stopped VTAPs. + // * When `TRUE`, lists only running VTAPs (VTAPs where isVtapEnabled = `TRUE`). + IsVtapEnabled *bool `mandatory:"false" contributesTo:"query" name:"isVtapEnabled"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListVtapsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListVtapsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // A filter to return only resources that match the given VTAP administrative lifecycle state. + // The state value is case-insensitive. + LifecycleState VtapLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVtapsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVtapsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVtapsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVtapsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVtapsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListVtapsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListVtapsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListVtapsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListVtapsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingVtapLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetVtapLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVtapsResponse wrapper for the ListVtaps operation +type ListVtapsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []Vtap instances + Items []Vtap `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVtapsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVtapsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListVtapsSortByEnum Enum with underlying type: string +type ListVtapsSortByEnum string + +// Set of constants representing the allowable values for ListVtapsSortByEnum +const ( + ListVtapsSortByTimecreated ListVtapsSortByEnum = "TIMECREATED" + ListVtapsSortByDisplayname ListVtapsSortByEnum = "DISPLAYNAME" +) + +var mappingListVtapsSortByEnum = map[string]ListVtapsSortByEnum{ + "TIMECREATED": ListVtapsSortByTimecreated, + "DISPLAYNAME": ListVtapsSortByDisplayname, +} + +var mappingListVtapsSortByEnumLowerCase = map[string]ListVtapsSortByEnum{ + "timecreated": ListVtapsSortByTimecreated, + "displayname": ListVtapsSortByDisplayname, +} + +// GetListVtapsSortByEnumValues Enumerates the set of values for ListVtapsSortByEnum +func GetListVtapsSortByEnumValues() []ListVtapsSortByEnum { + values := make([]ListVtapsSortByEnum, 0) + for _, v := range mappingListVtapsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListVtapsSortByEnumStringValues Enumerates the set of values in String for ListVtapsSortByEnum +func GetListVtapsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListVtapsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVtapsSortByEnum(val string) (ListVtapsSortByEnum, bool) { + enum, ok := mappingListVtapsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListVtapsSortOrderEnum Enum with underlying type: string +type ListVtapsSortOrderEnum string + +// Set of constants representing the allowable values for ListVtapsSortOrderEnum +const ( + ListVtapsSortOrderAsc ListVtapsSortOrderEnum = "ASC" + ListVtapsSortOrderDesc ListVtapsSortOrderEnum = "DESC" +) + +var mappingListVtapsSortOrderEnum = map[string]ListVtapsSortOrderEnum{ + "ASC": ListVtapsSortOrderAsc, + "DESC": ListVtapsSortOrderDesc, +} + +var mappingListVtapsSortOrderEnumLowerCase = map[string]ListVtapsSortOrderEnum{ + "asc": ListVtapsSortOrderAsc, + "desc": ListVtapsSortOrderDesc, +} + +// GetListVtapsSortOrderEnumValues Enumerates the set of values for ListVtapsSortOrderEnum +func GetListVtapsSortOrderEnumValues() []ListVtapsSortOrderEnum { + values := make([]ListVtapsSortOrderEnum, 0) + for _, v := range mappingListVtapsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListVtapsSortOrderEnumStringValues Enumerates the set of values in String for ListVtapsSortOrderEnum +func GetListVtapsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListVtapsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVtapsSortOrderEnum(val string) (ListVtapsSortOrderEnum, bool) { + enum, ok := mappingListVtapsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/local_peering_gateway.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/local_peering_gateway.go new file mode 100644 index 000000000..3534de79a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/local_peering_gateway.go @@ -0,0 +1,228 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LocalPeeringGateway A local peering gateway (LPG) is an object on a VCN that lets that VCN peer +// with another VCN in the same region. *Peering* means that the two VCNs can +// communicate using private IP addresses, but without the traffic traversing the +// internet or routing through your on-premises network. For more information, +// see VCN Peering (https://docs.oracle.com/iaas/Content/Network/Tasks/VCNpeering.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type LocalPeeringGateway struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the LPG. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The LPG's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // Whether the VCN at the other end of the peering is in a different tenancy. + // Example: `false` + IsCrossTenancyPeering *bool `mandatory:"true" json:"isCrossTenancyPeering"` + + // The LPG's current lifecycle state. + LifecycleState LocalPeeringGatewayLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Whether the LPG is peered with another LPG. `NEW` means the LPG has not yet been + // peered. `PENDING` means the peering is being established. `REVOKED` means the + // LPG at the other end of the peering has been deleted. + PeeringStatus LocalPeeringGatewayPeeringStatusEnum `mandatory:"true" json:"peeringStatus"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the peered LPG. + PeerId *string `mandatory:"true" json:"peerId"` + + // The date and time the LPG was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN that uses the LPG. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Security attributes (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels + // for a resource that can be referenced in a Zero Trust Packet Routing (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) + // (ZPR) policy to control access to ZPR-supported resources. + // Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` + SecurityAttributes map[string]map[string]interface{} `mandatory:"false" json:"securityAttributes"` + + // The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN + // at the other end of the peering from this LPG. See `peerAdvertisedCidrDetails` for + // the individual CIDRs. The value is `null` if the LPG is not peered. + // Example: `192.168.0.0/16`, or if aggregated with `172.16.0.0/24` then `128.0.0.0/1` + PeerAdvertisedCidr *string `mandatory:"false" json:"peerAdvertisedCidr"` + + // The specific ranges of IP addresses available on or via the VCN at the other + // end of the peering from this LPG. The value is `null` if the LPG is not peered. + // You can use these as destination CIDRs for route rules to route a subnet's + // traffic to this LPG. + // Example: [`192.168.0.0/16`, `172.16.0.0/24`] + PeerAdvertisedCidrDetails []string `mandatory:"false" json:"peerAdvertisedCidrDetails"` + + // Additional information regarding the peering status, if applicable. + PeeringStatusDetails *string `mandatory:"false" json:"peeringStatusDetails"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the LPG is using. + // For information about why you would associate a route table with an LPG, see + // Transit Routing: Access to Multiple VCNs in Same Region (https://docs.oracle.com/iaas/Content/Network/Tasks/transitrouting.htm). + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m LocalPeeringGateway) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LocalPeeringGateway) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingLocalPeeringGatewayLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetLocalPeeringGatewayLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingLocalPeeringGatewayPeeringStatusEnum(string(m.PeeringStatus)); !ok && m.PeeringStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PeeringStatus: %s. Supported values are: %s.", m.PeeringStatus, strings.Join(GetLocalPeeringGatewayPeeringStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// LocalPeeringGatewayLifecycleStateEnum Enum with underlying type: string +type LocalPeeringGatewayLifecycleStateEnum string + +// Set of constants representing the allowable values for LocalPeeringGatewayLifecycleStateEnum +const ( + LocalPeeringGatewayLifecycleStateProvisioning LocalPeeringGatewayLifecycleStateEnum = "PROVISIONING" + LocalPeeringGatewayLifecycleStateAvailable LocalPeeringGatewayLifecycleStateEnum = "AVAILABLE" + LocalPeeringGatewayLifecycleStateTerminating LocalPeeringGatewayLifecycleStateEnum = "TERMINATING" + LocalPeeringGatewayLifecycleStateTerminated LocalPeeringGatewayLifecycleStateEnum = "TERMINATED" +) + +var mappingLocalPeeringGatewayLifecycleStateEnum = map[string]LocalPeeringGatewayLifecycleStateEnum{ + "PROVISIONING": LocalPeeringGatewayLifecycleStateProvisioning, + "AVAILABLE": LocalPeeringGatewayLifecycleStateAvailable, + "TERMINATING": LocalPeeringGatewayLifecycleStateTerminating, + "TERMINATED": LocalPeeringGatewayLifecycleStateTerminated, +} + +var mappingLocalPeeringGatewayLifecycleStateEnumLowerCase = map[string]LocalPeeringGatewayLifecycleStateEnum{ + "provisioning": LocalPeeringGatewayLifecycleStateProvisioning, + "available": LocalPeeringGatewayLifecycleStateAvailable, + "terminating": LocalPeeringGatewayLifecycleStateTerminating, + "terminated": LocalPeeringGatewayLifecycleStateTerminated, +} + +// GetLocalPeeringGatewayLifecycleStateEnumValues Enumerates the set of values for LocalPeeringGatewayLifecycleStateEnum +func GetLocalPeeringGatewayLifecycleStateEnumValues() []LocalPeeringGatewayLifecycleStateEnum { + values := make([]LocalPeeringGatewayLifecycleStateEnum, 0) + for _, v := range mappingLocalPeeringGatewayLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetLocalPeeringGatewayLifecycleStateEnumStringValues Enumerates the set of values in String for LocalPeeringGatewayLifecycleStateEnum +func GetLocalPeeringGatewayLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingLocalPeeringGatewayLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLocalPeeringGatewayLifecycleStateEnum(val string) (LocalPeeringGatewayLifecycleStateEnum, bool) { + enum, ok := mappingLocalPeeringGatewayLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// LocalPeeringGatewayPeeringStatusEnum Enum with underlying type: string +type LocalPeeringGatewayPeeringStatusEnum string + +// Set of constants representing the allowable values for LocalPeeringGatewayPeeringStatusEnum +const ( + LocalPeeringGatewayPeeringStatusInvalid LocalPeeringGatewayPeeringStatusEnum = "INVALID" + LocalPeeringGatewayPeeringStatusNew LocalPeeringGatewayPeeringStatusEnum = "NEW" + LocalPeeringGatewayPeeringStatusPeered LocalPeeringGatewayPeeringStatusEnum = "PEERED" + LocalPeeringGatewayPeeringStatusPending LocalPeeringGatewayPeeringStatusEnum = "PENDING" + LocalPeeringGatewayPeeringStatusRevoked LocalPeeringGatewayPeeringStatusEnum = "REVOKED" +) + +var mappingLocalPeeringGatewayPeeringStatusEnum = map[string]LocalPeeringGatewayPeeringStatusEnum{ + "INVALID": LocalPeeringGatewayPeeringStatusInvalid, + "NEW": LocalPeeringGatewayPeeringStatusNew, + "PEERED": LocalPeeringGatewayPeeringStatusPeered, + "PENDING": LocalPeeringGatewayPeeringStatusPending, + "REVOKED": LocalPeeringGatewayPeeringStatusRevoked, +} + +var mappingLocalPeeringGatewayPeeringStatusEnumLowerCase = map[string]LocalPeeringGatewayPeeringStatusEnum{ + "invalid": LocalPeeringGatewayPeeringStatusInvalid, + "new": LocalPeeringGatewayPeeringStatusNew, + "peered": LocalPeeringGatewayPeeringStatusPeered, + "pending": LocalPeeringGatewayPeeringStatusPending, + "revoked": LocalPeeringGatewayPeeringStatusRevoked, +} + +// GetLocalPeeringGatewayPeeringStatusEnumValues Enumerates the set of values for LocalPeeringGatewayPeeringStatusEnum +func GetLocalPeeringGatewayPeeringStatusEnumValues() []LocalPeeringGatewayPeeringStatusEnum { + values := make([]LocalPeeringGatewayPeeringStatusEnum, 0) + for _, v := range mappingLocalPeeringGatewayPeeringStatusEnum { + values = append(values, v) + } + return values +} + +// GetLocalPeeringGatewayPeeringStatusEnumStringValues Enumerates the set of values in String for LocalPeeringGatewayPeeringStatusEnum +func GetLocalPeeringGatewayPeeringStatusEnumStringValues() []string { + return []string{ + "INVALID", + "NEW", + "PEERED", + "PENDING", + "REVOKED", + } +} + +// GetMappingLocalPeeringGatewayPeeringStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLocalPeeringGatewayPeeringStatusEnum(val string) (LocalPeeringGatewayPeeringStatusEnum, bool) { + enum, ok := mappingLocalPeeringGatewayPeeringStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/loop_back_drg_attachment_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/loop_back_drg_attachment_network_details.go new file mode 100644 index 000000000..aacfec126 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/loop_back_drg_attachment_network_details.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LoopBackDrgAttachmentNetworkDetails Specifies the loopback attachment on the DRG. A loopback attachment can be used to terminate a virtual circuit that is carrying an IPSec tunnel, routing traffic directly to the IPSec tunnel attachment where the tunnel can terminate. +type LoopBackDrgAttachmentNetworkDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. + Id *string `mandatory:"false" json:"id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the target IPSec tunnel attachment. + Ids []string `mandatory:"false" json:"ids"` +} + +// GetId returns Id +func (m LoopBackDrgAttachmentNetworkDetails) GetId() *string { + return m.Id +} + +func (m LoopBackDrgAttachmentNetworkDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LoopBackDrgAttachmentNetworkDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m LoopBackDrgAttachmentNetworkDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLoopBackDrgAttachmentNetworkDetails LoopBackDrgAttachmentNetworkDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeLoopBackDrgAttachmentNetworkDetails + }{ + "LOOPBACK", + (MarshalTypeLoopBackDrgAttachmentNetworkDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_encryption_cipher.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_encryption_cipher.go new file mode 100644 index 000000000..3e6594f2c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_encryption_cipher.go @@ -0,0 +1,70 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "strings" +) + +// MacsecEncryptionCipherEnum Enum with underlying type: string +type MacsecEncryptionCipherEnum string + +// Set of constants representing the allowable values for MacsecEncryptionCipherEnum +const ( + MacsecEncryptionCipherAes128Gcm MacsecEncryptionCipherEnum = "AES128_GCM" + MacsecEncryptionCipherAes128GcmXpn MacsecEncryptionCipherEnum = "AES128_GCM_XPN" + MacsecEncryptionCipherAes256Gcm MacsecEncryptionCipherEnum = "AES256_GCM" + MacsecEncryptionCipherAes256GcmXpn MacsecEncryptionCipherEnum = "AES256_GCM_XPN" +) + +var mappingMacsecEncryptionCipherEnum = map[string]MacsecEncryptionCipherEnum{ + "AES128_GCM": MacsecEncryptionCipherAes128Gcm, + "AES128_GCM_XPN": MacsecEncryptionCipherAes128GcmXpn, + "AES256_GCM": MacsecEncryptionCipherAes256Gcm, + "AES256_GCM_XPN": MacsecEncryptionCipherAes256GcmXpn, +} + +var mappingMacsecEncryptionCipherEnumLowerCase = map[string]MacsecEncryptionCipherEnum{ + "aes128_gcm": MacsecEncryptionCipherAes128Gcm, + "aes128_gcm_xpn": MacsecEncryptionCipherAes128GcmXpn, + "aes256_gcm": MacsecEncryptionCipherAes256Gcm, + "aes256_gcm_xpn": MacsecEncryptionCipherAes256GcmXpn, +} + +// GetMacsecEncryptionCipherEnumValues Enumerates the set of values for MacsecEncryptionCipherEnum +func GetMacsecEncryptionCipherEnumValues() []MacsecEncryptionCipherEnum { + values := make([]MacsecEncryptionCipherEnum, 0) + for _, v := range mappingMacsecEncryptionCipherEnum { + values = append(values, v) + } + return values +} + +// GetMacsecEncryptionCipherEnumStringValues Enumerates the set of values in String for MacsecEncryptionCipherEnum +func GetMacsecEncryptionCipherEnumStringValues() []string { + return []string{ + "AES128_GCM", + "AES128_GCM_XPN", + "AES256_GCM", + "AES256_GCM_XPN", + } +} + +// GetMappingMacsecEncryptionCipherEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMacsecEncryptionCipherEnum(val string) (MacsecEncryptionCipherEnum, bool) { + enum, ok := mappingMacsecEncryptionCipherEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_key.go new file mode 100644 index 000000000..bfd4aa0cd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_key.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MacsecKey An object defining the Secrets-in-Vault OCIDs representing the MACsec key. +type MacsecKey struct { + + // Secret OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) containing the Connectivity association Key Name (CKN) of this MACsec key. + ConnectivityAssociationNameSecretId *string `mandatory:"true" json:"connectivityAssociationNameSecretId"` + + // Secret OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) containing the Connectivity Association Key (CAK) of this MACsec key. + ConnectivityAssociationKeySecretId *string `mandatory:"true" json:"connectivityAssociationKeySecretId"` + + // The secret version of the connectivity association name secret in Vault. + ConnectivityAssociationNameSecretVersion *int64 `mandatory:"false" json:"connectivityAssociationNameSecretVersion"` + + // The secret version of the `connectivityAssociationKey` secret in Vault. + ConnectivityAssociationKeySecretVersion *int64 `mandatory:"false" json:"connectivityAssociationKeySecretVersion"` +} + +func (m MacsecKey) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MacsecKey) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_properties.go new file mode 100644 index 000000000..9665f8911 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_properties.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MacsecProperties Properties used for MACsec (if capable). +type MacsecProperties struct { + + // Indicates whether or not MACsec is enabled. + State MacsecStateEnum `mandatory:"true" json:"state"` + + PrimaryKey *MacsecKey `mandatory:"false" json:"primaryKey"` + + // Type of encryption cipher suite to use for the MACsec connection. + EncryptionCipher MacsecEncryptionCipherEnum `mandatory:"false" json:"encryptionCipher,omitempty"` + + // Indicates whether unencrypted traffic is allowed if MACsec Key Agreement protocol (MKA) fails. + IsUnprotectedTrafficAllowed *bool `mandatory:"false" json:"isUnprotectedTrafficAllowed"` +} + +func (m MacsecProperties) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MacsecProperties) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingMacsecStateEnum(string(m.State)); !ok && m.State != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for State: %s. Supported values are: %s.", m.State, strings.Join(GetMacsecStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingMacsecEncryptionCipherEnum(string(m.EncryptionCipher)); !ok && m.EncryptionCipher != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncryptionCipher: %s. Supported values are: %s.", m.EncryptionCipher, strings.Join(GetMacsecEncryptionCipherEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_state.go new file mode 100644 index 000000000..9f9a4d791 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/macsec_state.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "strings" +) + +// MacsecStateEnum Enum with underlying type: string +type MacsecStateEnum string + +// Set of constants representing the allowable values for MacsecStateEnum +const ( + MacsecStateEnabled MacsecStateEnum = "ENABLED" + MacsecStateDisabled MacsecStateEnum = "DISABLED" +) + +var mappingMacsecStateEnum = map[string]MacsecStateEnum{ + "ENABLED": MacsecStateEnabled, + "DISABLED": MacsecStateDisabled, +} + +var mappingMacsecStateEnumLowerCase = map[string]MacsecStateEnum{ + "enabled": MacsecStateEnabled, + "disabled": MacsecStateDisabled, +} + +// GetMacsecStateEnumValues Enumerates the set of values for MacsecStateEnum +func GetMacsecStateEnumValues() []MacsecStateEnum { + values := make([]MacsecStateEnum, 0) + for _, v := range mappingMacsecStateEnum { + values = append(values, v) + } + return values +} + +// GetMacsecStateEnumStringValues Enumerates the set of values in String for MacsecStateEnum +func GetMacsecStateEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + } +} + +// GetMappingMacsecStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMacsecStateEnum(val string) (MacsecStateEnum, bool) { + enum, ok := mappingMacsecStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/measured_boot_entry.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/measured_boot_entry.go new file mode 100644 index 000000000..316761674 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/measured_boot_entry.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MeasuredBootEntry One Trusted Platform Module (TPM) Platform Configuration Register (PCR) entry. The entry might be measured during boot, +// or specified in a policy. +type MeasuredBootEntry struct { + + // The index of the policy. + PcrIndex *string `mandatory:"false" json:"pcrIndex"` + + // The hashed PCR value. + Value *string `mandatory:"false" json:"value"` + + // The type of algorithm used to calculate the hash. + HashAlgorithm *string `mandatory:"false" json:"hashAlgorithm"` +} + +func (m MeasuredBootEntry) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MeasuredBootEntry) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/measured_boot_report.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/measured_boot_report.go new file mode 100644 index 000000000..f60bea5ef --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/measured_boot_report.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MeasuredBootReport The measured boot report for a shielded instance. +type MeasuredBootReport struct { + + // Whether the verification succeeded, and the new values match the expected values. + IsPolicyVerificationSuccessful *bool `mandatory:"true" json:"isPolicyVerificationSuccessful"` + + Measurements *MeasuredBootReportMeasurements `mandatory:"false" json:"measurements"` +} + +func (m MeasuredBootReport) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MeasuredBootReport) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/measured_boot_report_measurements.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/measured_boot_report_measurements.go new file mode 100644 index 000000000..235ca736b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/measured_boot_report_measurements.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MeasuredBootReportMeasurements A list of Trusted Platform Module (TPM) Platform Configuration Register (PCR) entries. +type MeasuredBootReportMeasurements struct { + + // The list of expected PCR entries to use during verification. + Policy []MeasuredBootEntry `mandatory:"false" json:"policy"` + + // The list of actual PCR entries measured during boot. + Actual []MeasuredBootEntry `mandatory:"false" json:"actual"` +} + +func (m MeasuredBootReportMeasurements) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MeasuredBootReportMeasurements) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/member_replica.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/member_replica.go new file mode 100644 index 000000000..2958503ff --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/member_replica.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MemberReplica OCIDs for the volume replicas in this volume group replica. +type MemberReplica struct { + + // The volume replica ID. + VolumeReplicaId *string `mandatory:"true" json:"volumeReplicaId"` + + // Membership state of the volume replica in relation to the volume group replica. + MembershipState MemberReplicaMembershipStateEnum `mandatory:"false" json:"membershipState,omitempty"` +} + +func (m MemberReplica) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MemberReplica) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingMemberReplicaMembershipStateEnum(string(m.MembershipState)); !ok && m.MembershipState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MembershipState: %s. Supported values are: %s.", m.MembershipState, strings.Join(GetMemberReplicaMembershipStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MemberReplicaMembershipStateEnum Enum with underlying type: string +type MemberReplicaMembershipStateEnum string + +// Set of constants representing the allowable values for MemberReplicaMembershipStateEnum +const ( + MemberReplicaMembershipStateAddPending MemberReplicaMembershipStateEnum = "ADD_PENDING" + MemberReplicaMembershipStateStable MemberReplicaMembershipStateEnum = "STABLE" + MemberReplicaMembershipStateRemovePending MemberReplicaMembershipStateEnum = "REMOVE_PENDING" +) + +var mappingMemberReplicaMembershipStateEnum = map[string]MemberReplicaMembershipStateEnum{ + "ADD_PENDING": MemberReplicaMembershipStateAddPending, + "STABLE": MemberReplicaMembershipStateStable, + "REMOVE_PENDING": MemberReplicaMembershipStateRemovePending, +} + +var mappingMemberReplicaMembershipStateEnumLowerCase = map[string]MemberReplicaMembershipStateEnum{ + "add_pending": MemberReplicaMembershipStateAddPending, + "stable": MemberReplicaMembershipStateStable, + "remove_pending": MemberReplicaMembershipStateRemovePending, +} + +// GetMemberReplicaMembershipStateEnumValues Enumerates the set of values for MemberReplicaMembershipStateEnum +func GetMemberReplicaMembershipStateEnumValues() []MemberReplicaMembershipStateEnum { + values := make([]MemberReplicaMembershipStateEnum, 0) + for _, v := range mappingMemberReplicaMembershipStateEnum { + values = append(values, v) + } + return values +} + +// GetMemberReplicaMembershipStateEnumStringValues Enumerates the set of values in String for MemberReplicaMembershipStateEnum +func GetMemberReplicaMembershipStateEnumStringValues() []string { + return []string{ + "ADD_PENDING", + "STABLE", + "REMOVE_PENDING", + } +} + +// GetMappingMemberReplicaMembershipStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMemberReplicaMembershipStateEnum(val string) (MemberReplicaMembershipStateEnum, bool) { + enum, ok := mappingMemberReplicaMembershipStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/memory_fabric_preferences_descriptor.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/memory_fabric_preferences_descriptor.go new file mode 100644 index 000000000..6eea30e02 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/memory_fabric_preferences_descriptor.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MemoryFabricPreferencesDescriptor The preference object specified by customer. Contains customerDesiredFirmwareBundleId, fabricRecycleLevel. +type MemoryFabricPreferencesDescriptor struct { + + // The desired firmware bundle id on the GPU memory fabric. + CustomerDesiredFirmwareBundleId *string `mandatory:"false" json:"customerDesiredFirmwareBundleId"` + + // The recycle level of GPU memory fabric. + FabricRecycleLevel MemoryFabricPreferencesDescriptorFabricRecycleLevelEnum `mandatory:"false" json:"fabricRecycleLevel,omitempty"` +} + +func (m MemoryFabricPreferencesDescriptor) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MemoryFabricPreferencesDescriptor) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingMemoryFabricPreferencesDescriptorFabricRecycleLevelEnum(string(m.FabricRecycleLevel)); !ok && m.FabricRecycleLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FabricRecycleLevel: %s. Supported values are: %s.", m.FabricRecycleLevel, strings.Join(GetMemoryFabricPreferencesDescriptorFabricRecycleLevelEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MemoryFabricPreferencesDescriptorFabricRecycleLevelEnum Enum with underlying type: string +type MemoryFabricPreferencesDescriptorFabricRecycleLevelEnum string + +// Set of constants representing the allowable values for MemoryFabricPreferencesDescriptorFabricRecycleLevelEnum +const ( + MemoryFabricPreferencesDescriptorFabricRecycleLevelFullRecycle MemoryFabricPreferencesDescriptorFabricRecycleLevelEnum = "FULL_RECYCLE" + MemoryFabricPreferencesDescriptorFabricRecycleLevelSkipRecycle MemoryFabricPreferencesDescriptorFabricRecycleLevelEnum = "SKIP_RECYCLE" + MemoryFabricPreferencesDescriptorFabricRecycleLevelOpportunisticFullRecycle MemoryFabricPreferencesDescriptorFabricRecycleLevelEnum = "OPPORTUNISTIC_FULL_RECYCLE" +) + +var mappingMemoryFabricPreferencesDescriptorFabricRecycleLevelEnum = map[string]MemoryFabricPreferencesDescriptorFabricRecycleLevelEnum{ + "FULL_RECYCLE": MemoryFabricPreferencesDescriptorFabricRecycleLevelFullRecycle, + "SKIP_RECYCLE": MemoryFabricPreferencesDescriptorFabricRecycleLevelSkipRecycle, + "OPPORTUNISTIC_FULL_RECYCLE": MemoryFabricPreferencesDescriptorFabricRecycleLevelOpportunisticFullRecycle, +} + +var mappingMemoryFabricPreferencesDescriptorFabricRecycleLevelEnumLowerCase = map[string]MemoryFabricPreferencesDescriptorFabricRecycleLevelEnum{ + "full_recycle": MemoryFabricPreferencesDescriptorFabricRecycleLevelFullRecycle, + "skip_recycle": MemoryFabricPreferencesDescriptorFabricRecycleLevelSkipRecycle, + "opportunistic_full_recycle": MemoryFabricPreferencesDescriptorFabricRecycleLevelOpportunisticFullRecycle, +} + +// GetMemoryFabricPreferencesDescriptorFabricRecycleLevelEnumValues Enumerates the set of values for MemoryFabricPreferencesDescriptorFabricRecycleLevelEnum +func GetMemoryFabricPreferencesDescriptorFabricRecycleLevelEnumValues() []MemoryFabricPreferencesDescriptorFabricRecycleLevelEnum { + values := make([]MemoryFabricPreferencesDescriptorFabricRecycleLevelEnum, 0) + for _, v := range mappingMemoryFabricPreferencesDescriptorFabricRecycleLevelEnum { + values = append(values, v) + } + return values +} + +// GetMemoryFabricPreferencesDescriptorFabricRecycleLevelEnumStringValues Enumerates the set of values in String for MemoryFabricPreferencesDescriptorFabricRecycleLevelEnum +func GetMemoryFabricPreferencesDescriptorFabricRecycleLevelEnumStringValues() []string { + return []string{ + "FULL_RECYCLE", + "SKIP_RECYCLE", + "OPPORTUNISTIC_FULL_RECYCLE", + } +} + +// GetMappingMemoryFabricPreferencesDescriptorFabricRecycleLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMemoryFabricPreferencesDescriptorFabricRecycleLevelEnum(val string) (MemoryFabricPreferencesDescriptorFabricRecycleLevelEnum, bool) { + enum, ok := mappingMemoryFabricPreferencesDescriptorFabricRecycleLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/modify_ipv4_subnet_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/modify_ipv4_subnet_cidr_details.go new file mode 100644 index 000000000..1a78d12cf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/modify_ipv4_subnet_cidr_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ModifyIpv4SubnetCidrDetails Details object for updating the specified Ipv4 CIDR block of a Subnet. +type ModifyIpv4SubnetCidrDetails struct { + + // The Ipv4 CIDR IP address to update. + Ipv4CidrBlock *string `mandatory:"true" json:"ipv4CidrBlock"` + + // The new Ipv4 CIDR IP address. + UpdatedIpv4CidrBlock *string `mandatory:"true" json:"updatedIpv4CidrBlock"` +} + +func (m ModifyIpv4SubnetCidrDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ModifyIpv4SubnetCidrDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/modify_ipv4_subnet_cidr_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/modify_ipv4_subnet_cidr_request_response.go new file mode 100644 index 000000000..85150e705 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/modify_ipv4_subnet_cidr_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ModifyIpv4SubnetCidrRequest wrapper for the ModifyIpv4SubnetCidr operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ModifyIpv4SubnetCidr.go.html to see an example of how to use ModifyIpv4SubnetCidrRequest. +type ModifyIpv4SubnetCidrRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // Details object for updating a SUBNET IPv4 prefix. + ModifyIpv4SubnetCidrDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ModifyIpv4SubnetCidrRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ModifyIpv4SubnetCidrRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ModifyIpv4SubnetCidrRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ModifyIpv4SubnetCidrRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ModifyIpv4SubnetCidrRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ModifyIpv4SubnetCidrResponse wrapper for the ModifyIpv4SubnetCidr operation +type ModifyIpv4SubnetCidrResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ModifyIpv4SubnetCidrResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ModifyIpv4SubnetCidrResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/modify_vcn_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/modify_vcn_cidr_details.go new file mode 100644 index 000000000..1717b7f28 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/modify_vcn_cidr_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ModifyVcnCidrDetails Details for updating a CIDR block. +type ModifyVcnCidrDetails struct { + + // The CIDR IP address to update. + OriginalCidrBlock *string `mandatory:"true" json:"originalCidrBlock"` + + // The new CIDR IP address. + NewCidrBlock *string `mandatory:"true" json:"newCidrBlock"` +} + +func (m ModifyVcnCidrDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ModifyVcnCidrDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/modify_vcn_cidr_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/modify_vcn_cidr_request_response.go new file mode 100644 index 000000000..f51eaf9cb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/modify_vcn_cidr_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ModifyVcnCidrRequest wrapper for the ModifyVcnCidr operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ModifyVcnCidr.go.html to see an example of how to use ModifyVcnCidrRequest. +type ModifyVcnCidrRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` + + // Details object for updating a VCN CIDR. + ModifyVcnCidrDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ModifyVcnCidrRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ModifyVcnCidrRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ModifyVcnCidrRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ModifyVcnCidrRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ModifyVcnCidrRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ModifyVcnCidrResponse wrapper for the ModifyVcnCidr operation +type ModifyVcnCidrResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ModifyVcnCidrResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ModifyVcnCidrResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/multipath_device.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/multipath_device.go new file mode 100644 index 000000000..5a6ceaa5f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/multipath_device.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MultipathDevice Secondary multipath device, it uses the charUsername and chapSecret from primary volume attachment +type MultipathDevice struct { + + // The volume's iSCSI IP address. + // Example: `169.254.2.2` + Ipv4 *string `mandatory:"true" json:"ipv4"` + + // The target volume's iSCSI Qualified Name in the format defined + // by RFC 3720 (https://tools.ietf.org/html/rfc3720#page-32). + // Example: `iqn.2015-12.com.oracleiaas:40b7ee03-883f-46c6-a951-63d2841d2195` + Iqn *string `mandatory:"true" json:"iqn"` + + // The volume's iSCSI port, usually port 860 or 3260. + // Example: `3260` + Port *int `mandatory:"false" json:"port"` +} + +func (m MultipathDevice) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MultipathDevice) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/nat_gateway.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/nat_gateway.go new file mode 100644 index 000000000..0622487ed --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/nat_gateway.go @@ -0,0 +1,152 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NatGateway A NAT (Network Address Translation) gateway, which represents a router that lets instances +// without public IPs contact the public internet without exposing the instance to inbound +// internet traffic. For more information, see +// NAT Gateway (https://docs.oracle.com/iaas/Content/Network/Tasks/NATgateway.htm). +// To use any of the API operations, you must be authorized in an +// IAM policy. If you are not authorized, talk to an +// administrator. If you are an administrator who needs to write +// policies to give users access, see Getting Started with +// Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type NatGateway struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains + // the NAT gateway. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the + // NAT gateway. + Id *string `mandatory:"true" json:"id"` + + // Whether the NAT gateway blocks traffic through it. The default is `false`. + // Example: `true` + BlockTraffic *bool `mandatory:"true" json:"blockTraffic"` + + // The NAT gateway's current state. + LifecycleState NatGatewayLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The IP address associated with the NAT gateway. + NatIp *string `mandatory:"true" json:"natIp"` + + // The date and time the NAT gateway was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN the NAT gateway + // belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP address associated with the NAT gateway. + PublicIpId *string `mandatory:"false" json:"publicIpId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table used by the NAT gateway. + // If you don't specify a route table here, the NAT gateway is created without an associated route + // table. The Networking service does NOT automatically associate the attached VCN's default route table + // with the NAT gateway. + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m NatGateway) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NatGateway) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingNatGatewayLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetNatGatewayLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// NatGatewayLifecycleStateEnum Enum with underlying type: string +type NatGatewayLifecycleStateEnum string + +// Set of constants representing the allowable values for NatGatewayLifecycleStateEnum +const ( + NatGatewayLifecycleStateProvisioning NatGatewayLifecycleStateEnum = "PROVISIONING" + NatGatewayLifecycleStateAvailable NatGatewayLifecycleStateEnum = "AVAILABLE" + NatGatewayLifecycleStateTerminating NatGatewayLifecycleStateEnum = "TERMINATING" + NatGatewayLifecycleStateTerminated NatGatewayLifecycleStateEnum = "TERMINATED" +) + +var mappingNatGatewayLifecycleStateEnum = map[string]NatGatewayLifecycleStateEnum{ + "PROVISIONING": NatGatewayLifecycleStateProvisioning, + "AVAILABLE": NatGatewayLifecycleStateAvailable, + "TERMINATING": NatGatewayLifecycleStateTerminating, + "TERMINATED": NatGatewayLifecycleStateTerminated, +} + +var mappingNatGatewayLifecycleStateEnumLowerCase = map[string]NatGatewayLifecycleStateEnum{ + "provisioning": NatGatewayLifecycleStateProvisioning, + "available": NatGatewayLifecycleStateAvailable, + "terminating": NatGatewayLifecycleStateTerminating, + "terminated": NatGatewayLifecycleStateTerminated, +} + +// GetNatGatewayLifecycleStateEnumValues Enumerates the set of values for NatGatewayLifecycleStateEnum +func GetNatGatewayLifecycleStateEnumValues() []NatGatewayLifecycleStateEnum { + values := make([]NatGatewayLifecycleStateEnum, 0) + for _, v := range mappingNatGatewayLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetNatGatewayLifecycleStateEnumStringValues Enumerates the set of values in String for NatGatewayLifecycleStateEnum +func GetNatGatewayLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingNatGatewayLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingNatGatewayLifecycleStateEnum(val string) (NatGatewayLifecycleStateEnum, bool) { + enum, ok := mappingNatGatewayLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/network_security_group.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/network_security_group.go new file mode 100644 index 000000000..1f8dde788 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/network_security_group.go @@ -0,0 +1,154 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NetworkSecurityGroup A *network security group* (NSG) provides virtual firewall rules for a specific set of +// Vnic in a VCN. Compare NSGs with SecurityList, +// which provide virtual firewall rules to all the VNICs in a *subnet*. +// A network security group consists of two items: +// - The set of Vnic that all have the same security rule needs (for +// example, a group of Compute instances all running the same application) +// - A set of NSG SecurityRule that apply to the VNICs in the group +// +// After creating an NSG, you can add VNICs and security rules to it. For example, when you create +// an instance, you can specify one or more NSGs to add the instance to (see +// CreateVnicDetails). Or you can add an existing +// instance to an NSG with UpdateVnic. +// To add security rules to an NSG, see +// AddNetworkSecurityGroupSecurityRules. +// To list the VNICs in an NSG, see +// ListNetworkSecurityGroupVnics. +// To list the security rules in an NSG, see +// ListNetworkSecurityGroupSecurityRules. +// For more information about network security groups, see +// Network Security Groups (https://docs.oracle.com/iaas/Content/Network/Concepts/networksecuritygroups.htm). +// **Important:** Oracle Cloud Infrastructure Compute service images automatically include firewall rules (for example, +// Linux iptables, Windows firewall). If there are issues with some type of access to an instance, +// make sure all of the following are set correctly: +// - Any security rules in any NSGs the instance's VNIC belongs to +// - Any SecurityList associated with the instance's subnet +// - The instance's OS firewall rules +// +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type NetworkSecurityGroup struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment the network security group is in. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security group. + Id *string `mandatory:"true" json:"id"` + + // The network security group's current state. + LifecycleState NetworkSecurityGroupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the network security group was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security group's VCN. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m NetworkSecurityGroup) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NetworkSecurityGroup) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingNetworkSecurityGroupLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetNetworkSecurityGroupLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// NetworkSecurityGroupLifecycleStateEnum Enum with underlying type: string +type NetworkSecurityGroupLifecycleStateEnum string + +// Set of constants representing the allowable values for NetworkSecurityGroupLifecycleStateEnum +const ( + NetworkSecurityGroupLifecycleStateProvisioning NetworkSecurityGroupLifecycleStateEnum = "PROVISIONING" + NetworkSecurityGroupLifecycleStateAvailable NetworkSecurityGroupLifecycleStateEnum = "AVAILABLE" + NetworkSecurityGroupLifecycleStateTerminating NetworkSecurityGroupLifecycleStateEnum = "TERMINATING" + NetworkSecurityGroupLifecycleStateTerminated NetworkSecurityGroupLifecycleStateEnum = "TERMINATED" +) + +var mappingNetworkSecurityGroupLifecycleStateEnum = map[string]NetworkSecurityGroupLifecycleStateEnum{ + "PROVISIONING": NetworkSecurityGroupLifecycleStateProvisioning, + "AVAILABLE": NetworkSecurityGroupLifecycleStateAvailable, + "TERMINATING": NetworkSecurityGroupLifecycleStateTerminating, + "TERMINATED": NetworkSecurityGroupLifecycleStateTerminated, +} + +var mappingNetworkSecurityGroupLifecycleStateEnumLowerCase = map[string]NetworkSecurityGroupLifecycleStateEnum{ + "provisioning": NetworkSecurityGroupLifecycleStateProvisioning, + "available": NetworkSecurityGroupLifecycleStateAvailable, + "terminating": NetworkSecurityGroupLifecycleStateTerminating, + "terminated": NetworkSecurityGroupLifecycleStateTerminated, +} + +// GetNetworkSecurityGroupLifecycleStateEnumValues Enumerates the set of values for NetworkSecurityGroupLifecycleStateEnum +func GetNetworkSecurityGroupLifecycleStateEnumValues() []NetworkSecurityGroupLifecycleStateEnum { + values := make([]NetworkSecurityGroupLifecycleStateEnum, 0) + for _, v := range mappingNetworkSecurityGroupLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetNetworkSecurityGroupLifecycleStateEnumStringValues Enumerates the set of values in String for NetworkSecurityGroupLifecycleStateEnum +func GetNetworkSecurityGroupLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingNetworkSecurityGroupLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingNetworkSecurityGroupLifecycleStateEnum(val string) (NetworkSecurityGroupLifecycleStateEnum, bool) { + enum, ok := mappingNetworkSecurityGroupLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/network_security_group_vnic.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/network_security_group_vnic.go new file mode 100644 index 000000000..993402380 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/network_security_group_vnic.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NetworkSecurityGroupVnic Information about a VNIC that belongs to a network security group. +type NetworkSecurityGroupVnic struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC. + VnicId *string `mandatory:"true" json:"vnicId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent resource that the VNIC + // is attached to (for example, a Compute instance). + ResourceId *string `mandatory:"false" json:"resourceId"` + + // The date and time the VNIC was added to the network security group, in the format + // defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeAssociated *common.SDKTime `mandatory:"false" json:"timeAssociated"` +} + +func (m NetworkSecurityGroupVnic) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NetworkSecurityGroupVnic) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/networking_topology.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/networking_topology.go new file mode 100644 index 000000000..0e624ed48 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/networking_topology.go @@ -0,0 +1,128 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NetworkingTopology Defines the representation of a virtual network topology for a region. +// See Network Visualizer Documentation (https://docs.oracle.com/iaas/Content/Network/Concepts/network_visualizer.htm) for more information, including +// conventions and pictures of symbols. +type NetworkingTopology struct { + + // Lists entities comprising the virtual network topology. + Entities []interface{} `mandatory:"true" json:"entities"` + + // Lists relationships between entities in the virtual network topology. + Relationships []TopologyEntityRelationship `mandatory:"true" json:"relationships"` + + // Lists entities that are limited during ingestion. + // The values for the items in the list are the entity type names of the limitedEntities. + // Example: `vcn` + LimitedEntities []string `mandatory:"true" json:"limitedEntities"` + + // Records when the virtual network topology was created, in RFC3339 (https://tools.ietf.org/html/rfc3339) format for date and time. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` +} + +// GetEntities returns Entities +func (m NetworkingTopology) GetEntities() []interface{} { + return m.Entities +} + +// GetRelationships returns Relationships +func (m NetworkingTopology) GetRelationships() []TopologyEntityRelationship { + return m.Relationships +} + +// GetLimitedEntities returns LimitedEntities +func (m NetworkingTopology) GetLimitedEntities() []string { + return m.LimitedEntities +} + +// GetTimeCreated returns TimeCreated +func (m NetworkingTopology) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +func (m NetworkingTopology) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NetworkingTopology) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m NetworkingTopology) MarshalJSON() (buff []byte, e error) { + type MarshalTypeNetworkingTopology NetworkingTopology + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeNetworkingTopology + }{ + "NETWORKING", + (MarshalTypeNetworkingTopology)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *NetworkingTopology) UnmarshalJSON(data []byte) (e error) { + model := struct { + Entities []interface{} `json:"entities"` + Relationships []topologyentityrelationship `json:"relationships"` + LimitedEntities []string `json:"limitedEntities"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Entities = make([]interface{}, len(model.Entities)) + copy(m.Entities, model.Entities) + m.Relationships = make([]TopologyEntityRelationship, len(model.Relationships)) + for i, n := range model.Relationships { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Relationships[i] = nn.(TopologyEntityRelationship) + } else { + m.Relationships[i] = nil + } + } + m.LimitedEntities = make([]string, len(model.LimitedEntities)) + copy(m.LimitedEntities, model.LimitedEntities) + m.TimeCreated = model.TimeCreated + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/paravirtualized_volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/paravirtualized_volume_attachment.go new file mode 100644 index 000000000..eb0ca639a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/paravirtualized_volume_attachment.go @@ -0,0 +1,191 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ParavirtualizedVolumeAttachment A paravirtualized volume attachment. +type ParavirtualizedVolumeAttachment struct { + + // The availability domain of an instance. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the volume attachment. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the instance the volume is attached to. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The date and time the volume was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the volume. + VolumeId *string `mandatory:"true" json:"volumeId"` + + // The device name. + Device *string `mandatory:"false" json:"device"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether the attachment was created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + IsShareable *bool `mandatory:"false" json:"isShareable"` + + // Whether in-transit encryption for the data volume's paravirtualized attachment is enabled or not. + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` + + // Whether the Iscsi or Paravirtualized attachment is multipath or not, it is not applicable to NVMe attachment. + IsMultipath *bool `mandatory:"false" json:"isMultipath"` + + // Flag indicating if this volume was created for the customer as part of a simplified launch. + // Used to determine whether the volume requires deletion on instance termination. + IsVolumeCreatedDuringLaunch *bool `mandatory:"false" json:"isVolumeCreatedDuringLaunch"` + + // The current state of the volume attachment. + LifecycleState VolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The iscsi login state of the volume attachment. For a Iscsi volume attachment, + // all iscsi sessions need to be all logged-in or logged-out to be in logged-in or logged-out state. + IscsiLoginState VolumeAttachmentIscsiLoginStateEnum `mandatory:"false" json:"iscsiLoginState,omitempty"` +} + +// GetAvailabilityDomain returns AvailabilityDomain +func (m ParavirtualizedVolumeAttachment) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetCompartmentId returns CompartmentId +func (m ParavirtualizedVolumeAttachment) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDevice returns Device +func (m ParavirtualizedVolumeAttachment) GetDevice() *string { + return m.Device +} + +// GetDisplayName returns DisplayName +func (m ParavirtualizedVolumeAttachment) GetDisplayName() *string { + return m.DisplayName +} + +// GetId returns Id +func (m ParavirtualizedVolumeAttachment) GetId() *string { + return m.Id +} + +// GetInstanceId returns InstanceId +func (m ParavirtualizedVolumeAttachment) GetInstanceId() *string { + return m.InstanceId +} + +// GetIsReadOnly returns IsReadOnly +func (m ParavirtualizedVolumeAttachment) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetIsShareable returns IsShareable +func (m ParavirtualizedVolumeAttachment) GetIsShareable() *bool { + return m.IsShareable +} + +// GetLifecycleState returns LifecycleState +func (m ParavirtualizedVolumeAttachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum { + return m.LifecycleState +} + +// GetTimeCreated returns TimeCreated +func (m ParavirtualizedVolumeAttachment) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetVolumeId returns VolumeId +func (m ParavirtualizedVolumeAttachment) GetVolumeId() *string { + return m.VolumeId +} + +// GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled +func (m ParavirtualizedVolumeAttachment) GetIsPvEncryptionInTransitEnabled() *bool { + return m.IsPvEncryptionInTransitEnabled +} + +// GetIsMultipath returns IsMultipath +func (m ParavirtualizedVolumeAttachment) GetIsMultipath() *bool { + return m.IsMultipath +} + +// GetIscsiLoginState returns IscsiLoginState +func (m ParavirtualizedVolumeAttachment) GetIscsiLoginState() VolumeAttachmentIscsiLoginStateEnum { + return m.IscsiLoginState +} + +// GetIsVolumeCreatedDuringLaunch returns IsVolumeCreatedDuringLaunch +func (m ParavirtualizedVolumeAttachment) GetIsVolumeCreatedDuringLaunch() *bool { + return m.IsVolumeCreatedDuringLaunch +} + +func (m ParavirtualizedVolumeAttachment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ParavirtualizedVolumeAttachment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingVolumeAttachmentLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVolumeAttachmentLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingVolumeAttachmentIscsiLoginStateEnum(string(m.IscsiLoginState)); !ok && m.IscsiLoginState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IscsiLoginState: %s. Supported values are: %s.", m.IscsiLoginState, strings.Join(GetVolumeAttachmentIscsiLoginStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ParavirtualizedVolumeAttachment) MarshalJSON() (buff []byte, e error) { + type MarshalTypeParavirtualizedVolumeAttachment ParavirtualizedVolumeAttachment + s := struct { + DiscriminatorParam string `json:"attachmentType"` + MarshalTypeParavirtualizedVolumeAttachment + }{ + "paravirtualized", + (MarshalTypeParavirtualizedVolumeAttachment)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_subnet_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_subnet_details.go new file mode 100644 index 000000000..5e9d63e02 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_subnet_details.go @@ -0,0 +1,88 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchSubnetDetails The request to patch the subnet. +// Example: +// +// { +// "patchSubnetInstructions": [ +// { +// "operation": "REPLACE", +// "selection": "ipv6CidrBlock", +// "value": {"cidr": "2001::/56"} +// }, +// { +// "operation": "REPLACE", +// "selection": "ipv6CidrBlocks", +// "value": { "cidrs": [ "2001:db8:1234:1111::/64", "2001:db8:1234:2121::/64" ] } +// } +// ] +// } +type PatchSubnetDetails struct { + + // List of patch instructions for Subnet. + PatchSubnetInstructions []PatchSubnetInstruction `mandatory:"true" json:"patchSubnetInstructions"` +} + +func (m PatchSubnetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchSubnetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *PatchSubnetDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + PatchSubnetInstructions []patchsubnetinstruction `json:"patchSubnetInstructions"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.PatchSubnetInstructions = make([]PatchSubnetInstruction, len(model.PatchSubnetInstructions)) + for i, n := range model.PatchSubnetInstructions { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.PatchSubnetInstructions[i] = nn.(PatchSubnetInstruction) + } else { + m.PatchSubnetInstructions[i] = nil + } + } + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_subnet_instruction.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_subnet_instruction.go new file mode 100644 index 000000000..2e81d3e72 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_subnet_instruction.go @@ -0,0 +1,134 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchSubnetInstruction A single instruction to be included as part of PatchSubnet request content. +type PatchSubnetInstruction interface { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation + // against the Subnet resource representation. + // The PatchSubnet operation restricts supported selections (see PatchSubnet documentation). + // Example: "ipv6CidrBlocks" + GetSelection() *string +} + +type patchsubnetinstruction struct { + JsonData []byte + Selection *string `mandatory:"true" json:"selection"` + Operation string `json:"operation"` +} + +// UnmarshalJSON unmarshals json +func (m *patchsubnetinstruction) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpatchsubnetinstruction patchsubnetinstruction + s := struct { + Model Unmarshalerpatchsubnetinstruction + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Selection = s.Model.Selection + m.Operation = s.Model.Operation + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *patchsubnetinstruction) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Operation { + case "REPLACE": + mm := PatchSubnetReplaceInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for PatchSubnetInstruction: %s.", m.Operation) + return *m, nil + } +} + +// GetSelection returns Selection +func (m patchsubnetinstruction) GetSelection() *string { + return m.Selection +} + +func (m patchsubnetinstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m patchsubnetinstruction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchSubnetInstructionOperationEnum Enum with underlying type: string +type PatchSubnetInstructionOperationEnum string + +// Set of constants representing the allowable values for PatchSubnetInstructionOperationEnum +const ( + PatchSubnetInstructionOperationReplace PatchSubnetInstructionOperationEnum = "REPLACE" +) + +var mappingPatchSubnetInstructionOperationEnum = map[string]PatchSubnetInstructionOperationEnum{ + "REPLACE": PatchSubnetInstructionOperationReplace, +} + +var mappingPatchSubnetInstructionOperationEnumLowerCase = map[string]PatchSubnetInstructionOperationEnum{ + "replace": PatchSubnetInstructionOperationReplace, +} + +// GetPatchSubnetInstructionOperationEnumValues Enumerates the set of values for PatchSubnetInstructionOperationEnum +func GetPatchSubnetInstructionOperationEnumValues() []PatchSubnetInstructionOperationEnum { + values := make([]PatchSubnetInstructionOperationEnum, 0) + for _, v := range mappingPatchSubnetInstructionOperationEnum { + values = append(values, v) + } + return values +} + +// GetPatchSubnetInstructionOperationEnumStringValues Enumerates the set of values in String for PatchSubnetInstructionOperationEnum +func GetPatchSubnetInstructionOperationEnumStringValues() []string { + return []string{ + "REPLACE", + } +} + +// GetMappingPatchSubnetInstructionOperationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchSubnetInstructionOperationEnum(val string) (PatchSubnetInstructionOperationEnum, bool) { + enum, ok := mappingPatchSubnetInstructionOperationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_subnet_replace_instruction.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_subnet_replace_instruction.go new file mode 100644 index 000000000..e5c556fd3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_subnet_replace_instruction.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchSubnetReplaceInstruction Replaces the entire value of the selected subnet CIDR field with the specified final state. +// For IPv6 CIDR list selections (for example, `ipv6CidrBlocks`), the supplied array is treated +// as the authoritative set of CIDRs for that field: +// - CIDRs present in both the existing list and the new list remain unchanged. +// - CIDRs present in the existing list but not in the new list are removed. +// - CIDRs present in the new list but not in the existing list are added. +type PatchSubnetReplaceInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation + // against the Subnet resource representation. + // The PatchSubnet operation restricts supported selections (see PatchSubnet documentation). + // Example: "ipv6CidrBlocks" + Selection *string `mandatory:"true" json:"selection"` + + // The desired final IPv6 CIDR value(s) to apply to the selected field. This field must + // always be a JSON object. + // For fields that take a single CIDR (for example, `ipv6CidrBlock`), specify a single element. + // For list fields (for example, `ipv6CidrBlocks`), specify the full desired list. + // Examples: + // - { "operation": "REPLACE", "selection": "ipv6CidrBlocks", "value": { "cidrs": [ "2001:db8:1234:1111::/64", "2001:db8:1234:2121::/64" ] } } + // - { "operation": "REPLACE", "selection": "ipv6CidrBlock", "value": { "cidr": "2001:db8:1234:1111::/64" } } + Value *interface{} `mandatory:"true" json:"value"` +} + +// GetSelection returns Selection +func (m PatchSubnetReplaceInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchSubnetReplaceInstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchSubnetReplaceInstruction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PatchSubnetReplaceInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchSubnetReplaceInstruction PatchSubnetReplaceInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchSubnetReplaceInstruction + }{ + "REPLACE", + (MarshalTypePatchSubnetReplaceInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_subnet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_subnet_request_response.go new file mode 100644 index 000000000..8d0593c60 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_subnet_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchSubnetRequest wrapper for the PatchSubnet operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/PatchSubnet.go.html to see an example of how to use PatchSubnetRequest. +type PatchSubnetRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // Details object for patching a subnet. + PatchSubnetDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchSubnetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchSubnetRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchSubnetRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchSubnetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchSubnetRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchSubnetResponse wrapper for the PatchSubnet operation +type PatchSubnetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response PatchSubnetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchSubnetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_vcn_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_vcn_details.go new file mode 100644 index 000000000..0ab93e707 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_vcn_details.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchVcnDetails The request to patch the VCN. +// Example: +// +// { +// "patchVcnInstructions": [ +// { +// "operation": "REPLACE", +// "selection": "ipv6CidrBlock", +// "value": {"cidr": "2001::/56"} +// }, +// { +// "operation": "REPLACE", +// "selection": "ipv6PublicCidrBlock", +// "value": {"cidr": "2001:0db8:0123::/48"} +// }, +// { +// "operation": "REPLACE", +// "selection": "byoipv6CidrDetails", +// "value": { +// "cidrs": [ +// { +// "byoipv6RangeId": "ocid1.byoiprange.oc1.", +// "ipv6CidrBlock": "2001:0db8:0123::/48" +// }, +// { +// "byoipv6RangeId": "ocid1.byoiprange.oc1.", +// "ipv6CidrBlock": "2001:0db8:0456::/48" +// } +// ] +// } +// }, +// { +// "operation": "REPLACE", +// "selection": "ipv6PrivateCidrBlocks", +// "value": { "cidrs": ["fd00:1000:0:1::/64", "fd00:1000:0:2::/64"] } +// } +// ] +// } +type PatchVcnDetails struct { + + // List of patch instructions for VCN. + PatchVcnInstructions []PatchVcnInstruction `mandatory:"true" json:"patchVcnInstructions"` +} + +func (m PatchVcnDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchVcnDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *PatchVcnDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + PatchVcnInstructions []patchvcninstruction `json:"patchVcnInstructions"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.PatchVcnInstructions = make([]PatchVcnInstruction, len(model.PatchVcnInstructions)) + for i, n := range model.PatchVcnInstructions { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.PatchVcnInstructions[i] = nn.(PatchVcnInstruction) + } else { + m.PatchVcnInstructions[i] = nil + } + } + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_vcn_instruction.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_vcn_instruction.go new file mode 100644 index 000000000..2ba3d1537 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_vcn_instruction.go @@ -0,0 +1,134 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchVcnInstruction A single instruction to be included as part of PatchVcn request content. +type PatchVcnInstruction interface { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation + // against the VCN resource representation. + // The PatchVcn operation restricts supported selections (see PatchVcn documentation). + // Example: "ipv6PrivateCidrBlocks" + GetSelection() *string +} + +type patchvcninstruction struct { + JsonData []byte + Selection *string `mandatory:"true" json:"selection"` + Operation string `json:"operation"` +} + +// UnmarshalJSON unmarshals json +func (m *patchvcninstruction) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpatchvcninstruction patchvcninstruction + s := struct { + Model Unmarshalerpatchvcninstruction + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Selection = s.Model.Selection + m.Operation = s.Model.Operation + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *patchvcninstruction) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Operation { + case "REPLACE": + mm := PatchVcnReplaceInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for PatchVcnInstruction: %s.", m.Operation) + return *m, nil + } +} + +// GetSelection returns Selection +func (m patchvcninstruction) GetSelection() *string { + return m.Selection +} + +func (m patchvcninstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m patchvcninstruction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchVcnInstructionOperationEnum Enum with underlying type: string +type PatchVcnInstructionOperationEnum string + +// Set of constants representing the allowable values for PatchVcnInstructionOperationEnum +const ( + PatchVcnInstructionOperationReplace PatchVcnInstructionOperationEnum = "REPLACE" +) + +var mappingPatchVcnInstructionOperationEnum = map[string]PatchVcnInstructionOperationEnum{ + "REPLACE": PatchVcnInstructionOperationReplace, +} + +var mappingPatchVcnInstructionOperationEnumLowerCase = map[string]PatchVcnInstructionOperationEnum{ + "replace": PatchVcnInstructionOperationReplace, +} + +// GetPatchVcnInstructionOperationEnumValues Enumerates the set of values for PatchVcnInstructionOperationEnum +func GetPatchVcnInstructionOperationEnumValues() []PatchVcnInstructionOperationEnum { + values := make([]PatchVcnInstructionOperationEnum, 0) + for _, v := range mappingPatchVcnInstructionOperationEnum { + values = append(values, v) + } + return values +} + +// GetPatchVcnInstructionOperationEnumStringValues Enumerates the set of values in String for PatchVcnInstructionOperationEnum +func GetPatchVcnInstructionOperationEnumStringValues() []string { + return []string{ + "REPLACE", + } +} + +// GetMappingPatchVcnInstructionOperationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchVcnInstructionOperationEnum(val string) (PatchVcnInstructionOperationEnum, bool) { + enum, ok := mappingPatchVcnInstructionOperationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_vcn_replace_instruction.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_vcn_replace_instruction.go new file mode 100644 index 000000000..f7d99345e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_vcn_replace_instruction.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchVcnReplaceInstruction Replaces the entire value of the selected VCN IPv6 CIDR field with the specified final state. +// For CIDR list selections (for example, `ipv6PrivateCidrBlocks`, `byoipv6CidrDetails`), the supplied array is treated +// as the authoritative set of CIDRs for that field: +// - CIDRs present in both the existing list and the new list remain unchanged. +// - CIDRs present in the existing list but not in the new list are removed. +// - CIDRs present in the new list but not in the existing list are added. +type PatchVcnReplaceInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation + // against the VCN resource representation. + // The PatchVcn operation restricts supported selections (see PatchVcn documentation). + // Example: "ipv6PrivateCidrBlocks" + Selection *string `mandatory:"true" json:"selection"` + + // The desired final IPv6 CIDR value(s) to apply to the selected field. This field must + // always be a JSON object. + // For fields that take a single CIDR (for example, `ipv6CidrBlock`), specify the CIDR. + // For fields that take multiple CIDRs (for example, `ipv6PrivateCidrBlocks`,`byoipv6CidrDetails`), specify the full desired list. + // Examples: + // - { "operation": "REPLACE", "selection": "ipv6PrivateCidrBlocks", "value": { "cidrs": [ "fd00:1000:0:1::/64", "fd00:1000:0:2::/64" ] } } + // - { "operation": "REPLACE", "selection": "ipv6CidrBlock", "value": { "cidr": "2001:db8:1234:1111::/64" } } + Value *interface{} `mandatory:"true" json:"value"` +} + +// GetSelection returns Selection +func (m PatchVcnReplaceInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchVcnReplaceInstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchVcnReplaceInstruction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PatchVcnReplaceInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchVcnReplaceInstruction PatchVcnReplaceInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchVcnReplaceInstruction + }{ + "REPLACE", + (MarshalTypePatchVcnReplaceInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_vcn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_vcn_request_response.go new file mode 100644 index 000000000..c414c1c4e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/patch_vcn_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchVcnRequest wrapper for the PatchVcn operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/PatchVcn.go.html to see an example of how to use PatchVcnRequest. +type PatchVcnRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` + + // Details object for patching a VCN. + PatchVcnDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchVcnRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchVcnRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchVcnRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchVcnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchVcnRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchVcnResponse wrapper for the PatchVcn operation +type PatchVcnResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response PatchVcnResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchVcnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/peer_region_for_remote_peering.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/peer_region_for_remote_peering.go new file mode 100644 index 000000000..b0f0df799 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/peer_region_for_remote_peering.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PeerRegionForRemotePeering Details about a region that supports remote VCN peering. For more +// information, see VCN Peering (https://docs.oracle.com/iaas/Content/Network/Tasks/VCNpeering.htm). +type PeerRegionForRemotePeering struct { + + // The region's name. + // Example: `us-phoenix-1` + Name *string `mandatory:"true" json:"name"` +} + +func (m PeerRegionForRemotePeering) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PeerRegionForRemotePeering) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/percentage_of_cores_enabled_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/percentage_of_cores_enabled_options.go new file mode 100644 index 000000000..80217e7a0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/percentage_of_cores_enabled_options.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PercentageOfCoresEnabledOptions Configuration options for the percentage of cores enabled. +type PercentageOfCoresEnabledOptions struct { + + // The minimum allowed percentage of cores enabled. + Min *int `mandatory:"false" json:"min"` + + // The maximum allowed percentage of cores enabled. + Max *int `mandatory:"false" json:"max"` + + // The default percentage of cores enabled. + DefaultValue *int `mandatory:"false" json:"defaultValue"` +} + +func (m PercentageOfCoresEnabledOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PercentageOfCoresEnabledOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/performance_based_autotune_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/performance_based_autotune_policy.go new file mode 100644 index 000000000..15328cff7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/performance_based_autotune_policy.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PerformanceBasedAutotunePolicy If a volume is being throttled at the current setting for a certain period of time, auto-tune will +// gradually increase the volume’s performance limited up to Maximum VPUs/GB. After the volume has been idle at the +// current setting for a certain period of time, auto-tune will gradually decrease the volume’s performance limited +// down to Default/Minimum VPUs/GB. +type PerformanceBasedAutotunePolicy struct { + + // This will be the maximum VPUs/GB performance level that the volume will be auto-tuned + // temporarily based on performance monitoring. + MaxVpusPerGB *int64 `mandatory:"true" json:"maxVpusPerGB"` +} + +func (m PerformanceBasedAutotunePolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PerformanceBasedAutotunePolicy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PerformanceBasedAutotunePolicy) MarshalJSON() (buff []byte, e error) { + type MarshalTypePerformanceBasedAutotunePolicy PerformanceBasedAutotunePolicy + s := struct { + DiscriminatorParam string `json:"autotuneType"` + MarshalTypePerformanceBasedAutotunePolicy + }{ + "PERFORMANCE_BASED", + (MarshalTypePerformanceBasedAutotunePolicy)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/phase_one_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/phase_one_config_details.go new file mode 100644 index 000000000..1516704a7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/phase_one_config_details.go @@ -0,0 +1,216 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PhaseOneConfigDetails Configuration details for IKE phase one (ISAKMP) configuration parameters. +type PhaseOneConfigDetails struct { + + // Indicates whether custom configuration is enabled for phase one options. + IsCustomPhaseOneConfig *bool `mandatory:"false" json:"isCustomPhaseOneConfig"` + + // The custom authentication algorithm proposed during phase one tunnel negotiation. + AuthenticationAlgorithm PhaseOneConfigDetailsAuthenticationAlgorithmEnum `mandatory:"false" json:"authenticationAlgorithm,omitempty"` + + // The custom encryption algorithm proposed during phase one tunnel negotiation. + EncryptionAlgorithm PhaseOneConfigDetailsEncryptionAlgorithmEnum `mandatory:"false" json:"encryptionAlgorithm,omitempty"` + + // The custom Diffie-Hellman group proposed during phase one tunnel negotiation. + DiffieHelmanGroup PhaseOneConfigDetailsDiffieHelmanGroupEnum `mandatory:"false" json:"diffieHelmanGroup,omitempty"` + + // Internet key association (IKE) session key lifetime in seconds for IPSec phase one. The default is 28800 which is equivalent to 8 hours. + LifetimeInSeconds *int `mandatory:"false" json:"lifetimeInSeconds"` +} + +func (m PhaseOneConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PhaseOneConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPhaseOneConfigDetailsAuthenticationAlgorithmEnum(string(m.AuthenticationAlgorithm)); !ok && m.AuthenticationAlgorithm != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AuthenticationAlgorithm: %s. Supported values are: %s.", m.AuthenticationAlgorithm, strings.Join(GetPhaseOneConfigDetailsAuthenticationAlgorithmEnumStringValues(), ","))) + } + if _, ok := GetMappingPhaseOneConfigDetailsEncryptionAlgorithmEnum(string(m.EncryptionAlgorithm)); !ok && m.EncryptionAlgorithm != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncryptionAlgorithm: %s. Supported values are: %s.", m.EncryptionAlgorithm, strings.Join(GetPhaseOneConfigDetailsEncryptionAlgorithmEnumStringValues(), ","))) + } + if _, ok := GetMappingPhaseOneConfigDetailsDiffieHelmanGroupEnum(string(m.DiffieHelmanGroup)); !ok && m.DiffieHelmanGroup != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DiffieHelmanGroup: %s. Supported values are: %s.", m.DiffieHelmanGroup, strings.Join(GetPhaseOneConfigDetailsDiffieHelmanGroupEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PhaseOneConfigDetailsAuthenticationAlgorithmEnum Enum with underlying type: string +type PhaseOneConfigDetailsAuthenticationAlgorithmEnum string + +// Set of constants representing the allowable values for PhaseOneConfigDetailsAuthenticationAlgorithmEnum +const ( + PhaseOneConfigDetailsAuthenticationAlgorithmSha2384 PhaseOneConfigDetailsAuthenticationAlgorithmEnum = "SHA2_384" + PhaseOneConfigDetailsAuthenticationAlgorithmSha2256 PhaseOneConfigDetailsAuthenticationAlgorithmEnum = "SHA2_256" + PhaseOneConfigDetailsAuthenticationAlgorithmSha196 PhaseOneConfigDetailsAuthenticationAlgorithmEnum = "SHA1_96" +) + +var mappingPhaseOneConfigDetailsAuthenticationAlgorithmEnum = map[string]PhaseOneConfigDetailsAuthenticationAlgorithmEnum{ + "SHA2_384": PhaseOneConfigDetailsAuthenticationAlgorithmSha2384, + "SHA2_256": PhaseOneConfigDetailsAuthenticationAlgorithmSha2256, + "SHA1_96": PhaseOneConfigDetailsAuthenticationAlgorithmSha196, +} + +var mappingPhaseOneConfigDetailsAuthenticationAlgorithmEnumLowerCase = map[string]PhaseOneConfigDetailsAuthenticationAlgorithmEnum{ + "sha2_384": PhaseOneConfigDetailsAuthenticationAlgorithmSha2384, + "sha2_256": PhaseOneConfigDetailsAuthenticationAlgorithmSha2256, + "sha1_96": PhaseOneConfigDetailsAuthenticationAlgorithmSha196, +} + +// GetPhaseOneConfigDetailsAuthenticationAlgorithmEnumValues Enumerates the set of values for PhaseOneConfigDetailsAuthenticationAlgorithmEnum +func GetPhaseOneConfigDetailsAuthenticationAlgorithmEnumValues() []PhaseOneConfigDetailsAuthenticationAlgorithmEnum { + values := make([]PhaseOneConfigDetailsAuthenticationAlgorithmEnum, 0) + for _, v := range mappingPhaseOneConfigDetailsAuthenticationAlgorithmEnum { + values = append(values, v) + } + return values +} + +// GetPhaseOneConfigDetailsAuthenticationAlgorithmEnumStringValues Enumerates the set of values in String for PhaseOneConfigDetailsAuthenticationAlgorithmEnum +func GetPhaseOneConfigDetailsAuthenticationAlgorithmEnumStringValues() []string { + return []string{ + "SHA2_384", + "SHA2_256", + "SHA1_96", + } +} + +// GetMappingPhaseOneConfigDetailsAuthenticationAlgorithmEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPhaseOneConfigDetailsAuthenticationAlgorithmEnum(val string) (PhaseOneConfigDetailsAuthenticationAlgorithmEnum, bool) { + enum, ok := mappingPhaseOneConfigDetailsAuthenticationAlgorithmEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PhaseOneConfigDetailsEncryptionAlgorithmEnum Enum with underlying type: string +type PhaseOneConfigDetailsEncryptionAlgorithmEnum string + +// Set of constants representing the allowable values for PhaseOneConfigDetailsEncryptionAlgorithmEnum +const ( + PhaseOneConfigDetailsEncryptionAlgorithm256Cbc PhaseOneConfigDetailsEncryptionAlgorithmEnum = "AES_256_CBC" + PhaseOneConfigDetailsEncryptionAlgorithm192Cbc PhaseOneConfigDetailsEncryptionAlgorithmEnum = "AES_192_CBC" + PhaseOneConfigDetailsEncryptionAlgorithm128Cbc PhaseOneConfigDetailsEncryptionAlgorithmEnum = "AES_128_CBC" +) + +var mappingPhaseOneConfigDetailsEncryptionAlgorithmEnum = map[string]PhaseOneConfigDetailsEncryptionAlgorithmEnum{ + "AES_256_CBC": PhaseOneConfigDetailsEncryptionAlgorithm256Cbc, + "AES_192_CBC": PhaseOneConfigDetailsEncryptionAlgorithm192Cbc, + "AES_128_CBC": PhaseOneConfigDetailsEncryptionAlgorithm128Cbc, +} + +var mappingPhaseOneConfigDetailsEncryptionAlgorithmEnumLowerCase = map[string]PhaseOneConfigDetailsEncryptionAlgorithmEnum{ + "aes_256_cbc": PhaseOneConfigDetailsEncryptionAlgorithm256Cbc, + "aes_192_cbc": PhaseOneConfigDetailsEncryptionAlgorithm192Cbc, + "aes_128_cbc": PhaseOneConfigDetailsEncryptionAlgorithm128Cbc, +} + +// GetPhaseOneConfigDetailsEncryptionAlgorithmEnumValues Enumerates the set of values for PhaseOneConfigDetailsEncryptionAlgorithmEnum +func GetPhaseOneConfigDetailsEncryptionAlgorithmEnumValues() []PhaseOneConfigDetailsEncryptionAlgorithmEnum { + values := make([]PhaseOneConfigDetailsEncryptionAlgorithmEnum, 0) + for _, v := range mappingPhaseOneConfigDetailsEncryptionAlgorithmEnum { + values = append(values, v) + } + return values +} + +// GetPhaseOneConfigDetailsEncryptionAlgorithmEnumStringValues Enumerates the set of values in String for PhaseOneConfigDetailsEncryptionAlgorithmEnum +func GetPhaseOneConfigDetailsEncryptionAlgorithmEnumStringValues() []string { + return []string{ + "AES_256_CBC", + "AES_192_CBC", + "AES_128_CBC", + } +} + +// GetMappingPhaseOneConfigDetailsEncryptionAlgorithmEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPhaseOneConfigDetailsEncryptionAlgorithmEnum(val string) (PhaseOneConfigDetailsEncryptionAlgorithmEnum, bool) { + enum, ok := mappingPhaseOneConfigDetailsEncryptionAlgorithmEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PhaseOneConfigDetailsDiffieHelmanGroupEnum Enum with underlying type: string +type PhaseOneConfigDetailsDiffieHelmanGroupEnum string + +// Set of constants representing the allowable values for PhaseOneConfigDetailsDiffieHelmanGroupEnum +const ( + PhaseOneConfigDetailsDiffieHelmanGroupGroup2 PhaseOneConfigDetailsDiffieHelmanGroupEnum = "GROUP2" + PhaseOneConfigDetailsDiffieHelmanGroupGroup5 PhaseOneConfigDetailsDiffieHelmanGroupEnum = "GROUP5" + PhaseOneConfigDetailsDiffieHelmanGroupGroup14 PhaseOneConfigDetailsDiffieHelmanGroupEnum = "GROUP14" + PhaseOneConfigDetailsDiffieHelmanGroupGroup19 PhaseOneConfigDetailsDiffieHelmanGroupEnum = "GROUP19" + PhaseOneConfigDetailsDiffieHelmanGroupGroup20 PhaseOneConfigDetailsDiffieHelmanGroupEnum = "GROUP20" + PhaseOneConfigDetailsDiffieHelmanGroupGroup24 PhaseOneConfigDetailsDiffieHelmanGroupEnum = "GROUP24" +) + +var mappingPhaseOneConfigDetailsDiffieHelmanGroupEnum = map[string]PhaseOneConfigDetailsDiffieHelmanGroupEnum{ + "GROUP2": PhaseOneConfigDetailsDiffieHelmanGroupGroup2, + "GROUP5": PhaseOneConfigDetailsDiffieHelmanGroupGroup5, + "GROUP14": PhaseOneConfigDetailsDiffieHelmanGroupGroup14, + "GROUP19": PhaseOneConfigDetailsDiffieHelmanGroupGroup19, + "GROUP20": PhaseOneConfigDetailsDiffieHelmanGroupGroup20, + "GROUP24": PhaseOneConfigDetailsDiffieHelmanGroupGroup24, +} + +var mappingPhaseOneConfigDetailsDiffieHelmanGroupEnumLowerCase = map[string]PhaseOneConfigDetailsDiffieHelmanGroupEnum{ + "group2": PhaseOneConfigDetailsDiffieHelmanGroupGroup2, + "group5": PhaseOneConfigDetailsDiffieHelmanGroupGroup5, + "group14": PhaseOneConfigDetailsDiffieHelmanGroupGroup14, + "group19": PhaseOneConfigDetailsDiffieHelmanGroupGroup19, + "group20": PhaseOneConfigDetailsDiffieHelmanGroupGroup20, + "group24": PhaseOneConfigDetailsDiffieHelmanGroupGroup24, +} + +// GetPhaseOneConfigDetailsDiffieHelmanGroupEnumValues Enumerates the set of values for PhaseOneConfigDetailsDiffieHelmanGroupEnum +func GetPhaseOneConfigDetailsDiffieHelmanGroupEnumValues() []PhaseOneConfigDetailsDiffieHelmanGroupEnum { + values := make([]PhaseOneConfigDetailsDiffieHelmanGroupEnum, 0) + for _, v := range mappingPhaseOneConfigDetailsDiffieHelmanGroupEnum { + values = append(values, v) + } + return values +} + +// GetPhaseOneConfigDetailsDiffieHelmanGroupEnumStringValues Enumerates the set of values in String for PhaseOneConfigDetailsDiffieHelmanGroupEnum +func GetPhaseOneConfigDetailsDiffieHelmanGroupEnumStringValues() []string { + return []string{ + "GROUP2", + "GROUP5", + "GROUP14", + "GROUP19", + "GROUP20", + "GROUP24", + } +} + +// GetMappingPhaseOneConfigDetailsDiffieHelmanGroupEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPhaseOneConfigDetailsDiffieHelmanGroupEnum(val string) (PhaseOneConfigDetailsDiffieHelmanGroupEnum, bool) { + enum, ok := mappingPhaseOneConfigDetailsDiffieHelmanGroupEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/phase_two_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/phase_two_config_details.go new file mode 100644 index 000000000..7b8e56347 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/phase_two_config_details.go @@ -0,0 +1,227 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PhaseTwoConfigDetails Configuration details for IPSec phase two configuration parameters. +type PhaseTwoConfigDetails struct { + + // Indicates whether custom configuration is enabled for phase two options. + IsCustomPhaseTwoConfig *bool `mandatory:"false" json:"isCustomPhaseTwoConfig"` + + // The authentication algorithm proposed during phase two tunnel negotiation. + AuthenticationAlgorithm PhaseTwoConfigDetailsAuthenticationAlgorithmEnum `mandatory:"false" json:"authenticationAlgorithm,omitempty"` + + // The encryption algorithm proposed during phase two tunnel negotiation. + EncryptionAlgorithm PhaseTwoConfigDetailsEncryptionAlgorithmEnum `mandatory:"false" json:"encryptionAlgorithm,omitempty"` + + // Lifetime in seconds for the IPSec session key set in phase two. The default is 3600 which is equivalent to 1 hour. + LifetimeInSeconds *int `mandatory:"false" json:"lifetimeInSeconds"` + + // Indicates whether perfect forward secrecy (PFS) is enabled. + IsPfsEnabled *bool `mandatory:"false" json:"isPfsEnabled"` + + // The Diffie-Hellman group used for PFS, if PFS is enabled. + PfsDhGroup PhaseTwoConfigDetailsPfsDhGroupEnum `mandatory:"false" json:"pfsDhGroup,omitempty"` +} + +func (m PhaseTwoConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PhaseTwoConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPhaseTwoConfigDetailsAuthenticationAlgorithmEnum(string(m.AuthenticationAlgorithm)); !ok && m.AuthenticationAlgorithm != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AuthenticationAlgorithm: %s. Supported values are: %s.", m.AuthenticationAlgorithm, strings.Join(GetPhaseTwoConfigDetailsAuthenticationAlgorithmEnumStringValues(), ","))) + } + if _, ok := GetMappingPhaseTwoConfigDetailsEncryptionAlgorithmEnum(string(m.EncryptionAlgorithm)); !ok && m.EncryptionAlgorithm != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncryptionAlgorithm: %s. Supported values are: %s.", m.EncryptionAlgorithm, strings.Join(GetPhaseTwoConfigDetailsEncryptionAlgorithmEnumStringValues(), ","))) + } + if _, ok := GetMappingPhaseTwoConfigDetailsPfsDhGroupEnum(string(m.PfsDhGroup)); !ok && m.PfsDhGroup != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PfsDhGroup: %s. Supported values are: %s.", m.PfsDhGroup, strings.Join(GetPhaseTwoConfigDetailsPfsDhGroupEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PhaseTwoConfigDetailsAuthenticationAlgorithmEnum Enum with underlying type: string +type PhaseTwoConfigDetailsAuthenticationAlgorithmEnum string + +// Set of constants representing the allowable values for PhaseTwoConfigDetailsAuthenticationAlgorithmEnum +const ( + PhaseTwoConfigDetailsAuthenticationAlgorithmSha2256128 PhaseTwoConfigDetailsAuthenticationAlgorithmEnum = "HMAC_SHA2_256_128" + PhaseTwoConfigDetailsAuthenticationAlgorithmSha1128 PhaseTwoConfigDetailsAuthenticationAlgorithmEnum = "HMAC_SHA1_128" +) + +var mappingPhaseTwoConfigDetailsAuthenticationAlgorithmEnum = map[string]PhaseTwoConfigDetailsAuthenticationAlgorithmEnum{ + "HMAC_SHA2_256_128": PhaseTwoConfigDetailsAuthenticationAlgorithmSha2256128, + "HMAC_SHA1_128": PhaseTwoConfigDetailsAuthenticationAlgorithmSha1128, +} + +var mappingPhaseTwoConfigDetailsAuthenticationAlgorithmEnumLowerCase = map[string]PhaseTwoConfigDetailsAuthenticationAlgorithmEnum{ + "hmac_sha2_256_128": PhaseTwoConfigDetailsAuthenticationAlgorithmSha2256128, + "hmac_sha1_128": PhaseTwoConfigDetailsAuthenticationAlgorithmSha1128, +} + +// GetPhaseTwoConfigDetailsAuthenticationAlgorithmEnumValues Enumerates the set of values for PhaseTwoConfigDetailsAuthenticationAlgorithmEnum +func GetPhaseTwoConfigDetailsAuthenticationAlgorithmEnumValues() []PhaseTwoConfigDetailsAuthenticationAlgorithmEnum { + values := make([]PhaseTwoConfigDetailsAuthenticationAlgorithmEnum, 0) + for _, v := range mappingPhaseTwoConfigDetailsAuthenticationAlgorithmEnum { + values = append(values, v) + } + return values +} + +// GetPhaseTwoConfigDetailsAuthenticationAlgorithmEnumStringValues Enumerates the set of values in String for PhaseTwoConfigDetailsAuthenticationAlgorithmEnum +func GetPhaseTwoConfigDetailsAuthenticationAlgorithmEnumStringValues() []string { + return []string{ + "HMAC_SHA2_256_128", + "HMAC_SHA1_128", + } +} + +// GetMappingPhaseTwoConfigDetailsAuthenticationAlgorithmEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPhaseTwoConfigDetailsAuthenticationAlgorithmEnum(val string) (PhaseTwoConfigDetailsAuthenticationAlgorithmEnum, bool) { + enum, ok := mappingPhaseTwoConfigDetailsAuthenticationAlgorithmEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PhaseTwoConfigDetailsEncryptionAlgorithmEnum Enum with underlying type: string +type PhaseTwoConfigDetailsEncryptionAlgorithmEnum string + +// Set of constants representing the allowable values for PhaseTwoConfigDetailsEncryptionAlgorithmEnum +const ( + PhaseTwoConfigDetailsEncryptionAlgorithm256Gcm PhaseTwoConfigDetailsEncryptionAlgorithmEnum = "AES_256_GCM" + PhaseTwoConfigDetailsEncryptionAlgorithm192Gcm PhaseTwoConfigDetailsEncryptionAlgorithmEnum = "AES_192_GCM" + PhaseTwoConfigDetailsEncryptionAlgorithm128Gcm PhaseTwoConfigDetailsEncryptionAlgorithmEnum = "AES_128_GCM" + PhaseTwoConfigDetailsEncryptionAlgorithm256Cbc PhaseTwoConfigDetailsEncryptionAlgorithmEnum = "AES_256_CBC" + PhaseTwoConfigDetailsEncryptionAlgorithm192Cbc PhaseTwoConfigDetailsEncryptionAlgorithmEnum = "AES_192_CBC" + PhaseTwoConfigDetailsEncryptionAlgorithm128Cbc PhaseTwoConfigDetailsEncryptionAlgorithmEnum = "AES_128_CBC" +) + +var mappingPhaseTwoConfigDetailsEncryptionAlgorithmEnum = map[string]PhaseTwoConfigDetailsEncryptionAlgorithmEnum{ + "AES_256_GCM": PhaseTwoConfigDetailsEncryptionAlgorithm256Gcm, + "AES_192_GCM": PhaseTwoConfigDetailsEncryptionAlgorithm192Gcm, + "AES_128_GCM": PhaseTwoConfigDetailsEncryptionAlgorithm128Gcm, + "AES_256_CBC": PhaseTwoConfigDetailsEncryptionAlgorithm256Cbc, + "AES_192_CBC": PhaseTwoConfigDetailsEncryptionAlgorithm192Cbc, + "AES_128_CBC": PhaseTwoConfigDetailsEncryptionAlgorithm128Cbc, +} + +var mappingPhaseTwoConfigDetailsEncryptionAlgorithmEnumLowerCase = map[string]PhaseTwoConfigDetailsEncryptionAlgorithmEnum{ + "aes_256_gcm": PhaseTwoConfigDetailsEncryptionAlgorithm256Gcm, + "aes_192_gcm": PhaseTwoConfigDetailsEncryptionAlgorithm192Gcm, + "aes_128_gcm": PhaseTwoConfigDetailsEncryptionAlgorithm128Gcm, + "aes_256_cbc": PhaseTwoConfigDetailsEncryptionAlgorithm256Cbc, + "aes_192_cbc": PhaseTwoConfigDetailsEncryptionAlgorithm192Cbc, + "aes_128_cbc": PhaseTwoConfigDetailsEncryptionAlgorithm128Cbc, +} + +// GetPhaseTwoConfigDetailsEncryptionAlgorithmEnumValues Enumerates the set of values for PhaseTwoConfigDetailsEncryptionAlgorithmEnum +func GetPhaseTwoConfigDetailsEncryptionAlgorithmEnumValues() []PhaseTwoConfigDetailsEncryptionAlgorithmEnum { + values := make([]PhaseTwoConfigDetailsEncryptionAlgorithmEnum, 0) + for _, v := range mappingPhaseTwoConfigDetailsEncryptionAlgorithmEnum { + values = append(values, v) + } + return values +} + +// GetPhaseTwoConfigDetailsEncryptionAlgorithmEnumStringValues Enumerates the set of values in String for PhaseTwoConfigDetailsEncryptionAlgorithmEnum +func GetPhaseTwoConfigDetailsEncryptionAlgorithmEnumStringValues() []string { + return []string{ + "AES_256_GCM", + "AES_192_GCM", + "AES_128_GCM", + "AES_256_CBC", + "AES_192_CBC", + "AES_128_CBC", + } +} + +// GetMappingPhaseTwoConfigDetailsEncryptionAlgorithmEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPhaseTwoConfigDetailsEncryptionAlgorithmEnum(val string) (PhaseTwoConfigDetailsEncryptionAlgorithmEnum, bool) { + enum, ok := mappingPhaseTwoConfigDetailsEncryptionAlgorithmEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PhaseTwoConfigDetailsPfsDhGroupEnum Enum with underlying type: string +type PhaseTwoConfigDetailsPfsDhGroupEnum string + +// Set of constants representing the allowable values for PhaseTwoConfigDetailsPfsDhGroupEnum +const ( + PhaseTwoConfigDetailsPfsDhGroupGroup2 PhaseTwoConfigDetailsPfsDhGroupEnum = "GROUP2" + PhaseTwoConfigDetailsPfsDhGroupGroup5 PhaseTwoConfigDetailsPfsDhGroupEnum = "GROUP5" + PhaseTwoConfigDetailsPfsDhGroupGroup14 PhaseTwoConfigDetailsPfsDhGroupEnum = "GROUP14" + PhaseTwoConfigDetailsPfsDhGroupGroup19 PhaseTwoConfigDetailsPfsDhGroupEnum = "GROUP19" + PhaseTwoConfigDetailsPfsDhGroupGroup20 PhaseTwoConfigDetailsPfsDhGroupEnum = "GROUP20" + PhaseTwoConfigDetailsPfsDhGroupGroup24 PhaseTwoConfigDetailsPfsDhGroupEnum = "GROUP24" +) + +var mappingPhaseTwoConfigDetailsPfsDhGroupEnum = map[string]PhaseTwoConfigDetailsPfsDhGroupEnum{ + "GROUP2": PhaseTwoConfigDetailsPfsDhGroupGroup2, + "GROUP5": PhaseTwoConfigDetailsPfsDhGroupGroup5, + "GROUP14": PhaseTwoConfigDetailsPfsDhGroupGroup14, + "GROUP19": PhaseTwoConfigDetailsPfsDhGroupGroup19, + "GROUP20": PhaseTwoConfigDetailsPfsDhGroupGroup20, + "GROUP24": PhaseTwoConfigDetailsPfsDhGroupGroup24, +} + +var mappingPhaseTwoConfigDetailsPfsDhGroupEnumLowerCase = map[string]PhaseTwoConfigDetailsPfsDhGroupEnum{ + "group2": PhaseTwoConfigDetailsPfsDhGroupGroup2, + "group5": PhaseTwoConfigDetailsPfsDhGroupGroup5, + "group14": PhaseTwoConfigDetailsPfsDhGroupGroup14, + "group19": PhaseTwoConfigDetailsPfsDhGroupGroup19, + "group20": PhaseTwoConfigDetailsPfsDhGroupGroup20, + "group24": PhaseTwoConfigDetailsPfsDhGroupGroup24, +} + +// GetPhaseTwoConfigDetailsPfsDhGroupEnumValues Enumerates the set of values for PhaseTwoConfigDetailsPfsDhGroupEnum +func GetPhaseTwoConfigDetailsPfsDhGroupEnumValues() []PhaseTwoConfigDetailsPfsDhGroupEnum { + values := make([]PhaseTwoConfigDetailsPfsDhGroupEnum, 0) + for _, v := range mappingPhaseTwoConfigDetailsPfsDhGroupEnum { + values = append(values, v) + } + return values +} + +// GetPhaseTwoConfigDetailsPfsDhGroupEnumStringValues Enumerates the set of values in String for PhaseTwoConfigDetailsPfsDhGroupEnum +func GetPhaseTwoConfigDetailsPfsDhGroupEnumStringValues() []string { + return []string{ + "GROUP2", + "GROUP5", + "GROUP14", + "GROUP19", + "GROUP20", + "GROUP24", + } +} + +// GetMappingPhaseTwoConfigDetailsPfsDhGroupEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPhaseTwoConfigDetailsPfsDhGroupEnum(val string) (PhaseTwoConfigDetailsPfsDhGroupEnum, bool) { + enum, ok := mappingPhaseTwoConfigDetailsPfsDhGroupEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/placement_constraint_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/placement_constraint_details.go new file mode 100644 index 000000000..f63e04964 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/placement_constraint_details.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PlacementConstraintDetails The details for providing placement constraints. +type PlacementConstraintDetails interface { +} + +type placementconstraintdetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *placementconstraintdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerplacementconstraintdetails placementconstraintdetails + s := struct { + Model Unmarshalerplacementconstraintdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *placementconstraintdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "HOST_GROUP": + mm := HostGroupPlacementConstraintDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "COMPUTE_BARE_METAL_HOST": + mm := ComputeBareMetalHostPlacementConstraintDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for PlacementConstraintDetails: %s.", m.Type) + return *m, nil + } +} + +func (m placementconstraintdetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m placementconstraintdetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/platform_config.go new file mode 100644 index 000000000..4092e527e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/platform_config.go @@ -0,0 +1,225 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PlatformConfig The platform configuration for the instance. +type PlatformConfig interface { + + // Whether Secure Boot is enabled on the instance. + GetIsSecureBootEnabled() *bool + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + GetIsTrustedPlatformModuleEnabled() *bool + + // Whether the Measured Boot feature is enabled on the instance. + GetIsMeasuredBootEnabled() *bool + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + GetIsMemoryEncryptionEnabled() *bool +} + +type platformconfig struct { + JsonData []byte + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *platformconfig) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerplatformconfig platformconfig + s := struct { + Model Unmarshalerplatformconfig + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.IsSecureBootEnabled = s.Model.IsSecureBootEnabled + m.IsTrustedPlatformModuleEnabled = s.Model.IsTrustedPlatformModuleEnabled + m.IsMeasuredBootEnabled = s.Model.IsMeasuredBootEnabled + m.IsMemoryEncryptionEnabled = s.Model.IsMemoryEncryptionEnabled + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *platformconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "AMD_MILAN_BM": + mm := AmdMilanBmPlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AMD_ROME_BM": + mm := AmdRomeBmPlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INTEL_SKYLAKE_BM": + mm := IntelSkylakeBmPlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AMD_ROME_BM_GPU": + mm := AmdRomeBmGpuPlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INTEL_ICELAKE_BM": + mm := IntelIcelakeBmPlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AMD_VM": + mm := AmdVmPlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INTEL_VM": + mm := IntelVmPlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "GENERIC_BM": + mm := GenericBmPlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AMD_MILAN_BM_GPU": + mm := AmdMilanBmGpuPlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for PlatformConfig: %s.", m.Type) + return *m, nil + } +} + +// GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m platformconfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m platformconfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m platformconfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m platformconfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m platformconfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m platformconfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PlatformConfigTypeEnum Enum with underlying type: string +type PlatformConfigTypeEnum string + +// Set of constants representing the allowable values for PlatformConfigTypeEnum +const ( + PlatformConfigTypeAmdMilanBm PlatformConfigTypeEnum = "AMD_MILAN_BM" + PlatformConfigTypeAmdMilanBmGpu PlatformConfigTypeEnum = "AMD_MILAN_BM_GPU" + PlatformConfigTypeAmdRomeBm PlatformConfigTypeEnum = "AMD_ROME_BM" + PlatformConfigTypeAmdRomeBmGpu PlatformConfigTypeEnum = "AMD_ROME_BM_GPU" + PlatformConfigTypeGenericBm PlatformConfigTypeEnum = "GENERIC_BM" + PlatformConfigTypeIntelIcelakeBm PlatformConfigTypeEnum = "INTEL_ICELAKE_BM" + PlatformConfigTypeIntelSkylakeBm PlatformConfigTypeEnum = "INTEL_SKYLAKE_BM" + PlatformConfigTypeAmdVm PlatformConfigTypeEnum = "AMD_VM" + PlatformConfigTypeIntelVm PlatformConfigTypeEnum = "INTEL_VM" +) + +var mappingPlatformConfigTypeEnum = map[string]PlatformConfigTypeEnum{ + "AMD_MILAN_BM": PlatformConfigTypeAmdMilanBm, + "AMD_MILAN_BM_GPU": PlatformConfigTypeAmdMilanBmGpu, + "AMD_ROME_BM": PlatformConfigTypeAmdRomeBm, + "AMD_ROME_BM_GPU": PlatformConfigTypeAmdRomeBmGpu, + "GENERIC_BM": PlatformConfigTypeGenericBm, + "INTEL_ICELAKE_BM": PlatformConfigTypeIntelIcelakeBm, + "INTEL_SKYLAKE_BM": PlatformConfigTypeIntelSkylakeBm, + "AMD_VM": PlatformConfigTypeAmdVm, + "INTEL_VM": PlatformConfigTypeIntelVm, +} + +var mappingPlatformConfigTypeEnumLowerCase = map[string]PlatformConfigTypeEnum{ + "amd_milan_bm": PlatformConfigTypeAmdMilanBm, + "amd_milan_bm_gpu": PlatformConfigTypeAmdMilanBmGpu, + "amd_rome_bm": PlatformConfigTypeAmdRomeBm, + "amd_rome_bm_gpu": PlatformConfigTypeAmdRomeBmGpu, + "generic_bm": PlatformConfigTypeGenericBm, + "intel_icelake_bm": PlatformConfigTypeIntelIcelakeBm, + "intel_skylake_bm": PlatformConfigTypeIntelSkylakeBm, + "amd_vm": PlatformConfigTypeAmdVm, + "intel_vm": PlatformConfigTypeIntelVm, +} + +// GetPlatformConfigTypeEnumValues Enumerates the set of values for PlatformConfigTypeEnum +func GetPlatformConfigTypeEnumValues() []PlatformConfigTypeEnum { + values := make([]PlatformConfigTypeEnum, 0) + for _, v := range mappingPlatformConfigTypeEnum { + values = append(values, v) + } + return values +} + +// GetPlatformConfigTypeEnumStringValues Enumerates the set of values in String for PlatformConfigTypeEnum +func GetPlatformConfigTypeEnumStringValues() []string { + return []string{ + "AMD_MILAN_BM", + "AMD_MILAN_BM_GPU", + "AMD_ROME_BM", + "AMD_ROME_BM_GPU", + "GENERIC_BM", + "INTEL_ICELAKE_BM", + "INTEL_SKYLAKE_BM", + "AMD_VM", + "INTEL_VM", + } +} + +// GetMappingPlatformConfigTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPlatformConfigTypeEnum(val string) (PlatformConfigTypeEnum, bool) { + enum, ok := mappingPlatformConfigTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/platform_versions.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/platform_versions.go new file mode 100644 index 000000000..bbfbb000b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/platform_versions.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PlatformVersions A platform's pinned firmware versions. +type PlatformVersions struct { + + // The name of the platform supported by this bundle. + Platform *string `mandatory:"false" json:"platform"` + + // An array of pinned components and their respective firmware versions. + Versions []ComponentVersion `mandatory:"false" json:"versions"` +} + +func (m PlatformVersions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PlatformVersions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/port_range.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/port_range.go new file mode 100644 index 000000000..37c2ca60b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/port_range.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PortRange The representation of PortRange +type PortRange struct { + + // The maximum port number, which must not be less than the minimum port number. To specify + // a single port number, set both the min and max to the same value. + Max *int `mandatory:"true" json:"max"` + + // The minimum port number, which must not be greater than the maximum port number. + Min *int `mandatory:"true" json:"min"` +} + +func (m PortRange) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PortRange) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/preemptible_instance_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/preemptible_instance_config_details.go new file mode 100644 index 000000000..7daf1a99c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/preemptible_instance_config_details.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PreemptibleInstanceConfigDetails Configuration options for preemptible instances. +type PreemptibleInstanceConfigDetails struct { + PreemptionAction PreemptionAction `mandatory:"true" json:"preemptionAction"` +} + +func (m PreemptibleInstanceConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PreemptibleInstanceConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *PreemptibleInstanceConfigDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + PreemptionAction preemptionaction `json:"preemptionAction"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.PreemptionAction.UnmarshalPolymorphicJSON(model.PreemptionAction.JsonData) + if e != nil { + return + } + if nn != nil { + m.PreemptionAction = nn.(PreemptionAction) + } else { + m.PreemptionAction = nil + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/preemption_action.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/preemption_action.go new file mode 100644 index 000000000..ccbb0f335 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/preemption_action.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PreemptionAction The action to run when the preemptible instance is interrupted for eviction. +type PreemptionAction interface { +} + +type preemptionaction struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *preemptionaction) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpreemptionaction preemptionaction + s := struct { + Model Unmarshalerpreemptionaction + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *preemptionaction) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "TERMINATE": + mm := TerminatePreemptionAction{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for PreemptionAction: %s.", m.Type) + return *m, nil + } +} + +func (m preemptionaction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m preemptionaction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PreemptionActionTypeEnum Enum with underlying type: string +type PreemptionActionTypeEnum string + +// Set of constants representing the allowable values for PreemptionActionTypeEnum +const ( + PreemptionActionTypeTerminate PreemptionActionTypeEnum = "TERMINATE" +) + +var mappingPreemptionActionTypeEnum = map[string]PreemptionActionTypeEnum{ + "TERMINATE": PreemptionActionTypeTerminate, +} + +var mappingPreemptionActionTypeEnumLowerCase = map[string]PreemptionActionTypeEnum{ + "terminate": PreemptionActionTypeTerminate, +} + +// GetPreemptionActionTypeEnumValues Enumerates the set of values for PreemptionActionTypeEnum +func GetPreemptionActionTypeEnumValues() []PreemptionActionTypeEnum { + values := make([]PreemptionActionTypeEnum, 0) + for _, v := range mappingPreemptionActionTypeEnum { + values = append(values, v) + } + return values +} + +// GetPreemptionActionTypeEnumStringValues Enumerates the set of values in String for PreemptionActionTypeEnum +func GetPreemptionActionTypeEnumStringValues() []string { + return []string{ + "TERMINATE", + } +} + +// GetMappingPreemptionActionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPreemptionActionTypeEnum(val string) (PreemptionActionTypeEnum, bool) { + enum, ok := mappingPreemptionActionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/private_ip.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/private_ip.go new file mode 100644 index 000000000..58f3233a1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/private_ip.go @@ -0,0 +1,247 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrivateIp A *private IP* is a conceptual term that refers to an IPv4 private IP address and related properties. +// The `privateIp` object is the API representation of a private IP. +// **Note:** For information about IPv6 addresses, see Ipv6. +// Each instance has a *primary private IP* that is automatically created and +// assigned to the primary VNIC during instance launch. If you add a secondary +// VNIC to the instance, it also automatically gets a primary private IP. You +// can't remove a primary private IP from its VNIC. The primary private IP is +// automatically deleted when the VNIC is terminated. +// You can add *secondary private IPs* to a VNIC after it's created. For more +// information, see the `privateIp` operations and also +// IP Addresses (https://docs.oracle.com/iaas/Content/Network/Tasks/managingIPaddresses.htm). +// **Note:** Only +// ListPrivateIps and +// GetPrivateIp work with +// *primary* private IPs. To create and update primary private IPs, you instead +// work with instance and VNIC operations. For example, a primary private IP's +// properties come from the values you specify in +// CreateVnicDetails when calling either +// LaunchInstance or +// AttachVnic. To update the hostname +// for a primary private IP, you use UpdateVnic. +// `PrivateIp` objects that are created for use with the Oracle Cloud VMware Solution are +// assigned to a VLAN and not a VNIC in a subnet. See the +// descriptions of the relevant attributes in the `PrivateIp` object. Also see +// Vlan. +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type PrivateIp struct { + + // The private IP's availability domain. This attribute will be null if this is a *secondary* + // private IP assigned to a VNIC that is in a *regional* subnet. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the private IP. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The hostname for the private IP. Used for DNS. The value is the hostname + // portion of the private IP's fully qualified domain name (FQDN) + // (for example, `bminstance1` in FQDN `bminstance1.subnet123.vcn1.oraclevcn.com`). + // Must be unique across all VNICs in the subnet and comply with + // RFC 952 (https://tools.ietf.org/html/rfc952) and + // RFC 1123 (https://tools.ietf.org/html/rfc1123). + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + // Example: `bminstance1` + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // The private IP's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"false" json:"id"` + + // The private IP address of the `privateIp` object. The address is within the CIDR + // of the VNIC's subnet. + // However, if the `PrivateIp` object is being used with a VLAN as part of + // the Oracle Cloud VMware Solution, the address is from the range specified by the + // `cidrBlock` attribute for the VLAN. See Vlan. + // Example: `10.0.3.3` + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // The secondary IPv4 CIDR prefix length. + CidrPrefixLength *int `mandatory:"false" json:"cidrPrefixLength"` + + // Whether this private IP is the primary one on the VNIC. Primary private IPs + // are unassigned and deleted automatically when the VNIC is terminated. + // Example: `true` + IsPrimary *bool `mandatory:"false" json:"isPrimary"` + + // Applicable only if the `PrivateIp` object is being used with a VLAN as part of + // the Oracle Cloud VMware Solution. The `vlanId` is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VLAN. See + // Vlan. + VlanId *string `mandatory:"false" json:"vlanId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet the VNIC is in. + // However, if the `PrivateIp` object is being used with a VLAN as part of + // the Oracle Cloud VMware Solution, the `subnetId` is null. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // The date and time the private IP was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC the private IP is assigned to. The VNIC and private IP + // must be in the same subnet. + // However, if the `PrivateIp` object is being used with a VLAN as part of + // the Oracle Cloud VMware Solution, the `vnicId` is null. + VnicId *string `mandatory:"false" json:"vnicId"` + + // State of the IP address. If an IP address is assigned to a VNIC it is ASSIGNED, otherwise it is AVAILABLE. + IpState PrivateIpIpStateEnum `mandatory:"false" json:"ipState,omitempty"` + + // Lifetime of the IP address. + // There are two types of IPs: + // - Ephemeral + // - Reserved + Lifetime PrivateIpLifetimeEnum `mandatory:"false" json:"lifetime,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see + // Per-resource Routing (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing). + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // Ipv4 Subnet CIDR specified whn creating the PrivateIP. + Ipv4SubnetCidrAtCreation *string `mandatory:"false" json:"ipv4SubnetCidrAtCreation"` +} + +func (m PrivateIp) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PrivateIp) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPrivateIpIpStateEnum(string(m.IpState)); !ok && m.IpState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IpState: %s. Supported values are: %s.", m.IpState, strings.Join(GetPrivateIpIpStateEnumStringValues(), ","))) + } + if _, ok := GetMappingPrivateIpLifetimeEnum(string(m.Lifetime)); !ok && m.Lifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Lifetime: %s. Supported values are: %s.", m.Lifetime, strings.Join(GetPrivateIpLifetimeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PrivateIpIpStateEnum Enum with underlying type: string +type PrivateIpIpStateEnum string + +// Set of constants representing the allowable values for PrivateIpIpStateEnum +const ( + PrivateIpIpStateAssigned PrivateIpIpStateEnum = "ASSIGNED" + PrivateIpIpStateAvailable PrivateIpIpStateEnum = "AVAILABLE" +) + +var mappingPrivateIpIpStateEnum = map[string]PrivateIpIpStateEnum{ + "ASSIGNED": PrivateIpIpStateAssigned, + "AVAILABLE": PrivateIpIpStateAvailable, +} + +var mappingPrivateIpIpStateEnumLowerCase = map[string]PrivateIpIpStateEnum{ + "assigned": PrivateIpIpStateAssigned, + "available": PrivateIpIpStateAvailable, +} + +// GetPrivateIpIpStateEnumValues Enumerates the set of values for PrivateIpIpStateEnum +func GetPrivateIpIpStateEnumValues() []PrivateIpIpStateEnum { + values := make([]PrivateIpIpStateEnum, 0) + for _, v := range mappingPrivateIpIpStateEnum { + values = append(values, v) + } + return values +} + +// GetPrivateIpIpStateEnumStringValues Enumerates the set of values in String for PrivateIpIpStateEnum +func GetPrivateIpIpStateEnumStringValues() []string { + return []string{ + "ASSIGNED", + "AVAILABLE", + } +} + +// GetMappingPrivateIpIpStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPrivateIpIpStateEnum(val string) (PrivateIpIpStateEnum, bool) { + enum, ok := mappingPrivateIpIpStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PrivateIpLifetimeEnum Enum with underlying type: string +type PrivateIpLifetimeEnum string + +// Set of constants representing the allowable values for PrivateIpLifetimeEnum +const ( + PrivateIpLifetimeEphemeral PrivateIpLifetimeEnum = "EPHEMERAL" + PrivateIpLifetimeReserved PrivateIpLifetimeEnum = "RESERVED" +) + +var mappingPrivateIpLifetimeEnum = map[string]PrivateIpLifetimeEnum{ + "EPHEMERAL": PrivateIpLifetimeEphemeral, + "RESERVED": PrivateIpLifetimeReserved, +} + +var mappingPrivateIpLifetimeEnumLowerCase = map[string]PrivateIpLifetimeEnum{ + "ephemeral": PrivateIpLifetimeEphemeral, + "reserved": PrivateIpLifetimeReserved, +} + +// GetPrivateIpLifetimeEnumValues Enumerates the set of values for PrivateIpLifetimeEnum +func GetPrivateIpLifetimeEnumValues() []PrivateIpLifetimeEnum { + values := make([]PrivateIpLifetimeEnum, 0) + for _, v := range mappingPrivateIpLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetPrivateIpLifetimeEnumStringValues Enumerates the set of values in String for PrivateIpLifetimeEnum +func GetPrivateIpLifetimeEnumStringValues() []string { + return []string{ + "EPHEMERAL", + "RESERVED", + } +} + +// GetMappingPrivateIpLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPrivateIpLifetimeEnum(val string) (PrivateIpLifetimeEnum, bool) { + enum, ok := mappingPrivateIpLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/private_ip_vnic_detach_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/private_ip_vnic_detach_request_response.go new file mode 100644 index 000000000..70075c96e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/private_ip_vnic_detach_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PrivateIpVnicDetachRequest wrapper for the PrivateIpVnicDetach operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/PrivateIpVnicDetach.go.html to see an example of how to use PrivateIpVnicDetachRequest. +type PrivateIpVnicDetachRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private IP or IPv6. + PrivateIpId *string `mandatory:"true" contributesTo:"path" name:"privateIpId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PrivateIpVnicDetachRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PrivateIpVnicDetachRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PrivateIpVnicDetachRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PrivateIpVnicDetachRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PrivateIpVnicDetachRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PrivateIpVnicDetachResponse wrapper for the PrivateIpVnicDetach operation +type PrivateIpVnicDetachResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PrivateIp instance + PrivateIp `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response PrivateIpVnicDetachResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PrivateIpVnicDetachResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/public_ip.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/public_ip.go new file mode 100644 index 000000000..27febd52a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/public_ip.go @@ -0,0 +1,333 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PublicIp A *public IP* is a conceptual term that refers to a public IP address and related properties. +// The `publicIp` object is the API representation of a public IP. +// There are two types of public IPs: +// 1. Ephemeral +// 2. Reserved +// For more information and comparison of the two types, +// see Public IP Addresses (https://docs.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm). +type PublicIp struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the entity the public IP is assigned to, or in the process of + // being assigned to. + AssignedEntityId *string `mandatory:"false" json:"assignedEntityId"` + + // The type of entity the public IP is assigned to, or in the process of being + // assigned to. + AssignedEntityType PublicIpAssignedEntityTypeEnum `mandatory:"false" json:"assignedEntityType,omitempty"` + + // The public IP's availability domain. This property is set only for ephemeral public IPs + // that are assigned to a private IP (that is, when the `scope` of the public IP is set to + // AVAILABILITY_DOMAIN). The value is the availability domain of the assigned private IP. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the public IP. For an ephemeral public IP, this is + // the compartment of its assigned entity (which can be a private IP or a regional entity such + // as a NAT gateway). For a reserved public IP that is currently assigned, + // its compartment can be different from the assigned private IP's. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The public IP's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"false" json:"id"` + + // The public IP address of the `publicIp` object. + // Example: `203.0.113.2` + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // The public IP's current state. + LifecycleState PublicIpLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Defines when the public IP is deleted and released back to Oracle's public IP pool. + // * `EPHEMERAL`: The lifetime is tied to the lifetime of its assigned entity. An ephemeral + // public IP must always be assigned to an entity. If the assigned entity is a private IP, + // the ephemeral public IP is automatically deleted when the private IP is deleted, when + // the VNIC is terminated, or when the instance is terminated. If the assigned entity is a + // NatGateway, the ephemeral public IP is automatically + // deleted when the NAT gateway is terminated. + // * `RESERVED`: You control the public IP's lifetime. You can delete a reserved public IP + // whenever you like. It does not need to be assigned to a private IP at all times. + // For more information and comparison of the two types, + // see Public IP Addresses (https://docs.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm). + Lifetime PublicIpLifetimeEnum `mandatory:"false" json:"lifetime,omitempty"` + + // Deprecated. Use `assignedEntityId` instead. + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private IP that the public IP is currently assigned to, or in the + // process of being assigned to. + // **Note:** This is `null` if the public IP is not assigned to a private IP, or is + // in the process of being assigned to one. + PrivateIpId *string `mandatory:"false" json:"privateIpId"` + + // Whether the public IP is regional or specific to a particular availability domain. + // * `REGION`: The public IP exists within a region and is assigned to a regional entity + // (such as a NatGateway), or can be assigned to a private + // IP in any availability domain in the region. Reserved public IPs and ephemeral public IPs + // assigned to a regional entity have `scope` = `REGION`. + // * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the entity + // it's assigned to, which is specified by the `availabilityDomain` property of the public IP object. + // Ephemeral public IPs that are assigned to private IPs have `scope` = `AVAILABILITY_DOMAIN`. + Scope PublicIpScopeEnum `mandatory:"false" json:"scope,omitempty"` + + // The date and time the public IP was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the pool object created in the current tenancy. + PublicIpPoolId *string `mandatory:"false" json:"publicIpPoolId"` +} + +func (m PublicIp) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PublicIp) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPublicIpAssignedEntityTypeEnum(string(m.AssignedEntityType)); !ok && m.AssignedEntityType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AssignedEntityType: %s. Supported values are: %s.", m.AssignedEntityType, strings.Join(GetPublicIpAssignedEntityTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingPublicIpLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPublicIpLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingPublicIpLifetimeEnum(string(m.Lifetime)); !ok && m.Lifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Lifetime: %s. Supported values are: %s.", m.Lifetime, strings.Join(GetPublicIpLifetimeEnumStringValues(), ","))) + } + if _, ok := GetMappingPublicIpScopeEnum(string(m.Scope)); !ok && m.Scope != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Scope: %s. Supported values are: %s.", m.Scope, strings.Join(GetPublicIpScopeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PublicIpAssignedEntityTypeEnum Enum with underlying type: string +type PublicIpAssignedEntityTypeEnum string + +// Set of constants representing the allowable values for PublicIpAssignedEntityTypeEnum +const ( + PublicIpAssignedEntityTypePrivateIp PublicIpAssignedEntityTypeEnum = "PRIVATE_IP" + PublicIpAssignedEntityTypeNatGateway PublicIpAssignedEntityTypeEnum = "NAT_GATEWAY" +) + +var mappingPublicIpAssignedEntityTypeEnum = map[string]PublicIpAssignedEntityTypeEnum{ + "PRIVATE_IP": PublicIpAssignedEntityTypePrivateIp, + "NAT_GATEWAY": PublicIpAssignedEntityTypeNatGateway, +} + +var mappingPublicIpAssignedEntityTypeEnumLowerCase = map[string]PublicIpAssignedEntityTypeEnum{ + "private_ip": PublicIpAssignedEntityTypePrivateIp, + "nat_gateway": PublicIpAssignedEntityTypeNatGateway, +} + +// GetPublicIpAssignedEntityTypeEnumValues Enumerates the set of values for PublicIpAssignedEntityTypeEnum +func GetPublicIpAssignedEntityTypeEnumValues() []PublicIpAssignedEntityTypeEnum { + values := make([]PublicIpAssignedEntityTypeEnum, 0) + for _, v := range mappingPublicIpAssignedEntityTypeEnum { + values = append(values, v) + } + return values +} + +// GetPublicIpAssignedEntityTypeEnumStringValues Enumerates the set of values in String for PublicIpAssignedEntityTypeEnum +func GetPublicIpAssignedEntityTypeEnumStringValues() []string { + return []string{ + "PRIVATE_IP", + "NAT_GATEWAY", + } +} + +// GetMappingPublicIpAssignedEntityTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPublicIpAssignedEntityTypeEnum(val string) (PublicIpAssignedEntityTypeEnum, bool) { + enum, ok := mappingPublicIpAssignedEntityTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PublicIpLifecycleStateEnum Enum with underlying type: string +type PublicIpLifecycleStateEnum string + +// Set of constants representing the allowable values for PublicIpLifecycleStateEnum +const ( + PublicIpLifecycleStateProvisioning PublicIpLifecycleStateEnum = "PROVISIONING" + PublicIpLifecycleStateAvailable PublicIpLifecycleStateEnum = "AVAILABLE" + PublicIpLifecycleStateAssigning PublicIpLifecycleStateEnum = "ASSIGNING" + PublicIpLifecycleStateAssigned PublicIpLifecycleStateEnum = "ASSIGNED" + PublicIpLifecycleStateUnassigning PublicIpLifecycleStateEnum = "UNASSIGNING" + PublicIpLifecycleStateUnassigned PublicIpLifecycleStateEnum = "UNASSIGNED" + PublicIpLifecycleStateTerminating PublicIpLifecycleStateEnum = "TERMINATING" + PublicIpLifecycleStateTerminated PublicIpLifecycleStateEnum = "TERMINATED" +) + +var mappingPublicIpLifecycleStateEnum = map[string]PublicIpLifecycleStateEnum{ + "PROVISIONING": PublicIpLifecycleStateProvisioning, + "AVAILABLE": PublicIpLifecycleStateAvailable, + "ASSIGNING": PublicIpLifecycleStateAssigning, + "ASSIGNED": PublicIpLifecycleStateAssigned, + "UNASSIGNING": PublicIpLifecycleStateUnassigning, + "UNASSIGNED": PublicIpLifecycleStateUnassigned, + "TERMINATING": PublicIpLifecycleStateTerminating, + "TERMINATED": PublicIpLifecycleStateTerminated, +} + +var mappingPublicIpLifecycleStateEnumLowerCase = map[string]PublicIpLifecycleStateEnum{ + "provisioning": PublicIpLifecycleStateProvisioning, + "available": PublicIpLifecycleStateAvailable, + "assigning": PublicIpLifecycleStateAssigning, + "assigned": PublicIpLifecycleStateAssigned, + "unassigning": PublicIpLifecycleStateUnassigning, + "unassigned": PublicIpLifecycleStateUnassigned, + "terminating": PublicIpLifecycleStateTerminating, + "terminated": PublicIpLifecycleStateTerminated, +} + +// GetPublicIpLifecycleStateEnumValues Enumerates the set of values for PublicIpLifecycleStateEnum +func GetPublicIpLifecycleStateEnumValues() []PublicIpLifecycleStateEnum { + values := make([]PublicIpLifecycleStateEnum, 0) + for _, v := range mappingPublicIpLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetPublicIpLifecycleStateEnumStringValues Enumerates the set of values in String for PublicIpLifecycleStateEnum +func GetPublicIpLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "ASSIGNING", + "ASSIGNED", + "UNASSIGNING", + "UNASSIGNED", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingPublicIpLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPublicIpLifecycleStateEnum(val string) (PublicIpLifecycleStateEnum, bool) { + enum, ok := mappingPublicIpLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PublicIpLifetimeEnum Enum with underlying type: string +type PublicIpLifetimeEnum string + +// Set of constants representing the allowable values for PublicIpLifetimeEnum +const ( + PublicIpLifetimeEphemeral PublicIpLifetimeEnum = "EPHEMERAL" + PublicIpLifetimeReserved PublicIpLifetimeEnum = "RESERVED" +) + +var mappingPublicIpLifetimeEnum = map[string]PublicIpLifetimeEnum{ + "EPHEMERAL": PublicIpLifetimeEphemeral, + "RESERVED": PublicIpLifetimeReserved, +} + +var mappingPublicIpLifetimeEnumLowerCase = map[string]PublicIpLifetimeEnum{ + "ephemeral": PublicIpLifetimeEphemeral, + "reserved": PublicIpLifetimeReserved, +} + +// GetPublicIpLifetimeEnumValues Enumerates the set of values for PublicIpLifetimeEnum +func GetPublicIpLifetimeEnumValues() []PublicIpLifetimeEnum { + values := make([]PublicIpLifetimeEnum, 0) + for _, v := range mappingPublicIpLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetPublicIpLifetimeEnumStringValues Enumerates the set of values in String for PublicIpLifetimeEnum +func GetPublicIpLifetimeEnumStringValues() []string { + return []string{ + "EPHEMERAL", + "RESERVED", + } +} + +// GetMappingPublicIpLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPublicIpLifetimeEnum(val string) (PublicIpLifetimeEnum, bool) { + enum, ok := mappingPublicIpLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PublicIpScopeEnum Enum with underlying type: string +type PublicIpScopeEnum string + +// Set of constants representing the allowable values for PublicIpScopeEnum +const ( + PublicIpScopeRegion PublicIpScopeEnum = "REGION" + PublicIpScopeAvailabilityDomain PublicIpScopeEnum = "AVAILABILITY_DOMAIN" +) + +var mappingPublicIpScopeEnum = map[string]PublicIpScopeEnum{ + "REGION": PublicIpScopeRegion, + "AVAILABILITY_DOMAIN": PublicIpScopeAvailabilityDomain, +} + +var mappingPublicIpScopeEnumLowerCase = map[string]PublicIpScopeEnum{ + "region": PublicIpScopeRegion, + "availability_domain": PublicIpScopeAvailabilityDomain, +} + +// GetPublicIpScopeEnumValues Enumerates the set of values for PublicIpScopeEnum +func GetPublicIpScopeEnumValues() []PublicIpScopeEnum { + values := make([]PublicIpScopeEnum, 0) + for _, v := range mappingPublicIpScopeEnum { + values = append(values, v) + } + return values +} + +// GetPublicIpScopeEnumStringValues Enumerates the set of values in String for PublicIpScopeEnum +func GetPublicIpScopeEnumStringValues() []string { + return []string{ + "REGION", + "AVAILABILITY_DOMAIN", + } +} + +// GetMappingPublicIpScopeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPublicIpScopeEnum(val string) (PublicIpScopeEnum, bool) { + enum, ok := mappingPublicIpScopeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/public_ip_pool.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/public_ip_pool.go new file mode 100644 index 000000000..523252225 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/public_ip_pool.go @@ -0,0 +1,129 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PublicIpPool A public IP pool is a set of public IP addresses represented as one or more IPv4 CIDR blocks. Resources like load balancers and compute instances can be allocated public IP addresses from a public IP pool. +type PublicIpPool struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing this pool. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP pool. + Id *string `mandatory:"true" json:"id"` + + // The date and time the public IP pool was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block. + CidrBlocks []string `mandatory:"false" json:"cidrBlocks"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The public IP pool's current state. + LifecycleState PublicIpPoolLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` +} + +func (m PublicIpPool) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PublicIpPool) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPublicIpPoolLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPublicIpPoolLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PublicIpPoolLifecycleStateEnum Enum with underlying type: string +type PublicIpPoolLifecycleStateEnum string + +// Set of constants representing the allowable values for PublicIpPoolLifecycleStateEnum +const ( + PublicIpPoolLifecycleStateInactive PublicIpPoolLifecycleStateEnum = "INACTIVE" + PublicIpPoolLifecycleStateUpdating PublicIpPoolLifecycleStateEnum = "UPDATING" + PublicIpPoolLifecycleStateActive PublicIpPoolLifecycleStateEnum = "ACTIVE" + PublicIpPoolLifecycleStateDeleting PublicIpPoolLifecycleStateEnum = "DELETING" + PublicIpPoolLifecycleStateDeleted PublicIpPoolLifecycleStateEnum = "DELETED" +) + +var mappingPublicIpPoolLifecycleStateEnum = map[string]PublicIpPoolLifecycleStateEnum{ + "INACTIVE": PublicIpPoolLifecycleStateInactive, + "UPDATING": PublicIpPoolLifecycleStateUpdating, + "ACTIVE": PublicIpPoolLifecycleStateActive, + "DELETING": PublicIpPoolLifecycleStateDeleting, + "DELETED": PublicIpPoolLifecycleStateDeleted, +} + +var mappingPublicIpPoolLifecycleStateEnumLowerCase = map[string]PublicIpPoolLifecycleStateEnum{ + "inactive": PublicIpPoolLifecycleStateInactive, + "updating": PublicIpPoolLifecycleStateUpdating, + "active": PublicIpPoolLifecycleStateActive, + "deleting": PublicIpPoolLifecycleStateDeleting, + "deleted": PublicIpPoolLifecycleStateDeleted, +} + +// GetPublicIpPoolLifecycleStateEnumValues Enumerates the set of values for PublicIpPoolLifecycleStateEnum +func GetPublicIpPoolLifecycleStateEnumValues() []PublicIpPoolLifecycleStateEnum { + values := make([]PublicIpPoolLifecycleStateEnum, 0) + for _, v := range mappingPublicIpPoolLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetPublicIpPoolLifecycleStateEnumStringValues Enumerates the set of values in String for PublicIpPoolLifecycleStateEnum +func GetPublicIpPoolLifecycleStateEnumStringValues() []string { + return []string{ + "INACTIVE", + "UPDATING", + "ACTIVE", + "DELETING", + "DELETED", + } +} + +// GetMappingPublicIpPoolLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPublicIpPoolLifecycleStateEnum(val string) (PublicIpPoolLifecycleStateEnum, bool) { + enum, ok := mappingPublicIpPoolLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/public_ip_pool_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/public_ip_pool_collection.go new file mode 100644 index 000000000..45e5c4041 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/public_ip_pool_collection.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PublicIpPoolCollection Results of a `ListPublicIpPool` operation. +type PublicIpPoolCollection struct { + + // A list of public IP pool summaries. + Items []PublicIpPoolSummary `mandatory:"true" json:"items"` +} + +func (m PublicIpPoolCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PublicIpPoolCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/public_ip_pool_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/public_ip_pool_summary.go new file mode 100644 index 000000000..b00a23e10 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/public_ip_pool_summary.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PublicIpPoolSummary Summary information about a public IP pool. +type PublicIpPoolSummary struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the public IP pool. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP pool. + Id *string `mandatory:"false" json:"id"` + + // The public IP pool's current state. + LifecycleState PublicIpPoolLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The date and time the public IP pool was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m PublicIpPoolSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PublicIpPoolSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPublicIpPoolLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPublicIpPoolLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/reboot_migrate_action_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/reboot_migrate_action_details.go new file mode 100644 index 000000000..9b4d0ee67 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/reboot_migrate_action_details.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RebootMigrateActionDetails Parameters for the `rebootMigrate` InstanceAction. +type RebootMigrateActionDetails struct { + + // For bare metal instances that have local storage, this must be set to true to verify that the local storage + // will be deleted during the migration. For instances without, this parameter has no effect. + DeleteLocalStorage *bool `mandatory:"false" json:"deleteLocalStorage"` + + // If present, this parameter will set (or reset) the scheduled time that the instance will be reboot + // migrated in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). This will also change + // the `timeMaintenanceRebootDue` field on the instance. + // If not present, the reboot migration will be triggered immediately. + TimeScheduled *common.SDKTime `mandatory:"false" json:"timeScheduled"` +} + +func (m RebootMigrateActionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RebootMigrateActionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m RebootMigrateActionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeRebootMigrateActionDetails RebootMigrateActionDetails + s := struct { + DiscriminatorParam string `json:"actionType"` + MarshalTypeRebootMigrateActionDetails + }{ + "rebootMigrate", + (MarshalTypeRebootMigrateActionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/recycle_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/recycle_details.go new file mode 100644 index 000000000..2334449ab --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/recycle_details.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RecycleDetails Shows details about the last recycle performed on this host. +type RecycleDetails struct { + + // Preferred recycle level for hosts associated with the reservation config. + // * `SKIP_RECYCLE` - Skips host wipe. + // * `FULL_RECYCLE` - Does not skip host wipe. This is the default behavior. + RecycleLevel RecycleDetailsRecycleLevelEnum `mandatory:"false" json:"recycleLevel,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host group this host was attached to at the time of recycle. + ComputeHostGroupId *string `mandatory:"false" json:"computeHostGroupId"` +} + +func (m RecycleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RecycleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingRecycleDetailsRecycleLevelEnum(string(m.RecycleLevel)); !ok && m.RecycleLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RecycleLevel: %s. Supported values are: %s.", m.RecycleLevel, strings.Join(GetRecycleDetailsRecycleLevelEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RecycleDetailsRecycleLevelEnum Enum with underlying type: string +type RecycleDetailsRecycleLevelEnum string + +// Set of constants representing the allowable values for RecycleDetailsRecycleLevelEnum +const ( + RecycleDetailsRecycleLevelSkipRecycle RecycleDetailsRecycleLevelEnum = "SKIP_RECYCLE" + RecycleDetailsRecycleLevelFullRecycle RecycleDetailsRecycleLevelEnum = "FULL_RECYCLE" +) + +var mappingRecycleDetailsRecycleLevelEnum = map[string]RecycleDetailsRecycleLevelEnum{ + "SKIP_RECYCLE": RecycleDetailsRecycleLevelSkipRecycle, + "FULL_RECYCLE": RecycleDetailsRecycleLevelFullRecycle, +} + +var mappingRecycleDetailsRecycleLevelEnumLowerCase = map[string]RecycleDetailsRecycleLevelEnum{ + "skip_recycle": RecycleDetailsRecycleLevelSkipRecycle, + "full_recycle": RecycleDetailsRecycleLevelFullRecycle, +} + +// GetRecycleDetailsRecycleLevelEnumValues Enumerates the set of values for RecycleDetailsRecycleLevelEnum +func GetRecycleDetailsRecycleLevelEnumValues() []RecycleDetailsRecycleLevelEnum { + values := make([]RecycleDetailsRecycleLevelEnum, 0) + for _, v := range mappingRecycleDetailsRecycleLevelEnum { + values = append(values, v) + } + return values +} + +// GetRecycleDetailsRecycleLevelEnumStringValues Enumerates the set of values in String for RecycleDetailsRecycleLevelEnum +func GetRecycleDetailsRecycleLevelEnumStringValues() []string { + return []string{ + "SKIP_RECYCLE", + "FULL_RECYCLE", + } +} + +// GetMappingRecycleDetailsRecycleLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRecycleDetailsRecycleLevelEnum(val string) (RecycleDetailsRecycleLevelEnum, bool) { + enum, ok := mappingRecycleDetailsRecycleLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remote_peering_connection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remote_peering_connection.go new file mode 100644 index 000000000..d5a28dc59 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remote_peering_connection.go @@ -0,0 +1,208 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RemotePeeringConnection A remote peering connection (RPC) is an object on a DRG that lets the VCN that is attached +// to the DRG peer with a VCN in a different region. *Peering* means that the two VCNs can +// communicate using private IP addresses, but without the traffic traversing the internet or +// routing through your on-premises network. For more information, see +// VCN Peering (https://docs.oracle.com/iaas/Content/Network/Tasks/VCNpeering.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type RemotePeeringConnection struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the RPC. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG that this RPC belongs to. + DrgId *string `mandatory:"true" json:"drgId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the RPC. + Id *string `mandatory:"true" json:"id"` + + // Whether the VCN at the other end of the peering is in a different tenancy. + // Example: `false` + IsCrossTenancyPeering *bool `mandatory:"true" json:"isCrossTenancyPeering"` + + // The RPC's current lifecycle state. + LifecycleState RemotePeeringConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Whether the RPC is peered with another RPC. `NEW` means the RPC has not yet been + // peered. `PENDING` means the peering is being established. `REVOKED` means the + // RPC at the other end of the peering has been deleted. + PeeringStatus RemotePeeringConnectionPeeringStatusEnum `mandatory:"true" json:"peeringStatus"` + + // The date and time the RPC was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // If this RPC is peered, this value is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the other RPC. + PeerId *string `mandatory:"false" json:"peerId"` + + // If this RPC is peered, this value is the region that contains the other RPC. + // Example: `us-ashburn-1` + PeerRegionName *string `mandatory:"false" json:"peerRegionName"` + + // If this RPC is peered, this value is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the other RPC's tenancy. + PeerTenancyId *string `mandatory:"false" json:"peerTenancyId"` +} + +func (m RemotePeeringConnection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RemotePeeringConnection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRemotePeeringConnectionLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetRemotePeeringConnectionLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingRemotePeeringConnectionPeeringStatusEnum(string(m.PeeringStatus)); !ok && m.PeeringStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PeeringStatus: %s. Supported values are: %s.", m.PeeringStatus, strings.Join(GetRemotePeeringConnectionPeeringStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemotePeeringConnectionLifecycleStateEnum Enum with underlying type: string +type RemotePeeringConnectionLifecycleStateEnum string + +// Set of constants representing the allowable values for RemotePeeringConnectionLifecycleStateEnum +const ( + RemotePeeringConnectionLifecycleStateAvailable RemotePeeringConnectionLifecycleStateEnum = "AVAILABLE" + RemotePeeringConnectionLifecycleStateProvisioning RemotePeeringConnectionLifecycleStateEnum = "PROVISIONING" + RemotePeeringConnectionLifecycleStateTerminating RemotePeeringConnectionLifecycleStateEnum = "TERMINATING" + RemotePeeringConnectionLifecycleStateTerminated RemotePeeringConnectionLifecycleStateEnum = "TERMINATED" +) + +var mappingRemotePeeringConnectionLifecycleStateEnum = map[string]RemotePeeringConnectionLifecycleStateEnum{ + "AVAILABLE": RemotePeeringConnectionLifecycleStateAvailable, + "PROVISIONING": RemotePeeringConnectionLifecycleStateProvisioning, + "TERMINATING": RemotePeeringConnectionLifecycleStateTerminating, + "TERMINATED": RemotePeeringConnectionLifecycleStateTerminated, +} + +var mappingRemotePeeringConnectionLifecycleStateEnumLowerCase = map[string]RemotePeeringConnectionLifecycleStateEnum{ + "available": RemotePeeringConnectionLifecycleStateAvailable, + "provisioning": RemotePeeringConnectionLifecycleStateProvisioning, + "terminating": RemotePeeringConnectionLifecycleStateTerminating, + "terminated": RemotePeeringConnectionLifecycleStateTerminated, +} + +// GetRemotePeeringConnectionLifecycleStateEnumValues Enumerates the set of values for RemotePeeringConnectionLifecycleStateEnum +func GetRemotePeeringConnectionLifecycleStateEnumValues() []RemotePeeringConnectionLifecycleStateEnum { + values := make([]RemotePeeringConnectionLifecycleStateEnum, 0) + for _, v := range mappingRemotePeeringConnectionLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetRemotePeeringConnectionLifecycleStateEnumStringValues Enumerates the set of values in String for RemotePeeringConnectionLifecycleStateEnum +func GetRemotePeeringConnectionLifecycleStateEnumStringValues() []string { + return []string{ + "AVAILABLE", + "PROVISIONING", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingRemotePeeringConnectionLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRemotePeeringConnectionLifecycleStateEnum(val string) (RemotePeeringConnectionLifecycleStateEnum, bool) { + enum, ok := mappingRemotePeeringConnectionLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// RemotePeeringConnectionPeeringStatusEnum Enum with underlying type: string +type RemotePeeringConnectionPeeringStatusEnum string + +// Set of constants representing the allowable values for RemotePeeringConnectionPeeringStatusEnum +const ( + RemotePeeringConnectionPeeringStatusInvalid RemotePeeringConnectionPeeringStatusEnum = "INVALID" + RemotePeeringConnectionPeeringStatusNew RemotePeeringConnectionPeeringStatusEnum = "NEW" + RemotePeeringConnectionPeeringStatusPending RemotePeeringConnectionPeeringStatusEnum = "PENDING" + RemotePeeringConnectionPeeringStatusPeered RemotePeeringConnectionPeeringStatusEnum = "PEERED" + RemotePeeringConnectionPeeringStatusRevoked RemotePeeringConnectionPeeringStatusEnum = "REVOKED" +) + +var mappingRemotePeeringConnectionPeeringStatusEnum = map[string]RemotePeeringConnectionPeeringStatusEnum{ + "INVALID": RemotePeeringConnectionPeeringStatusInvalid, + "NEW": RemotePeeringConnectionPeeringStatusNew, + "PENDING": RemotePeeringConnectionPeeringStatusPending, + "PEERED": RemotePeeringConnectionPeeringStatusPeered, + "REVOKED": RemotePeeringConnectionPeeringStatusRevoked, +} + +var mappingRemotePeeringConnectionPeeringStatusEnumLowerCase = map[string]RemotePeeringConnectionPeeringStatusEnum{ + "invalid": RemotePeeringConnectionPeeringStatusInvalid, + "new": RemotePeeringConnectionPeeringStatusNew, + "pending": RemotePeeringConnectionPeeringStatusPending, + "peered": RemotePeeringConnectionPeeringStatusPeered, + "revoked": RemotePeeringConnectionPeeringStatusRevoked, +} + +// GetRemotePeeringConnectionPeeringStatusEnumValues Enumerates the set of values for RemotePeeringConnectionPeeringStatusEnum +func GetRemotePeeringConnectionPeeringStatusEnumValues() []RemotePeeringConnectionPeeringStatusEnum { + values := make([]RemotePeeringConnectionPeeringStatusEnum, 0) + for _, v := range mappingRemotePeeringConnectionPeeringStatusEnum { + values = append(values, v) + } + return values +} + +// GetRemotePeeringConnectionPeeringStatusEnumStringValues Enumerates the set of values in String for RemotePeeringConnectionPeeringStatusEnum +func GetRemotePeeringConnectionPeeringStatusEnumStringValues() []string { + return []string{ + "INVALID", + "NEW", + "PENDING", + "PEERED", + "REVOKED", + } +} + +// GetMappingRemotePeeringConnectionPeeringStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRemotePeeringConnectionPeeringStatusEnum(val string) (RemotePeeringConnectionPeeringStatusEnum, bool) { + enum, ok := mappingRemotePeeringConnectionPeeringStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remote_peering_connection_drg_attachment_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remote_peering_connection_drg_attachment_network_details.go new file mode 100644 index 000000000..94c5cada0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remote_peering_connection_drg_attachment_network_details.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RemotePeeringConnectionDrgAttachmentNetworkDetails Specifies the DRG attachment to another DRG. +type RemotePeeringConnectionDrgAttachmentNetworkDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. + Id *string `mandatory:"false" json:"id"` +} + +// GetId returns Id +func (m RemotePeeringConnectionDrgAttachmentNetworkDetails) GetId() *string { + return m.Id +} + +func (m RemotePeeringConnectionDrgAttachmentNetworkDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RemotePeeringConnectionDrgAttachmentNetworkDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m RemotePeeringConnectionDrgAttachmentNetworkDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeRemotePeeringConnectionDrgAttachmentNetworkDetails RemotePeeringConnectionDrgAttachmentNetworkDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeRemotePeeringConnectionDrgAttachmentNetworkDetails + }{ + "REMOTE_PEERING_CONNECTION", + (MarshalTypeRemotePeeringConnectionDrgAttachmentNetworkDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_drg_route_distribution_statements_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_drg_route_distribution_statements_details.go new file mode 100644 index 000000000..0ddc2fd87 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_drg_route_distribution_statements_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RemoveDrgRouteDistributionStatementsDetails Details request to remove statements from a route distribution. +type RemoveDrgRouteDistributionStatementsDetails struct { + + // The Oracle-assigned ID of each route distribution to remove. + StatementIds []string `mandatory:"false" json:"statementIds"` +} + +func (m RemoveDrgRouteDistributionStatementsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RemoveDrgRouteDistributionStatementsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_drg_route_distribution_statements_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_drg_route_distribution_statements_request_response.go new file mode 100644 index 000000000..c65400ad0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_drg_route_distribution_statements_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveDrgRouteDistributionStatementsRequest wrapper for the RemoveDrgRouteDistributionStatements operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveDrgRouteDistributionStatements.go.html to see an example of how to use RemoveDrgRouteDistributionStatementsRequest. +type RemoveDrgRouteDistributionStatementsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route distribution. + DrgRouteDistributionId *string `mandatory:"true" contributesTo:"path" name:"drgRouteDistributionId"` + + // Request with one or more route distribution statements to remove from the route distribution. + RemoveDrgRouteDistributionStatementsDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveDrgRouteDistributionStatementsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveDrgRouteDistributionStatementsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveDrgRouteDistributionStatementsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveDrgRouteDistributionStatementsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveDrgRouteDistributionStatementsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveDrgRouteDistributionStatementsResponse wrapper for the RemoveDrgRouteDistributionStatements operation +type RemoveDrgRouteDistributionStatementsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RemoveDrgRouteDistributionStatementsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveDrgRouteDistributionStatementsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_drg_route_rules_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_drg_route_rules_details.go new file mode 100644 index 000000000..224fc4972 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_drg_route_rules_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RemoveDrgRouteRulesDetails Details used in a request to remove static routes from a DRG route table. +type RemoveDrgRouteRulesDetails struct { + + // The Oracle-assigned ID of each DRG route rule to be deleted. + RouteRuleIds []string `mandatory:"false" json:"routeRuleIds"` +} + +func (m RemoveDrgRouteRulesDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RemoveDrgRouteRulesDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_drg_route_rules_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_drg_route_rules_request_response.go new file mode 100644 index 000000000..f95770d52 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_drg_route_rules_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveDrgRouteRulesRequest wrapper for the RemoveDrgRouteRules operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveDrgRouteRules.go.html to see an example of how to use RemoveDrgRouteRulesRequest. +type RemoveDrgRouteRulesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table. + DrgRouteTableId *string `mandatory:"true" contributesTo:"path" name:"drgRouteTableId"` + + // Request to remove one or more route rules in the DRG route table. + RemoveDrgRouteRulesDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveDrgRouteRulesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveDrgRouteRulesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveDrgRouteRulesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveDrgRouteRulesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveDrgRouteRulesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveDrgRouteRulesResponse wrapper for the RemoveDrgRouteRules operation +type RemoveDrgRouteRulesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RemoveDrgRouteRulesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveDrgRouteRulesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_export_drg_route_distribution_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_export_drg_route_distribution_request_response.go new file mode 100644 index 000000000..8a003d0ab --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_export_drg_route_distribution_request_response.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveExportDrgRouteDistributionRequest wrapper for the RemoveExportDrgRouteDistribution operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveExportDrgRouteDistribution.go.html to see an example of how to use RemoveExportDrgRouteDistributionRequest. +type RemoveExportDrgRouteDistributionRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG attachment. + DrgAttachmentId *string `mandatory:"true" contributesTo:"path" name:"drgAttachmentId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveExportDrgRouteDistributionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveExportDrgRouteDistributionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveExportDrgRouteDistributionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveExportDrgRouteDistributionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveExportDrgRouteDistributionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveExportDrgRouteDistributionResponse wrapper for the RemoveExportDrgRouteDistribution operation +type RemoveExportDrgRouteDistributionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DrgAttachment instance + DrgAttachment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RemoveExportDrgRouteDistributionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveExportDrgRouteDistributionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_image_shape_compatibility_entry_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_image_shape_compatibility_entry_request_response.go new file mode 100644 index 000000000..f3bbd49a5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_image_shape_compatibility_entry_request_response.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveImageShapeCompatibilityEntryRequest wrapper for the RemoveImageShapeCompatibilityEntry operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveImageShapeCompatibilityEntry.go.html to see an example of how to use RemoveImageShapeCompatibilityEntryRequest. +type RemoveImageShapeCompatibilityEntryRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. + ImageId *string `mandatory:"true" contributesTo:"path" name:"imageId"` + + // Shape name. + ShapeName *string `mandatory:"true" contributesTo:"path" name:"shapeName"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveImageShapeCompatibilityEntryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveImageShapeCompatibilityEntryRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveImageShapeCompatibilityEntryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveImageShapeCompatibilityEntryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveImageShapeCompatibilityEntryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveImageShapeCompatibilityEntryResponse wrapper for the RemoveImageShapeCompatibilityEntry operation +type RemoveImageShapeCompatibilityEntryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RemoveImageShapeCompatibilityEntryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveImageShapeCompatibilityEntryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_import_drg_route_distribution_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_import_drg_route_distribution_request_response.go new file mode 100644 index 000000000..d4f1de4f7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_import_drg_route_distribution_request_response.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveImportDrgRouteDistributionRequest wrapper for the RemoveImportDrgRouteDistribution operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveImportDrgRouteDistribution.go.html to see an example of how to use RemoveImportDrgRouteDistributionRequest. +type RemoveImportDrgRouteDistributionRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table. + DrgRouteTableId *string `mandatory:"true" contributesTo:"path" name:"drgRouteTableId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveImportDrgRouteDistributionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveImportDrgRouteDistributionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveImportDrgRouteDistributionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveImportDrgRouteDistributionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveImportDrgRouteDistributionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveImportDrgRouteDistributionResponse wrapper for the RemoveImportDrgRouteDistribution operation +type RemoveImportDrgRouteDistributionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DrgRouteTable instance + DrgRouteTable `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RemoveImportDrgRouteDistributionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveImportDrgRouteDistributionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv4_subnet_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv4_subnet_cidr_details.go new file mode 100644 index 000000000..d308a0bad --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv4_subnet_cidr_details.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RemoveIpv4SubnetCidrDetails Details object for removing an IPv4 prefix from a subnet. +type RemoveIpv4SubnetCidrDetails struct { + + // This field should only be specified when removing an IPv4 prefix from a subnet's IPv4 address space. + // The CIDR must maintain the following rules - + // a. The CIDR block is valid and correctly formatted. + // b. The CIDR range is within one of the parent VCN ranges. + // c. The CIDR range to be removed is already present in the list of ipv4CidrBlocks + // Example: `10.0.1.0/24` + Ipv4CidrBlock *string `mandatory:"true" json:"ipv4CidrBlock"` +} + +func (m RemoveIpv4SubnetCidrDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RemoveIpv4SubnetCidrDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv4_subnet_cidr_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv4_subnet_cidr_request_response.go new file mode 100644 index 000000000..f47033307 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv4_subnet_cidr_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveIpv4SubnetCidrRequest wrapper for the RemoveIpv4SubnetCidr operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveIpv4SubnetCidr.go.html to see an example of how to use RemoveIpv4SubnetCidrRequest. +type RemoveIpv4SubnetCidrRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // Details object for removing an IPv4 SUBNET prefix. + RemoveIpv4SubnetCidrDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveIpv4SubnetCidrRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveIpv4SubnetCidrRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveIpv4SubnetCidrRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveIpv4SubnetCidrRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveIpv4SubnetCidrRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveIpv4SubnetCidrResponse wrapper for the RemoveIpv4SubnetCidr operation +type RemoveIpv4SubnetCidrResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response RemoveIpv4SubnetCidrResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveIpv4SubnetCidrResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv6_subnet_cidr_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv6_subnet_cidr_request_response.go new file mode 100644 index 000000000..dab5de440 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv6_subnet_cidr_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveIpv6SubnetCidrRequest wrapper for the RemoveIpv6SubnetCidr operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveIpv6SubnetCidr.go.html to see an example of how to use RemoveIpv6SubnetCidrRequest. +type RemoveIpv6SubnetCidrRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // Details object for removing an IPv6 SUBNET prefix. + RemoveSubnetIpv6CidrDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveIpv6SubnetCidrRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveIpv6SubnetCidrRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveIpv6SubnetCidrRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveIpv6SubnetCidrRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveIpv6SubnetCidrRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveIpv6SubnetCidrResponse wrapper for the RemoveIpv6SubnetCidr operation +type RemoveIpv6SubnetCidrResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response RemoveIpv6SubnetCidrResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveIpv6SubnetCidrResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv6_vcn_cidr_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv6_vcn_cidr_request_response.go new file mode 100644 index 000000000..d23bf6e06 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_ipv6_vcn_cidr_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveIpv6VcnCidrRequest wrapper for the RemoveIpv6VcnCidr operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveIpv6VcnCidr.go.html to see an example of how to use RemoveIpv6VcnCidrRequest. +type RemoveIpv6VcnCidrRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Details object for removing a VCN IPv6 prefix. + RemoveVcnIpv6CidrDetails `contributesTo:"body"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveIpv6VcnCidrRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveIpv6VcnCidrRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveIpv6VcnCidrRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveIpv6VcnCidrRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveIpv6VcnCidrRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveIpv6VcnCidrResponse wrapper for the RemoveIpv6VcnCidr operation +type RemoveIpv6VcnCidrResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response RemoveIpv6VcnCidrResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveIpv6VcnCidrResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_network_security_group_security_rules_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_network_security_group_security_rules_details.go new file mode 100644 index 000000000..8f28855c4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_network_security_group_security_rules_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RemoveNetworkSecurityGroupSecurityRulesDetails The representation of RemoveNetworkSecurityGroupSecurityRulesDetails +type RemoveNetworkSecurityGroupSecurityRulesDetails struct { + + // The Oracle-assigned ID of each SecurityRule to be deleted. + SecurityRuleIds []string `mandatory:"false" json:"securityRuleIds"` +} + +func (m RemoveNetworkSecurityGroupSecurityRulesDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RemoveNetworkSecurityGroupSecurityRulesDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_network_security_group_security_rules_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_network_security_group_security_rules_request_response.go new file mode 100644 index 000000000..c838d334b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_network_security_group_security_rules_request_response.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveNetworkSecurityGroupSecurityRulesRequest wrapper for the RemoveNetworkSecurityGroupSecurityRules operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveNetworkSecurityGroupSecurityRules.go.html to see an example of how to use RemoveNetworkSecurityGroupSecurityRulesRequest. +type RemoveNetworkSecurityGroupSecurityRulesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security group. + NetworkSecurityGroupId *string `mandatory:"true" contributesTo:"path" name:"networkSecurityGroupId"` + + // Request with one or more security rules associated with the network security group that + // will be removed. + RemoveNetworkSecurityGroupSecurityRulesDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveNetworkSecurityGroupSecurityRulesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveNetworkSecurityGroupSecurityRulesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveNetworkSecurityGroupSecurityRulesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveNetworkSecurityGroupSecurityRulesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveNetworkSecurityGroupSecurityRulesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveNetworkSecurityGroupSecurityRulesResponse wrapper for the RemoveNetworkSecurityGroupSecurityRules operation +type RemoveNetworkSecurityGroupSecurityRulesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RemoveNetworkSecurityGroupSecurityRulesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveNetworkSecurityGroupSecurityRulesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_public_ip_pool_capacity_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_public_ip_pool_capacity_details.go new file mode 100644 index 000000000..13ab48371 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_public_ip_pool_capacity_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RemovePublicIpPoolCapacityDetails The information needed to remove capacity from a public IP pool. +type RemovePublicIpPoolCapacityDetails struct { + + // The CIDR block to remove from the public IP pool. + // Example: `10.0.1.0/24` + CidrBlock *string `mandatory:"true" json:"cidrBlock"` +} + +func (m RemovePublicIpPoolCapacityDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RemovePublicIpPoolCapacityDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_public_ip_pool_capacity_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_public_ip_pool_capacity_request_response.go new file mode 100644 index 000000000..233d807d6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_public_ip_pool_capacity_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemovePublicIpPoolCapacityRequest wrapper for the RemovePublicIpPoolCapacity operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemovePublicIpPoolCapacity.go.html to see an example of how to use RemovePublicIpPoolCapacityRequest. +type RemovePublicIpPoolCapacityRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP pool. + PublicIpPoolId *string `mandatory:"true" contributesTo:"path" name:"publicIpPoolId"` + + // The CIDR block to remove from the IP pool. + RemovePublicIpPoolCapacityDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemovePublicIpPoolCapacityRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemovePublicIpPoolCapacityRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemovePublicIpPoolCapacityRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemovePublicIpPoolCapacityRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemovePublicIpPoolCapacityRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemovePublicIpPoolCapacityResponse wrapper for the RemovePublicIpPoolCapacity operation +type RemovePublicIpPoolCapacityResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIpPool instance + PublicIpPool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RemovePublicIpPoolCapacityResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemovePublicIpPoolCapacityResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_subnet_ipv6_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_subnet_ipv6_cidr_details.go new file mode 100644 index 000000000..9f359bc40 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_subnet_ipv6_cidr_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RemoveSubnetIpv6CidrDetails Details object for removing an IPv6 prefix from a subnet. +type RemoveSubnetIpv6CidrDetails struct { + + // This field is not required and should only be specified when removing an IPv6 prefix + // from a subnet's IPv6 address space. + // SeeIPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // Example: `2001:0db8:0123::/64` + Ipv6CidrBlock *string `mandatory:"true" json:"ipv6CidrBlock"` +} + +func (m RemoveSubnetIpv6CidrDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RemoveSubnetIpv6CidrDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_vcn_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_vcn_cidr_details.go new file mode 100644 index 000000000..d7d14ee5f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_vcn_cidr_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RemoveVcnCidrDetails Details for removing a CIDR block from a VCN. +type RemoveVcnCidrDetails struct { + + // The CIDR block to remove. + CidrBlock *string `mandatory:"true" json:"cidrBlock"` +} + +func (m RemoveVcnCidrDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RemoveVcnCidrDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_vcn_cidr_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_vcn_cidr_request_response.go new file mode 100644 index 000000000..babcfa159 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_vcn_cidr_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveVcnCidrRequest wrapper for the RemoveVcnCidr operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/RemoveVcnCidr.go.html to see an example of how to use RemoveVcnCidrRequest. +type RemoveVcnCidrRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` + + // Details object for removing a VCN CIDR. + RemoveVcnCidrDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveVcnCidrRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveVcnCidrRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveVcnCidrRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveVcnCidrRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveVcnCidrRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveVcnCidrResponse wrapper for the RemoveVcnCidr operation +type RemoveVcnCidrResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response RemoveVcnCidrResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveVcnCidrResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_vcn_ipv6_cidr_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_vcn_ipv6_cidr_details.go new file mode 100644 index 000000000..60dec6331 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/remove_vcn_ipv6_cidr_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RemoveVcnIpv6CidrDetails Details used when removing ULA or private IPv6 prefix or an IPv6 GUA assigned by Oracle or BYOIPv6 prefix. You can only remove one of these per request. +type RemoveVcnIpv6CidrDetails struct { + + // This field is not required and should only be specified when removing ULA or private IPv6 prefix or an IPv6 GUA assigned by Oracle or BYOIPv6 prefix + // from a VCN's IPv6 address space. + // SeeIPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // Example: `2001:0db8:0123::/56` + Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` +} + +func (m RemoveVcnIpv6CidrDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RemoveVcnIpv6CidrDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/reset_action_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/reset_action_details.go new file mode 100644 index 000000000..71682722b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/reset_action_details.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ResetActionDetails Parameters for the `reset` InstanceAction. If omitted, default values are used. +type ResetActionDetails struct { + + // For instances that use a DenseIO shape, the flag denoting whether + // reboot migration (https://docs.oracle.com/iaas/Content/Compute/References/infrastructure-maintenance.htm#reboot) + // is performed for the instance. The default value is `false`. + // If the instance has a date in the Maintenance reboot field and you do nothing (or set this flag to `false`), the instance + // will be rebuilt at the scheduled maintenance time. The instance will experience 2-6 hours of downtime during the + // maintenance process. The local NVMe-based SSD will be preserved. + // If you want to minimize downtime and can delete the SSD, you can set this flag to `true` and proactively reboot the + // instance before the scheduled maintenance time. The instance will be reboot migrated to a healthy host and the SSD will be + // deleted. A short downtime occurs during the migration. + // **Caution:** When `true`, the SSD is permanently deleted. We recommend that you create a backup of the SSD before proceeding. + AllowDenseRebootMigration *bool `mandatory:"false" json:"allowDenseRebootMigration"` +} + +func (m ResetActionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ResetActionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ResetActionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeResetActionDetails ResetActionDetails + s := struct { + DiscriminatorParam string `json:"actionType"` + MarshalTypeResetActionDetails + }{ + "reset", + (MarshalTypeResetActionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/reset_instance_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/reset_instance_pool_request_response.go new file mode 100644 index 000000000..81a74dd5a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/reset_instance_pool_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ResetInstancePoolRequest wrapper for the ResetInstancePool operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ResetInstancePool.go.html to see an example of how to use ResetInstancePoolRequest. +type ResetInstancePoolRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ResetInstancePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ResetInstancePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ResetInstancePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ResetInstancePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ResetInstancePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ResetInstancePoolResponse wrapper for the ResetInstancePool operation +type ResetInstancePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstancePool instance + InstancePool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ResetInstancePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ResetInstancePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/route_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/route_rule.go new file mode 100644 index 000000000..4117bd86f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/route_rule.go @@ -0,0 +1,172 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RouteRule A mapping between a destination IP address range and a virtual device to route matching +// packets to (a target). +type RouteRule struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the route rule's target. For information about the type of + // targets you can specify, see + // Route Tables (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm). + NetworkEntityId *string `mandatory:"true" json:"networkEntityId"` + + // Deprecated. Instead use `destination` and `destinationType`. Requests that include both + // `cidrBlock` and `destination` will be rejected. + // A destination IP address range in CIDR notation. Matching packets will + // be routed to the indicated network entity (the target). + // Cannot be an IPv6 prefix. + // Example: `0.0.0.0/0` + CidrBlock *string `mandatory:"false" json:"cidrBlock"` + + // Conceptually, this is the range of IP addresses used for matching when routing + // traffic. Required if you provide a `destinationType`. + // Allowed values: + // * IP address range in CIDR notation. Can be an IPv4 CIDR block or IPv6 prefix. For example: `192.168.1.0/24` + // or `2001:0db8:0123:45::/56`. If you set this to an IPv6 prefix, the route rule's target + // can only be a DRG or internet gateway. + // IPv6 addressing is supported for all commercial and government regions. + // See IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // * The `cidrBlock` value for a Service, if you're + // setting up a route rule for traffic destined for a particular `Service` through + // a service gateway. For example: `oci-phx-objectstorage`. + Destination *string `mandatory:"false" json:"destination"` + + // Type of destination for the rule. Required if you provide a `destination`. + // * `CIDR_BLOCK`: If the rule's `destination` is an IP address range in CIDR notation. + // * `SERVICE_CIDR_BLOCK`: If the rule's `destination` is the `cidrBlock` value for a + // Service (the rule is for traffic destined for a + // particular `Service` through a service gateway). + DestinationType RouteRuleDestinationTypeEnum `mandatory:"false" json:"destinationType,omitempty"` + + // An optional description of your choice for the rule. + Description *string `mandatory:"false" json:"description"` + + // A route rule can be STATIC if manually added to the route table, LOCAL if added by OCI to the route table. + RouteType RouteRuleRouteTypeEnum `mandatory:"false" json:"routeType,omitempty"` +} + +func (m RouteRule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RouteRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingRouteRuleDestinationTypeEnum(string(m.DestinationType)); !ok && m.DestinationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DestinationType: %s. Supported values are: %s.", m.DestinationType, strings.Join(GetRouteRuleDestinationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingRouteRuleRouteTypeEnum(string(m.RouteType)); !ok && m.RouteType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RouteType: %s. Supported values are: %s.", m.RouteType, strings.Join(GetRouteRuleRouteTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RouteRuleDestinationTypeEnum Enum with underlying type: string +type RouteRuleDestinationTypeEnum string + +// Set of constants representing the allowable values for RouteRuleDestinationTypeEnum +const ( + RouteRuleDestinationTypeCidrBlock RouteRuleDestinationTypeEnum = "CIDR_BLOCK" + RouteRuleDestinationTypeServiceCidrBlock RouteRuleDestinationTypeEnum = "SERVICE_CIDR_BLOCK" +) + +var mappingRouteRuleDestinationTypeEnum = map[string]RouteRuleDestinationTypeEnum{ + "CIDR_BLOCK": RouteRuleDestinationTypeCidrBlock, + "SERVICE_CIDR_BLOCK": RouteRuleDestinationTypeServiceCidrBlock, +} + +var mappingRouteRuleDestinationTypeEnumLowerCase = map[string]RouteRuleDestinationTypeEnum{ + "cidr_block": RouteRuleDestinationTypeCidrBlock, + "service_cidr_block": RouteRuleDestinationTypeServiceCidrBlock, +} + +// GetRouteRuleDestinationTypeEnumValues Enumerates the set of values for RouteRuleDestinationTypeEnum +func GetRouteRuleDestinationTypeEnumValues() []RouteRuleDestinationTypeEnum { + values := make([]RouteRuleDestinationTypeEnum, 0) + for _, v := range mappingRouteRuleDestinationTypeEnum { + values = append(values, v) + } + return values +} + +// GetRouteRuleDestinationTypeEnumStringValues Enumerates the set of values in String for RouteRuleDestinationTypeEnum +func GetRouteRuleDestinationTypeEnumStringValues() []string { + return []string{ + "CIDR_BLOCK", + "SERVICE_CIDR_BLOCK", + } +} + +// GetMappingRouteRuleDestinationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRouteRuleDestinationTypeEnum(val string) (RouteRuleDestinationTypeEnum, bool) { + enum, ok := mappingRouteRuleDestinationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// RouteRuleRouteTypeEnum Enum with underlying type: string +type RouteRuleRouteTypeEnum string + +// Set of constants representing the allowable values for RouteRuleRouteTypeEnum +const ( + RouteRuleRouteTypeStatic RouteRuleRouteTypeEnum = "STATIC" + RouteRuleRouteTypeLocal RouteRuleRouteTypeEnum = "LOCAL" +) + +var mappingRouteRuleRouteTypeEnum = map[string]RouteRuleRouteTypeEnum{ + "STATIC": RouteRuleRouteTypeStatic, + "LOCAL": RouteRuleRouteTypeLocal, +} + +var mappingRouteRuleRouteTypeEnumLowerCase = map[string]RouteRuleRouteTypeEnum{ + "static": RouteRuleRouteTypeStatic, + "local": RouteRuleRouteTypeLocal, +} + +// GetRouteRuleRouteTypeEnumValues Enumerates the set of values for RouteRuleRouteTypeEnum +func GetRouteRuleRouteTypeEnumValues() []RouteRuleRouteTypeEnum { + values := make([]RouteRuleRouteTypeEnum, 0) + for _, v := range mappingRouteRuleRouteTypeEnum { + values = append(values, v) + } + return values +} + +// GetRouteRuleRouteTypeEnumStringValues Enumerates the set of values in String for RouteRuleRouteTypeEnum +func GetRouteRuleRouteTypeEnumStringValues() []string { + return []string{ + "STATIC", + "LOCAL", + } +} + +// GetMappingRouteRuleRouteTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRouteRuleRouteTypeEnum(val string) (RouteRuleRouteTypeEnum, bool) { + enum, ok := mappingRouteRuleRouteTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/route_table.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/route_table.go new file mode 100644 index 000000000..b25b0234a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/route_table.go @@ -0,0 +1,133 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RouteTable A collection of `RouteRule` objects, which are used to route packets +// based on destination IP to a particular network entity. For more information, see +// Overview of the Networking Service (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type RouteTable struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the route table. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The route table's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // The route table's current state. + LifecycleState RouteTableLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The collection of rules for routing destination IPs to network devices. + RouteRules []RouteRule `mandatory:"true" json:"routeRules"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN the route table list belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The date and time the route table was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m RouteTable) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RouteTable) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRouteTableLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetRouteTableLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RouteTableLifecycleStateEnum Enum with underlying type: string +type RouteTableLifecycleStateEnum string + +// Set of constants representing the allowable values for RouteTableLifecycleStateEnum +const ( + RouteTableLifecycleStateProvisioning RouteTableLifecycleStateEnum = "PROVISIONING" + RouteTableLifecycleStateAvailable RouteTableLifecycleStateEnum = "AVAILABLE" + RouteTableLifecycleStateTerminating RouteTableLifecycleStateEnum = "TERMINATING" + RouteTableLifecycleStateTerminated RouteTableLifecycleStateEnum = "TERMINATED" +) + +var mappingRouteTableLifecycleStateEnum = map[string]RouteTableLifecycleStateEnum{ + "PROVISIONING": RouteTableLifecycleStateProvisioning, + "AVAILABLE": RouteTableLifecycleStateAvailable, + "TERMINATING": RouteTableLifecycleStateTerminating, + "TERMINATED": RouteTableLifecycleStateTerminated, +} + +var mappingRouteTableLifecycleStateEnumLowerCase = map[string]RouteTableLifecycleStateEnum{ + "provisioning": RouteTableLifecycleStateProvisioning, + "available": RouteTableLifecycleStateAvailable, + "terminating": RouteTableLifecycleStateTerminating, + "terminated": RouteTableLifecycleStateTerminated, +} + +// GetRouteTableLifecycleStateEnumValues Enumerates the set of values for RouteTableLifecycleStateEnum +func GetRouteTableLifecycleStateEnumValues() []RouteTableLifecycleStateEnum { + values := make([]RouteTableLifecycleStateEnum, 0) + for _, v := range mappingRouteTableLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetRouteTableLifecycleStateEnumStringValues Enumerates the set of values in String for RouteTableLifecycleStateEnum +func GetRouteTableLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingRouteTableLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRouteTableLifecycleStateEnum(val string) (RouteTableLifecycleStateEnum, bool) { + enum, ok := mappingRouteTableLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/security_list.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/security_list.go new file mode 100644 index 000000000..b85f8a34a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/security_list.go @@ -0,0 +1,145 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SecurityList A set of virtual firewall rules for your VCN. Security lists are configured at the subnet +// level, but the rules are applied to the ingress and egress traffic for the individual instances +// in the subnet. The rules can be stateful or stateless. For more information, see +// Security Lists (https://docs.oracle.com/iaas/Content/Network/Concepts/securitylists.htm). +// **Note:** Compare security lists to NetworkSecurityGroups, +// which let you apply a set of security rules to a *specific set of VNICs* instead of an entire +// subnet. Oracle recommends using network security groups instead of security lists, although you +// can use either or both together. +// **Important:** Oracle Cloud Infrastructure Compute service images automatically include firewall rules (for example, +// Linux iptables, Windows firewall). If there are issues with some type of access to an instance, +// make sure both the security lists associated with the instance's subnet and the instance's +// firewall rules are set correctly. +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type SecurityList struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the security list. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // Rules for allowing egress IP packets. + EgressSecurityRules []EgressSecurityRule `mandatory:"true" json:"egressSecurityRules"` + + // The security list's Oracle Cloud ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // Rules for allowing ingress IP packets. + IngressSecurityRules []IngressSecurityRule `mandatory:"true" json:"ingressSecurityRules"` + + // The security list's current state. + LifecycleState SecurityListLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the security list was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN the security list belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m SecurityList) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SecurityList) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSecurityListLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetSecurityListLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SecurityListLifecycleStateEnum Enum with underlying type: string +type SecurityListLifecycleStateEnum string + +// Set of constants representing the allowable values for SecurityListLifecycleStateEnum +const ( + SecurityListLifecycleStateProvisioning SecurityListLifecycleStateEnum = "PROVISIONING" + SecurityListLifecycleStateAvailable SecurityListLifecycleStateEnum = "AVAILABLE" + SecurityListLifecycleStateTerminating SecurityListLifecycleStateEnum = "TERMINATING" + SecurityListLifecycleStateTerminated SecurityListLifecycleStateEnum = "TERMINATED" +) + +var mappingSecurityListLifecycleStateEnum = map[string]SecurityListLifecycleStateEnum{ + "PROVISIONING": SecurityListLifecycleStateProvisioning, + "AVAILABLE": SecurityListLifecycleStateAvailable, + "TERMINATING": SecurityListLifecycleStateTerminating, + "TERMINATED": SecurityListLifecycleStateTerminated, +} + +var mappingSecurityListLifecycleStateEnumLowerCase = map[string]SecurityListLifecycleStateEnum{ + "provisioning": SecurityListLifecycleStateProvisioning, + "available": SecurityListLifecycleStateAvailable, + "terminating": SecurityListLifecycleStateTerminating, + "terminated": SecurityListLifecycleStateTerminated, +} + +// GetSecurityListLifecycleStateEnumValues Enumerates the set of values for SecurityListLifecycleStateEnum +func GetSecurityListLifecycleStateEnumValues() []SecurityListLifecycleStateEnum { + values := make([]SecurityListLifecycleStateEnum, 0) + for _, v := range mappingSecurityListLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetSecurityListLifecycleStateEnumStringValues Enumerates the set of values in String for SecurityListLifecycleStateEnum +func GetSecurityListLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingSecurityListLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSecurityListLifecycleStateEnum(val string) (SecurityListLifecycleStateEnum, bool) { + enum, ok := mappingSecurityListLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/security_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/security_rule.go new file mode 100644 index 000000000..d35ccbb08 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/security_rule.go @@ -0,0 +1,273 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SecurityRule A security rule is one of the items in a NetworkSecurityGroup. +// It is a virtual firewall rule for the VNICs in the network security group. A rule can be for +// either inbound (`direction`= INGRESS) or outbound (`direction`= EGRESS) IP packets. +type SecurityRule struct { + + // Direction of the security rule. Set to `EGRESS` for rules to allow outbound IP packets, + // or `INGRESS` for rules to allow inbound IP packets. + Direction SecurityRuleDirectionEnum `mandatory:"true" json:"direction"` + + // The transport protocol. Specify either `all` or an IPv4 protocol number as + // defined in + // Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). + // Options are supported only for ICMP ("1"), TCP ("6"), UDP ("17"), and ICMPv6 ("58"). + Protocol *string `mandatory:"true" json:"protocol"` + + // An optional description of your choice for the rule. + Description *string `mandatory:"false" json:"description"` + + // Conceptually, this is the range of IP addresses that a packet originating from the instance + // can go to. + // Allowed values: + // * An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + // IPv6 addressing is supported for all commercial and government regions. + // See IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // * The `cidrBlock` value for a Service, if you're + // setting up a security rule for traffic destined for a particular `Service` through + // a service gateway. For example: `oci-phx-objectstorage`. + // * The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a NetworkSecurityGroup in the same + // VCN. The value can be the NSG that the rule belongs to if the rule's intent is to control + // traffic between VNICs in the same NSG. + Destination *string `mandatory:"false" json:"destination"` + + // Type of destination for the rule. Required if `direction` = `EGRESS`. + // Allowed values: + // * `CIDR_BLOCK`: If the rule's `destination` is an IP address range in CIDR notation. + // * `SERVICE_CIDR_BLOCK`: If the rule's `destination` is the `cidrBlock` value for a + // Service (the rule is for traffic destined for a + // particular `Service` through a service gateway). + // * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a + // NetworkSecurityGroup. + DestinationType SecurityRuleDestinationTypeEnum `mandatory:"false" json:"destinationType,omitempty"` + + IcmpOptions *IcmpOptions `mandatory:"false" json:"icmpOptions"` + + // An Oracle-assigned identifier for the security rule. You specify this ID when you want to + // update or delete the rule. + // Example: `04ABEC` + Id *string `mandatory:"false" json:"id"` + + // A stateless rule allows traffic in one direction. Remember to add a corresponding + // stateless rule in the other direction if you need to support bidirectional traffic. For + // example, if egress traffic allows TCP destination port 80, there should be an ingress + // rule to allow TCP source port 80. Defaults to false, which means the rule is stateful + // and a corresponding rule is not necessary for bidirectional traffic. + IsStateless *bool `mandatory:"false" json:"isStateless"` + + // Whether the rule is valid. The value is `True` when the rule is first created. If + // the rule's `source` or `destination` is a network security group, the value changes to + // `False` if that network security group is deleted. + IsValid *bool `mandatory:"false" json:"isValid"` + + // Conceptually, this is the range of IP addresses that a packet coming into the instance + // can come from. + // Allowed values: + // * An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + // IPv6 addressing is supported for all commercial and government regions. + // See IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // * The `cidrBlock` value for a Service, if you're + // setting up a security rule for traffic coming from a particular `Service` through + // a service gateway. For example: `oci-phx-objectstorage`. + // * The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a NetworkSecurityGroup in the same + // VCN. The value can be the NSG that the rule belongs to if the rule's intent is to control + // traffic between VNICs in the same NSG. + Source *string `mandatory:"false" json:"source"` + + // Type of source for the rule. Required if `direction` = `INGRESS`. + // * `CIDR_BLOCK`: If the rule's `source` is an IP address range in CIDR notation. + // * `SERVICE_CIDR_BLOCK`: If the rule's `source` is the `cidrBlock` value for a + // Service (the rule is for traffic coming from a + // particular `Service` through a service gateway). + // * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a + // NetworkSecurityGroup. + SourceType SecurityRuleSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` + + TcpOptions *TcpOptions `mandatory:"false" json:"tcpOptions"` + + // The date and time the security rule was created. Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + UdpOptions *UdpOptions `mandatory:"false" json:"udpOptions"` +} + +func (m SecurityRule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SecurityRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSecurityRuleDirectionEnum(string(m.Direction)); !ok && m.Direction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Direction: %s. Supported values are: %s.", m.Direction, strings.Join(GetSecurityRuleDirectionEnumStringValues(), ","))) + } + + if _, ok := GetMappingSecurityRuleDestinationTypeEnum(string(m.DestinationType)); !ok && m.DestinationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DestinationType: %s. Supported values are: %s.", m.DestinationType, strings.Join(GetSecurityRuleDestinationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingSecurityRuleSourceTypeEnum(string(m.SourceType)); !ok && m.SourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceType: %s. Supported values are: %s.", m.SourceType, strings.Join(GetSecurityRuleSourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SecurityRuleDestinationTypeEnum Enum with underlying type: string +type SecurityRuleDestinationTypeEnum string + +// Set of constants representing the allowable values for SecurityRuleDestinationTypeEnum +const ( + SecurityRuleDestinationTypeCidrBlock SecurityRuleDestinationTypeEnum = "CIDR_BLOCK" + SecurityRuleDestinationTypeServiceCidrBlock SecurityRuleDestinationTypeEnum = "SERVICE_CIDR_BLOCK" + SecurityRuleDestinationTypeNetworkSecurityGroup SecurityRuleDestinationTypeEnum = "NETWORK_SECURITY_GROUP" +) + +var mappingSecurityRuleDestinationTypeEnum = map[string]SecurityRuleDestinationTypeEnum{ + "CIDR_BLOCK": SecurityRuleDestinationTypeCidrBlock, + "SERVICE_CIDR_BLOCK": SecurityRuleDestinationTypeServiceCidrBlock, + "NETWORK_SECURITY_GROUP": SecurityRuleDestinationTypeNetworkSecurityGroup, +} + +var mappingSecurityRuleDestinationTypeEnumLowerCase = map[string]SecurityRuleDestinationTypeEnum{ + "cidr_block": SecurityRuleDestinationTypeCidrBlock, + "service_cidr_block": SecurityRuleDestinationTypeServiceCidrBlock, + "network_security_group": SecurityRuleDestinationTypeNetworkSecurityGroup, +} + +// GetSecurityRuleDestinationTypeEnumValues Enumerates the set of values for SecurityRuleDestinationTypeEnum +func GetSecurityRuleDestinationTypeEnumValues() []SecurityRuleDestinationTypeEnum { + values := make([]SecurityRuleDestinationTypeEnum, 0) + for _, v := range mappingSecurityRuleDestinationTypeEnum { + values = append(values, v) + } + return values +} + +// GetSecurityRuleDestinationTypeEnumStringValues Enumerates the set of values in String for SecurityRuleDestinationTypeEnum +func GetSecurityRuleDestinationTypeEnumStringValues() []string { + return []string{ + "CIDR_BLOCK", + "SERVICE_CIDR_BLOCK", + "NETWORK_SECURITY_GROUP", + } +} + +// GetMappingSecurityRuleDestinationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSecurityRuleDestinationTypeEnum(val string) (SecurityRuleDestinationTypeEnum, bool) { + enum, ok := mappingSecurityRuleDestinationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SecurityRuleDirectionEnum Enum with underlying type: string +type SecurityRuleDirectionEnum string + +// Set of constants representing the allowable values for SecurityRuleDirectionEnum +const ( + SecurityRuleDirectionEgress SecurityRuleDirectionEnum = "EGRESS" + SecurityRuleDirectionIngress SecurityRuleDirectionEnum = "INGRESS" +) + +var mappingSecurityRuleDirectionEnum = map[string]SecurityRuleDirectionEnum{ + "EGRESS": SecurityRuleDirectionEgress, + "INGRESS": SecurityRuleDirectionIngress, +} + +var mappingSecurityRuleDirectionEnumLowerCase = map[string]SecurityRuleDirectionEnum{ + "egress": SecurityRuleDirectionEgress, + "ingress": SecurityRuleDirectionIngress, +} + +// GetSecurityRuleDirectionEnumValues Enumerates the set of values for SecurityRuleDirectionEnum +func GetSecurityRuleDirectionEnumValues() []SecurityRuleDirectionEnum { + values := make([]SecurityRuleDirectionEnum, 0) + for _, v := range mappingSecurityRuleDirectionEnum { + values = append(values, v) + } + return values +} + +// GetSecurityRuleDirectionEnumStringValues Enumerates the set of values in String for SecurityRuleDirectionEnum +func GetSecurityRuleDirectionEnumStringValues() []string { + return []string{ + "EGRESS", + "INGRESS", + } +} + +// GetMappingSecurityRuleDirectionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSecurityRuleDirectionEnum(val string) (SecurityRuleDirectionEnum, bool) { + enum, ok := mappingSecurityRuleDirectionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SecurityRuleSourceTypeEnum Enum with underlying type: string +type SecurityRuleSourceTypeEnum string + +// Set of constants representing the allowable values for SecurityRuleSourceTypeEnum +const ( + SecurityRuleSourceTypeCidrBlock SecurityRuleSourceTypeEnum = "CIDR_BLOCK" + SecurityRuleSourceTypeServiceCidrBlock SecurityRuleSourceTypeEnum = "SERVICE_CIDR_BLOCK" + SecurityRuleSourceTypeNetworkSecurityGroup SecurityRuleSourceTypeEnum = "NETWORK_SECURITY_GROUP" +) + +var mappingSecurityRuleSourceTypeEnum = map[string]SecurityRuleSourceTypeEnum{ + "CIDR_BLOCK": SecurityRuleSourceTypeCidrBlock, + "SERVICE_CIDR_BLOCK": SecurityRuleSourceTypeServiceCidrBlock, + "NETWORK_SECURITY_GROUP": SecurityRuleSourceTypeNetworkSecurityGroup, +} + +var mappingSecurityRuleSourceTypeEnumLowerCase = map[string]SecurityRuleSourceTypeEnum{ + "cidr_block": SecurityRuleSourceTypeCidrBlock, + "service_cidr_block": SecurityRuleSourceTypeServiceCidrBlock, + "network_security_group": SecurityRuleSourceTypeNetworkSecurityGroup, +} + +// GetSecurityRuleSourceTypeEnumValues Enumerates the set of values for SecurityRuleSourceTypeEnum +func GetSecurityRuleSourceTypeEnumValues() []SecurityRuleSourceTypeEnum { + values := make([]SecurityRuleSourceTypeEnum, 0) + for _, v := range mappingSecurityRuleSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetSecurityRuleSourceTypeEnumStringValues Enumerates the set of values in String for SecurityRuleSourceTypeEnum +func GetSecurityRuleSourceTypeEnumStringValues() []string { + return []string{ + "CIDR_BLOCK", + "SERVICE_CIDR_BLOCK", + "NETWORK_SECURITY_GROUP", + } +} + +// GetMappingSecurityRuleSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSecurityRuleSourceTypeEnum(val string) (SecurityRuleSourceTypeEnum, bool) { + enum, ok := mappingSecurityRuleSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/service.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/service.go new file mode 100644 index 000000000..a7dedbc08 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/service.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Service An object that represents one or multiple Oracle services that you can enable for a +// ServiceGateway. In the User Guide topic +// Access to Oracle Services: Service Gateway (https://docs.oracle.com/iaas/Content/Network/Tasks/servicegateway.htm), the +// term *service CIDR label* is used to refer to the string that represents the regional public +// IP address ranges of the Oracle service or services covered by a given `Service` object. That +// unique string is the value of the `Service` object's `cidrBlock` attribute. +type Service struct { + + // A string that represents the regional public IP address ranges for the Oracle service or + // services covered by this `Service` object. Also known as the `Service` object's *service + // CIDR label*. + // When you set up a route rule to route traffic to the service gateway, use this value as the + // rule's destination. See RouteTable. Also, when you set up + // a security list rule to cover traffic with the service gateway, use the `cidrBlock` value + // as the rule's destination (for an egress rule) or the source (for an ingress rule). + // See SecurityList. + // Example: `oci-phx-objectstorage` + CidrBlock *string `mandatory:"true" json:"cidrBlock"` + + // Description of the Oracle service or services covered by this `Service` object. + // Example: `OCI PHX Object Storage` + Description *string `mandatory:"true" json:"description"` + + // The `Service` object's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id *string `mandatory:"true" json:"id"` + + // Name of the `Service` object. This name can change and is not guaranteed to be unique. + // Example: `OCI PHX Object Storage` + Name *string `mandatory:"true" json:"name"` +} + +func (m Service) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Service) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/service_gateway.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/service_gateway.go new file mode 100644 index 000000000..bb38bd113 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/service_gateway.go @@ -0,0 +1,152 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ServiceGateway Represents a router that lets your VCN privately access specific Oracle services such as Object +// Storage without exposing the VCN to the public internet. Traffic leaving the VCN and destined +// for a supported Oracle service (use the ListServices operation to +// find available service CIDR labels) is routed through the service gateway and does not traverse the internet. +// The instances in the VCN do not need to have public IP addresses nor be in a public subnet. The VCN does not +// need an internet gateway for this traffic. For more information, see +// Access to Oracle Services: Service Gateway (https://docs.oracle.com/iaas/Content/Network/Tasks/servicegateway.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type ServiceGateway struct { + + // Whether the service gateway blocks all traffic through it. The default is `false`. When + // this is `true`, traffic is not routed to any services, regardless of route rules. + // Example: `true` + BlockTraffic *bool `mandatory:"true" json:"blockTraffic"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the + // service gateway. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the service gateway. + Id *string `mandatory:"true" json:"id"` + + // The service gateway's current state. + LifecycleState ServiceGatewayLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // List of the Service objects enabled for this service gateway. + // The list can be empty. You can enable a particular `Service` by using + // AttachServiceId or + // UpdateServiceGateway. + Services []ServiceIdResponseDetails `mandatory:"true" json:"services"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN the service gateway + // belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the service gateway is using. + // For information about why you would associate a route table with a service gateway, see + // Transit Routing: Private Access to Oracle Services (https://docs.oracle.com/iaas/Content/Network/Tasks/transitroutingoracleservices.htm). + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // The date and time the service gateway was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m ServiceGateway) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ServiceGateway) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingServiceGatewayLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetServiceGatewayLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ServiceGatewayLifecycleStateEnum Enum with underlying type: string +type ServiceGatewayLifecycleStateEnum string + +// Set of constants representing the allowable values for ServiceGatewayLifecycleStateEnum +const ( + ServiceGatewayLifecycleStateProvisioning ServiceGatewayLifecycleStateEnum = "PROVISIONING" + ServiceGatewayLifecycleStateAvailable ServiceGatewayLifecycleStateEnum = "AVAILABLE" + ServiceGatewayLifecycleStateTerminating ServiceGatewayLifecycleStateEnum = "TERMINATING" + ServiceGatewayLifecycleStateTerminated ServiceGatewayLifecycleStateEnum = "TERMINATED" +) + +var mappingServiceGatewayLifecycleStateEnum = map[string]ServiceGatewayLifecycleStateEnum{ + "PROVISIONING": ServiceGatewayLifecycleStateProvisioning, + "AVAILABLE": ServiceGatewayLifecycleStateAvailable, + "TERMINATING": ServiceGatewayLifecycleStateTerminating, + "TERMINATED": ServiceGatewayLifecycleStateTerminated, +} + +var mappingServiceGatewayLifecycleStateEnumLowerCase = map[string]ServiceGatewayLifecycleStateEnum{ + "provisioning": ServiceGatewayLifecycleStateProvisioning, + "available": ServiceGatewayLifecycleStateAvailable, + "terminating": ServiceGatewayLifecycleStateTerminating, + "terminated": ServiceGatewayLifecycleStateTerminated, +} + +// GetServiceGatewayLifecycleStateEnumValues Enumerates the set of values for ServiceGatewayLifecycleStateEnum +func GetServiceGatewayLifecycleStateEnumValues() []ServiceGatewayLifecycleStateEnum { + values := make([]ServiceGatewayLifecycleStateEnum, 0) + for _, v := range mappingServiceGatewayLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetServiceGatewayLifecycleStateEnumStringValues Enumerates the set of values in String for ServiceGatewayLifecycleStateEnum +func GetServiceGatewayLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingServiceGatewayLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingServiceGatewayLifecycleStateEnum(val string) (ServiceGatewayLifecycleStateEnum, bool) { + enum, ok := mappingServiceGatewayLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/service_id_request_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/service_id_request_details.go new file mode 100644 index 000000000..98e98a074 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/service_id_request_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ServiceIdRequestDetails The representation of ServiceIdRequestDetails +type ServiceIdRequestDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Service. + ServiceId *string `mandatory:"true" json:"serviceId"` +} + +func (m ServiceIdRequestDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ServiceIdRequestDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/service_id_response_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/service_id_response_details.go new file mode 100644 index 000000000..8ea06a433 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/service_id_response_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ServiceIdResponseDetails The representation of ServiceIdResponseDetails +type ServiceIdResponseDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the service. + ServiceId *string `mandatory:"true" json:"serviceId"` + + // The name of the service. + ServiceName *string `mandatory:"true" json:"serviceName"` +} + +func (m ServiceIdResponseDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ServiceIdResponseDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/set_origin_asn_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/set_origin_asn_details.go new file mode 100644 index 000000000..bb34be5ca --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/set_origin_asn_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SetOriginAsnDetails Update Origin ASN of a BYOIP Range +type SetOriginAsnDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `Byoasn` Resource to be associated. + ByoasnId *string `mandatory:"true" json:"byoasnId"` + + // The as path prepend length. + AsPathPrependLength *int `mandatory:"false" json:"asPathPrependLength"` +} + +func (m SetOriginAsnDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SetOriginAsnDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/set_origin_asn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/set_origin_asn_request_response.go new file mode 100644 index 000000000..dbf657ea9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/set_origin_asn_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SetOriginAsnRequest wrapper for the SetOriginAsn operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/SetOriginAsn.go.html to see an example of how to use SetOriginAsnRequest. +type SetOriginAsnRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource containing the BYOIP CIDR block. + ByoipRangeId *string `mandatory:"true" contributesTo:"path" name:"byoipRangeId"` + + // ASN details + SetOriginAsnDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SetOriginAsnRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SetOriginAsnRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SetOriginAsnRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SetOriginAsnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SetOriginAsnRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SetOriginAsnResponse wrapper for the SetOriginAsn operation +type SetOriginAsnResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response SetOriginAsnResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SetOriginAsnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/set_origin_asn_to_oracle_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/set_origin_asn_to_oracle_request_response.go new file mode 100644 index 000000000..ce401ff1a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/set_origin_asn_to_oracle_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SetOriginAsnToOracleRequest wrapper for the SetOriginAsnToOracle operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/SetOriginAsnToOracle.go.html to see an example of how to use SetOriginAsnToOracleRequest. +type SetOriginAsnToOracleRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource containing the BYOIP CIDR block. + ByoipRangeId *string `mandatory:"true" contributesTo:"path" name:"byoipRangeId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SetOriginAsnToOracleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SetOriginAsnToOracleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SetOriginAsnToOracleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SetOriginAsnToOracleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SetOriginAsnToOracleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SetOriginAsnToOracleResponse wrapper for the SetOriginAsnToOracle operation +type SetOriginAsnToOracleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response SetOriginAsnToOracleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SetOriginAsnToOracleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape.go new file mode 100644 index 000000000..ef9d931eb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape.go @@ -0,0 +1,242 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Shape A compute instance shape that can be used in LaunchInstance. +// For more information, see Overview of the Compute Service (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm) and +// Compute Shapes (https://docs.oracle.com/iaas/Content/Compute/References/computeshapes.htm). +type Shape struct { + + // The name of the shape. You can enumerate all available shapes by calling + // ListShapes. + Shape *string `mandatory:"true" json:"shape"` + + // For a subcore burstable VM, the supported baseline OCPU utilization for instances that use this shape. + BaselineOcpuUtilizations []ShapeBaselineOcpuUtilizationsEnum `mandatory:"false" json:"baselineOcpuUtilizations,omitempty"` + + // For a subcore burstable VM, the minimum total baseline OCPUs required. The total baseline OCPUs is equal to + // baselineOcpuUtilization chosen multiplied by the number of OCPUs chosen. + MinTotalBaselineOcpusRequired *float32 `mandatory:"false" json:"minTotalBaselineOcpusRequired"` + + // A short description of the shape's processor (CPU). + ProcessorDescription *string `mandatory:"false" json:"processorDescription"` + + // The default number of OCPUs available for this shape. + Ocpus *float32 `mandatory:"false" json:"ocpus"` + + // The default amount of memory available for this shape, in gigabytes. + MemoryInGBs *float32 `mandatory:"false" json:"memoryInGBs"` + + // The number of physical network interface card (NIC) ports available for this shape. + NetworkPorts *int `mandatory:"false" json:"networkPorts"` + + // The networking bandwidth available for this shape, in gigabits per second. + NetworkingBandwidthInGbps *float32 `mandatory:"false" json:"networkingBandwidthInGbps"` + + // The maximum number of VNIC attachments available for this shape. + MaxVnicAttachments *int `mandatory:"false" json:"maxVnicAttachments"` + + // The number of GPUs available for this shape. + Gpus *int `mandatory:"false" json:"gpus"` + + // A short description of the graphics processing unit (GPU) available for this shape. + // If the shape does not have any GPUs, this field is `null`. + GpuDescription *string `mandatory:"false" json:"gpuDescription"` + + // The number of local disks available for this shape. + LocalDisks *int `mandatory:"false" json:"localDisks"` + + // The aggregate size of the local disks available for this shape, in gigabytes. + // If the shape does not have any local disks, this field is `null`. + LocalDisksTotalSizeInGBs *float32 `mandatory:"false" json:"localDisksTotalSizeInGBs"` + + // A short description of the local disks available for this shape. + // If the shape does not have any local disks, this field is `null`. + LocalDiskDescription *string `mandatory:"false" json:"localDiskDescription"` + + // The number of networking ports available for the remote direct memory access (RDMA) network between nodes in + // a high performance computing (HPC) cluster network. If the shape does not support cluster networks, this + // value is `0`. + RdmaPorts *int `mandatory:"false" json:"rdmaPorts"` + + // The networking bandwidth available for the remote direct memory access (RDMA) network for this shape, in + // gigabits per second. + RdmaBandwidthInGbps *int `mandatory:"false" json:"rdmaBandwidthInGbps"` + + // Whether live migration is supported for this shape. + IsLiveMigrationSupported *bool `mandatory:"false" json:"isLiveMigrationSupported"` + + OcpuOptions *ShapeOcpuOptions `mandatory:"false" json:"ocpuOptions"` + + MemoryOptions *ShapeMemoryOptions `mandatory:"false" json:"memoryOptions"` + + NetworkingBandwidthOptions *ShapeNetworkingBandwidthOptions `mandatory:"false" json:"networkingBandwidthOptions"` + + MaxVnicAttachmentOptions *ShapeMaxVnicAttachmentOptions `mandatory:"false" json:"maxVnicAttachmentOptions"` + + PlatformConfigOptions *ShapePlatformConfigOptions `mandatory:"false" json:"platformConfigOptions"` + + // Whether billing continues when the instances that use this shape are in the stopped state. + IsBilledForStoppedInstance *bool `mandatory:"false" json:"isBilledForStoppedInstance"` + + // How instances that use this shape are charged. + BillingType ShapeBillingTypeEnum `mandatory:"false" json:"billingType,omitempty"` + + // The list of of compartment quotas for the shape. + QuotaNames []string `mandatory:"false" json:"quotaNames"` + + // Whether the shape supports creating subcore or burstable instances. A burstable instance (https://docs.oracle.com/iaas/Content/Compute/References/burstable-instances.htm) + // is a virtual machine (VM) instance that provides a baseline level of CPU performance with the ability to burst to a higher level to support occasional + // spikes in usage. + IsSubcore *bool `mandatory:"false" json:"isSubcore"` + + // Whether the shape supports creating flexible instances. A flexible shape (https://docs.oracle.com/iaas/Content/Compute/References/computeshapes.htm#flexible) + // is a shape that lets you customize the number of OCPUs and the amount of memory when launching or resizing your instance. + IsFlexible *bool `mandatory:"false" json:"isFlexible"` + + // The list of compatible shapes that this shape can be changed to. For more information, + // see Changing the Shape of an Instance (https://docs.oracle.com/iaas/Content/Compute/Tasks/resizinginstances.htm). + ResizeCompatibleShapes []string `mandatory:"false" json:"resizeCompatibleShapes"` + + // The list of shapes and shape details (if applicable) that Oracle recommends that you use as an alternative to the current shape. + RecommendedAlternatives []ShapeAlternativeObject `mandatory:"false" json:"recommendedAlternatives"` + + // The list of platform names that can be used for this shapes + PlatformNames []string `mandatory:"false" json:"platformNames"` +} + +func (m Shape) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Shape) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.BaselineOcpuUtilizations { + if _, ok := GetMappingShapeBaselineOcpuUtilizationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BaselineOcpuUtilizations: %s. Supported values are: %s.", val, strings.Join(GetShapeBaselineOcpuUtilizationsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingShapeBillingTypeEnum(string(m.BillingType)); !ok && m.BillingType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BillingType: %s. Supported values are: %s.", m.BillingType, strings.Join(GetShapeBillingTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ShapeBaselineOcpuUtilizationsEnum Enum with underlying type: string +type ShapeBaselineOcpuUtilizationsEnum string + +// Set of constants representing the allowable values for ShapeBaselineOcpuUtilizationsEnum +const ( + ShapeBaselineOcpuUtilizations8 ShapeBaselineOcpuUtilizationsEnum = "BASELINE_1_8" + ShapeBaselineOcpuUtilizations2 ShapeBaselineOcpuUtilizationsEnum = "BASELINE_1_2" + ShapeBaselineOcpuUtilizations1 ShapeBaselineOcpuUtilizationsEnum = "BASELINE_1_1" +) + +var mappingShapeBaselineOcpuUtilizationsEnum = map[string]ShapeBaselineOcpuUtilizationsEnum{ + "BASELINE_1_8": ShapeBaselineOcpuUtilizations8, + "BASELINE_1_2": ShapeBaselineOcpuUtilizations2, + "BASELINE_1_1": ShapeBaselineOcpuUtilizations1, +} + +var mappingShapeBaselineOcpuUtilizationsEnumLowerCase = map[string]ShapeBaselineOcpuUtilizationsEnum{ + "baseline_1_8": ShapeBaselineOcpuUtilizations8, + "baseline_1_2": ShapeBaselineOcpuUtilizations2, + "baseline_1_1": ShapeBaselineOcpuUtilizations1, +} + +// GetShapeBaselineOcpuUtilizationsEnumValues Enumerates the set of values for ShapeBaselineOcpuUtilizationsEnum +func GetShapeBaselineOcpuUtilizationsEnumValues() []ShapeBaselineOcpuUtilizationsEnum { + values := make([]ShapeBaselineOcpuUtilizationsEnum, 0) + for _, v := range mappingShapeBaselineOcpuUtilizationsEnum { + values = append(values, v) + } + return values +} + +// GetShapeBaselineOcpuUtilizationsEnumStringValues Enumerates the set of values in String for ShapeBaselineOcpuUtilizationsEnum +func GetShapeBaselineOcpuUtilizationsEnumStringValues() []string { + return []string{ + "BASELINE_1_8", + "BASELINE_1_2", + "BASELINE_1_1", + } +} + +// GetMappingShapeBaselineOcpuUtilizationsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingShapeBaselineOcpuUtilizationsEnum(val string) (ShapeBaselineOcpuUtilizationsEnum, bool) { + enum, ok := mappingShapeBaselineOcpuUtilizationsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ShapeBillingTypeEnum Enum with underlying type: string +type ShapeBillingTypeEnum string + +// Set of constants representing the allowable values for ShapeBillingTypeEnum +const ( + ShapeBillingTypeAlwaysFree ShapeBillingTypeEnum = "ALWAYS_FREE" + ShapeBillingTypeLimitedFree ShapeBillingTypeEnum = "LIMITED_FREE" + ShapeBillingTypePaid ShapeBillingTypeEnum = "PAID" +) + +var mappingShapeBillingTypeEnum = map[string]ShapeBillingTypeEnum{ + "ALWAYS_FREE": ShapeBillingTypeAlwaysFree, + "LIMITED_FREE": ShapeBillingTypeLimitedFree, + "PAID": ShapeBillingTypePaid, +} + +var mappingShapeBillingTypeEnumLowerCase = map[string]ShapeBillingTypeEnum{ + "always_free": ShapeBillingTypeAlwaysFree, + "limited_free": ShapeBillingTypeLimitedFree, + "paid": ShapeBillingTypePaid, +} + +// GetShapeBillingTypeEnumValues Enumerates the set of values for ShapeBillingTypeEnum +func GetShapeBillingTypeEnumValues() []ShapeBillingTypeEnum { + values := make([]ShapeBillingTypeEnum, 0) + for _, v := range mappingShapeBillingTypeEnum { + values = append(values, v) + } + return values +} + +// GetShapeBillingTypeEnumStringValues Enumerates the set of values in String for ShapeBillingTypeEnum +func GetShapeBillingTypeEnumStringValues() []string { + return []string{ + "ALWAYS_FREE", + "LIMITED_FREE", + "PAID", + } +} + +// GetMappingShapeBillingTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingShapeBillingTypeEnum(val string) (ShapeBillingTypeEnum, bool) { + enum, ok := mappingShapeBillingTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_access_control_service_enabled_platform_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_access_control_service_enabled_platform_options.go new file mode 100644 index 000000000..c2bbbab59 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_access_control_service_enabled_platform_options.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeAccessControlServiceEnabledPlatformOptions Configuration options for the Access Control Service. +type ShapeAccessControlServiceEnabledPlatformOptions struct { + + // Whether the Access Control Service can be enabled. + AllowedValues []bool `mandatory:"false" json:"allowedValues"` + + // Whether the Access Control Service is enabled by default. + IsDefaultEnabled *bool `mandatory:"false" json:"isDefaultEnabled"` +} + +func (m ShapeAccessControlServiceEnabledPlatformOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeAccessControlServiceEnabledPlatformOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_alternative_object.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_alternative_object.go new file mode 100644 index 000000000..6c4b1648c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_alternative_object.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeAlternativeObject The shape that Oracle recommends you to use an alternative to the current shape. +type ShapeAlternativeObject struct { + + // The name of the shape. + ShapeName *string `mandatory:"true" json:"shapeName"` +} + +func (m ShapeAlternativeObject) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeAlternativeObject) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_input_output_memory_management_unit_enabled_platform_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_input_output_memory_management_unit_enabled_platform_options.go new file mode 100644 index 000000000..1dab6f45b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_input_output_memory_management_unit_enabled_platform_options.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeInputOutputMemoryManagementUnitEnabledPlatformOptions Configuration options for the input-output memory management unit (IOMMU). +type ShapeInputOutputMemoryManagementUnitEnabledPlatformOptions struct { + + // Whether the input-output memory management unit can be enabled. + AllowedValues []bool `mandatory:"false" json:"allowedValues"` + + // Whether the input-output memory management unit is enabled by default. + IsDefaultEnabled *bool `mandatory:"false" json:"isDefaultEnabled"` +} + +func (m ShapeInputOutputMemoryManagementUnitEnabledPlatformOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeInputOutputMemoryManagementUnitEnabledPlatformOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_max_vnic_attachment_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_max_vnic_attachment_options.go new file mode 100644 index 000000000..bee52f678 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_max_vnic_attachment_options.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeMaxVnicAttachmentOptions For a flexible shape, the number of VNIC attachments that are available for instances that use this shape. +// If this field is null, then this shape has a fixed maximum number of VNIC attachments equal to `maxVnicAttachments`. +type ShapeMaxVnicAttachmentOptions struct { + + // The lowest maximum value of VNIC attachments. + Min *int `mandatory:"false" json:"min"` + + // The highest maximum value of VNIC attachments. + Max *float32 `mandatory:"false" json:"max"` + + // The default number of VNIC attachments allowed per OCPU. + DefaultPerOcpu *float32 `mandatory:"false" json:"defaultPerOcpu"` +} + +func (m ShapeMaxVnicAttachmentOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeMaxVnicAttachmentOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_measured_boot_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_measured_boot_options.go new file mode 100644 index 000000000..8ee950375 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_measured_boot_options.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeMeasuredBootOptions Configuration options for the Measured Boot feature. +type ShapeMeasuredBootOptions struct { + + // Boolean values that indicate whether the Measured Boot feature can be enabled or disabled. + AllowedValues []bool `mandatory:"false" json:"allowedValues"` + + // Whether the Measured Boot feature is enabled by default. + IsDefaultEnabled *bool `mandatory:"false" json:"isDefaultEnabled"` +} + +func (m ShapeMeasuredBootOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeMeasuredBootOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_memory_encryption_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_memory_encryption_options.go new file mode 100644 index 000000000..8641771b0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_memory_encryption_options.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeMemoryEncryptionOptions Configuration options for memory encryption. +type ShapeMemoryEncryptionOptions struct { + + // Whether memory encryption can be enabled. + AllowedValues []bool `mandatory:"false" json:"allowedValues"` + + // Whether memory encryption is enabled by default. + IsDefaultEnabled *bool `mandatory:"false" json:"isDefaultEnabled"` +} + +func (m ShapeMemoryEncryptionOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeMemoryEncryptionOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_memory_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_memory_options.go new file mode 100644 index 000000000..7b8e1b7f1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_memory_options.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeMemoryOptions For a flexible shape, the amount of memory available for instances that use this shape. +// If this field is null, then this shape has a fixed amount of memory equivalent to `memoryInGBs`. +type ShapeMemoryOptions struct { + + // The minimum amount of memory, in gigabytes. + MinInGBs *float32 `mandatory:"false" json:"minInGBs"` + + // The maximum amount of memory, in gigabytes. + MaxInGBs *float32 `mandatory:"false" json:"maxInGBs"` + + // The default amount of memory per OCPU available for this shape, in gigabytes. + DefaultPerOcpuInGBs *float32 `mandatory:"false" json:"defaultPerOcpuInGBs"` + + // The minimum amount of memory per OCPU available for this shape, in gigabytes. + MinPerOcpuInGBs *float32 `mandatory:"false" json:"minPerOcpuInGBs"` + + // The maximum amount of memory per OCPU available for this shape, in gigabytes. + MaxPerOcpuInGBs *float32 `mandatory:"false" json:"maxPerOcpuInGBs"` + + // The maximum amount of memory per NUMA node, in gigabytes. + MaxPerNumaNodeInGBs *float32 `mandatory:"false" json:"maxPerNumaNodeInGBs"` +} + +func (m ShapeMemoryOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeMemoryOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_networking_bandwidth_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_networking_bandwidth_options.go new file mode 100644 index 000000000..b08ff5a2d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_networking_bandwidth_options.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeNetworkingBandwidthOptions For a flexible shape, the amount of networking bandwidth available for instances that use this shape. +// If this field is null, then this shape has a fixed amount of bandwidth equivalent to `networkingBandwidthInGbps`. +type ShapeNetworkingBandwidthOptions struct { + + // The minimum amount of networking bandwidth, in gigabits per second. + MinInGbps *float32 `mandatory:"false" json:"minInGbps"` + + // The maximum amount of networking bandwidth, in gigabits per second. + MaxInGbps *float32 `mandatory:"false" json:"maxInGbps"` + + // The default amount of networking bandwidth per OCPU, in gigabits per second. + DefaultPerOcpuInGbps *float32 `mandatory:"false" json:"defaultPerOcpuInGbps"` +} + +func (m ShapeNetworkingBandwidthOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeNetworkingBandwidthOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_numa_nodes_per_socket_platform_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_numa_nodes_per_socket_platform_options.go new file mode 100644 index 000000000..565b7628a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_numa_nodes_per_socket_platform_options.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeNumaNodesPerSocketPlatformOptions Configuration options for NUMA nodes per socket. +type ShapeNumaNodesPerSocketPlatformOptions struct { + + // The supported values for this platform configuration property. + AllowedValues []ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum `mandatory:"false" json:"allowedValues,omitempty"` + + // The default NUMA nodes per socket configuration. + DefaultValue *string `mandatory:"false" json:"defaultValue"` +} + +func (m ShapeNumaNodesPerSocketPlatformOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeNumaNodesPerSocketPlatformOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AllowedValues { + if _, ok := GetMappingShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AllowedValues: %s. Supported values are: %s.", val, strings.Join(GetShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum Enum with underlying type: string +type ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum string + +// Set of constants representing the allowable values for ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum +const ( + ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps0 ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum = "NPS0" + ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps1 ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum = "NPS1" + ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps2 ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum = "NPS2" + ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps4 ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum = "NPS4" + ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps6 ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum = "NPS6" +) + +var mappingShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum = map[string]ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum{ + "NPS0": ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps0, + "NPS1": ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps1, + "NPS2": ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps2, + "NPS4": ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps4, + "NPS6": ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps6, +} + +var mappingShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnumLowerCase = map[string]ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum{ + "nps0": ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps0, + "nps1": ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps1, + "nps2": ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps2, + "nps4": ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps4, + "nps6": ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesNps6, +} + +// GetShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnumValues Enumerates the set of values for ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum +func GetShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnumValues() []ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum { + values := make([]ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum, 0) + for _, v := range mappingShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum { + values = append(values, v) + } + return values +} + +// GetShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnumStringValues Enumerates the set of values in String for ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum +func GetShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + "NPS6", + } +} + +// GetMappingShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum(val string) (ShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnum, bool) { + enum, ok := mappingShapeNumaNodesPerSocketPlatformOptionsAllowedValuesEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_ocpu_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_ocpu_options.go new file mode 100644 index 000000000..453f40b4f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_ocpu_options.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeOcpuOptions For a flexible shape, the number of OCPUs available for instances that use this shape. +// If this field is null, then this shape has a fixed number of OCPUs equal to `ocpus`. +type ShapeOcpuOptions struct { + + // The minimum number of OCPUs. + Min *float32 `mandatory:"false" json:"min"` + + // The maximum number of OCPUs. + Max *float32 `mandatory:"false" json:"max"` + + // The maximum number of cores available per NUMA node. + MaxPerNumaNode *float32 `mandatory:"false" json:"maxPerNumaNode"` +} + +func (m ShapeOcpuOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeOcpuOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_platform_config_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_platform_config_options.go new file mode 100644 index 000000000..87750530c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_platform_config_options.go @@ -0,0 +1,138 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapePlatformConfigOptions The list of supported platform configuration options for this shape. +type ShapePlatformConfigOptions struct { + + // The type of platform being configured. + Type ShapePlatformConfigOptionsTypeEnum `mandatory:"false" json:"type,omitempty"` + + SecureBootOptions *ShapeSecureBootOptions `mandatory:"false" json:"secureBootOptions"` + + MeasuredBootOptions *ShapeMeasuredBootOptions `mandatory:"false" json:"measuredBootOptions"` + + TrustedPlatformModuleOptions *ShapeTrustedPlatformModuleOptions `mandatory:"false" json:"trustedPlatformModuleOptions"` + + NumaNodesPerSocketPlatformOptions *ShapeNumaNodesPerSocketPlatformOptions `mandatory:"false" json:"numaNodesPerSocketPlatformOptions"` + + MemoryEncryptionOptions *ShapeMemoryEncryptionOptions `mandatory:"false" json:"memoryEncryptionOptions"` + + SymmetricMultiThreadingOptions *ShapeSymmetricMultiThreadingEnabledPlatformOptions `mandatory:"false" json:"symmetricMultiThreadingOptions"` + + AccessControlServiceOptions *ShapeAccessControlServiceEnabledPlatformOptions `mandatory:"false" json:"accessControlServiceOptions"` + + VirtualInstructionsOptions *ShapeVirtualInstructionsEnabledPlatformOptions `mandatory:"false" json:"virtualInstructionsOptions"` + + InputOutputMemoryManagementUnitOptions *ShapeInputOutputMemoryManagementUnitEnabledPlatformOptions `mandatory:"false" json:"inputOutputMemoryManagementUnitOptions"` + + PercentageOfCoresEnabledOptions *PercentageOfCoresEnabledOptions `mandatory:"false" json:"percentageOfCoresEnabledOptions"` +} + +func (m ShapePlatformConfigOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapePlatformConfigOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingShapePlatformConfigOptionsTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetShapePlatformConfigOptionsTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ShapePlatformConfigOptionsTypeEnum Enum with underlying type: string +type ShapePlatformConfigOptionsTypeEnum string + +// Set of constants representing the allowable values for ShapePlatformConfigOptionsTypeEnum +const ( + ShapePlatformConfigOptionsTypeAmdMilanBm ShapePlatformConfigOptionsTypeEnum = "AMD_MILAN_BM" + ShapePlatformConfigOptionsTypeAmdMilanBmGpu ShapePlatformConfigOptionsTypeEnum = "AMD_MILAN_BM_GPU" + ShapePlatformConfigOptionsTypeAmdRomeBm ShapePlatformConfigOptionsTypeEnum = "AMD_ROME_BM" + ShapePlatformConfigOptionsTypeAmdRomeBmGpu ShapePlatformConfigOptionsTypeEnum = "AMD_ROME_BM_GPU" + ShapePlatformConfigOptionsTypeGenericBm ShapePlatformConfigOptionsTypeEnum = "GENERIC_BM" + ShapePlatformConfigOptionsTypeIntelIcelakeBm ShapePlatformConfigOptionsTypeEnum = "INTEL_ICELAKE_BM" + ShapePlatformConfigOptionsTypeIntelSkylakeBm ShapePlatformConfigOptionsTypeEnum = "INTEL_SKYLAKE_BM" + ShapePlatformConfigOptionsTypeAmdVm ShapePlatformConfigOptionsTypeEnum = "AMD_VM" + ShapePlatformConfigOptionsTypeIntelVm ShapePlatformConfigOptionsTypeEnum = "INTEL_VM" +) + +var mappingShapePlatformConfigOptionsTypeEnum = map[string]ShapePlatformConfigOptionsTypeEnum{ + "AMD_MILAN_BM": ShapePlatformConfigOptionsTypeAmdMilanBm, + "AMD_MILAN_BM_GPU": ShapePlatformConfigOptionsTypeAmdMilanBmGpu, + "AMD_ROME_BM": ShapePlatformConfigOptionsTypeAmdRomeBm, + "AMD_ROME_BM_GPU": ShapePlatformConfigOptionsTypeAmdRomeBmGpu, + "GENERIC_BM": ShapePlatformConfigOptionsTypeGenericBm, + "INTEL_ICELAKE_BM": ShapePlatformConfigOptionsTypeIntelIcelakeBm, + "INTEL_SKYLAKE_BM": ShapePlatformConfigOptionsTypeIntelSkylakeBm, + "AMD_VM": ShapePlatformConfigOptionsTypeAmdVm, + "INTEL_VM": ShapePlatformConfigOptionsTypeIntelVm, +} + +var mappingShapePlatformConfigOptionsTypeEnumLowerCase = map[string]ShapePlatformConfigOptionsTypeEnum{ + "amd_milan_bm": ShapePlatformConfigOptionsTypeAmdMilanBm, + "amd_milan_bm_gpu": ShapePlatformConfigOptionsTypeAmdMilanBmGpu, + "amd_rome_bm": ShapePlatformConfigOptionsTypeAmdRomeBm, + "amd_rome_bm_gpu": ShapePlatformConfigOptionsTypeAmdRomeBmGpu, + "generic_bm": ShapePlatformConfigOptionsTypeGenericBm, + "intel_icelake_bm": ShapePlatformConfigOptionsTypeIntelIcelakeBm, + "intel_skylake_bm": ShapePlatformConfigOptionsTypeIntelSkylakeBm, + "amd_vm": ShapePlatformConfigOptionsTypeAmdVm, + "intel_vm": ShapePlatformConfigOptionsTypeIntelVm, +} + +// GetShapePlatformConfigOptionsTypeEnumValues Enumerates the set of values for ShapePlatformConfigOptionsTypeEnum +func GetShapePlatformConfigOptionsTypeEnumValues() []ShapePlatformConfigOptionsTypeEnum { + values := make([]ShapePlatformConfigOptionsTypeEnum, 0) + for _, v := range mappingShapePlatformConfigOptionsTypeEnum { + values = append(values, v) + } + return values +} + +// GetShapePlatformConfigOptionsTypeEnumStringValues Enumerates the set of values in String for ShapePlatformConfigOptionsTypeEnum +func GetShapePlatformConfigOptionsTypeEnumStringValues() []string { + return []string{ + "AMD_MILAN_BM", + "AMD_MILAN_BM_GPU", + "AMD_ROME_BM", + "AMD_ROME_BM_GPU", + "GENERIC_BM", + "INTEL_ICELAKE_BM", + "INTEL_SKYLAKE_BM", + "AMD_VM", + "INTEL_VM", + } +} + +// GetMappingShapePlatformConfigOptionsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingShapePlatformConfigOptionsTypeEnum(val string) (ShapePlatformConfigOptionsTypeEnum, bool) { + enum, ok := mappingShapePlatformConfigOptionsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_secure_boot_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_secure_boot_options.go new file mode 100644 index 000000000..4d2a7dd09 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_secure_boot_options.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeSecureBootOptions Configuration options for Secure Boot. +type ShapeSecureBootOptions struct { + + // Boolean values that indicate whether Secure Boot can be enabled or disabled. + AllowedValues []bool `mandatory:"false" json:"allowedValues"` + + // Whether Secure Boot is enabled by default. + IsDefaultEnabled *bool `mandatory:"false" json:"isDefaultEnabled"` +} + +func (m ShapeSecureBootOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeSecureBootOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_symmetric_multi_threading_enabled_platform_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_symmetric_multi_threading_enabled_platform_options.go new file mode 100644 index 000000000..a9896e600 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_symmetric_multi_threading_enabled_platform_options.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeSymmetricMultiThreadingEnabledPlatformOptions Configuration options for symmetric multithreading (also called simultaneous multithreading or SMT). +type ShapeSymmetricMultiThreadingEnabledPlatformOptions struct { + + // Whether symmetric multithreading can be enabled. + AllowedValues []bool `mandatory:"false" json:"allowedValues"` + + // Whether symmetric multithreading is enabled by default. + IsDefaultEnabled *bool `mandatory:"false" json:"isDefaultEnabled"` +} + +func (m ShapeSymmetricMultiThreadingEnabledPlatformOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeSymmetricMultiThreadingEnabledPlatformOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_trusted_platform_module_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_trusted_platform_module_options.go new file mode 100644 index 000000000..4a52e0340 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_trusted_platform_module_options.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeTrustedPlatformModuleOptions Configuration options for the Trusted Platform Module (TPM). +type ShapeTrustedPlatformModuleOptions struct { + + // Boolean values that indicate whether the Trusted Platform Module can be enabled or disabled. + AllowedValues []bool `mandatory:"false" json:"allowedValues"` + + // Whether the Trusted Platform Module is enabled by default. + IsDefaultEnabled *bool `mandatory:"false" json:"isDefaultEnabled"` +} + +func (m ShapeTrustedPlatformModuleOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeTrustedPlatformModuleOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_virtual_instructions_enabled_platform_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_virtual_instructions_enabled_platform_options.go new file mode 100644 index 000000000..d65248ff3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/shape_virtual_instructions_enabled_platform_options.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeVirtualInstructionsEnabledPlatformOptions Configuration options for the virtualization instructions. +type ShapeVirtualInstructionsEnabledPlatformOptions struct { + + // Whether virtualization instructions can be enabled. + AllowedValues []bool `mandatory:"false" json:"allowedValues"` + + // Whether virtualization instructions are enabled by default. + IsDefaultEnabled *bool `mandatory:"false" json:"isDefaultEnabled"` +} + +func (m ShapeVirtualInstructionsEnabledPlatformOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeVirtualInstructionsEnabledPlatformOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/soft_reset_action_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/soft_reset_action_details.go new file mode 100644 index 000000000..ee8904d88 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/soft_reset_action_details.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SoftResetActionDetails Parameters for the `softReset` InstanceAction. If omitted, default values are used. +type SoftResetActionDetails struct { + + // For instances that use a DenseIO shape, the flag denoting whether + // reboot migration (https://docs.oracle.com/iaas/Content/Compute/References/infrastructure-maintenance.htm#reboot) + // is performed for the instance. The default value is `false`. + // If the instance has a date in the Maintenance reboot field and you do nothing (or set this flag to `false`), the instance + // will be rebuilt at the scheduled maintenance time. The instance will experience 2-6 hours of downtime during the + // maintenance process. The local NVMe-based SSD will be preserved. + // If you want to minimize downtime and can delete the SSD, you can set this flag to `true` and proactively reboot the + // instance before the scheduled maintenance time. The instance will be reboot migrated to a healthy host and the SSD will be + // deleted. A short downtime occurs during the migration. + // **Caution:** When `true`, the SSD is permanently deleted. We recommend that you create a backup of the SSD before proceeding. + AllowDenseRebootMigration *bool `mandatory:"false" json:"allowDenseRebootMigration"` +} + +func (m SoftResetActionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SoftResetActionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m SoftResetActionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeSoftResetActionDetails SoftResetActionDetails + s := struct { + DiscriminatorParam string `json:"actionType"` + MarshalTypeSoftResetActionDetails + }{ + "softreset", + (MarshalTypeSoftResetActionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/softreset_instance_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/softreset_instance_pool_request_response.go new file mode 100644 index 000000000..cdf1409f7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/softreset_instance_pool_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SoftresetInstancePoolRequest wrapper for the SoftresetInstancePool operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/SoftresetInstancePool.go.html to see an example of how to use SoftresetInstancePoolRequest. +type SoftresetInstancePoolRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SoftresetInstancePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SoftresetInstancePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SoftresetInstancePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SoftresetInstancePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SoftresetInstancePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SoftresetInstancePoolResponse wrapper for the SoftresetInstancePool operation +type SoftresetInstancePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstancePool instance + InstancePool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response SoftresetInstancePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SoftresetInstancePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/softstop_instance_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/softstop_instance_pool_request_response.go new file mode 100644 index 000000000..4c15fba50 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/softstop_instance_pool_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SoftstopInstancePoolRequest wrapper for the SoftstopInstancePool operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/SoftstopInstancePool.go.html to see an example of how to use SoftstopInstancePoolRequest. +type SoftstopInstancePoolRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SoftstopInstancePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SoftstopInstancePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SoftstopInstancePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SoftstopInstancePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SoftstopInstancePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SoftstopInstancePoolResponse wrapper for the SoftstopInstancePool operation +type SoftstopInstancePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstancePool instance + InstancePool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response SoftstopInstancePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SoftstopInstancePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/start_instance_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/start_instance_pool_request_response.go new file mode 100644 index 000000000..80ccc3b3f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/start_instance_pool_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// StartInstancePoolRequest wrapper for the StartInstancePool operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/StartInstancePool.go.html to see an example of how to use StartInstancePoolRequest. +type StartInstancePoolRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request StartInstancePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request StartInstancePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request StartInstancePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request StartInstancePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request StartInstancePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// StartInstancePoolResponse wrapper for the StartInstancePool operation +type StartInstancePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstancePool instance + InstancePool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response StartInstancePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response StartInstancePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/stop_instance_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/stop_instance_pool_request_response.go new file mode 100644 index 000000000..94347a02c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/stop_instance_pool_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// StopInstancePoolRequest wrapper for the StopInstancePool operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/StopInstancePool.go.html to see an example of how to use StopInstancePoolRequest. +type StopInstancePoolRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request StopInstancePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request StopInstancePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request StopInstancePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request StopInstancePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request StopInstancePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// StopInstancePoolResponse wrapper for the StopInstancePool operation +type StopInstancePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstancePool instance + InstancePool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response StopInstancePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response StopInstancePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/subnet.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/subnet.go new file mode 100644 index 000000000..5a4403f6c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/subnet.go @@ -0,0 +1,225 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Subnet A logical subdivision of a VCN. Each subnet +// consists of a contiguous range of IP addresses that do not overlap with +// other subnets in the VCN. Example: 172.16.1.0/24. For more information, see +// Overview of the Networking Service (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm) and +// VCNs and Subnets (https://docs.oracle.com/iaas/Content/Network/Tasks/managingVCNs.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type Subnet struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the subnet. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The subnet's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // The subnet's current state. + LifecycleState SubnetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table that the subnet uses. + RouteTableId *string `mandatory:"true" json:"routeTableId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN the subnet is in. + VcnId *string `mandatory:"true" json:"vcnId"` + + // The MAC address of the virtual router. + // Example: `00:00:00:00:00:01` + VirtualRouterMac *string `mandatory:"true" json:"virtualRouterMac"` + + // The subnet's availability domain. This attribute will be null if this is a regional subnet + // instead of an AD-specific subnet. Oracle recommends creating regional subnets. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The subnet's CIDR block. + // Example: `10.0.1.0/24` + CidrBlock *string `mandatory:"false" json:"cidrBlock"` + + // The list of all IPv4 CIDR blocks for the subnet that meets the following criteria: + // - Ipv4 CIDR blocks must be valid. + // - Multiple Ipv4 CIDR blocks must not overlap each other or the on-premises network CIDR block. + // - The number of prefixes must not exceed the limit of IPv4 prefixes allowed to a subnet. + Ipv4CidrBlocks []string `mandatory:"false" json:"ipv4CidrBlocks"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the set of DHCP options that the subnet uses. + DhcpOptionsId *string `mandatory:"false" json:"dhcpOptionsId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // A DNS label for the subnet, used in conjunction with the VNIC's hostname and + // VCN's DNS label to form a fully qualified domain name (FQDN) for each VNIC + // within this subnet (for example, `bminstance1.subnet123.vcn1.oraclevcn.com`). + // Must be an alphanumeric string that begins with a letter and is unique within the VCN. + // The value cannot be changed. + // The absence of this parameter means the Internet and VCN Resolver + // will not resolve hostnames of instances in this subnet. + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + // Example: `subnet123` + DnsLabel *string `mandatory:"false" json:"dnsLabel"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // For an IPv6-enabled subnet, this is the IPv6 prefix for the subnet's IP address space. + // The subnet size is always /64. See IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // Example: `2001:0db8:0123:1111::/64` + Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` + + // The list of all IPv6 prefixes (Oracle allocated IPv6 GUA, ULA or private IPv6 prefixes, BYOIPv6 prefixes) for the subnet. + Ipv6CidrBlocks []string `mandatory:"false" json:"ipv6CidrBlocks"` + + // For an IPv6-enabled subnet, this is the IPv6 address of the virtual router. + // Example: `2001:0db8:0123:1111:89ab:cdef:1234:5678` + Ipv6VirtualRouterIp *string `mandatory:"false" json:"ipv6VirtualRouterIp"` + + // Whether to disallow ingress internet traffic to VNICs within this subnet. Defaults to false. + // For IPV4, `prohibitInternetIngress` behaves similarly to `prohibitPublicIpOnVnic`. + // If it is set to false, VNICs created in this subnet will automatically be assigned public IP + // addresses unless specified otherwise during instance launch or VNIC creation (with the `assignPublicIp` + // flag in CreateVnicDetails). + // If `prohibitInternetIngress` is set to true, VNICs created in this subnet cannot have public IP addresses + // (that is, it's a privatesubnet). + // For IPv6, if `prohibitInternetIngress` is set to `true`, internet access is not allowed for any + // IPv6s assigned to VNICs in the subnet. Otherwise, ingress internet traffic is allowed by default. + // Example: `true` + ProhibitInternetIngress *bool `mandatory:"false" json:"prohibitInternetIngress"` + + // Whether VNICs within this subnet can have public IP addresses. + // Defaults to false, which means VNICs created in this subnet will + // automatically be assigned public IP addresses unless specified + // otherwise during instance launch or VNIC creation (with the + // `assignPublicIp` flag in + // CreateVnicDetails). + // If `prohibitPublicIpOnVnic` is set to true, VNICs created in this + // subnet cannot have public IP addresses (that is, it's a private + // subnet). + // Example: `true` + ProhibitPublicIpOnVnic *bool `mandatory:"false" json:"prohibitPublicIpOnVnic"` + + // The OCIDs of the security list or lists that the subnet uses. Remember + // that security lists are associated *with the subnet*, but the + // rules are applied to the individual VNICs in the subnet. + SecurityListIds []string `mandatory:"false" json:"securityListIds"` + + // The subnet's domain name, which consists of the subnet's DNS label, + // the VCN's DNS label, and the `oraclevcn.com` domain. + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + // Example: `subnet123.vcn1.oraclevcn.com` + SubnetDomainName *string `mandatory:"false" json:"subnetDomainName"` + + // The date and time the subnet was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The IP address of the virtual router. + // Example: `10.0.14.1` + VirtualRouterIp *string `mandatory:"false" json:"virtualRouterIp"` +} + +func (m Subnet) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Subnet) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSubnetLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetSubnetLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SubnetLifecycleStateEnum Enum with underlying type: string +type SubnetLifecycleStateEnum string + +// Set of constants representing the allowable values for SubnetLifecycleStateEnum +const ( + SubnetLifecycleStateProvisioning SubnetLifecycleStateEnum = "PROVISIONING" + SubnetLifecycleStateAvailable SubnetLifecycleStateEnum = "AVAILABLE" + SubnetLifecycleStateTerminating SubnetLifecycleStateEnum = "TERMINATING" + SubnetLifecycleStateTerminated SubnetLifecycleStateEnum = "TERMINATED" + SubnetLifecycleStateUpdating SubnetLifecycleStateEnum = "UPDATING" +) + +var mappingSubnetLifecycleStateEnum = map[string]SubnetLifecycleStateEnum{ + "PROVISIONING": SubnetLifecycleStateProvisioning, + "AVAILABLE": SubnetLifecycleStateAvailable, + "TERMINATING": SubnetLifecycleStateTerminating, + "TERMINATED": SubnetLifecycleStateTerminated, + "UPDATING": SubnetLifecycleStateUpdating, +} + +var mappingSubnetLifecycleStateEnumLowerCase = map[string]SubnetLifecycleStateEnum{ + "provisioning": SubnetLifecycleStateProvisioning, + "available": SubnetLifecycleStateAvailable, + "terminating": SubnetLifecycleStateTerminating, + "terminated": SubnetLifecycleStateTerminated, + "updating": SubnetLifecycleStateUpdating, +} + +// GetSubnetLifecycleStateEnumValues Enumerates the set of values for SubnetLifecycleStateEnum +func GetSubnetLifecycleStateEnumValues() []SubnetLifecycleStateEnum { + values := make([]SubnetLifecycleStateEnum, 0) + for _, v := range mappingSubnetLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetSubnetLifecycleStateEnumStringValues Enumerates the set of values in String for SubnetLifecycleStateEnum +func GetSubnetLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + "UPDATING", + } +} + +// GetMappingSubnetLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSubnetLifecycleStateEnum(val string) (SubnetLifecycleStateEnum, bool) { + enum, ok := mappingSubnetLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/subnet_topology.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/subnet_topology.go new file mode 100644 index 000000000..af7528871 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/subnet_topology.go @@ -0,0 +1,134 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SubnetTopology Defines the visualization of a subnet in a VCN. +// See Network Visualizer Documentation (https://docs.oracle.com/iaas/Content/Network/Concepts/network_visualizer.htm) for more information, including +// conventions and pictures of symbols. +type SubnetTopology struct { + + // Lists entities comprising the virtual network topology. + Entities []interface{} `mandatory:"true" json:"entities"` + + // Lists relationships between entities in the virtual network topology. + Relationships []TopologyEntityRelationship `mandatory:"true" json:"relationships"` + + // Lists entities that are limited during ingestion. + // The values for the items in the list are the entity type names of the limitedEntities. + // Example: `vcn` + LimitedEntities []string `mandatory:"true" json:"limitedEntities"` + + // Records when the virtual network topology was created, in RFC3339 (https://tools.ietf.org/html/rfc3339) format for date and time. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet for which the visualization is generated. + SubnetId *string `mandatory:"false" json:"subnetId"` +} + +// GetEntities returns Entities +func (m SubnetTopology) GetEntities() []interface{} { + return m.Entities +} + +// GetRelationships returns Relationships +func (m SubnetTopology) GetRelationships() []TopologyEntityRelationship { + return m.Relationships +} + +// GetLimitedEntities returns LimitedEntities +func (m SubnetTopology) GetLimitedEntities() []string { + return m.LimitedEntities +} + +// GetTimeCreated returns TimeCreated +func (m SubnetTopology) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +func (m SubnetTopology) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SubnetTopology) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m SubnetTopology) MarshalJSON() (buff []byte, e error) { + type MarshalTypeSubnetTopology SubnetTopology + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeSubnetTopology + }{ + "SUBNET", + (MarshalTypeSubnetTopology)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *SubnetTopology) UnmarshalJSON(data []byte) (e error) { + model := struct { + SubnetId *string `json:"subnetId"` + Entities []interface{} `json:"entities"` + Relationships []topologyentityrelationship `json:"relationships"` + LimitedEntities []string `json:"limitedEntities"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.SubnetId = model.SubnetId + + m.Entities = make([]interface{}, len(model.Entities)) + copy(m.Entities, model.Entities) + m.Relationships = make([]TopologyEntityRelationship, len(model.Relationships)) + for i, n := range model.Relationships { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Relationships[i] = nn.(TopologyEntityRelationship) + } else { + m.Relationships[i] = nil + } + } + m.LimitedEntities = make([]string, len(model.LimitedEntities)) + copy(m.LimitedEntities, model.LimitedEntities) + m.TimeCreated = model.TimeCreated + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/supported_capabilities.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/supported_capabilities.go new file mode 100644 index 000000000..07ef0f1a9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/supported_capabilities.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SupportedCapabilities Specifies the capabilities that the Dedicated Virtual Machine Host (DVMH) Shape or Virtual Machine Instance Shape could support. +type SupportedCapabilities struct { + + // Whether the DVMH shape could support confidential VMs or the VM instance shape could be confidential. + IsMemoryEncryptionSupported *bool `mandatory:"true" json:"isMemoryEncryptionSupported"` +} + +func (m SupportedCapabilities) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SupportedCapabilities) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/tcp_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/tcp_options.go new file mode 100644 index 000000000..92ba7b37d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/tcp_options.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TcpOptions Optional and valid only for TCP. Use to specify particular destination ports for TCP rules. +// If you specify TCP as the protocol but omit this object, then all destination ports are allowed. +type TcpOptions struct { + DestinationPortRange *PortRange `mandatory:"false" json:"destinationPortRange"` + + SourcePortRange *PortRange `mandatory:"false" json:"sourcePortRange"` +} + +func (m TcpOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TcpOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/terminate_cluster_network_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/terminate_cluster_network_request_response.go new file mode 100644 index 000000000..5f217a742 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/terminate_cluster_network_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// TerminateClusterNetworkRequest wrapper for the TerminateClusterNetwork operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/TerminateClusterNetwork.go.html to see an example of how to use TerminateClusterNetworkRequest. +type TerminateClusterNetworkRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster network. + ClusterNetworkId *string `mandatory:"true" contributesTo:"path" name:"clusterNetworkId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request TerminateClusterNetworkRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request TerminateClusterNetworkRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request TerminateClusterNetworkRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request TerminateClusterNetworkRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request TerminateClusterNetworkRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TerminateClusterNetworkResponse wrapper for the TerminateClusterNetwork operation +type TerminateClusterNetworkResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response TerminateClusterNetworkResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response TerminateClusterNetworkResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/terminate_instance_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/terminate_instance_pool_request_response.go new file mode 100644 index 000000000..7b652a6b0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/terminate_instance_pool_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// TerminateInstancePoolRequest wrapper for the TerminateInstancePool operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/TerminateInstancePool.go.html to see an example of how to use TerminateInstancePoolRequest. +type TerminateInstancePoolRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request TerminateInstancePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request TerminateInstancePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request TerminateInstancePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request TerminateInstancePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request TerminateInstancePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TerminateInstancePoolResponse wrapper for the TerminateInstancePool operation +type TerminateInstancePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response TerminateInstancePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response TerminateInstancePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/terminate_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/terminate_instance_request_response.go new file mode 100644 index 000000000..22dad6a43 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/terminate_instance_request_response.go @@ -0,0 +1,153 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// TerminateInstanceRequest wrapper for the TerminateInstance operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/TerminateInstance.go.html to see an example of how to use TerminateInstanceRequest. +type TerminateInstanceRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Specifies whether to delete or preserve the boot volume when terminating an instance. + // When set to `true`, the boot volume is preserved. The default value is `false`. + PreserveBootVolume *bool `mandatory:"false" contributesTo:"query" name:"preserveBootVolume"` + + // Specifies whether to delete or preserve the data volumes created during launch when + // terminating an instance. When set to `true`, the data volumes are preserved. The + // default value is `true`. + PreserveDataVolumesCreatedAtLaunch *bool `mandatory:"false" contributesTo:"query" name:"preserveDataVolumesCreatedAtLaunch"` + + // This optional parameter overrides recycle level for hosts. The parameter can be used when hosts are associated + // with a Capacity Reservation. + // * `FULL_RECYCLE` - Does not skip host wipe. This is the default behavior. + RecycleLevel TerminateInstanceRecycleLevelEnum `mandatory:"false" contributesTo:"query" name:"recycleLevel" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request TerminateInstanceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request TerminateInstanceRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request TerminateInstanceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request TerminateInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request TerminateInstanceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingTerminateInstanceRecycleLevelEnum(string(request.RecycleLevel)); !ok && request.RecycleLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RecycleLevel: %s. Supported values are: %s.", request.RecycleLevel, strings.Join(GetTerminateInstanceRecycleLevelEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TerminateInstanceResponse wrapper for the TerminateInstance operation +type TerminateInstanceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response TerminateInstanceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response TerminateInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// TerminateInstanceRecycleLevelEnum Enum with underlying type: string +type TerminateInstanceRecycleLevelEnum string + +// Set of constants representing the allowable values for TerminateInstanceRecycleLevelEnum +const ( + TerminateInstanceRecycleLevelFullRecycle TerminateInstanceRecycleLevelEnum = "FULL_RECYCLE" +) + +var mappingTerminateInstanceRecycleLevelEnum = map[string]TerminateInstanceRecycleLevelEnum{ + "FULL_RECYCLE": TerminateInstanceRecycleLevelFullRecycle, +} + +var mappingTerminateInstanceRecycleLevelEnumLowerCase = map[string]TerminateInstanceRecycleLevelEnum{ + "full_recycle": TerminateInstanceRecycleLevelFullRecycle, +} + +// GetTerminateInstanceRecycleLevelEnumValues Enumerates the set of values for TerminateInstanceRecycleLevelEnum +func GetTerminateInstanceRecycleLevelEnumValues() []TerminateInstanceRecycleLevelEnum { + values := make([]TerminateInstanceRecycleLevelEnum, 0) + for _, v := range mappingTerminateInstanceRecycleLevelEnum { + values = append(values, v) + } + return values +} + +// GetTerminateInstanceRecycleLevelEnumStringValues Enumerates the set of values in String for TerminateInstanceRecycleLevelEnum +func GetTerminateInstanceRecycleLevelEnumStringValues() []string { + return []string{ + "FULL_RECYCLE", + } +} + +// GetMappingTerminateInstanceRecycleLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTerminateInstanceRecycleLevelEnum(val string) (TerminateInstanceRecycleLevelEnum, bool) { + enum, ok := mappingTerminateInstanceRecycleLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/terminate_preemption_action.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/terminate_preemption_action.go new file mode 100644 index 000000000..f0cbed576 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/terminate_preemption_action.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TerminatePreemptionAction Terminates the preemptible instance when it is interrupted for eviction. +type TerminatePreemptionAction struct { + + // Whether to preserve the boot volume that was used to launch the preemptible instance when the instance is terminated. Defaults to false if not specified. + PreserveBootVolume *bool `mandatory:"false" json:"preserveBootVolume"` +} + +func (m TerminatePreemptionAction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TerminatePreemptionAction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m TerminatePreemptionAction) MarshalJSON() (buff []byte, e error) { + type MarshalTypeTerminatePreemptionAction TerminatePreemptionAction + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeTerminatePreemptionAction + }{ + "TERMINATE", + (MarshalTypeTerminatePreemptionAction)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/termination_proceed_instance_pool_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/termination_proceed_instance_pool_instance_details.go new file mode 100644 index 000000000..39e6bf8b6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/termination_proceed_instance_pool_instance_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TerminationProceedInstancePoolInstanceDetails An instance to be marked for termination in an instance pool. +type TerminationProceedInstancePoolInstanceDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + InstanceId *string `mandatory:"true" json:"instanceId"` +} + +func (m TerminationProceedInstancePoolInstanceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TerminationProceedInstancePoolInstanceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/termination_proceed_instance_pool_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/termination_proceed_instance_pool_instance_request_response.go new file mode 100644 index 000000000..be80272b3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/termination_proceed_instance_pool_instance_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// TerminationProceedInstancePoolInstanceRequest wrapper for the TerminationProceedInstancePoolInstance operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/TerminationProceedInstancePoolInstance.go.html to see an example of how to use TerminationProceedInstancePoolInstanceRequest. +type TerminationProceedInstancePoolInstanceRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // Instance to be marked for terminating. + TerminationProceedInstancePoolInstanceDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request TerminationProceedInstancePoolInstanceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request TerminationProceedInstancePoolInstanceRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request TerminationProceedInstancePoolInstanceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request TerminationProceedInstancePoolInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request TerminationProceedInstancePoolInstanceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TerminationProceedInstancePoolInstanceResponse wrapper for the TerminationProceedInstancePoolInstance operation +type TerminationProceedInstancePoolInstanceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response TerminationProceedInstancePoolInstanceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response TerminationProceedInstancePoolInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology.go new file mode 100644 index 000000000..eab5cf321 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology.go @@ -0,0 +1,183 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Topology Defines the representation of a virtual network topology. +type Topology interface { + + // Lists entities comprising the virtual network topology. + GetEntities() []interface{} + + // Lists relationships between entities in the virtual network topology. + GetRelationships() []TopologyEntityRelationship + + // Lists entities that are limited during ingestion. + // The values for the items in the list are the entity type names of the limitedEntities. + // Example: `vcn` + GetLimitedEntities() []string + + // Records when the virtual network topology was created, in RFC3339 (https://tools.ietf.org/html/rfc3339) format for date and time. + GetTimeCreated() *common.SDKTime +} + +type topology struct { + JsonData []byte + Entities []interface{} `mandatory:"true" json:"entities"` + Relationships json.RawMessage `mandatory:"true" json:"relationships"` + LimitedEntities []string `mandatory:"true" json:"limitedEntities"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *topology) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalertopology topology + s := struct { + Model Unmarshalertopology + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Entities = s.Model.Entities + m.Relationships = s.Model.Relationships + m.LimitedEntities = s.Model.LimitedEntities + m.TimeCreated = s.Model.TimeCreated + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *topology) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "VCN": + mm := VcnTopology{} + err = json.Unmarshal(data, &mm) + return mm, err + case "NETWORKING": + mm := NetworkingTopology{} + err = json.Unmarshal(data, &mm) + return mm, err + case "SUBNET": + mm := SubnetTopology{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for Topology: %s.", m.Type) + return *m, nil + } +} + +// GetEntities returns Entities +func (m topology) GetEntities() []interface{} { + return m.Entities +} + +// GetRelationships returns Relationships +func (m topology) GetRelationships() json.RawMessage { + return m.Relationships +} + +// GetLimitedEntities returns LimitedEntities +func (m topology) GetLimitedEntities() []string { + return m.LimitedEntities +} + +// GetTimeCreated returns TimeCreated +func (m topology) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +func (m topology) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m topology) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TopologyTypeEnum Enum with underlying type: string +type TopologyTypeEnum string + +// Set of constants representing the allowable values for TopologyTypeEnum +const ( + TopologyTypeNetworking TopologyTypeEnum = "NETWORKING" + TopologyTypeVcn TopologyTypeEnum = "VCN" + TopologyTypeSubnet TopologyTypeEnum = "SUBNET" + TopologyTypePath TopologyTypeEnum = "PATH" +) + +var mappingTopologyTypeEnum = map[string]TopologyTypeEnum{ + "NETWORKING": TopologyTypeNetworking, + "VCN": TopologyTypeVcn, + "SUBNET": TopologyTypeSubnet, + "PATH": TopologyTypePath, +} + +var mappingTopologyTypeEnumLowerCase = map[string]TopologyTypeEnum{ + "networking": TopologyTypeNetworking, + "vcn": TopologyTypeVcn, + "subnet": TopologyTypeSubnet, + "path": TopologyTypePath, +} + +// GetTopologyTypeEnumValues Enumerates the set of values for TopologyTypeEnum +func GetTopologyTypeEnumValues() []TopologyTypeEnum { + values := make([]TopologyTypeEnum, 0) + for _, v := range mappingTopologyTypeEnum { + values = append(values, v) + } + return values +} + +// GetTopologyTypeEnumStringValues Enumerates the set of values in String for TopologyTypeEnum +func GetTopologyTypeEnumStringValues() []string { + return []string{ + "NETWORKING", + "VCN", + "SUBNET", + "PATH", + } +} + +// GetMappingTopologyTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTopologyTypeEnum(val string) (TopologyTypeEnum, bool) { + enum, ok := mappingTopologyTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_associated_with_entity_relationship.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_associated_with_entity_relationship.go new file mode 100644 index 000000000..58575f9c9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_associated_with_entity_relationship.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TopologyAssociatedWithEntityRelationship Defines the `AssociatedWith` relationship between virtual network topology entities. An `AssociatedWith` relationship +// is defined when there is no obvious `contains` relationship but entities are still related. +// For example, a DRG is associated with a VCN because a DRG is not managed by VCN but can be +// attached to a VCN. +type TopologyAssociatedWithEntityRelationship struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the first entity in the relationship. + Id1 *string `mandatory:"true" json:"id1"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the second entity in the relationship. + Id2 *string `mandatory:"true" json:"id2"` + + AssociatedWithDetails *TopologyAssociatedWithRelationshipDetails `mandatory:"false" json:"associatedWithDetails"` +} + +// GetId1 returns Id1 +func (m TopologyAssociatedWithEntityRelationship) GetId1() *string { + return m.Id1 +} + +// GetId2 returns Id2 +func (m TopologyAssociatedWithEntityRelationship) GetId2() *string { + return m.Id2 +} + +func (m TopologyAssociatedWithEntityRelationship) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TopologyAssociatedWithEntityRelationship) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m TopologyAssociatedWithEntityRelationship) MarshalJSON() (buff []byte, e error) { + type MarshalTypeTopologyAssociatedWithEntityRelationship TopologyAssociatedWithEntityRelationship + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeTopologyAssociatedWithEntityRelationship + }{ + "ASSOCIATED_WITH", + (MarshalTypeTopologyAssociatedWithEntityRelationship)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_associated_with_relationship_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_associated_with_relationship_details.go new file mode 100644 index 000000000..f37284092 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_associated_with_relationship_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TopologyAssociatedWithRelationshipDetails Defines association details for an `associatedWith` relationship. +type TopologyAssociatedWithRelationshipDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the entities via which the relationship is created. For example an instance is associated with a network security group via the VNIC attachment and the VNIC. + Via []string `mandatory:"false" json:"via"` +} + +func (m TopologyAssociatedWithRelationshipDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TopologyAssociatedWithRelationshipDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_contains_entity_relationship.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_contains_entity_relationship.go new file mode 100644 index 000000000..7e9389b62 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_contains_entity_relationship.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TopologyContainsEntityRelationship Defines the `contains` relationship between virtual network topology entities. A `Contains` relationship +// is defined when an entity fully owns, contains or manages another entity. +// For example, a subnet is contained and managed in the scope of a VCN, therefore a VCN has a +// `contains` relationship to a subnet. +type TopologyContainsEntityRelationship struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the first entity in the relationship. + Id1 *string `mandatory:"true" json:"id1"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the second entity in the relationship. + Id2 *string `mandatory:"true" json:"id2"` +} + +// GetId1 returns Id1 +func (m TopologyContainsEntityRelationship) GetId1() *string { + return m.Id1 +} + +// GetId2 returns Id2 +func (m TopologyContainsEntityRelationship) GetId2() *string { + return m.Id2 +} + +func (m TopologyContainsEntityRelationship) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TopologyContainsEntityRelationship) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m TopologyContainsEntityRelationship) MarshalJSON() (buff []byte, e error) { + type MarshalTypeTopologyContainsEntityRelationship TopologyContainsEntityRelationship + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeTopologyContainsEntityRelationship + }{ + "CONTAINS", + (MarshalTypeTopologyContainsEntityRelationship)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_entity_relationship.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_entity_relationship.go new file mode 100644 index 000000000..df279d0f8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_entity_relationship.go @@ -0,0 +1,157 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TopologyEntityRelationship Defines the relationship between Virtual Network topology entities. +type TopologyEntityRelationship interface { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the first entity in the relationship. + GetId1() *string + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the second entity in the relationship. + GetId2() *string +} + +type topologyentityrelationship struct { + JsonData []byte + Id1 *string `mandatory:"true" json:"id1"` + Id2 *string `mandatory:"true" json:"id2"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *topologyentityrelationship) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalertopologyentityrelationship topologyentityrelationship + s := struct { + Model Unmarshalertopologyentityrelationship + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Id1 = s.Model.Id1 + m.Id2 = s.Model.Id2 + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *topologyentityrelationship) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "ROUTES_TO": + mm := TopologyRoutesToEntityRelationship{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ASSOCIATED_WITH": + mm := TopologyAssociatedWithEntityRelationship{} + err = json.Unmarshal(data, &mm) + return mm, err + case "CONTAINS": + mm := TopologyContainsEntityRelationship{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for TopologyEntityRelationship: %s.", m.Type) + return *m, nil + } +} + +// GetId1 returns Id1 +func (m topologyentityrelationship) GetId1() *string { + return m.Id1 +} + +// GetId2 returns Id2 +func (m topologyentityrelationship) GetId2() *string { + return m.Id2 +} + +func (m topologyentityrelationship) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m topologyentityrelationship) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TopologyEntityRelationshipTypeEnum Enum with underlying type: string +type TopologyEntityRelationshipTypeEnum string + +// Set of constants representing the allowable values for TopologyEntityRelationshipTypeEnum +const ( + TopologyEntityRelationshipTypeContains TopologyEntityRelationshipTypeEnum = "CONTAINS" + TopologyEntityRelationshipTypeAssociatedWith TopologyEntityRelationshipTypeEnum = "ASSOCIATED_WITH" + TopologyEntityRelationshipTypeRoutesTo TopologyEntityRelationshipTypeEnum = "ROUTES_TO" +) + +var mappingTopologyEntityRelationshipTypeEnum = map[string]TopologyEntityRelationshipTypeEnum{ + "CONTAINS": TopologyEntityRelationshipTypeContains, + "ASSOCIATED_WITH": TopologyEntityRelationshipTypeAssociatedWith, + "ROUTES_TO": TopologyEntityRelationshipTypeRoutesTo, +} + +var mappingTopologyEntityRelationshipTypeEnumLowerCase = map[string]TopologyEntityRelationshipTypeEnum{ + "contains": TopologyEntityRelationshipTypeContains, + "associated_with": TopologyEntityRelationshipTypeAssociatedWith, + "routes_to": TopologyEntityRelationshipTypeRoutesTo, +} + +// GetTopologyEntityRelationshipTypeEnumValues Enumerates the set of values for TopologyEntityRelationshipTypeEnum +func GetTopologyEntityRelationshipTypeEnumValues() []TopologyEntityRelationshipTypeEnum { + values := make([]TopologyEntityRelationshipTypeEnum, 0) + for _, v := range mappingTopologyEntityRelationshipTypeEnum { + values = append(values, v) + } + return values +} + +// GetTopologyEntityRelationshipTypeEnumStringValues Enumerates the set of values in String for TopologyEntityRelationshipTypeEnum +func GetTopologyEntityRelationshipTypeEnumStringValues() []string { + return []string{ + "CONTAINS", + "ASSOCIATED_WITH", + "ROUTES_TO", + } +} + +// GetMappingTopologyEntityRelationshipTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTopologyEntityRelationshipTypeEnum(val string) (TopologyEntityRelationshipTypeEnum, bool) { + enum, ok := mappingTopologyEntityRelationshipTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_routes_to_entity_relationship.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_routes_to_entity_relationship.go new file mode 100644 index 000000000..37e41b37c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_routes_to_entity_relationship.go @@ -0,0 +1,77 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TopologyRoutesToEntityRelationship Defines the `routesTo` relationship between virtual network topology entities. A `RoutesTo` relationship +// is defined when a routing table and a routing rule are used to govern how to route traffic +// from one entity to another. For example, a DRG might have a routing rule to send certain traffic to an LPG. +type TopologyRoutesToEntityRelationship struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the first entity in the relationship. + Id1 *string `mandatory:"true" json:"id1"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the second entity in the relationship. + Id2 *string `mandatory:"true" json:"id2"` + + RouteRuleDetails *TopologyRoutesToRelationshipDetails `mandatory:"true" json:"routeRuleDetails"` +} + +// GetId1 returns Id1 +func (m TopologyRoutesToEntityRelationship) GetId1() *string { + return m.Id1 +} + +// GetId2 returns Id2 +func (m TopologyRoutesToEntityRelationship) GetId2() *string { + return m.Id2 +} + +func (m TopologyRoutesToEntityRelationship) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TopologyRoutesToEntityRelationship) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m TopologyRoutesToEntityRelationship) MarshalJSON() (buff []byte, e error) { + type MarshalTypeTopologyRoutesToEntityRelationship TopologyRoutesToEntityRelationship + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeTopologyRoutesToEntityRelationship + }{ + "ROUTES_TO", + (MarshalTypeTopologyRoutesToEntityRelationship)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_routes_to_relationship_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_routes_to_relationship_details.go new file mode 100644 index 000000000..b53e6e0af --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/topology_routes_to_relationship_details.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TopologyRoutesToRelationshipDetails Defines route rule details for a `routesTo` relationship. +type TopologyRoutesToRelationshipDetails struct { + + // The destinationType can be set to one of two values: + // * Use `CIDR_BLOCK` if the rule's `destination` is an IP address range in CIDR notation. + // * Use `SERVICE_CIDR_BLOCK` if the rule's `destination` is the `cidrBlock` value for a Service. + DestinationType *string `mandatory:"true" json:"destinationType"` + + // An IP address range in CIDR notation or the `cidrBlock` value for a Service. + Destination *string `mandatory:"true" json:"destination"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the routing table that contains the route rule. + RouteTableId *string `mandatory:"true" json:"routeTableId"` + + // A route rule can be `STATIC` if manually added to the route table or `DYNAMIC` if imported from another route table. + RouteType TopologyRoutesToRelationshipDetailsRouteTypeEnum `mandatory:"false" json:"routeType,omitempty"` +} + +func (m TopologyRoutesToRelationshipDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TopologyRoutesToRelationshipDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingTopologyRoutesToRelationshipDetailsRouteTypeEnum(string(m.RouteType)); !ok && m.RouteType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RouteType: %s. Supported values are: %s.", m.RouteType, strings.Join(GetTopologyRoutesToRelationshipDetailsRouteTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TopologyRoutesToRelationshipDetailsRouteTypeEnum Enum with underlying type: string +type TopologyRoutesToRelationshipDetailsRouteTypeEnum string + +// Set of constants representing the allowable values for TopologyRoutesToRelationshipDetailsRouteTypeEnum +const ( + TopologyRoutesToRelationshipDetailsRouteTypeStatic TopologyRoutesToRelationshipDetailsRouteTypeEnum = "STATIC" + TopologyRoutesToRelationshipDetailsRouteTypeDynamic TopologyRoutesToRelationshipDetailsRouteTypeEnum = "DYNAMIC" +) + +var mappingTopologyRoutesToRelationshipDetailsRouteTypeEnum = map[string]TopologyRoutesToRelationshipDetailsRouteTypeEnum{ + "STATIC": TopologyRoutesToRelationshipDetailsRouteTypeStatic, + "DYNAMIC": TopologyRoutesToRelationshipDetailsRouteTypeDynamic, +} + +var mappingTopologyRoutesToRelationshipDetailsRouteTypeEnumLowerCase = map[string]TopologyRoutesToRelationshipDetailsRouteTypeEnum{ + "static": TopologyRoutesToRelationshipDetailsRouteTypeStatic, + "dynamic": TopologyRoutesToRelationshipDetailsRouteTypeDynamic, +} + +// GetTopologyRoutesToRelationshipDetailsRouteTypeEnumValues Enumerates the set of values for TopologyRoutesToRelationshipDetailsRouteTypeEnum +func GetTopologyRoutesToRelationshipDetailsRouteTypeEnumValues() []TopologyRoutesToRelationshipDetailsRouteTypeEnum { + values := make([]TopologyRoutesToRelationshipDetailsRouteTypeEnum, 0) + for _, v := range mappingTopologyRoutesToRelationshipDetailsRouteTypeEnum { + values = append(values, v) + } + return values +} + +// GetTopologyRoutesToRelationshipDetailsRouteTypeEnumStringValues Enumerates the set of values in String for TopologyRoutesToRelationshipDetailsRouteTypeEnum +func GetTopologyRoutesToRelationshipDetailsRouteTypeEnumStringValues() []string { + return []string{ + "STATIC", + "DYNAMIC", + } +} + +// GetMappingTopologyRoutesToRelationshipDetailsRouteTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTopologyRoutesToRelationshipDetailsRouteTypeEnum(val string) (TopologyRoutesToRelationshipDetailsRouteTypeEnum, bool) { + enum, ok := mappingTopologyRoutesToRelationshipDetailsRouteTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_config.go new file mode 100644 index 000000000..3e7c43339 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_config.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TunnelConfig Deprecated. For tunnel information, instead see: +// - IPSecConnectionTunnel +// - IPSecConnectionTunnelSharedSecret +type TunnelConfig struct { + + // The IP address of Oracle's VPN headend. + // Example: `203.0.113.50 ` + IpAddress *string `mandatory:"true" json:"ipAddress"` + + // The shared secret of the IPSec tunnel. + SharedSecret *string `mandatory:"true" json:"sharedSecret"` + + // The date and time the IPSec connection was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m TunnelConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TunnelConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_cpe_device_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_cpe_device_config.go new file mode 100644 index 000000000..1c08158a6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_cpe_device_config.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TunnelCpeDeviceConfig The set of CPE configuration answers for the tunnel, which the customer provides in +// UpdateTunnelCpeDeviceConfig. +// The answers correlate to the questions that are specific to the CPE device type (see the +// `parameters` attribute of CpeDeviceShapeDetail). +// See these related operations: +// - GetTunnelCpeDeviceConfig +// - GetTunnelCpeDeviceConfigContent +// - GetIpsecCpeDeviceConfigContent +// - GetCpeDeviceConfigContent +type TunnelCpeDeviceConfig struct { + TunnelCpeDeviceConfigParameter []CpeDeviceConfigAnswer `mandatory:"false" json:"tunnelCpeDeviceConfigParameter"` +} + +func (m TunnelCpeDeviceConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TunnelCpeDeviceConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_phase_one_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_phase_one_details.go new file mode 100644 index 000000000..494981a15 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_phase_one_details.go @@ -0,0 +1,77 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TunnelPhaseOneDetails IPSec tunnel details specific to ISAKMP phase one. +type TunnelPhaseOneDetails struct { + + // Indicates whether custom phase one configuration is enabled. + // If this option is not enabled, default settings are proposed. + IsCustomPhaseOneConfig *bool `mandatory:"false" json:"isCustomPhaseOneConfig"` + + // The total configured lifetime of the IKE security association. + Lifetime *int64 `mandatory:"false" json:"lifetime"` + + // The remaining lifetime before the key is refreshed. + RemainingLifetime *int64 `mandatory:"false" json:"remainingLifetime"` + + // The proposed custom authentication algorithm. + CustomAuthenticationAlgorithm *string `mandatory:"false" json:"customAuthenticationAlgorithm"` + + // The negotiated authentication algorithm. + NegotiatedAuthenticationAlgorithm *string `mandatory:"false" json:"negotiatedAuthenticationAlgorithm"` + + // The proposed custom encryption algorithm. + CustomEncryptionAlgorithm *string `mandatory:"false" json:"customEncryptionAlgorithm"` + + // The negotiated encryption algorithm. + NegotiatedEncryptionAlgorithm *string `mandatory:"false" json:"negotiatedEncryptionAlgorithm"` + + // The proposed custom Diffie-Hellman group. + CustomDhGroup *string `mandatory:"false" json:"customDhGroup"` + + // The negotiated Diffie-Hellman group. + NegotiatedDhGroup *string `mandatory:"false" json:"negotiatedDhGroup"` + + // Indicates whether IKE phase one is established. + IsIkeEstablished *bool `mandatory:"false" json:"isIkeEstablished"` + + // The date and time we retrieved the remaining lifetime, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + RemainingLifetimeLastRetrieved *common.SDKTime `mandatory:"false" json:"remainingLifetimeLastRetrieved"` +} + +func (m TunnelPhaseOneDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TunnelPhaseOneDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_phase_two_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_phase_two_details.go new file mode 100644 index 000000000..fdb936044 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_phase_two_details.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TunnelPhaseTwoDetails IPsec tunnel detail information specific to phase two. +type TunnelPhaseTwoDetails struct { + + // Indicates whether custom phase two configuration is enabled. + // If this option is not enabled, default settings are proposed. + IsCustomPhaseTwoConfig *bool `mandatory:"false" json:"isCustomPhaseTwoConfig"` + + // The total configured lifetime of the IKE security association. + Lifetime *int64 `mandatory:"false" json:"lifetime"` + + // The remaining lifetime before the key is refreshed. + RemainingLifetime *int64 `mandatory:"false" json:"remainingLifetime"` + + // Phase two authentication algorithm proposed during tunnel negotiation. + CustomAuthenticationAlgorithm *string `mandatory:"false" json:"customAuthenticationAlgorithm"` + + // The negotiated phase two authentication algorithm. + NegotiatedAuthenticationAlgorithm *string `mandatory:"false" json:"negotiatedAuthenticationAlgorithm"` + + // The proposed custom phase two encryption algorithm. + CustomEncryptionAlgorithm *string `mandatory:"false" json:"customEncryptionAlgorithm"` + + // The negotiated encryption algorithm. + NegotiatedEncryptionAlgorithm *string `mandatory:"false" json:"negotiatedEncryptionAlgorithm"` + + // The proposed Diffie-Hellman group. + DhGroup *string `mandatory:"false" json:"dhGroup"` + + // The negotiated Diffie-Hellman group. + NegotiatedDhGroup *string `mandatory:"false" json:"negotiatedDhGroup"` + + // Indicates that ESP phase two is established. + IsEspEstablished *bool `mandatory:"false" json:"isEspEstablished"` + + // Indicates that PFS (perfect forward secrecy) is enabled. + IsPfsEnabled *bool `mandatory:"false" json:"isPfsEnabled"` + + // The date and time the remaining lifetime was last retrieved, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + RemainingLifetimeLastRetrieved *common.SDKTime `mandatory:"false" json:"remainingLifetimeLastRetrieved"` +} + +func (m TunnelPhaseTwoDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TunnelPhaseTwoDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_route_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_route_summary.go new file mode 100644 index 000000000..781fd0364 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_route_summary.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TunnelRouteSummary A summary of the routes advertised to and received from the on-premises network. +type TunnelRouteSummary struct { + + // The BGP network layer reachability information. + Prefix *string `mandatory:"false" json:"prefix"` + + // The age of the route. + Age *int64 `mandatory:"false" json:"age"` + + // Indicates this is the best route. + IsBestPath *bool `mandatory:"false" json:"isBestPath"` + + // A list of ASNs in AS_Path. + AsPath []int `mandatory:"false" json:"asPath"` + + // The source of the route advertisement. + Advertiser TunnelRouteSummaryAdvertiserEnum `mandatory:"false" json:"advertiser,omitempty"` +} + +func (m TunnelRouteSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TunnelRouteSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingTunnelRouteSummaryAdvertiserEnum(string(m.Advertiser)); !ok && m.Advertiser != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Advertiser: %s. Supported values are: %s.", m.Advertiser, strings.Join(GetTunnelRouteSummaryAdvertiserEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TunnelRouteSummaryAdvertiserEnum Enum with underlying type: string +type TunnelRouteSummaryAdvertiserEnum string + +// Set of constants representing the allowable values for TunnelRouteSummaryAdvertiserEnum +const ( + TunnelRouteSummaryAdvertiserCustomer TunnelRouteSummaryAdvertiserEnum = "CUSTOMER" + TunnelRouteSummaryAdvertiserOracle TunnelRouteSummaryAdvertiserEnum = "ORACLE" +) + +var mappingTunnelRouteSummaryAdvertiserEnum = map[string]TunnelRouteSummaryAdvertiserEnum{ + "CUSTOMER": TunnelRouteSummaryAdvertiserCustomer, + "ORACLE": TunnelRouteSummaryAdvertiserOracle, +} + +var mappingTunnelRouteSummaryAdvertiserEnumLowerCase = map[string]TunnelRouteSummaryAdvertiserEnum{ + "customer": TunnelRouteSummaryAdvertiserCustomer, + "oracle": TunnelRouteSummaryAdvertiserOracle, +} + +// GetTunnelRouteSummaryAdvertiserEnumValues Enumerates the set of values for TunnelRouteSummaryAdvertiserEnum +func GetTunnelRouteSummaryAdvertiserEnumValues() []TunnelRouteSummaryAdvertiserEnum { + values := make([]TunnelRouteSummaryAdvertiserEnum, 0) + for _, v := range mappingTunnelRouteSummaryAdvertiserEnum { + values = append(values, v) + } + return values +} + +// GetTunnelRouteSummaryAdvertiserEnumStringValues Enumerates the set of values in String for TunnelRouteSummaryAdvertiserEnum +func GetTunnelRouteSummaryAdvertiserEnumStringValues() []string { + return []string{ + "CUSTOMER", + "ORACLE", + } +} + +// GetMappingTunnelRouteSummaryAdvertiserEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTunnelRouteSummaryAdvertiserEnum(val string) (TunnelRouteSummaryAdvertiserEnum, bool) { + enum, ok := mappingTunnelRouteSummaryAdvertiserEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_security_association_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_security_association_summary.go new file mode 100644 index 000000000..dd430d629 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_security_association_summary.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TunnelSecurityAssociationSummary A summary of the IPSec tunnel security association details. +type TunnelSecurityAssociationSummary struct { + + // The IP address and mask of the partner subnet used in policy based VPNs or static routes. + CpeSubnet *string `mandatory:"false" json:"cpeSubnet"` + + // The IP address and mask of the local subnet used in policy based VPNs or static routes. + OracleSubnet *string `mandatory:"false" json:"oracleSubnet"` + + // The IPSec tunnel's phase one status. + TunnelSaStatus TunnelSecurityAssociationSummaryTunnelSaStatusEnum `mandatory:"false" json:"tunnelSaStatus,omitempty"` + + // Current state if the IPSec tunnel status is not `UP`, including phase one and phase two details and a possible reason the tunnel is not `UP`. + TunnelSaErrorInfo *string `mandatory:"false" json:"tunnelSaErrorInfo"` + + // Time in the current state, in seconds. + Time *string `mandatory:"false" json:"time"` +} + +func (m TunnelSecurityAssociationSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TunnelSecurityAssociationSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingTunnelSecurityAssociationSummaryTunnelSaStatusEnum(string(m.TunnelSaStatus)); !ok && m.TunnelSaStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TunnelSaStatus: %s. Supported values are: %s.", m.TunnelSaStatus, strings.Join(GetTunnelSecurityAssociationSummaryTunnelSaStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TunnelSecurityAssociationSummaryTunnelSaStatusEnum Enum with underlying type: string +type TunnelSecurityAssociationSummaryTunnelSaStatusEnum string + +// Set of constants representing the allowable values for TunnelSecurityAssociationSummaryTunnelSaStatusEnum +const ( + TunnelSecurityAssociationSummaryTunnelSaStatusInitiating TunnelSecurityAssociationSummaryTunnelSaStatusEnum = "INITIATING" + TunnelSecurityAssociationSummaryTunnelSaStatusListening TunnelSecurityAssociationSummaryTunnelSaStatusEnum = "LISTENING" + TunnelSecurityAssociationSummaryTunnelSaStatusUp TunnelSecurityAssociationSummaryTunnelSaStatusEnum = "UP" + TunnelSecurityAssociationSummaryTunnelSaStatusDown TunnelSecurityAssociationSummaryTunnelSaStatusEnum = "DOWN" + TunnelSecurityAssociationSummaryTunnelSaStatusError TunnelSecurityAssociationSummaryTunnelSaStatusEnum = "ERROR" + TunnelSecurityAssociationSummaryTunnelSaStatusUnknown TunnelSecurityAssociationSummaryTunnelSaStatusEnum = "UNKNOWN" +) + +var mappingTunnelSecurityAssociationSummaryTunnelSaStatusEnum = map[string]TunnelSecurityAssociationSummaryTunnelSaStatusEnum{ + "INITIATING": TunnelSecurityAssociationSummaryTunnelSaStatusInitiating, + "LISTENING": TunnelSecurityAssociationSummaryTunnelSaStatusListening, + "UP": TunnelSecurityAssociationSummaryTunnelSaStatusUp, + "DOWN": TunnelSecurityAssociationSummaryTunnelSaStatusDown, + "ERROR": TunnelSecurityAssociationSummaryTunnelSaStatusError, + "UNKNOWN": TunnelSecurityAssociationSummaryTunnelSaStatusUnknown, +} + +var mappingTunnelSecurityAssociationSummaryTunnelSaStatusEnumLowerCase = map[string]TunnelSecurityAssociationSummaryTunnelSaStatusEnum{ + "initiating": TunnelSecurityAssociationSummaryTunnelSaStatusInitiating, + "listening": TunnelSecurityAssociationSummaryTunnelSaStatusListening, + "up": TunnelSecurityAssociationSummaryTunnelSaStatusUp, + "down": TunnelSecurityAssociationSummaryTunnelSaStatusDown, + "error": TunnelSecurityAssociationSummaryTunnelSaStatusError, + "unknown": TunnelSecurityAssociationSummaryTunnelSaStatusUnknown, +} + +// GetTunnelSecurityAssociationSummaryTunnelSaStatusEnumValues Enumerates the set of values for TunnelSecurityAssociationSummaryTunnelSaStatusEnum +func GetTunnelSecurityAssociationSummaryTunnelSaStatusEnumValues() []TunnelSecurityAssociationSummaryTunnelSaStatusEnum { + values := make([]TunnelSecurityAssociationSummaryTunnelSaStatusEnum, 0) + for _, v := range mappingTunnelSecurityAssociationSummaryTunnelSaStatusEnum { + values = append(values, v) + } + return values +} + +// GetTunnelSecurityAssociationSummaryTunnelSaStatusEnumStringValues Enumerates the set of values in String for TunnelSecurityAssociationSummaryTunnelSaStatusEnum +func GetTunnelSecurityAssociationSummaryTunnelSaStatusEnumStringValues() []string { + return []string{ + "INITIATING", + "LISTENING", + "UP", + "DOWN", + "ERROR", + "UNKNOWN", + } +} + +// GetMappingTunnelSecurityAssociationSummaryTunnelSaStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTunnelSecurityAssociationSummaryTunnelSaStatusEnum(val string) (TunnelSecurityAssociationSummaryTunnelSaStatusEnum, bool) { + enum, ok := mappingTunnelSecurityAssociationSummaryTunnelSaStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_status.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_status.go new file mode 100644 index 000000000..a608200a4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/tunnel_status.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TunnelStatus Deprecated. For tunnel information, instead see IPSecConnectionTunnel. +type TunnelStatus struct { + + // The IP address of Oracle's VPN headend. + // Example: `203.0.113.50` + IpAddress *string `mandatory:"true" json:"ipAddress"` + + // The tunnel's current state. + LifecycleState TunnelStatusLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The date and time the IPSec connection was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // When the state of the tunnel last changed, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeStateModified *common.SDKTime `mandatory:"false" json:"timeStateModified"` +} + +func (m TunnelStatus) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TunnelStatus) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingTunnelStatusLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetTunnelStatusLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TunnelStatusLifecycleStateEnum Enum with underlying type: string +type TunnelStatusLifecycleStateEnum string + +// Set of constants representing the allowable values for TunnelStatusLifecycleStateEnum +const ( + TunnelStatusLifecycleStateUp TunnelStatusLifecycleStateEnum = "UP" + TunnelStatusLifecycleStateDown TunnelStatusLifecycleStateEnum = "DOWN" + TunnelStatusLifecycleStateDownForMaintenance TunnelStatusLifecycleStateEnum = "DOWN_FOR_MAINTENANCE" + TunnelStatusLifecycleStatePartialUp TunnelStatusLifecycleStateEnum = "PARTIAL_UP" +) + +var mappingTunnelStatusLifecycleStateEnum = map[string]TunnelStatusLifecycleStateEnum{ + "UP": TunnelStatusLifecycleStateUp, + "DOWN": TunnelStatusLifecycleStateDown, + "DOWN_FOR_MAINTENANCE": TunnelStatusLifecycleStateDownForMaintenance, + "PARTIAL_UP": TunnelStatusLifecycleStatePartialUp, +} + +var mappingTunnelStatusLifecycleStateEnumLowerCase = map[string]TunnelStatusLifecycleStateEnum{ + "up": TunnelStatusLifecycleStateUp, + "down": TunnelStatusLifecycleStateDown, + "down_for_maintenance": TunnelStatusLifecycleStateDownForMaintenance, + "partial_up": TunnelStatusLifecycleStatePartialUp, +} + +// GetTunnelStatusLifecycleStateEnumValues Enumerates the set of values for TunnelStatusLifecycleStateEnum +func GetTunnelStatusLifecycleStateEnumValues() []TunnelStatusLifecycleStateEnum { + values := make([]TunnelStatusLifecycleStateEnum, 0) + for _, v := range mappingTunnelStatusLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetTunnelStatusLifecycleStateEnumStringValues Enumerates the set of values in String for TunnelStatusLifecycleStateEnum +func GetTunnelStatusLifecycleStateEnumStringValues() []string { + return []string{ + "UP", + "DOWN", + "DOWN_FOR_MAINTENANCE", + "PARTIAL_UP", + } +} + +// GetMappingTunnelStatusLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTunnelStatusLifecycleStateEnum(val string) (TunnelStatusLifecycleStateEnum, bool) { + enum, ok := mappingTunnelStatusLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/udp_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/udp_options.go new file mode 100644 index 000000000..1458539d7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/udp_options.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UdpOptions Optional and valid only for UDP. Use to specify particular destination ports for UDP rules. +// If you specify UDP as the protocol but omit this object, then all destination ports are allowed. +type UdpOptions struct { + DestinationPortRange *PortRange `mandatory:"false" json:"destinationPortRange"` + + SourcePortRange *PortRange `mandatory:"false" json:"sourcePortRange"` +} + +func (m UdpOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UdpOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_backup_details.go new file mode 100644 index 000000000..2ac50aeab --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_backup_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateBootVolumeBackupDetails The representation of UpdateBootVolumeBackupDetails +type UpdateBootVolumeBackupDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID of the Vault service key which is the master encryption key for the volume backup. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m UpdateBootVolumeBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateBootVolumeBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_backup_request_response.go new file mode 100644 index 000000000..d2a566131 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_backup_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateBootVolumeBackupRequest wrapper for the UpdateBootVolumeBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateBootVolumeBackup.go.html to see an example of how to use UpdateBootVolumeBackupRequest. +type UpdateBootVolumeBackupRequest struct { + + // The OCID of the boot volume backup. + BootVolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeBackupId"` + + // Update boot volume backup fields + UpdateBootVolumeBackupDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateBootVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateBootVolumeBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateBootVolumeBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateBootVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateBootVolumeBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateBootVolumeBackupResponse wrapper for the UpdateBootVolumeBackup operation +type UpdateBootVolumeBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolumeBackup instance + BootVolumeBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateBootVolumeBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateBootVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_details.go new file mode 100644 index 000000000..c3ce27646 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_details.go @@ -0,0 +1,128 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateBootVolumeDetails The representation of UpdateBootVolumeDetails +type UpdateBootVolumeDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The size to resize the volume to in GBs. Has to be larger than the current size. + SizeInGBs *int64 `mandatory:"false" json:"sizeInGBs"` + + // The number of volume performance units (VPUs) that will be applied to this volume per GB, + // representing the Block Volume service's elastic performance options. + // See Block Volume Performance Levels (https://docs.oracle.com/iaas/Content/Block/Concepts/blockvolumeperformance.htm#perf_levels) for more information. + // Allowed values: + // * `10`: Represents Balanced option. + // * `20`: Represents Higher Performance option. + // * `30`-`120`: Represents the Ultra High Performance option. + // For performance autotune enabled volumes, it would be the Default(Minimum) VPUs/GB. + VpusPerGB *int64 `mandatory:"false" json:"vpusPerGB"` + + // Specifies whether the auto-tune performance is enabled for this boot volume. This field is deprecated. + // Use the `DetachedVolumeAutotunePolicy` instead to enable the volume for detached autotune. + IsAutoTuneEnabled *bool `mandatory:"false" json:"isAutoTuneEnabled"` + + // The list of boot volume replicas that this boot volume will be updated to have + // in the specified destination availability domains. + BootVolumeReplicas []BootVolumeReplicaDetails `mandatory:"false" json:"bootVolumeReplicas"` + + // The list of autotune policies to be enabled for this volume. + AutotunePolicies []AutotunePolicy `mandatory:"false" json:"autotunePolicies"` +} + +func (m UpdateBootVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateBootVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *UpdateBootVolumeDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + SizeInGBs *int64 `json:"sizeInGBs"` + VpusPerGB *int64 `json:"vpusPerGB"` + IsAutoTuneEnabled *bool `json:"isAutoTuneEnabled"` + BootVolumeReplicas []BootVolumeReplicaDetails `json:"bootVolumeReplicas"` + AutotunePolicies []autotunepolicy `json:"autotunePolicies"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.SizeInGBs = model.SizeInGBs + + m.VpusPerGB = model.VpusPerGB + + m.IsAutoTuneEnabled = model.IsAutoTuneEnabled + + m.BootVolumeReplicas = make([]BootVolumeReplicaDetails, len(model.BootVolumeReplicas)) + copy(m.BootVolumeReplicas, model.BootVolumeReplicas) + m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) + for i, n := range model.AutotunePolicies { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.AutotunePolicies[i] = nn.(AutotunePolicy) + } else { + m.AutotunePolicies[i] = nil + } + } + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_kms_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_kms_key_details.go new file mode 100644 index 000000000..0c1dcf9d4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_kms_key_details.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateBootVolumeKmsKeyDetails The representation of UpdateBootVolumeKmsKeyDetails +type UpdateBootVolumeKmsKeyDetails struct { + + // The OCID of the new Vault service key to assign to protect the specified volume. + // This key has to be a valid Vault service key, and policies must exist to allow the user and the Block Volume service to access this key. + // If you specify the same OCID as the previous key's OCID, the Block Volume service will use it to regenerate a volume encryption key. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m UpdateBootVolumeKmsKeyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateBootVolumeKmsKeyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_kms_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_kms_key_request_response.go new file mode 100644 index 000000000..045296222 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_kms_key_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateBootVolumeKmsKeyRequest wrapper for the UpdateBootVolumeKmsKey operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateBootVolumeKmsKey.go.html to see an example of how to use UpdateBootVolumeKmsKeyRequest. +type UpdateBootVolumeKmsKeyRequest struct { + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeId"` + + // Updates the Vault service master encryption key assigned to the specified boot volume. + UpdateBootVolumeKmsKeyDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateBootVolumeKmsKeyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateBootVolumeKmsKeyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateBootVolumeKmsKeyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateBootVolumeKmsKeyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateBootVolumeKmsKeyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateBootVolumeKmsKeyResponse wrapper for the UpdateBootVolumeKmsKey operation +type UpdateBootVolumeKmsKeyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolumeKmsKey instance + BootVolumeKmsKey `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateBootVolumeKmsKeyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateBootVolumeKmsKeyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_request_response.go new file mode 100644 index 000000000..e70b9c4db --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_boot_volume_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateBootVolumeRequest wrapper for the UpdateBootVolume operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateBootVolume.go.html to see an example of how to use UpdateBootVolumeRequest. +type UpdateBootVolumeRequest struct { + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeId"` + + // Update boot volume's display name. + UpdateBootVolumeDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateBootVolumeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateBootVolumeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateBootVolumeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateBootVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateBootVolumeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateBootVolumeResponse wrapper for the UpdateBootVolume operation +type UpdateBootVolumeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BootVolume instance + BootVolume `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateBootVolumeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateBootVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_byoasn_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_byoasn_details.go new file mode 100644 index 000000000..dcc6c6bc7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_byoasn_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateByoasnDetails The information used to update a `Byoasn` resource. +type UpdateByoasnDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateByoasnDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateByoasnDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_byoasn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_byoasn_request_response.go new file mode 100644 index 000000000..d0138c7c9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_byoasn_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateByoasnRequest wrapper for the UpdateByoasn operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateByoasn.go.html to see an example of how to use UpdateByoasnRequest. +type UpdateByoasnRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `Byoasn` resource. + ByoasnId *string `mandatory:"true" contributesTo:"path" name:"byoasnId"` + + // Byoasn Range details. + UpdateByoasnDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateByoasnRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateByoasnRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateByoasnRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateByoasnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateByoasnRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateByoasnResponse wrapper for the UpdateByoasn operation +type UpdateByoasnResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Byoasn instance + Byoasn `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateByoasnResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateByoasnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_byoip_range_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_byoip_range_details.go new file mode 100644 index 000000000..0f346bec9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_byoip_range_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateByoipRangeDetails The information used to update a `ByoipRange` resource. +type UpdateByoipRangeDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateByoipRangeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateByoipRangeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_byoip_range_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_byoip_range_request_response.go new file mode 100644 index 000000000..4a249b1fd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_byoip_range_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateByoipRangeRequest wrapper for the UpdateByoipRange operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateByoipRange.go.html to see an example of how to use UpdateByoipRangeRequest. +type UpdateByoipRangeRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource containing the BYOIP CIDR block. + ByoipRangeId *string `mandatory:"true" contributesTo:"path" name:"byoipRangeId"` + + // Byoip Range details. + UpdateByoipRangeDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateByoipRangeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateByoipRangeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateByoipRangeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateByoipRangeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateByoipRangeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateByoipRangeResponse wrapper for the UpdateByoipRange operation +type UpdateByoipRangeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ByoipRange instance + ByoipRange `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateByoipRangeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateByoipRangeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_capacity_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_capacity_source_details.go new file mode 100644 index 000000000..519775681 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_capacity_source_details.go @@ -0,0 +1,83 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateCapacitySourceDetails A capacity source of bare metal hosts. +type UpdateCapacitySourceDetails interface { +} + +type updatecapacitysourcedetails struct { + JsonData []byte + CapacityType string `json:"capacityType"` +} + +// UnmarshalJSON unmarshals json +func (m *updatecapacitysourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerupdatecapacitysourcedetails updatecapacitysourcedetails + s := struct { + Model Unmarshalerupdatecapacitysourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CapacityType = s.Model.CapacityType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *updatecapacitysourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.CapacityType { + case "DEDICATED": + mm := UpdateDedicatedCapacitySourceDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for UpdateCapacitySourceDetails: %s.", m.CapacityType) + return *m, nil + } +} + +func (m updatecapacitysourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m updatecapacitysourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_capture_filter_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_capture_filter_details.go new file mode 100644 index 000000000..21740f160 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_capture_filter_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateCaptureFilterDetails These details can be included in a request to update a capture filter. A capture filter contains a set of rules governing what traffic a VTAP mirrors or a VCN flow log collects. +type UpdateCaptureFilterDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The set of rules governing what traffic a VTAP mirrors. + VtapCaptureFilterRules []VtapCaptureFilterRuleDetails `mandatory:"false" json:"vtapCaptureFilterRules"` + + // The set of rules governing what traffic the VCN flow log collects. + FlowLogCaptureFilterRules []FlowLogCaptureFilterRuleDetails `mandatory:"false" json:"flowLogCaptureFilterRules"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateCaptureFilterDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateCaptureFilterDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_capture_filter_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_capture_filter_request_response.go new file mode 100644 index 000000000..0488c8b05 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_capture_filter_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateCaptureFilterRequest wrapper for the UpdateCaptureFilter operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateCaptureFilter.go.html to see an example of how to use UpdateCaptureFilterRequest. +type UpdateCaptureFilterRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the capture filter. + CaptureFilterId *string `mandatory:"true" contributesTo:"path" name:"captureFilterId"` + + // Details object for updating a VTAP. + UpdateCaptureFilterDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateCaptureFilterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateCaptureFilterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateCaptureFilterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateCaptureFilterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateCaptureFilterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateCaptureFilterResponse wrapper for the UpdateCaptureFilter operation +type UpdateCaptureFilterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CaptureFilter instance + CaptureFilter `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateCaptureFilterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateCaptureFilterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cluster_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cluster_network_details.go new file mode 100644 index 000000000..907bc1be1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cluster_network_details.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateClusterNetworkDetails The data to update a cluster network with instance pools (https://docs.oracle.com/iaas/Content/Compute/Tasks/managingclusternetworks.htm). +type UpdateClusterNetworkDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The instance pools in the cluster network to update. + InstancePools []UpdateClusterNetworkInstancePoolDetails `mandatory:"false" json:"instancePools"` +} + +func (m UpdateClusterNetworkDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateClusterNetworkDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cluster_network_instance_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cluster_network_instance_pool_details.go new file mode 100644 index 000000000..bcd421829 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cluster_network_instance_pool_details.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateClusterNetworkInstancePoolDetails The data to update an instance pool within a cluster network. +type UpdateClusterNetworkInstancePoolDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + Id *string `mandatory:"true" json:"id"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The number of instances that should be in the instance pool. + // To determine whether capacity is available for a specific shape before you resize an instance pool, + // use the CreateComputeCapacityReport + // operation. + Size *int `mandatory:"false" json:"size"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance configuration associated with the instance pool. + InstanceConfigurationId *string `mandatory:"false" json:"instanceConfigurationId"` +} + +func (m UpdateClusterNetworkInstancePoolDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateClusterNetworkInstancePoolDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cluster_network_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cluster_network_request_response.go new file mode 100644 index 000000000..8fe4880ce --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cluster_network_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateClusterNetworkRequest wrapper for the UpdateClusterNetwork operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateClusterNetwork.go.html to see an example of how to use UpdateClusterNetworkRequest. +type UpdateClusterNetworkRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster network. + ClusterNetworkId *string `mandatory:"true" contributesTo:"path" name:"clusterNetworkId"` + + // Update cluster network + UpdateClusterNetworkDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateClusterNetworkRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateClusterNetworkRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateClusterNetworkRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateClusterNetworkRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateClusterNetworkRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateClusterNetworkResponse wrapper for the UpdateClusterNetwork operation +type UpdateClusterNetworkResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ClusterNetwork instance + ClusterNetwork `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateClusterNetworkResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateClusterNetworkResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_capacity_reservation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_capacity_reservation_details.go new file mode 100644 index 000000000..3884db239 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_capacity_reservation_details.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateComputeCapacityReservationDetails Details for updating the compute capacity reservation. +type UpdateComputeCapacityReservationDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Whether this capacity reservation is the default. + // For more information, see Capacity Reservations (https://docs.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm#default). + IsDefaultReservation *bool `mandatory:"false" json:"isDefaultReservation"` + + // The capacity configurations for the capacity reservation. + // To use the reservation for the desired shape, specify the shape, count, and + // optionally the fault domain where you want this configuration. + InstanceReservationConfigs []InstanceReservationConfigDetails `mandatory:"false" json:"instanceReservationConfigs"` +} + +func (m UpdateComputeCapacityReservationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateComputeCapacityReservationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_capacity_reservation_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_capacity_reservation_request_response.go new file mode 100644 index 000000000..d80bb4dc9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_capacity_reservation_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateComputeCapacityReservationRequest wrapper for the UpdateComputeCapacityReservation operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeCapacityReservation.go.html to see an example of how to use UpdateComputeCapacityReservationRequest. +type UpdateComputeCapacityReservationRequest struct { + + // The OCID of the compute capacity reservation. + CapacityReservationId *string `mandatory:"true" contributesTo:"path" name:"capacityReservationId"` + + // Update compute capacity reservation details. + UpdateComputeCapacityReservationDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateComputeCapacityReservationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateComputeCapacityReservationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateComputeCapacityReservationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateComputeCapacityReservationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateComputeCapacityReservationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateComputeCapacityReservationResponse wrapper for the UpdateComputeCapacityReservation operation +type UpdateComputeCapacityReservationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateComputeCapacityReservationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateComputeCapacityReservationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_capacity_topology_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_capacity_topology_details.go new file mode 100644 index 000000000..9880dd2ae --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_capacity_topology_details.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateComputeCapacityTopologyDetails The details for updating the compute capacity topology. +type UpdateComputeCapacityTopologyDetails struct { + CapacitySource UpdateCapacitySourceDetails `mandatory:"false" json:"capacitySource"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateComputeCapacityTopologyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateComputeCapacityTopologyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *UpdateComputeCapacityTopologyDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + CapacitySource updatecapacitysourcedetails `json:"capacitySource"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.CapacitySource.UnmarshalPolymorphicJSON(model.CapacitySource.JsonData) + if e != nil { + return + } + if nn != nil { + m.CapacitySource = nn.(UpdateCapacitySourceDetails) + } else { + m.CapacitySource = nil + } + + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_capacity_topology_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_capacity_topology_request_response.go new file mode 100644 index 000000000..104bf91d9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_capacity_topology_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateComputeCapacityTopologyRequest wrapper for the UpdateComputeCapacityTopology operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeCapacityTopology.go.html to see an example of how to use UpdateComputeCapacityTopologyRequest. +type UpdateComputeCapacityTopologyRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" contributesTo:"path" name:"computeCapacityTopologyId"` + + // Update compute capacity topology details. + UpdateComputeCapacityTopologyDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateComputeCapacityTopologyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateComputeCapacityTopologyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateComputeCapacityTopologyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateComputeCapacityTopologyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateComputeCapacityTopologyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateComputeCapacityTopologyResponse wrapper for the UpdateComputeCapacityTopology operation +type UpdateComputeCapacityTopologyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateComputeCapacityTopologyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateComputeCapacityTopologyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_cluster_details.go new file mode 100644 index 000000000..d9608158b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_cluster_details.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateComputeClusterDetails The data to update a compute cluster. A compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) +// is a remote direct memory access (RDMA) network group. +type UpdateComputeClusterDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateComputeClusterDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateComputeClusterDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_cluster_request_response.go new file mode 100644 index 000000000..04f0afa34 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_cluster_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateComputeClusterRequest wrapper for the UpdateComputeCluster operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeCluster.go.html to see an example of how to use UpdateComputeClusterRequest. +type UpdateComputeClusterRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. + // A compute cluster (https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory + // access (RDMA) network group. + ComputeClusterId *string `mandatory:"true" contributesTo:"path" name:"computeClusterId"` + + // Details for updating the compute cluster. + UpdateComputeClusterDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateComputeClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateComputeClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateComputeClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateComputeClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateComputeClusterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateComputeClusterResponse wrapper for the UpdateComputeCluster operation +type UpdateComputeClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeCluster instance + ComputeCluster `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateComputeClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateComputeClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_cluster_details.go new file mode 100644 index 000000000..3d23f65ee --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_cluster_details.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateComputeGpuMemoryClusterDetails Updates compute GPU Memory Cluster details. +type UpdateComputeGpuMemoryClusterDetails struct { + + // Instance Configuration to be used for this GPU Memory Cluster + InstanceConfigurationId *string `mandatory:"false" json:"instanceConfigurationId"` + + // The desired number of instances for the GPU Memory Cluster. + Size *int64 `mandatory:"false" json:"size"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + GpuMemoryClusterScaleConfig *UpdateComputeGpuMemoryClusterScaleConfig `mandatory:"false" json:"gpuMemoryClusterScaleConfig"` + + // Unique list of OCIDs for private IPs (IPv4/IPv6) associated with the GPU Memory Cluster + PrivateIpIds []string `mandatory:"false" json:"privateIpIds"` +} + +func (m UpdateComputeGpuMemoryClusterDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateComputeGpuMemoryClusterDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_cluster_request_response.go new file mode 100644 index 000000000..ccb3a79a8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_cluster_request_response.go @@ -0,0 +1,114 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateComputeGpuMemoryClusterRequest wrapper for the UpdateComputeGpuMemoryCluster operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeGpuMemoryCluster.go.html to see an example of how to use UpdateComputeGpuMemoryClusterRequest. +type UpdateComputeGpuMemoryClusterRequest struct { + + // The OCID of the compute GPU memory cluster. + ComputeGpuMemoryClusterId *string `mandatory:"true" contributesTo:"path" name:"computeGpuMemoryClusterId"` + + // Update compute GPU memory cluster details. + UpdateComputeGpuMemoryClusterDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateComputeGpuMemoryClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateComputeGpuMemoryClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateComputeGpuMemoryClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateComputeGpuMemoryClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateComputeGpuMemoryClusterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateComputeGpuMemoryClusterResponse wrapper for the UpdateComputeGpuMemoryCluster operation +type UpdateComputeGpuMemoryClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeGpuMemoryCluster instance + ComputeGpuMemoryCluster `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateComputeGpuMemoryClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateComputeGpuMemoryClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_cluster_scale_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_cluster_scale_config.go new file mode 100644 index 000000000..b80e8280e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_cluster_scale_config.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateComputeGpuMemoryClusterScaleConfig Configuration settings for GPU Memory Cluster scaling. +type UpdateComputeGpuMemoryClusterScaleConfig struct { + + // Enables upsizing towards the target size. + IsUpsizeEnabled *bool `mandatory:"false" json:"isUpsizeEnabled"` + + // Enables downsizing towards the target size. + IsDownsizeEnabled *bool `mandatory:"false" json:"isDownsizeEnabled"` + + // The configured target size for the GPU Memory Cluster. + TargetSize *int64 `mandatory:"false" json:"targetSize"` +} + +func (m UpdateComputeGpuMemoryClusterScaleConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateComputeGpuMemoryClusterScaleConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_fabric_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_fabric_details.go new file mode 100644 index 000000000..f9d9b7d5d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_fabric_details.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateComputeGpuMemoryFabricDetails Updates compute GPU memory fabric details. +type UpdateComputeGpuMemoryFabricDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + MemoryFabricPreferences *MemoryFabricPreferencesDescriptor `mandatory:"false" json:"memoryFabricPreferences"` +} + +func (m UpdateComputeGpuMemoryFabricDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateComputeGpuMemoryFabricDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_fabric_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_fabric_request_response.go new file mode 100644 index 000000000..f55e96747 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_gpu_memory_fabric_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateComputeGpuMemoryFabricRequest wrapper for the UpdateComputeGpuMemoryFabric operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeGpuMemoryFabric.go.html to see an example of how to use UpdateComputeGpuMemoryFabricRequest. +type UpdateComputeGpuMemoryFabricRequest struct { + + // The OCID of the compute GPU memory fabric. + ComputeGpuMemoryFabricId *string `mandatory:"true" contributesTo:"path" name:"computeGpuMemoryFabricId"` + + // Update compute GPU memory fabric details. + UpdateComputeGpuMemoryFabricDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateComputeGpuMemoryFabricRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateComputeGpuMemoryFabricRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateComputeGpuMemoryFabricRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateComputeGpuMemoryFabricRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateComputeGpuMemoryFabricRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateComputeGpuMemoryFabricResponse wrapper for the UpdateComputeGpuMemoryFabric operation +type UpdateComputeGpuMemoryFabricResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeGpuMemoryFabric instance + ComputeGpuMemoryFabric `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateComputeGpuMemoryFabricResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateComputeGpuMemoryFabricResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_host_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_host_details.go new file mode 100644 index 000000000..8910ff5b0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_host_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateComputeHostDetails The details for updating the compute host. +type UpdateComputeHostDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateComputeHostDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateComputeHostDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_host_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_host_group_details.go new file mode 100644 index 000000000..aa4f90dd6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_host_group_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateComputeHostGroupDetails Update details information for a compute host group. +type UpdateComputeHostGroupDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // A list of HostGroupConfiguration objects + Configurations []HostGroupConfiguration `mandatory:"false" json:"configurations"` + + // A flag that allows customers to restrict placement for hosts attached to the group. If true, the only way to place on hosts is to target the specific host group. + IsTargetedPlacementRequired *bool `mandatory:"false" json:"isTargetedPlacementRequired"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateComputeHostGroupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateComputeHostGroupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_host_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_host_group_request_response.go new file mode 100644 index 000000000..d4f6df108 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_host_group_request_response.go @@ -0,0 +1,117 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateComputeHostGroupRequest wrapper for the UpdateComputeHostGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeHostGroup.go.html to see an example of how to use UpdateComputeHostGroupRequest. +type UpdateComputeHostGroupRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host group. + ComputeHostGroupId *string `mandatory:"true" contributesTo:"path" name:"computeHostGroupId"` + + // Update compute host group details. + UpdateComputeHostGroupDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateComputeHostGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateComputeHostGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateComputeHostGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateComputeHostGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateComputeHostGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateComputeHostGroupResponse wrapper for the UpdateComputeHostGroup operation +type UpdateComputeHostGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeHostGroup instance + ComputeHostGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Location of the resource. + Location *string `presentIn:"header" name:"location"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateComputeHostGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateComputeHostGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_host_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_host_request_response.go new file mode 100644 index 000000000..f6eb6440c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_host_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateComputeHostRequest wrapper for the UpdateComputeHost operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeHost.go.html to see an example of how to use UpdateComputeHostRequest. +type UpdateComputeHostRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute host. + ComputeHostId *string `mandatory:"true" contributesTo:"path" name:"computeHostId"` + + // Update compute capacity topology details. + UpdateComputeHostDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateComputeHostRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateComputeHostRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateComputeHostRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateComputeHostRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateComputeHostRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateComputeHostResponse wrapper for the UpdateComputeHost operation +type UpdateComputeHostResponse struct { + + // The underlying http response + RawResponse *http.Response + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateComputeHostResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateComputeHostResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_image_capability_schema_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_image_capability_schema_details.go new file mode 100644 index 000000000..fb2f30970 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_image_capability_schema_details.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateComputeImageCapabilitySchemaDetails Create Image Capability Schema for an image. +type UpdateComputeImageCapabilitySchemaDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The map of each capability name to its ImageCapabilitySchemaDescriptor. + SchemaData map[string]ImageCapabilitySchemaDescriptor `mandatory:"false" json:"schemaData"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateComputeImageCapabilitySchemaDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateComputeImageCapabilitySchemaDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *UpdateComputeImageCapabilitySchemaDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + SchemaData map[string]imagecapabilityschemadescriptor `json:"schemaData"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.SchemaData = make(map[string]ImageCapabilitySchemaDescriptor) + for k, v := range model.SchemaData { + nn, e = v.UnmarshalPolymorphicJSON(v.JsonData) + if e != nil { + return e + } + if nn != nil { + m.SchemaData[k] = nn.(ImageCapabilitySchemaDescriptor) + } else { + m.SchemaData[k] = nil + } + } + + m.DefinedTags = model.DefinedTags + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_image_capability_schema_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_image_capability_schema_request_response.go new file mode 100644 index 000000000..942c1725a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_compute_image_capability_schema_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateComputeImageCapabilitySchemaRequest wrapper for the UpdateComputeImageCapabilitySchema operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeImageCapabilitySchema.go.html to see an example of how to use UpdateComputeImageCapabilitySchemaRequest. +type UpdateComputeImageCapabilitySchemaRequest struct { + + // The id of the compute image capability schema or the image ocid + ComputeImageCapabilitySchemaId *string `mandatory:"true" contributesTo:"path" name:"computeImageCapabilitySchemaId"` + + // Updates the freeFormTags, definedTags, and display name of the image capability schema + UpdateComputeImageCapabilitySchemaDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateComputeImageCapabilitySchemaRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateComputeImageCapabilitySchemaRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateComputeImageCapabilitySchemaRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateComputeImageCapabilitySchemaRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateComputeImageCapabilitySchemaRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateComputeImageCapabilitySchemaResponse wrapper for the UpdateComputeImageCapabilitySchema operation +type UpdateComputeImageCapabilitySchemaResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeImageCapabilitySchema instance + ComputeImageCapabilitySchema `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateComputeImageCapabilitySchemaResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateComputeImageCapabilitySchemaResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_console_history_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_console_history_details.go new file mode 100644 index 000000000..fd46fac79 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_console_history_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateConsoleHistoryDetails The representation of UpdateConsoleHistoryDetails +type UpdateConsoleHistoryDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateConsoleHistoryDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateConsoleHistoryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_console_history_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_console_history_request_response.go new file mode 100644 index 000000000..808535384 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_console_history_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateConsoleHistoryRequest wrapper for the UpdateConsoleHistory operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateConsoleHistory.go.html to see an example of how to use UpdateConsoleHistoryRequest. +type UpdateConsoleHistoryRequest struct { + + // The OCID of the console history. + InstanceConsoleHistoryId *string `mandatory:"true" contributesTo:"path" name:"instanceConsoleHistoryId"` + + // Update instance fields + UpdateConsoleHistoryDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateConsoleHistoryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateConsoleHistoryRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateConsoleHistoryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateConsoleHistoryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateConsoleHistoryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateConsoleHistoryResponse wrapper for the UpdateConsoleHistory operation +type UpdateConsoleHistoryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ConsoleHistory instance + ConsoleHistory `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateConsoleHistoryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateConsoleHistoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cpe_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cpe_details.go new file mode 100644 index 000000000..89ca54723 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cpe_details.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateCpeDetails The representation of UpdateCpeDetails +type UpdateCpeDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the CPE device type. You can provide + // a value if you want to generate CPE device configuration content for IPSec connections + // that use this CPE. For a list of possible values, see + // ListCpeDeviceShapes. + // For more information about generating CPE device configuration content, see: + // * GetCpeDeviceConfigContent + // * GetIpsecCpeDeviceConfigContent + // * GetTunnelCpeDeviceConfigContent + // * GetTunnelCpeDeviceConfig + CpeDeviceShapeId *string `mandatory:"false" json:"cpeDeviceShapeId"` +} + +func (m UpdateCpeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateCpeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cpe_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cpe_request_response.go new file mode 100644 index 000000000..650af2d56 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cpe_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateCpeRequest wrapper for the UpdateCpe operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateCpe.go.html to see an example of how to use UpdateCpeRequest. +type UpdateCpeRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the CPE. + CpeId *string `mandatory:"true" contributesTo:"path" name:"cpeId"` + + // Details object for updating a CPE. + UpdateCpeDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateCpeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateCpeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateCpeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateCpeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateCpeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateCpeResponse wrapper for the UpdateCpe operation +type UpdateCpeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Cpe instance + Cpe `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateCpeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateCpeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cross_connect_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cross_connect_details.go new file mode 100644 index 000000000..4e1dc6018 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cross_connect_details.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateCrossConnectDetails Update a CrossConnect +type UpdateCrossConnectDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Set to true to activate the cross-connect. You activate it after the physical cabling + // is complete, and you've confirmed the cross-connect's light levels are good and your side + // of the interface is up. Activation indicates to Oracle that the physical connection is ready. + // Example: `true` + IsActive *bool `mandatory:"false" json:"isActive"` + + // A reference name or identifier for the physical fiber connection this cross-connect uses. + CustomerReferenceName *string `mandatory:"false" json:"customerReferenceName"` + + MacsecProperties *UpdateMacsecProperties `mandatory:"false" json:"macsecProperties"` +} + +func (m UpdateCrossConnectDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateCrossConnectDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cross_connect_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cross_connect_group_details.go new file mode 100644 index 000000000..e6c776503 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cross_connect_group_details.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateCrossConnectGroupDetails The representation of UpdateCrossConnectGroupDetails +type UpdateCrossConnectGroupDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // A reference name or identifier for the physical fiber connection this cross-connect group uses. + CustomerReferenceName *string `mandatory:"false" json:"customerReferenceName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + MacsecProperties *UpdateMacsecProperties `mandatory:"false" json:"macsecProperties"` +} + +func (m UpdateCrossConnectGroupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateCrossConnectGroupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cross_connect_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cross_connect_group_request_response.go new file mode 100644 index 000000000..e949da8cd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cross_connect_group_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateCrossConnectGroupRequest wrapper for the UpdateCrossConnectGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateCrossConnectGroup.go.html to see an example of how to use UpdateCrossConnectGroupRequest. +type UpdateCrossConnectGroupRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect group. + CrossConnectGroupId *string `mandatory:"true" contributesTo:"path" name:"crossConnectGroupId"` + + // Update CrossConnectGroup fields + UpdateCrossConnectGroupDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateCrossConnectGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateCrossConnectGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateCrossConnectGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateCrossConnectGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateCrossConnectGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateCrossConnectGroupResponse wrapper for the UpdateCrossConnectGroup operation +type UpdateCrossConnectGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CrossConnectGroup instance + CrossConnectGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateCrossConnectGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateCrossConnectGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cross_connect_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cross_connect_request_response.go new file mode 100644 index 000000000..c75cd49de --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_cross_connect_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateCrossConnectRequest wrapper for the UpdateCrossConnect operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateCrossConnect.go.html to see an example of how to use UpdateCrossConnectRequest. +type UpdateCrossConnectRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect. + CrossConnectId *string `mandatory:"true" contributesTo:"path" name:"crossConnectId"` + + // Update CrossConnect fields. + UpdateCrossConnectDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateCrossConnectRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateCrossConnectRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateCrossConnectRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateCrossConnectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateCrossConnectRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateCrossConnectResponse wrapper for the UpdateCrossConnect operation +type UpdateCrossConnectResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CrossConnect instance + CrossConnect `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateCrossConnectResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateCrossConnectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dedicated_capacity_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dedicated_capacity_source_details.go new file mode 100644 index 000000000..47615ed61 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dedicated_capacity_source_details.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDedicatedCapacitySourceDetails A capacity source of bare metal hosts that is dedicated to a user. +type UpdateDedicatedCapacitySourceDetails struct { +} + +func (m UpdateDedicatedCapacitySourceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDedicatedCapacitySourceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateDedicatedCapacitySourceDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateDedicatedCapacitySourceDetails UpdateDedicatedCapacitySourceDetails + s := struct { + DiscriminatorParam string `json:"capacityType"` + MarshalTypeUpdateDedicatedCapacitySourceDetails + }{ + "DEDICATED", + (MarshalTypeUpdateDedicatedCapacitySourceDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dedicated_vm_host_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dedicated_vm_host_details.go new file mode 100644 index 000000000..b10b9fe1f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dedicated_vm_host_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDedicatedVmHostDetails Details for updating the dedicated virtual machine host details. +type UpdateDedicatedVmHostDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateDedicatedVmHostDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDedicatedVmHostDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dedicated_vm_host_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dedicated_vm_host_request_response.go new file mode 100644 index 000000000..ae9432299 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dedicated_vm_host_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateDedicatedVmHostRequest wrapper for the UpdateDedicatedVmHost operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDedicatedVmHost.go.html to see an example of how to use UpdateDedicatedVmHostRequest. +type UpdateDedicatedVmHostRequest struct { + + // The OCID of the dedicated VM host. + DedicatedVmHostId *string `mandatory:"true" contributesTo:"path" name:"dedicatedVmHostId"` + + // Update dedicated VM host details + UpdateDedicatedVmHostDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateDedicatedVmHostRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateDedicatedVmHostRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateDedicatedVmHostRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDedicatedVmHostRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateDedicatedVmHostRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateDedicatedVmHostResponse wrapper for the UpdateDedicatedVmHost operation +type UpdateDedicatedVmHostResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DedicatedVmHost instance + DedicatedVmHost `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateDedicatedVmHostResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDedicatedVmHostResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dhcp_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dhcp_details.go new file mode 100644 index 000000000..eebb8ef6a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dhcp_details.go @@ -0,0 +1,149 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDhcpDetails The representation of UpdateDhcpDetails +type UpdateDhcpDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + Options []DhcpOption `mandatory:"false" json:"options"` + + // The search domain name type of DHCP options + DomainNameType UpdateDhcpDetailsDomainNameTypeEnum `mandatory:"false" json:"domainNameType,omitempty"` +} + +func (m UpdateDhcpDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDhcpDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateDhcpDetailsDomainNameTypeEnum(string(m.DomainNameType)); !ok && m.DomainNameType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DomainNameType: %s. Supported values are: %s.", m.DomainNameType, strings.Join(GetUpdateDhcpDetailsDomainNameTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *UpdateDhcpDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + Options []dhcpoption `json:"options"` + DomainNameType UpdateDhcpDetailsDomainNameTypeEnum `json:"domainNameType"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.Options = make([]DhcpOption, len(model.Options)) + for i, n := range model.Options { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Options[i] = nn.(DhcpOption) + } else { + m.Options[i] = nil + } + } + m.DomainNameType = model.DomainNameType + + return +} + +// UpdateDhcpDetailsDomainNameTypeEnum Enum with underlying type: string +type UpdateDhcpDetailsDomainNameTypeEnum string + +// Set of constants representing the allowable values for UpdateDhcpDetailsDomainNameTypeEnum +const ( + UpdateDhcpDetailsDomainNameTypeSubnetDomain UpdateDhcpDetailsDomainNameTypeEnum = "SUBNET_DOMAIN" + UpdateDhcpDetailsDomainNameTypeVcnDomain UpdateDhcpDetailsDomainNameTypeEnum = "VCN_DOMAIN" + UpdateDhcpDetailsDomainNameTypeCustomDomain UpdateDhcpDetailsDomainNameTypeEnum = "CUSTOM_DOMAIN" +) + +var mappingUpdateDhcpDetailsDomainNameTypeEnum = map[string]UpdateDhcpDetailsDomainNameTypeEnum{ + "SUBNET_DOMAIN": UpdateDhcpDetailsDomainNameTypeSubnetDomain, + "VCN_DOMAIN": UpdateDhcpDetailsDomainNameTypeVcnDomain, + "CUSTOM_DOMAIN": UpdateDhcpDetailsDomainNameTypeCustomDomain, +} + +var mappingUpdateDhcpDetailsDomainNameTypeEnumLowerCase = map[string]UpdateDhcpDetailsDomainNameTypeEnum{ + "subnet_domain": UpdateDhcpDetailsDomainNameTypeSubnetDomain, + "vcn_domain": UpdateDhcpDetailsDomainNameTypeVcnDomain, + "custom_domain": UpdateDhcpDetailsDomainNameTypeCustomDomain, +} + +// GetUpdateDhcpDetailsDomainNameTypeEnumValues Enumerates the set of values for UpdateDhcpDetailsDomainNameTypeEnum +func GetUpdateDhcpDetailsDomainNameTypeEnumValues() []UpdateDhcpDetailsDomainNameTypeEnum { + values := make([]UpdateDhcpDetailsDomainNameTypeEnum, 0) + for _, v := range mappingUpdateDhcpDetailsDomainNameTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateDhcpDetailsDomainNameTypeEnumStringValues Enumerates the set of values in String for UpdateDhcpDetailsDomainNameTypeEnum +func GetUpdateDhcpDetailsDomainNameTypeEnumStringValues() []string { + return []string{ + "SUBNET_DOMAIN", + "VCN_DOMAIN", + "CUSTOM_DOMAIN", + } +} + +// GetMappingUpdateDhcpDetailsDomainNameTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateDhcpDetailsDomainNameTypeEnum(val string) (UpdateDhcpDetailsDomainNameTypeEnum, bool) { + enum, ok := mappingUpdateDhcpDetailsDomainNameTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dhcp_options_request_response.go new file mode 100644 index 000000000..9b5dd51c1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_dhcp_options_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateDhcpOptionsRequest wrapper for the UpdateDhcpOptions operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDhcpOptions.go.html to see an example of how to use UpdateDhcpOptionsRequest. +type UpdateDhcpOptionsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the set of DHCP options. + DhcpId *string `mandatory:"true" contributesTo:"path" name:"dhcpId"` + + // Request object for updating a set of DHCP options. + UpdateDhcpDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateDhcpOptionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateDhcpOptionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateDhcpOptionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDhcpOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateDhcpOptionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateDhcpOptionsResponse wrapper for the UpdateDhcpOptions operation +type UpdateDhcpOptionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DhcpOptions instance + DhcpOptions `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateDhcpOptionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDhcpOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_attachment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_attachment_details.go new file mode 100644 index 000000000..d055a5913 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_attachment_details.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDrgAttachmentDetails The representation of UpdateDrgAttachmentDetails +type UpdateDrgAttachmentDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table that is assigned to this attachment. + // The DRG route table manages traffic inside the DRG. + // You can't remove a DRG route table from a DRG attachment, but you can reassign which + // DRG route table it uses. + DrgRouteTableId *string `mandatory:"false" json:"drgRouteTableId"` + + NetworkDetails DrgAttachmentNetworkUpdateDetails `mandatory:"false" json:"networkDetails"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the export route distribution used to specify how routes in the assigned DRG route table + // are advertised out through the attachment. + // If this value is null, no routes are advertised through this attachment. + ExportDrgRouteDistributionId *string `mandatory:"false" json:"exportDrgRouteDistributionId"` + + // This is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table that is used to route the traffic as it enters a VCN through this attachment. + // For information about why you would associate a route table with a DRG attachment, see: + // * Transit Routing: Access to Multiple VCNs in Same Region (https://docs.oracle.com/iaas/Content/Network/Tasks/transitrouting.htm) + // * Transit Routing: Private Access to Oracle Services (https://docs.oracle.com/iaas/Content/Network/Tasks/transitroutingoracleservices.htm) + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m UpdateDrgAttachmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDrgAttachmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *UpdateDrgAttachmentDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + DrgRouteTableId *string `json:"drgRouteTableId"` + NetworkDetails drgattachmentnetworkupdatedetails `json:"networkDetails"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + FreeformTags map[string]string `json:"freeformTags"` + ExportDrgRouteDistributionId *string `json:"exportDrgRouteDistributionId"` + RouteTableId *string `json:"routeTableId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DisplayName = model.DisplayName + + m.DrgRouteTableId = model.DrgRouteTableId + + nn, e = model.NetworkDetails.UnmarshalPolymorphicJSON(model.NetworkDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.NetworkDetails = nn.(DrgAttachmentNetworkUpdateDetails) + } else { + m.NetworkDetails = nil + } + + m.DefinedTags = model.DefinedTags + + m.FreeformTags = model.FreeformTags + + m.ExportDrgRouteDistributionId = model.ExportDrgRouteDistributionId + + m.RouteTableId = model.RouteTableId + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_attachment_request_response.go new file mode 100644 index 000000000..12bbfd2bb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_attachment_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateDrgAttachmentRequest wrapper for the UpdateDrgAttachment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgAttachment.go.html to see an example of how to use UpdateDrgAttachmentRequest. +type UpdateDrgAttachmentRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG attachment. + DrgAttachmentId *string `mandatory:"true" contributesTo:"path" name:"drgAttachmentId"` + + // Details object for updating a `DrgAttachment`. + UpdateDrgAttachmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateDrgAttachmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateDrgAttachmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateDrgAttachmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDrgAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateDrgAttachmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateDrgAttachmentResponse wrapper for the UpdateDrgAttachment operation +type UpdateDrgAttachmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DrgAttachment instance + DrgAttachment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateDrgAttachmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDrgAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_details.go new file mode 100644 index 000000000..71f015493 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_details.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDrgDetails The representation of UpdateDrgDetails +type UpdateDrgDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + DefaultDrgRouteTables *DefaultDrgRouteTables `mandatory:"false" json:"defaultDrgRouteTables"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateDrgDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDrgDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_request_response.go new file mode 100644 index 000000000..8a43c43ad --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateDrgRequest wrapper for the UpdateDrg operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrg.go.html to see an example of how to use UpdateDrgRequest. +type UpdateDrgRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"true" contributesTo:"path" name:"drgId"` + + // Details object for updating a DRG. + UpdateDrgDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateDrgRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateDrgRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateDrgRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDrgRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateDrgRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateDrgResponse wrapper for the UpdateDrg operation +type UpdateDrgResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Drg instance + Drg `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateDrgResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDrgResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_details.go new file mode 100644 index 000000000..a9c7e37a8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_details.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDrgRouteDistributionDetails Details used in a request to update a route distribution. +// You cannot assign a table to a virtual circuit or IPSec tunnel attachment if there is a static route rule for an RPC attachment. +type UpdateDrgRouteDistributionDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateDrgRouteDistributionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDrgRouteDistributionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_request_response.go new file mode 100644 index 000000000..9cd1962ab --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateDrgRouteDistributionRequest wrapper for the UpdateDrgRouteDistribution operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgRouteDistribution.go.html to see an example of how to use UpdateDrgRouteDistributionRequest. +type UpdateDrgRouteDistributionRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route distribution. + DrgRouteDistributionId *string `mandatory:"true" contributesTo:"path" name:"drgRouteDistributionId"` + + // Details object for updating a route distribution + UpdateDrgRouteDistributionDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateDrgRouteDistributionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateDrgRouteDistributionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateDrgRouteDistributionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDrgRouteDistributionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateDrgRouteDistributionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateDrgRouteDistributionResponse wrapper for the UpdateDrgRouteDistribution operation +type UpdateDrgRouteDistributionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DrgRouteDistribution instance + DrgRouteDistribution `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateDrgRouteDistributionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDrgRouteDistributionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_statement_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_statement_details.go new file mode 100644 index 000000000..68bcd5609 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_statement_details.go @@ -0,0 +1,84 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDrgRouteDistributionStatementDetails Route distribution statements to update in the route distribution. +type UpdateDrgRouteDistributionStatementDetails struct { + + // The Oracle-assigned ID of each route distribution statement to be updated. + Id *string `mandatory:"true" json:"id"` + + // The action is applied only if all of the match criteria is met. + MatchCriteria []DrgRouteDistributionMatchCriteria `mandatory:"false" json:"matchCriteria"` + + // The priority of the statement you'd like to update. + Priority *int `mandatory:"false" json:"priority"` +} + +func (m UpdateDrgRouteDistributionStatementDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDrgRouteDistributionStatementDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *UpdateDrgRouteDistributionStatementDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + MatchCriteria []drgroutedistributionmatchcriteria `json:"matchCriteria"` + Priority *int `json:"priority"` + Id *string `json:"id"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.MatchCriteria = make([]DrgRouteDistributionMatchCriteria, len(model.MatchCriteria)) + for i, n := range model.MatchCriteria { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.MatchCriteria[i] = nn.(DrgRouteDistributionMatchCriteria) + } else { + m.MatchCriteria[i] = nil + } + } + m.Priority = model.Priority + + m.Id = model.Id + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_statements_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_statements_details.go new file mode 100644 index 000000000..c4902bf79 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_statements_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDrgRouteDistributionStatementsDetails Details request to update statements in a route distribution. +type UpdateDrgRouteDistributionStatementsDetails struct { + + // The route distribution statements to update, and the details to be updated. + Statements []UpdateDrgRouteDistributionStatementDetails `mandatory:"true" json:"statements"` +} + +func (m UpdateDrgRouteDistributionStatementsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDrgRouteDistributionStatementsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_statements_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_statements_request_response.go new file mode 100644 index 000000000..6346ed578 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_distribution_statements_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateDrgRouteDistributionStatementsRequest wrapper for the UpdateDrgRouteDistributionStatements operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgRouteDistributionStatements.go.html to see an example of how to use UpdateDrgRouteDistributionStatementsRequest. +type UpdateDrgRouteDistributionStatementsRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route distribution. + DrgRouteDistributionId *string `mandatory:"true" contributesTo:"path" name:"drgRouteDistributionId"` + + // Request to update one or more route distribution statements in the route distribution. + UpdateDrgRouteDistributionStatementsDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateDrgRouteDistributionStatementsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateDrgRouteDistributionStatementsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateDrgRouteDistributionStatementsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDrgRouteDistributionStatementsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateDrgRouteDistributionStatementsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateDrgRouteDistributionStatementsResponse wrapper for the UpdateDrgRouteDistributionStatements operation +type UpdateDrgRouteDistributionStatementsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []DrgRouteDistributionStatement instance + Items []DrgRouteDistributionStatement `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateDrgRouteDistributionStatementsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDrgRouteDistributionStatementsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_rule_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_rule_details.go new file mode 100644 index 000000000..d81b1cd5e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_rule_details.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDrgRouteRuleDetails Details used to update a route rule in the DRG route table. +type UpdateDrgRouteRuleDetails struct { + + // The Oracle-assigned ID of each DRG route rule to update. + Id *string `mandatory:"true" json:"id"` + + // The range of IP addresses used for matching when routing traffic. + // Potential values: + // * IP address range in CIDR notation. Can be an IPv4 CIDR block or IPv6 prefix. For example: `192.168.1.0/24` + // or `2001:0db8:0123:45::/56`. + Destination *string `mandatory:"false" json:"destination"` + + // Type of destination for the rule. + // Allowed values: + // * `CIDR_BLOCK`: If the rule's `destination` is an IP address range in CIDR notation. + DestinationType UpdateDrgRouteRuleDetailsDestinationTypeEnum `mandatory:"false" json:"destinationType,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the next hop DRG attachment. The next hop DRG attachment is responsible + // for reaching the network destination. + NextHopDrgAttachmentId *string `mandatory:"false" json:"nextHopDrgAttachmentId"` +} + +func (m UpdateDrgRouteRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDrgRouteRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateDrgRouteRuleDetailsDestinationTypeEnum(string(m.DestinationType)); !ok && m.DestinationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DestinationType: %s. Supported values are: %s.", m.DestinationType, strings.Join(GetUpdateDrgRouteRuleDetailsDestinationTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateDrgRouteRuleDetailsDestinationTypeEnum Enum with underlying type: string +type UpdateDrgRouteRuleDetailsDestinationTypeEnum string + +// Set of constants representing the allowable values for UpdateDrgRouteRuleDetailsDestinationTypeEnum +const ( + UpdateDrgRouteRuleDetailsDestinationTypeCidrBlock UpdateDrgRouteRuleDetailsDestinationTypeEnum = "CIDR_BLOCK" +) + +var mappingUpdateDrgRouteRuleDetailsDestinationTypeEnum = map[string]UpdateDrgRouteRuleDetailsDestinationTypeEnum{ + "CIDR_BLOCK": UpdateDrgRouteRuleDetailsDestinationTypeCidrBlock, +} + +var mappingUpdateDrgRouteRuleDetailsDestinationTypeEnumLowerCase = map[string]UpdateDrgRouteRuleDetailsDestinationTypeEnum{ + "cidr_block": UpdateDrgRouteRuleDetailsDestinationTypeCidrBlock, +} + +// GetUpdateDrgRouteRuleDetailsDestinationTypeEnumValues Enumerates the set of values for UpdateDrgRouteRuleDetailsDestinationTypeEnum +func GetUpdateDrgRouteRuleDetailsDestinationTypeEnumValues() []UpdateDrgRouteRuleDetailsDestinationTypeEnum { + values := make([]UpdateDrgRouteRuleDetailsDestinationTypeEnum, 0) + for _, v := range mappingUpdateDrgRouteRuleDetailsDestinationTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateDrgRouteRuleDetailsDestinationTypeEnumStringValues Enumerates the set of values in String for UpdateDrgRouteRuleDetailsDestinationTypeEnum +func GetUpdateDrgRouteRuleDetailsDestinationTypeEnumStringValues() []string { + return []string{ + "CIDR_BLOCK", + } +} + +// GetMappingUpdateDrgRouteRuleDetailsDestinationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateDrgRouteRuleDetailsDestinationTypeEnum(val string) (UpdateDrgRouteRuleDetailsDestinationTypeEnum, bool) { + enum, ok := mappingUpdateDrgRouteRuleDetailsDestinationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_rules_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_rules_details.go new file mode 100644 index 000000000..f6c5f2e5c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_rules_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDrgRouteRulesDetails Details used to update route rules in a DRG route table. +type UpdateDrgRouteRulesDetails struct { + + // The DRG rute rules to update. + RouteRules []UpdateDrgRouteRuleDetails `mandatory:"false" json:"routeRules"` +} + +func (m UpdateDrgRouteRulesDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDrgRouteRulesDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_rules_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_rules_request_response.go new file mode 100644 index 000000000..7d532ed65 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_rules_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateDrgRouteRulesRequest wrapper for the UpdateDrgRouteRules operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgRouteRules.go.html to see an example of how to use UpdateDrgRouteRulesRequest. +type UpdateDrgRouteRulesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table. + DrgRouteTableId *string `mandatory:"true" contributesTo:"path" name:"drgRouteTableId"` + + // Request to update one or more route rules in the DRG route table. + UpdateDrgRouteRulesDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateDrgRouteRulesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateDrgRouteRulesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateDrgRouteRulesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDrgRouteRulesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateDrgRouteRulesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateDrgRouteRulesResponse wrapper for the UpdateDrgRouteRules operation +type UpdateDrgRouteRulesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []DrgRouteRule instance + Items []DrgRouteRule `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateDrgRouteRulesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDrgRouteRulesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_table_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_table_details.go new file mode 100644 index 000000000..9428ad52b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_table_details.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDrgRouteTableDetails Details used in a request to update a DRG route table. +// You can't assign a table to a virtual circuit or IPSec tunnel attachment if there is a static route rule for an RPC attachment. +type UpdateDrgRouteTableDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the import route distribution used to specify how incoming route advertisements through + // referenced attachements are inserted into the DRG route table. + ImportDrgRouteDistributionId *string `mandatory:"false" json:"importDrgRouteDistributionId"` + + // If you want traffic to be routed using ECMP across your virtual circuits or IPSec tunnels to + // your on-prem networks, set this value to true on the route table. + IsEcmpEnabled *bool `mandatory:"false" json:"isEcmpEnabled"` +} + +func (m UpdateDrgRouteTableDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDrgRouteTableDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_table_request_response.go new file mode 100644 index 000000000..2263b3b9e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_drg_route_table_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateDrgRouteTableRequest wrapper for the UpdateDrgRouteTable operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateDrgRouteTable.go.html to see an example of how to use UpdateDrgRouteTableRequest. +type UpdateDrgRouteTableRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table. + DrgRouteTableId *string `mandatory:"true" contributesTo:"path" name:"drgRouteTableId"` + + // Details object used to updating a DRG route table. + UpdateDrgRouteTableDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateDrgRouteTableRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateDrgRouteTableRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateDrgRouteTableRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDrgRouteTableRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateDrgRouteTableRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateDrgRouteTableResponse wrapper for the UpdateDrgRouteTable operation +type UpdateDrgRouteTableResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DrgRouteTable instance + DrgRouteTable `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateDrgRouteTableResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDrgRouteTableResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_i_p_sec_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_i_p_sec_connection_request_response.go new file mode 100644 index 000000000..92f583eff --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_i_p_sec_connection_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateIPSecConnectionRequest wrapper for the UpdateIPSecConnection operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateIPSecConnection.go.html to see an example of how to use UpdateIPSecConnectionRequest. +type UpdateIPSecConnectionRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // Details object for updating an IPSec connection. + UpdateIpSecConnectionDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateIPSecConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateIPSecConnectionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateIPSecConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateIPSecConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateIPSecConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateIPSecConnectionResponse wrapper for the UpdateIPSecConnection operation +type UpdateIPSecConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpSecConnection instance + IpSecConnection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateIPSecConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateIPSecConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_i_p_sec_connection_tunnel_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_i_p_sec_connection_tunnel_request_response.go new file mode 100644 index 000000000..1542afc02 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_i_p_sec_connection_tunnel_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateIPSecConnectionTunnelRequest wrapper for the UpdateIPSecConnectionTunnel operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateIPSecConnectionTunnel.go.html to see an example of how to use UpdateIPSecConnectionTunnelRequest. +type UpdateIPSecConnectionTunnelRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tunnel. + TunnelId *string `mandatory:"true" contributesTo:"path" name:"tunnelId"` + + // Details object for updating a IPSecConnection tunnel's details. + UpdateIpSecConnectionTunnelDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateIPSecConnectionTunnelRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateIPSecConnectionTunnelRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateIPSecConnectionTunnelRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateIPSecConnectionTunnelRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateIPSecConnectionTunnelRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateIPSecConnectionTunnelResponse wrapper for the UpdateIPSecConnectionTunnel operation +type UpdateIPSecConnectionTunnelResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpSecConnectionTunnel instance + IpSecConnectionTunnel `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateIPSecConnectionTunnelResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateIPSecConnectionTunnelResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_i_p_sec_connection_tunnel_shared_secret_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_i_p_sec_connection_tunnel_shared_secret_request_response.go new file mode 100644 index 000000000..b7bae332c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_i_p_sec_connection_tunnel_shared_secret_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateIPSecConnectionTunnelSharedSecretRequest wrapper for the UpdateIPSecConnectionTunnelSharedSecret operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateIPSecConnectionTunnelSharedSecret.go.html to see an example of how to use UpdateIPSecConnectionTunnelSharedSecretRequest. +type UpdateIPSecConnectionTunnelSharedSecretRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tunnel. + TunnelId *string `mandatory:"true" contributesTo:"path" name:"tunnelId"` + + // Details object for updating a IPSec connection tunnel's sharedSecret. + UpdateIpSecConnectionTunnelSharedSecretDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateIPSecConnectionTunnelSharedSecretRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateIPSecConnectionTunnelSharedSecretRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateIPSecConnectionTunnelSharedSecretRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateIPSecConnectionTunnelSharedSecretRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateIPSecConnectionTunnelSharedSecretRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateIPSecConnectionTunnelSharedSecretResponse wrapper for the UpdateIPSecConnectionTunnelSharedSecret operation +type UpdateIPSecConnectionTunnelSharedSecretResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpSecConnectionTunnelSharedSecret instance + IpSecConnectionTunnelSharedSecret `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateIPSecConnectionTunnelSharedSecretResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateIPSecConnectionTunnelSharedSecretResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_image_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_image_details.go new file mode 100644 index 000000000..c5cf92fe7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_image_details.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateImageDetails The representation of UpdateImageDetails +type UpdateImageDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Operating system + // Example: `Oracle Linux` + OperatingSystem *string `mandatory:"false" json:"operatingSystem"` + + // Operating system version + // Example: `7.4` + OperatingSystemVersion *string `mandatory:"false" json:"operatingSystemVersion"` +} + +func (m UpdateImageDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateImageDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_image_request_response.go new file mode 100644 index 000000000..88ec78f19 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_image_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateImageRequest wrapper for the UpdateImage operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateImage.go.html to see an example of how to use UpdateImageRequest. +type UpdateImageRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the image. + ImageId *string `mandatory:"true" contributesTo:"path" name:"imageId"` + + // Updates the image display name field. Avoid entering confidential information. + UpdateImageDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateImageRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateImageRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateImageRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateImageRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateImageRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateImageResponse wrapper for the UpdateImage operation +type UpdateImageResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Image instance + Image `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateImageResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateImageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_agent_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_agent_config_details.go new file mode 100644 index 000000000..2d804dab9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_agent_config_details.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceAgentConfigDetails Configuration options for the Oracle Cloud Agent software running on the instance. +type UpdateInstanceAgentConfigDetails struct { + + // Whether Oracle Cloud Agent can gather performance metrics and monitor the instance using the + // monitoring plugins. + // These are the monitoring plugins: Compute Instance Monitoring + // and Custom Logs Monitoring. + // The monitoring plugins are controlled by this parameter and by the per-plugin + // configuration in the `pluginsConfig` object. + // - If `isMonitoringDisabled` is true, all of the monitoring plugins are disabled, regardless of + // the per-plugin configuration. + // - If `isMonitoringDisabled` is false, all of the monitoring plugins are enabled. You + // can optionally disable individual monitoring plugins by providing a value in the `pluginsConfig` + // object. + IsMonitoringDisabled *bool `mandatory:"false" json:"isMonitoringDisabled"` + + // Whether Oracle Cloud Agent can run all the available management plugins. + // These are the management plugins: OS Management Service Agent and Compute Instance + // Run Command. + // The management plugins are controlled by this parameter and by the per-plugin + // configuration in the `pluginsConfig` object. + // - If `isManagementDisabled` is true, all of the management plugins are disabled, regardless of + // the per-plugin configuration. + // - If `isManagementDisabled` is false, all of the management plugins are enabled. You + // can optionally disable individual management plugins by providing a value in the `pluginsConfig` + // object. + IsManagementDisabled *bool `mandatory:"false" json:"isManagementDisabled"` + + // Whether Oracle Cloud Agent can run all the available plugins. + // This includes the management and monitoring plugins. + // To get a list of available plugins, use the + // ListInstanceagentAvailablePlugins + // operation in the Oracle Cloud Agent API. For more information about the available plugins, see + // Managing Plugins with Oracle Cloud Agent (https://docs.oracle.com/iaas/Content/Compute/Tasks/manage-plugins.htm). + AreAllPluginsDisabled *bool `mandatory:"false" json:"areAllPluginsDisabled"` + + // The configuration of plugins associated with this instance. + PluginsConfig []InstanceAgentPluginConfigDetails `mandatory:"false" json:"pluginsConfig"` +} + +func (m UpdateInstanceAgentConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInstanceAgentConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_availability_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_availability_config_details.go new file mode 100644 index 000000000..3735297aa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_availability_config_details.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceAvailabilityConfigDetails Options for defining the availability of a VM instance after a maintenance event that impacts the underlying +// hardware, including whether to live migrate supported VM instances when possible without sending a prior customer notification. +type UpdateInstanceAvailabilityConfigDetails struct { + + // Whether to live migrate supported VM instances to a healthy physical VM host without + // disrupting running instances during infrastructure maintenance events. If null, Oracle + // chooses the best option for migrating the VM during infrastructure maintenance events. + IsLiveMigrationPreferred *bool `mandatory:"false" json:"isLiveMigrationPreferred"` + + // The lifecycle state for an instance when it is recovered after infrastructure maintenance. + // * `RESTORE_INSTANCE` - The instance is restored to the lifecycle state it was in before the maintenance event. + // If the instance was running, it is automatically rebooted. This is the default action when a value is not set. + // * `STOP_INSTANCE` - The instance is recovered in the stopped state. + RecoveryAction UpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum `mandatory:"false" json:"recoveryAction,omitempty"` +} + +func (m UpdateInstanceAvailabilityConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInstanceAvailabilityConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum(string(m.RecoveryAction)); !ok && m.RecoveryAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RecoveryAction: %s. Supported values are: %s.", m.RecoveryAction, strings.Join(GetUpdateInstanceAvailabilityConfigDetailsRecoveryActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum Enum with underlying type: string +type UpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum string + +// Set of constants representing the allowable values for UpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum +const ( + UpdateInstanceAvailabilityConfigDetailsRecoveryActionRestoreInstance UpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum = "RESTORE_INSTANCE" + UpdateInstanceAvailabilityConfigDetailsRecoveryActionStopInstance UpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum = "STOP_INSTANCE" +) + +var mappingUpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum = map[string]UpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum{ + "RESTORE_INSTANCE": UpdateInstanceAvailabilityConfigDetailsRecoveryActionRestoreInstance, + "STOP_INSTANCE": UpdateInstanceAvailabilityConfigDetailsRecoveryActionStopInstance, +} + +var mappingUpdateInstanceAvailabilityConfigDetailsRecoveryActionEnumLowerCase = map[string]UpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum{ + "restore_instance": UpdateInstanceAvailabilityConfigDetailsRecoveryActionRestoreInstance, + "stop_instance": UpdateInstanceAvailabilityConfigDetailsRecoveryActionStopInstance, +} + +// GetUpdateInstanceAvailabilityConfigDetailsRecoveryActionEnumValues Enumerates the set of values for UpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum +func GetUpdateInstanceAvailabilityConfigDetailsRecoveryActionEnumValues() []UpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum { + values := make([]UpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum, 0) + for _, v := range mappingUpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum { + values = append(values, v) + } + return values +} + +// GetUpdateInstanceAvailabilityConfigDetailsRecoveryActionEnumStringValues Enumerates the set of values in String for UpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum +func GetUpdateInstanceAvailabilityConfigDetailsRecoveryActionEnumStringValues() []string { + return []string{ + "RESTORE_INSTANCE", + "STOP_INSTANCE", + } +} + +// GetMappingUpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum(val string) (UpdateInstanceAvailabilityConfigDetailsRecoveryActionEnum, bool) { + enum, ok := mappingUpdateInstanceAvailabilityConfigDetailsRecoveryActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_configuration_details.go new file mode 100644 index 000000000..34caa3ef6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_configuration_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceConfigurationDetails The representation of UpdateInstanceConfigurationDetails +type UpdateInstanceConfigurationDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateInstanceConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInstanceConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_configuration_request_response.go new file mode 100644 index 000000000..fb2b083bd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_configuration_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateInstanceConfigurationRequest wrapper for the UpdateInstanceConfiguration operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInstanceConfiguration.go.html to see an example of how to use UpdateInstanceConfigurationRequest. +type UpdateInstanceConfigurationRequest struct { + + // The OCID of the instance configuration. + InstanceConfigurationId *string `mandatory:"true" contributesTo:"path" name:"instanceConfigurationId"` + + // Updates the freeFormTags, definedTags, and display name of an instance configuration. + UpdateInstanceConfigurationDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateInstanceConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateInstanceConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateInstanceConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateInstanceConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateInstanceConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateInstanceConfigurationResponse wrapper for the UpdateInstanceConfiguration operation +type UpdateInstanceConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstanceConfiguration instance + InstanceConfiguration `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateInstanceConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateInstanceConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_console_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_console_connection_details.go new file mode 100644 index 000000000..04782bb7a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_console_connection_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceConsoleConnectionDetails Specifies the properties for updating tags for an instance console connection. +type UpdateInstanceConsoleConnectionDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateInstanceConsoleConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInstanceConsoleConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_console_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_console_connection_request_response.go new file mode 100644 index 000000000..3c1cbd589 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_console_connection_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateInstanceConsoleConnectionRequest wrapper for the UpdateInstanceConsoleConnection operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInstanceConsoleConnection.go.html to see an example of how to use UpdateInstanceConsoleConnectionRequest. +type UpdateInstanceConsoleConnectionRequest struct { + + // The OCID of the instance console connection. + InstanceConsoleConnectionId *string `mandatory:"true" contributesTo:"path" name:"instanceConsoleConnectionId"` + + // Update instanceConsoleConnection tags + UpdateInstanceConsoleConnectionDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateInstanceConsoleConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateInstanceConsoleConnectionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateInstanceConsoleConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateInstanceConsoleConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateInstanceConsoleConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateInstanceConsoleConnectionResponse wrapper for the UpdateInstanceConsoleConnection operation +type UpdateInstanceConsoleConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstanceConsoleConnection instance + InstanceConsoleConnection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateInstanceConsoleConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateInstanceConsoleConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_details.go new file mode 100644 index 000000000..3d6078942 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_details.go @@ -0,0 +1,313 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceDetails The representation of UpdateInstanceDetails +type UpdateInstanceDetails struct { + + // Whether to enable AI enterprise on the instance. + IsAIEnterpriseEnabled *bool `mandatory:"false" json:"isAIEnterpriseEnabled"` + + // The OCID of the compute capacity reservation this instance is launched under. + // You can remove the instance from a reservation by specifying an empty string as input for this field. + // For more information, see Capacity Reservations (https://docs.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm#default). + CapacityReservationId *string `mandatory:"false" json:"capacityReservationId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Security attributes (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels + // for a resource that can be referenced in a Zero Trust Packet Routing (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) + // (ZPR) policy to control access to ZPR-supported resources. + // Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` + SecurityAttributes map[string]map[string]interface{} `mandatory:"false" json:"securityAttributes"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + AgentConfig *UpdateInstanceAgentConfigDetails `mandatory:"false" json:"agentConfig"` + + // Custom metadata key/value string pairs that you provide. Any set of key/value pairs + // provided here will completely replace the current set of key/value pairs in the `metadata` + // field on the instance. + // The "user_data" field and the "ssh_authorized_keys" field cannot be changed after an instance + // has launched. Any request that updates, removes, or adds either of these fields will be + // rejected. You must provide the same values for "user_data" and "ssh_authorized_keys" that + // already exist on the instance. + // The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of + // 32,000 bytes. + Metadata map[string]string `mandatory:"false" json:"metadata"` + + // Additional metadata key/value pairs that you provide. They serve the same purpose and + // functionality as fields in the `metadata` object. + // They are distinguished from `metadata` fields in that these can be nested JSON objects + // (whereas `metadata` fields are string/string maps only). + // The "user_data" field and the "ssh_authorized_keys" field cannot be changed after an instance + // has launched. Any request that updates, removes, or adds either of these fields will be + // rejected. You must provide the same values for "user_data" and "ssh_authorized_keys" that + // already exist on the instance. + // The combined size of the `metadata` and `extendedMetadata` objects can be a maximum of + // 32,000 bytes. + ExtendedMetadata map[string]interface{} `mandatory:"false" json:"extendedMetadata"` + + // The shape of the instance. The shape determines the number of CPUs and the amount of memory + // allocated to the instance. For more information about how to change shapes, and a list of + // shapes that are supported, see + // Editing an Instance (https://docs.oracle.com/iaas/Content/Compute/Tasks/resizinginstances.htm). + // For details about the CPUs, memory, and other properties of each shape, see + // Compute Shapes (https://docs.oracle.com/iaas/Content/Compute/References/computeshapes.htm). + // The new shape must be compatible with the image that was used to launch the instance. You + // can enumerate all available shapes and determine image compatibility by calling + // ListShapes. + // To determine whether capacity is available for a specific shape before you change the shape of an instance, + // use the CreateComputeCapacityReport + // operation. + // If the instance is running when you change the shape, the instance is rebooted. + // Example: `VM.Standard2.1` + Shape *string `mandatory:"false" json:"shape"` + + ShapeConfig *UpdateInstanceShapeConfigDetails `mandatory:"false" json:"shapeConfig"` + + SourceDetails UpdateInstanceSourceDetails `mandatory:"false" json:"sourceDetails"` + + // The parameter acts as a fail-safe to prevent unwanted downtime when updating a running instance. + // The default is ALLOW_DOWNTIME. + // * `ALLOW_DOWNTIME` - Compute might reboot the instance while updating the instance if a reboot is required. + // * `AVOID_DOWNTIME` - If the instance is in running state, Compute tries to update the instance without rebooting + // it. If the instance requires a reboot to be updated, an error is returned and the instance + // is not updated. If the instance is stopped, it is updated and remains in the stopped state. + UpdateOperationConstraint UpdateInstanceDetailsUpdateOperationConstraintEnum `mandatory:"false" json:"updateOperationConstraint,omitempty"` + + InstanceOptions *InstanceOptions `mandatory:"false" json:"instanceOptions"` + + // A fault domain is a grouping of hardware and infrastructure within an availability domain. + // Each availability domain contains three fault domains. Fault domains let you distribute your + // instances so that they are not on the same physical hardware within a single availability domain. + // A hardware failure or Compute hardware maintenance that affects one fault domain does not affect + // instances in other fault domains. + // To get a list of fault domains, use the + // ListFaultDomains operation in the + // Identity and Access Management Service API. + // Example: `FAULT-DOMAIN-1` + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + LaunchOptions *UpdateLaunchOptions `mandatory:"false" json:"launchOptions"` + + AvailabilityConfig *UpdateInstanceAvailabilityConfigDetails `mandatory:"false" json:"availabilityConfig"` + + // For a VM instance, resets the scheduled time that the instance will be reboot migrated for + // infrastructure maintenance, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // If the instance hasn't been rebooted after this date, Oracle reboots the instance within 24 hours of the time + // and date that maintenance is due. + // To get the maximum possible date that a maintenance reboot can be extended, + // use GetInstanceMaintenanceReboot. + // Regardless of how the instance is stopped, this flag is reset to empty as soon as the instance reaches the + // Stopped state. + // To reboot migrate a bare metal instance, use the InstanceAction operation. + // For more information, see + // Infrastructure Maintenance (https://docs.oracle.com/iaas/Content/Compute/References/infrastructure-maintenance.htm). + // Example: `2018-05-25T21:10:29.600Z` + TimeMaintenanceRebootDue *common.SDKTime `mandatory:"false" json:"timeMaintenanceRebootDue"` + + // The OCID of the dedicated virtual machine host to place the instance on. + // Supported only if this VM instance was already placed on a dedicated virtual machine host + // - that is, you can't move an instance from on-demand capacity to dedicated capacity, + // nor can you move an instance from dedicated capacity to on-demand capacity. + DedicatedVmHostId *string `mandatory:"false" json:"dedicatedVmHostId"` + + PlatformConfig UpdateInstancePlatformConfig `mandatory:"false" json:"platformConfig"` + + // The list of liscensing configurations with target update values. + LicensingConfigs []UpdateInstanceLicensingConfig `mandatory:"false" json:"licensingConfigs"` +} + +func (m UpdateInstanceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInstanceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateInstanceDetailsUpdateOperationConstraintEnum(string(m.UpdateOperationConstraint)); !ok && m.UpdateOperationConstraint != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for UpdateOperationConstraint: %s. Supported values are: %s.", m.UpdateOperationConstraint, strings.Join(GetUpdateInstanceDetailsUpdateOperationConstraintEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *UpdateInstanceDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + IsAIEnterpriseEnabled *bool `json:"isAIEnterpriseEnabled"` + CapacityReservationId *string `json:"capacityReservationId"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + AgentConfig *UpdateInstanceAgentConfigDetails `json:"agentConfig"` + Metadata map[string]string `json:"metadata"` + ExtendedMetadata map[string]interface{} `json:"extendedMetadata"` + Shape *string `json:"shape"` + ShapeConfig *UpdateInstanceShapeConfigDetails `json:"shapeConfig"` + SourceDetails updateinstancesourcedetails `json:"sourceDetails"` + UpdateOperationConstraint UpdateInstanceDetailsUpdateOperationConstraintEnum `json:"updateOperationConstraint"` + InstanceOptions *InstanceOptions `json:"instanceOptions"` + FaultDomain *string `json:"faultDomain"` + LaunchOptions *UpdateLaunchOptions `json:"launchOptions"` + AvailabilityConfig *UpdateInstanceAvailabilityConfigDetails `json:"availabilityConfig"` + TimeMaintenanceRebootDue *common.SDKTime `json:"timeMaintenanceRebootDue"` + DedicatedVmHostId *string `json:"dedicatedVmHostId"` + PlatformConfig updateinstanceplatformconfig `json:"platformConfig"` + LicensingConfigs []updateinstancelicensingconfig `json:"licensingConfigs"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.IsAIEnterpriseEnabled = model.IsAIEnterpriseEnabled + + m.CapacityReservationId = model.CapacityReservationId + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.AgentConfig = model.AgentConfig + + m.Metadata = model.Metadata + + m.ExtendedMetadata = model.ExtendedMetadata + + m.Shape = model.Shape + + m.ShapeConfig = model.ShapeConfig + + nn, e = model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.SourceDetails = nn.(UpdateInstanceSourceDetails) + } else { + m.SourceDetails = nil + } + + m.UpdateOperationConstraint = model.UpdateOperationConstraint + + m.InstanceOptions = model.InstanceOptions + + m.FaultDomain = model.FaultDomain + + m.LaunchOptions = model.LaunchOptions + + m.AvailabilityConfig = model.AvailabilityConfig + + m.TimeMaintenanceRebootDue = model.TimeMaintenanceRebootDue + + m.DedicatedVmHostId = model.DedicatedVmHostId + + nn, e = model.PlatformConfig.UnmarshalPolymorphicJSON(model.PlatformConfig.JsonData) + if e != nil { + return + } + if nn != nil { + m.PlatformConfig = nn.(UpdateInstancePlatformConfig) + } else { + m.PlatformConfig = nil + } + + m.LicensingConfigs = make([]UpdateInstanceLicensingConfig, len(model.LicensingConfigs)) + for i, n := range model.LicensingConfigs { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.LicensingConfigs[i] = nn.(UpdateInstanceLicensingConfig) + } else { + m.LicensingConfigs[i] = nil + } + } + return +} + +// UpdateInstanceDetailsUpdateOperationConstraintEnum Enum with underlying type: string +type UpdateInstanceDetailsUpdateOperationConstraintEnum string + +// Set of constants representing the allowable values for UpdateInstanceDetailsUpdateOperationConstraintEnum +const ( + UpdateInstanceDetailsUpdateOperationConstraintAllowDowntime UpdateInstanceDetailsUpdateOperationConstraintEnum = "ALLOW_DOWNTIME" + UpdateInstanceDetailsUpdateOperationConstraintAvoidDowntime UpdateInstanceDetailsUpdateOperationConstraintEnum = "AVOID_DOWNTIME" +) + +var mappingUpdateInstanceDetailsUpdateOperationConstraintEnum = map[string]UpdateInstanceDetailsUpdateOperationConstraintEnum{ + "ALLOW_DOWNTIME": UpdateInstanceDetailsUpdateOperationConstraintAllowDowntime, + "AVOID_DOWNTIME": UpdateInstanceDetailsUpdateOperationConstraintAvoidDowntime, +} + +var mappingUpdateInstanceDetailsUpdateOperationConstraintEnumLowerCase = map[string]UpdateInstanceDetailsUpdateOperationConstraintEnum{ + "allow_downtime": UpdateInstanceDetailsUpdateOperationConstraintAllowDowntime, + "avoid_downtime": UpdateInstanceDetailsUpdateOperationConstraintAvoidDowntime, +} + +// GetUpdateInstanceDetailsUpdateOperationConstraintEnumValues Enumerates the set of values for UpdateInstanceDetailsUpdateOperationConstraintEnum +func GetUpdateInstanceDetailsUpdateOperationConstraintEnumValues() []UpdateInstanceDetailsUpdateOperationConstraintEnum { + values := make([]UpdateInstanceDetailsUpdateOperationConstraintEnum, 0) + for _, v := range mappingUpdateInstanceDetailsUpdateOperationConstraintEnum { + values = append(values, v) + } + return values +} + +// GetUpdateInstanceDetailsUpdateOperationConstraintEnumStringValues Enumerates the set of values in String for UpdateInstanceDetailsUpdateOperationConstraintEnum +func GetUpdateInstanceDetailsUpdateOperationConstraintEnumStringValues() []string { + return []string{ + "ALLOW_DOWNTIME", + "AVOID_DOWNTIME", + } +} + +// GetMappingUpdateInstanceDetailsUpdateOperationConstraintEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateInstanceDetailsUpdateOperationConstraintEnum(val string) (UpdateInstanceDetailsUpdateOperationConstraintEnum, bool) { + enum, ok := mappingUpdateInstanceDetailsUpdateOperationConstraintEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_licensing_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_licensing_config.go new file mode 100644 index 000000000..b05217018 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_licensing_config.go @@ -0,0 +1,183 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceLicensingConfig The target license config to be updated on the instance. +type UpdateInstanceLicensingConfig interface { + + // License Type for the OS license. + // * `OCI_PROVIDED` - OCI provided license (e.g. metered $/OCPU-hour). + // * `BRING_YOUR_OWN_LICENSE` - Bring your own license. + // * `PARTNER_PROVIDED` - Partner provided license. + GetLicenseType() UpdateInstanceLicensingConfigLicenseTypeEnum +} + +type updateinstancelicensingconfig struct { + JsonData []byte + LicenseType UpdateInstanceLicensingConfigLicenseTypeEnum `mandatory:"false" json:"licenseType,omitempty"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *updateinstancelicensingconfig) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerupdateinstancelicensingconfig updateinstancelicensingconfig + s := struct { + Model Unmarshalerupdateinstancelicensingconfig + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.LicenseType = s.Model.LicenseType + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *updateinstancelicensingconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "WINDOWS": + mm := UpdateInstanceWindowsLicensingConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for UpdateInstanceLicensingConfig: %s.", m.Type) + return *m, nil + } +} + +// GetLicenseType returns LicenseType +func (m updateinstancelicensingconfig) GetLicenseType() UpdateInstanceLicensingConfigLicenseTypeEnum { + return m.LicenseType +} + +func (m updateinstancelicensingconfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m updateinstancelicensingconfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateInstanceLicensingConfigLicenseTypeEnum(string(m.LicenseType)); !ok && m.LicenseType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseType: %s. Supported values are: %s.", m.LicenseType, strings.Join(GetUpdateInstanceLicensingConfigLicenseTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateInstanceLicensingConfigLicenseTypeEnum Enum with underlying type: string +type UpdateInstanceLicensingConfigLicenseTypeEnum string + +// Set of constants representing the allowable values for UpdateInstanceLicensingConfigLicenseTypeEnum +const ( + UpdateInstanceLicensingConfigLicenseTypeOciProvided UpdateInstanceLicensingConfigLicenseTypeEnum = "OCI_PROVIDED" + UpdateInstanceLicensingConfigLicenseTypeBringYourOwnLicense UpdateInstanceLicensingConfigLicenseTypeEnum = "BRING_YOUR_OWN_LICENSE" + UpdateInstanceLicensingConfigLicenseTypePartnerProvided UpdateInstanceLicensingConfigLicenseTypeEnum = "PARTNER_PROVIDED" +) + +var mappingUpdateInstanceLicensingConfigLicenseTypeEnum = map[string]UpdateInstanceLicensingConfigLicenseTypeEnum{ + "OCI_PROVIDED": UpdateInstanceLicensingConfigLicenseTypeOciProvided, + "BRING_YOUR_OWN_LICENSE": UpdateInstanceLicensingConfigLicenseTypeBringYourOwnLicense, + "PARTNER_PROVIDED": UpdateInstanceLicensingConfigLicenseTypePartnerProvided, +} + +var mappingUpdateInstanceLicensingConfigLicenseTypeEnumLowerCase = map[string]UpdateInstanceLicensingConfigLicenseTypeEnum{ + "oci_provided": UpdateInstanceLicensingConfigLicenseTypeOciProvided, + "bring_your_own_license": UpdateInstanceLicensingConfigLicenseTypeBringYourOwnLicense, + "partner_provided": UpdateInstanceLicensingConfigLicenseTypePartnerProvided, +} + +// GetUpdateInstanceLicensingConfigLicenseTypeEnumValues Enumerates the set of values for UpdateInstanceLicensingConfigLicenseTypeEnum +func GetUpdateInstanceLicensingConfigLicenseTypeEnumValues() []UpdateInstanceLicensingConfigLicenseTypeEnum { + values := make([]UpdateInstanceLicensingConfigLicenseTypeEnum, 0) + for _, v := range mappingUpdateInstanceLicensingConfigLicenseTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateInstanceLicensingConfigLicenseTypeEnumStringValues Enumerates the set of values in String for UpdateInstanceLicensingConfigLicenseTypeEnum +func GetUpdateInstanceLicensingConfigLicenseTypeEnumStringValues() []string { + return []string{ + "OCI_PROVIDED", + "BRING_YOUR_OWN_LICENSE", + "PARTNER_PROVIDED", + } +} + +// GetMappingUpdateInstanceLicensingConfigLicenseTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateInstanceLicensingConfigLicenseTypeEnum(val string) (UpdateInstanceLicensingConfigLicenseTypeEnum, bool) { + enum, ok := mappingUpdateInstanceLicensingConfigLicenseTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UpdateInstanceLicensingConfigTypeEnum Enum with underlying type: string +type UpdateInstanceLicensingConfigTypeEnum string + +// Set of constants representing the allowable values for UpdateInstanceLicensingConfigTypeEnum +const ( + UpdateInstanceLicensingConfigTypeWindows UpdateInstanceLicensingConfigTypeEnum = "WINDOWS" +) + +var mappingUpdateInstanceLicensingConfigTypeEnum = map[string]UpdateInstanceLicensingConfigTypeEnum{ + "WINDOWS": UpdateInstanceLicensingConfigTypeWindows, +} + +var mappingUpdateInstanceLicensingConfigTypeEnumLowerCase = map[string]UpdateInstanceLicensingConfigTypeEnum{ + "windows": UpdateInstanceLicensingConfigTypeWindows, +} + +// GetUpdateInstanceLicensingConfigTypeEnumValues Enumerates the set of values for UpdateInstanceLicensingConfigTypeEnum +func GetUpdateInstanceLicensingConfigTypeEnumValues() []UpdateInstanceLicensingConfigTypeEnum { + values := make([]UpdateInstanceLicensingConfigTypeEnum, 0) + for _, v := range mappingUpdateInstanceLicensingConfigTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateInstanceLicensingConfigTypeEnumStringValues Enumerates the set of values in String for UpdateInstanceLicensingConfigTypeEnum +func GetUpdateInstanceLicensingConfigTypeEnumStringValues() []string { + return []string{ + "WINDOWS", + } +} + +// GetMappingUpdateInstanceLicensingConfigTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateInstanceLicensingConfigTypeEnum(val string) (UpdateInstanceLicensingConfigTypeEnum, bool) { + enum, ok := mappingUpdateInstanceLicensingConfigTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_maintenance_event_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_maintenance_event_details.go new file mode 100644 index 000000000..4907a6366 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_maintenance_event_details.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceMaintenanceEventDetails Specifies the properties for updating maintenance due date. +type UpdateInstanceMaintenanceEventDetails struct { + + // The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + // this time. + // The timeWindowEnd is automatically calculated based on the maintenanceReason and the instanceAction. + TimeWindowStart *common.SDKTime `mandatory:"false" json:"timeWindowStart"` + + // One of the alternativeResolutionActions that was provided in the InstanceMaintenanceEvent. + AlternativeResolutionAction InstanceMaintenanceAlternativeResolutionActionsEnum `mandatory:"false" json:"alternativeResolutionAction,omitempty"` + + // This field is only applicable when setting the alternativeResolutionAction. + // For Instances that have local storage, this must be set to true to verify that the local storage + // will be deleted during the migration. For instances without, this parameter has no effect. + // In cases where the local storage will be lost, this parameter must be set or the request will fail. + CanDeleteLocalStorage *bool `mandatory:"false" json:"canDeleteLocalStorage"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateInstanceMaintenanceEventDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInstanceMaintenanceEventDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInstanceMaintenanceAlternativeResolutionActionsEnum(string(m.AlternativeResolutionAction)); !ok && m.AlternativeResolutionAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AlternativeResolutionAction: %s. Supported values are: %s.", m.AlternativeResolutionAction, strings.Join(GetInstanceMaintenanceAlternativeResolutionActionsEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_maintenance_event_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_maintenance_event_request_response.go new file mode 100644 index 000000000..34639dac8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_maintenance_event_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateInstanceMaintenanceEventRequest wrapper for the UpdateInstanceMaintenanceEvent operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInstanceMaintenanceEvent.go.html to see an example of how to use UpdateInstanceMaintenanceEventRequest. +type UpdateInstanceMaintenanceEventRequest struct { + + // The OCID of the instance maintenance event. + InstanceMaintenanceEventId *string `mandatory:"true" contributesTo:"path" name:"instanceMaintenanceEventId"` + + // Update instance maintenance event due date. + UpdateInstanceMaintenanceEventDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateInstanceMaintenanceEventRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateInstanceMaintenanceEventRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateInstanceMaintenanceEventRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateInstanceMaintenanceEventRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateInstanceMaintenanceEventRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateInstanceMaintenanceEventResponse wrapper for the UpdateInstanceMaintenanceEvent operation +type UpdateInstanceMaintenanceEventResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateInstanceMaintenanceEventResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateInstanceMaintenanceEventResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_platform_config.go new file mode 100644 index 000000000..5ae0077f2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_platform_config.go @@ -0,0 +1,129 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstancePlatformConfig The platform configuration to be updated for the instance. +type UpdateInstancePlatformConfig interface { +} + +type updateinstanceplatformconfig struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *updateinstanceplatformconfig) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerupdateinstanceplatformconfig updateinstanceplatformconfig + s := struct { + Model Unmarshalerupdateinstanceplatformconfig + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *updateinstanceplatformconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "AMD_VM": + mm := AmdVmUpdateInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INTEL_VM": + mm := IntelVmUpdateInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for UpdateInstancePlatformConfig: %s.", m.Type) + return *m, nil + } +} + +func (m updateinstanceplatformconfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m updateinstanceplatformconfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateInstancePlatformConfigTypeEnum Enum with underlying type: string +type UpdateInstancePlatformConfigTypeEnum string + +// Set of constants representing the allowable values for UpdateInstancePlatformConfigTypeEnum +const ( + UpdateInstancePlatformConfigTypeAmdVm UpdateInstancePlatformConfigTypeEnum = "AMD_VM" + UpdateInstancePlatformConfigTypeIntelVm UpdateInstancePlatformConfigTypeEnum = "INTEL_VM" +) + +var mappingUpdateInstancePlatformConfigTypeEnum = map[string]UpdateInstancePlatformConfigTypeEnum{ + "AMD_VM": UpdateInstancePlatformConfigTypeAmdVm, + "INTEL_VM": UpdateInstancePlatformConfigTypeIntelVm, +} + +var mappingUpdateInstancePlatformConfigTypeEnumLowerCase = map[string]UpdateInstancePlatformConfigTypeEnum{ + "amd_vm": UpdateInstancePlatformConfigTypeAmdVm, + "intel_vm": UpdateInstancePlatformConfigTypeIntelVm, +} + +// GetUpdateInstancePlatformConfigTypeEnumValues Enumerates the set of values for UpdateInstancePlatformConfigTypeEnum +func GetUpdateInstancePlatformConfigTypeEnumValues() []UpdateInstancePlatformConfigTypeEnum { + values := make([]UpdateInstancePlatformConfigTypeEnum, 0) + for _, v := range mappingUpdateInstancePlatformConfigTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateInstancePlatformConfigTypeEnumStringValues Enumerates the set of values in String for UpdateInstancePlatformConfigTypeEnum +func GetUpdateInstancePlatformConfigTypeEnumStringValues() []string { + return []string{ + "AMD_VM", + "INTEL_VM", + } +} + +// GetMappingUpdateInstancePlatformConfigTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateInstancePlatformConfigTypeEnum(val string) (UpdateInstancePlatformConfigTypeEnum, bool) { + enum, ok := mappingUpdateInstancePlatformConfigTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_details.go new file mode 100644 index 000000000..85dda4985 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_details.go @@ -0,0 +1,83 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstancePoolDetails The data to update an instance pool. +type UpdateInstancePoolDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance configuration associated with the + // instance pool. + InstanceConfigurationId *string `mandatory:"false" json:"instanceConfigurationId"` + + // The placement configurations for the instance pool. Provide one placement configuration for + // each availability domain. + // To use the instance pool with a regional subnet, provide a placement configuration for + // each availability domain, and include the regional subnet in each placement + // configuration. + PlacementConfigurations []UpdateInstancePoolPlacementConfigurationDetails `mandatory:"false" json:"placementConfigurations"` + + // The number of instances that should be in the instance pool. + // To determine whether capacity is available for a specific shape before you resize an instance pool, + // use the CreateComputeCapacityReport + // operation. + Size *int `mandatory:"false" json:"size"` + + // A user-friendly formatter for the instance pool's instances. Instance displaynames follow the format. + // The formatter does not retroactively change instance's displaynames, only instance displaynames in the future follow the format + InstanceDisplayNameFormatter *string `mandatory:"false" json:"instanceDisplayNameFormatter"` + + // A user-friendly formatter for the instance pool's instances. Instance hostnames follow the format. + // The formatter does not retroactively change instance's hostnames, only instance hostnames in the future follow the format + InstanceHostnameFormatter *string `mandatory:"false" json:"instanceHostnameFormatter"` + + LifecycleManagement *InstancePoolLifecycleManagementDetails `mandatory:"false" json:"lifecycleManagement"` +} + +func (m UpdateInstancePoolDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInstancePoolDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_placement_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_placement_configuration_details.go new file mode 100644 index 000000000..49aa821d0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_placement_configuration_details.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstancePoolPlacementConfigurationDetails The location for where an instance pool will place instances. +type UpdateInstancePoolPlacementConfigurationDetails struct { + + // The availability domain to place instances. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The fault domains to place instances. + // If you don't provide any values, the system makes a best effort to distribute + // instances across all fault domains based on capacity. + // To distribute the instances evenly across selected fault domains, provide a + // set of fault domains. For example, you might want instances to be evenly + // distributed if your applications require high availability. + // To get a list of fault domains, use the + // ListFaultDomains operation + // in the Identity and Access Management Service API. + // Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` + FaultDomains []string `mandatory:"false" json:"faultDomains"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. This field is deprecated. + // Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. + PrimarySubnetId *string `mandatory:"false" json:"primarySubnetId"` + + PrimaryVnicSubnets *InstancePoolPlacementPrimarySubnet `mandatory:"false" json:"primaryVnicSubnets"` + + // The set of secondary VNIC data for instances in the pool. + SecondaryVnicSubnets []InstancePoolPlacementSecondaryVnicSubnet `mandatory:"false" json:"secondaryVnicSubnets"` +} + +func (m UpdateInstancePoolPlacementConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInstancePoolPlacementConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_request_response.go new file mode 100644 index 000000000..c9a74237b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_pool_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateInstancePoolRequest wrapper for the UpdateInstancePool operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInstancePool.go.html to see an example of how to use UpdateInstancePoolRequest. +type UpdateInstancePoolRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. + InstancePoolId *string `mandatory:"true" contributesTo:"path" name:"instancePoolId"` + + // Update instance pool configuration + UpdateInstancePoolDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateInstancePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateInstancePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateInstancePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateInstancePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateInstancePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateInstancePoolResponse wrapper for the UpdateInstancePool operation +type UpdateInstancePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InstancePool instance + InstancePool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateInstancePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateInstancePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_request_response.go new file mode 100644 index 000000000..5c2277ae8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_request_response.go @@ -0,0 +1,114 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateInstanceRequest wrapper for the UpdateInstance operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInstance.go.html to see an example of how to use UpdateInstanceRequest. +type UpdateInstanceRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance. + InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` + + // Update instance fields + UpdateInstanceDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateInstanceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateInstanceRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateInstanceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateInstanceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateInstanceResponse wrapper for the UpdateInstance operation +type UpdateInstanceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Instance instance + Instance `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateInstanceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_shape_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_shape_config_details.go new file mode 100644 index 000000000..9e2738727 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_shape_config_details.go @@ -0,0 +1,172 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceShapeConfigDetails The shape configuration requested for the instance. If provided, the instance will be updated +// with the resources specified. In the case where some properties are missing, +// the missing values will be set to the default for the provided `shape`. +// Each shape only supports certain configurable values. If the `shape` is provided +// and the configuration values are invalid for that new `shape`, an error will be returned. +// If no `shape` is provided and the configuration values are invalid for the instance's +// existing shape, an error will be returned. +type UpdateInstanceShapeConfigDetails struct { + + // The total number of OCPUs available to the instance. + Ocpus *float32 `mandatory:"false" json:"ocpus"` + + // The total number of VCPUs available to the instance. This can be used instead of OCPUs, + // in which case the actual number of OCPUs will be calculated based on this value + // and the actual hardware. This must be a multiple of 2. + Vcpus *int `mandatory:"false" json:"vcpus"` + + // The total amount of memory available to the instance, in gigabytes. + MemoryInGBs *float32 `mandatory:"false" json:"memoryInGBs"` + + // The baseline OCPU utilization for a subcore burstable VM instance. Leave this attribute blank for a + // non-burstable instance, or explicitly specify non-burstable with `BASELINE_1_1`. + // The following values are supported: + // - `BASELINE_1_8` - baseline usage is 1/8 of an OCPU. + // - `BASELINE_1_2` - baseline usage is 1/2 of an OCPU. + // - `BASELINE_1_1` - baseline usage is an entire OCPU. This represents a non-burstable instance. + BaselineOcpuUtilization UpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum `mandatory:"false" json:"baselineOcpuUtilization,omitempty"` + + // The number of NVMe drives to be used for storage. A single drive has 6.8 TB available. + Nvmes *int `mandatory:"false" json:"nvmes"` + + // This field is reserved for internal use. + ResourceManagement UpdateInstanceShapeConfigDetailsResourceManagementEnum `mandatory:"false" json:"resourceManagement,omitempty"` + + // The NVMe-backed local storage capacity, in GB, for flexible dense (DenseLV) VM shapes. If the selected shape + // is DenseLV, the value must be greater than 0. For all other shapes, the value must be null (if specified); + // any non-null value for a non-DenseLV shape results in an error. + LocalVolumeSizeInGBs *int `mandatory:"false" json:"localVolumeSizeInGBs"` +} + +func (m UpdateInstanceShapeConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInstanceShapeConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum(string(m.BaselineOcpuUtilization)); !ok && m.BaselineOcpuUtilization != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BaselineOcpuUtilization: %s. Supported values are: %s.", m.BaselineOcpuUtilization, strings.Join(GetUpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumStringValues(), ","))) + } + if _, ok := GetMappingUpdateInstanceShapeConfigDetailsResourceManagementEnum(string(m.ResourceManagement)); !ok && m.ResourceManagement != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceManagement: %s. Supported values are: %s.", m.ResourceManagement, strings.Join(GetUpdateInstanceShapeConfigDetailsResourceManagementEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum Enum with underlying type: string +type UpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum string + +// Set of constants representing the allowable values for UpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum +const ( + UpdateInstanceShapeConfigDetailsBaselineOcpuUtilization8 UpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum = "BASELINE_1_8" + UpdateInstanceShapeConfigDetailsBaselineOcpuUtilization2 UpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum = "BASELINE_1_2" + UpdateInstanceShapeConfigDetailsBaselineOcpuUtilization1 UpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum = "BASELINE_1_1" +) + +var mappingUpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum = map[string]UpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum{ + "BASELINE_1_8": UpdateInstanceShapeConfigDetailsBaselineOcpuUtilization8, + "BASELINE_1_2": UpdateInstanceShapeConfigDetailsBaselineOcpuUtilization2, + "BASELINE_1_1": UpdateInstanceShapeConfigDetailsBaselineOcpuUtilization1, +} + +var mappingUpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumLowerCase = map[string]UpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum{ + "baseline_1_8": UpdateInstanceShapeConfigDetailsBaselineOcpuUtilization8, + "baseline_1_2": UpdateInstanceShapeConfigDetailsBaselineOcpuUtilization2, + "baseline_1_1": UpdateInstanceShapeConfigDetailsBaselineOcpuUtilization1, +} + +// GetUpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumValues Enumerates the set of values for UpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum +func GetUpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumValues() []UpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum { + values := make([]UpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum, 0) + for _, v := range mappingUpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum { + values = append(values, v) + } + return values +} + +// GetUpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumStringValues Enumerates the set of values in String for UpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum +func GetUpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumStringValues() []string { + return []string{ + "BASELINE_1_8", + "BASELINE_1_2", + "BASELINE_1_1", + } +} + +// GetMappingUpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum(val string) (UpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnum, bool) { + enum, ok := mappingUpdateInstanceShapeConfigDetailsBaselineOcpuUtilizationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UpdateInstanceShapeConfigDetailsResourceManagementEnum Enum with underlying type: string +type UpdateInstanceShapeConfigDetailsResourceManagementEnum string + +// Set of constants representing the allowable values for UpdateInstanceShapeConfigDetailsResourceManagementEnum +const ( + UpdateInstanceShapeConfigDetailsResourceManagementDynamic UpdateInstanceShapeConfigDetailsResourceManagementEnum = "DYNAMIC" + UpdateInstanceShapeConfigDetailsResourceManagementStatic UpdateInstanceShapeConfigDetailsResourceManagementEnum = "STATIC" +) + +var mappingUpdateInstanceShapeConfigDetailsResourceManagementEnum = map[string]UpdateInstanceShapeConfigDetailsResourceManagementEnum{ + "DYNAMIC": UpdateInstanceShapeConfigDetailsResourceManagementDynamic, + "STATIC": UpdateInstanceShapeConfigDetailsResourceManagementStatic, +} + +var mappingUpdateInstanceShapeConfigDetailsResourceManagementEnumLowerCase = map[string]UpdateInstanceShapeConfigDetailsResourceManagementEnum{ + "dynamic": UpdateInstanceShapeConfigDetailsResourceManagementDynamic, + "static": UpdateInstanceShapeConfigDetailsResourceManagementStatic, +} + +// GetUpdateInstanceShapeConfigDetailsResourceManagementEnumValues Enumerates the set of values for UpdateInstanceShapeConfigDetailsResourceManagementEnum +func GetUpdateInstanceShapeConfigDetailsResourceManagementEnumValues() []UpdateInstanceShapeConfigDetailsResourceManagementEnum { + values := make([]UpdateInstanceShapeConfigDetailsResourceManagementEnum, 0) + for _, v := range mappingUpdateInstanceShapeConfigDetailsResourceManagementEnum { + values = append(values, v) + } + return values +} + +// GetUpdateInstanceShapeConfigDetailsResourceManagementEnumStringValues Enumerates the set of values in String for UpdateInstanceShapeConfigDetailsResourceManagementEnum +func GetUpdateInstanceShapeConfigDetailsResourceManagementEnumStringValues() []string { + return []string{ + "DYNAMIC", + "STATIC", + } +} + +// GetMappingUpdateInstanceShapeConfigDetailsResourceManagementEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateInstanceShapeConfigDetailsResourceManagementEnum(val string) (UpdateInstanceShapeConfigDetailsResourceManagementEnum, bool) { + enum, ok := mappingUpdateInstanceShapeConfigDetailsResourceManagementEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_details.go new file mode 100644 index 000000000..7f424ee11 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_details.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceSourceDetails The details for updating the instance source. +type UpdateInstanceSourceDetails interface { + + // Whether to preserve the boot volume that was previously attached to the instance after a successful replacement of that boot volume. + GetIsPreserveBootVolumeEnabled() *bool +} + +type updateinstancesourcedetails struct { + JsonData []byte + IsPreserveBootVolumeEnabled *bool `mandatory:"false" json:"isPreserveBootVolumeEnabled"` + SourceType string `json:"sourceType"` +} + +// UnmarshalJSON unmarshals json +func (m *updateinstancesourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerupdateinstancesourcedetails updateinstancesourcedetails + s := struct { + Model Unmarshalerupdateinstancesourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.IsPreserveBootVolumeEnabled = s.Model.IsPreserveBootVolumeEnabled + m.SourceType = s.Model.SourceType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *updateinstancesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.SourceType { + case "bootVolume": + mm := UpdateInstanceSourceViaBootVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "image": + mm := UpdateInstanceSourceViaImageDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for UpdateInstanceSourceDetails: %s.", m.SourceType) + return *m, nil + } +} + +// GetIsPreserveBootVolumeEnabled returns IsPreserveBootVolumeEnabled +func (m updateinstancesourcedetails) GetIsPreserveBootVolumeEnabled() *bool { + return m.IsPreserveBootVolumeEnabled +} + +func (m updateinstancesourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m updateinstancesourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_via_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_via_boot_volume_details.go new file mode 100644 index 000000000..c7649f6b9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_via_boot_volume_details.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceSourceViaBootVolumeDetails The details for updating the instance source from an existing boot volume. +type UpdateInstanceSourceViaBootVolumeDetails struct { + + // The OCID of the boot volume used to boot the instance. + BootVolumeId *string `mandatory:"true" json:"bootVolumeId"` + + // Whether to preserve the boot volume that was previously attached to the instance after a successful replacement of that boot volume. + IsPreserveBootVolumeEnabled *bool `mandatory:"false" json:"isPreserveBootVolumeEnabled"` +} + +// GetIsPreserveBootVolumeEnabled returns IsPreserveBootVolumeEnabled +func (m UpdateInstanceSourceViaBootVolumeDetails) GetIsPreserveBootVolumeEnabled() *bool { + return m.IsPreserveBootVolumeEnabled +} + +func (m UpdateInstanceSourceViaBootVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInstanceSourceViaBootVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateInstanceSourceViaBootVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateInstanceSourceViaBootVolumeDetails UpdateInstanceSourceViaBootVolumeDetails + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeUpdateInstanceSourceViaBootVolumeDetails + }{ + "bootVolume", + (MarshalTypeUpdateInstanceSourceViaBootVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_via_image_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_via_image_details.go new file mode 100644 index 000000000..42fee7bdb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_via_image_details.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceSourceViaImageDetails The details for updating the instance source from an image. +type UpdateInstanceSourceViaImageDetails struct { + + // The OCID of the image used to boot the instance. + ImageId *string `mandatory:"true" json:"imageId"` + + // Whether to preserve the boot volume that was previously attached to the instance after a successful replacement of that boot volume. + IsPreserveBootVolumeEnabled *bool `mandatory:"false" json:"isPreserveBootVolumeEnabled"` + + // The size of the boot volume in GBs. Minimum value is 50 GB and maximum value is 32,768 GB (32 TB). + BootVolumeSizeInGBs *int64 `mandatory:"false" json:"bootVolumeSizeInGBs"` + + // The OCID of the Vault service key to assign as the master encryption key for the boot volume. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +// GetIsPreserveBootVolumeEnabled returns IsPreserveBootVolumeEnabled +func (m UpdateInstanceSourceViaImageDetails) GetIsPreserveBootVolumeEnabled() *bool { + return m.IsPreserveBootVolumeEnabled +} + +func (m UpdateInstanceSourceViaImageDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInstanceSourceViaImageDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateInstanceSourceViaImageDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateInstanceSourceViaImageDetails UpdateInstanceSourceViaImageDetails + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeUpdateInstanceSourceViaImageDetails + }{ + "image", + (MarshalTypeUpdateInstanceSourceViaImageDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_windows_licensing_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_windows_licensing_config.go new file mode 100644 index 000000000..f6ad1bf6b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_windows_licensing_config.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceWindowsLicensingConfig The default windows licensing config. +type UpdateInstanceWindowsLicensingConfig struct { + + // License Type for the OS license. + // * `OCI_PROVIDED` - OCI provided license (e.g. metered $/OCPU-hour). + // * `BRING_YOUR_OWN_LICENSE` - Bring your own license. + // * `PARTNER_PROVIDED` - Partner provided license. + LicenseType UpdateInstanceLicensingConfigLicenseTypeEnum `mandatory:"false" json:"licenseType,omitempty"` +} + +// GetLicenseType returns LicenseType +func (m UpdateInstanceWindowsLicensingConfig) GetLicenseType() UpdateInstanceLicensingConfigLicenseTypeEnum { + return m.LicenseType +} + +func (m UpdateInstanceWindowsLicensingConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInstanceWindowsLicensingConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateInstanceLicensingConfigLicenseTypeEnum(string(m.LicenseType)); !ok && m.LicenseType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseType: %s. Supported values are: %s.", m.LicenseType, strings.Join(GetUpdateInstanceLicensingConfigLicenseTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateInstanceWindowsLicensingConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateInstanceWindowsLicensingConfig UpdateInstanceWindowsLicensingConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeUpdateInstanceWindowsLicensingConfig + }{ + "WINDOWS", + (MarshalTypeUpdateInstanceWindowsLicensingConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_internet_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_internet_gateway_details.go new file mode 100644 index 000000000..28d51b614 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_internet_gateway_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInternetGatewayDetails The representation of UpdateInternetGatewayDetails +type UpdateInternetGatewayDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Whether the gateway is enabled. + IsEnabled *bool `mandatory:"false" json:"isEnabled"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the Internet Gateway is using. + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m UpdateInternetGatewayDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInternetGatewayDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_internet_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_internet_gateway_request_response.go new file mode 100644 index 000000000..d7b6e611a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_internet_gateway_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateInternetGatewayRequest wrapper for the UpdateInternetGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateInternetGateway.go.html to see an example of how to use UpdateInternetGatewayRequest. +type UpdateInternetGatewayRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the internet gateway. + IgId *string `mandatory:"true" contributesTo:"path" name:"igId"` + + // Details for updating the internet gateway. + UpdateInternetGatewayDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateInternetGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateInternetGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateInternetGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateInternetGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateInternetGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateInternetGatewayResponse wrapper for the UpdateInternetGateway operation +type UpdateInternetGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The InternetGateway instance + InternetGateway `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateInternetGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateInternetGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_connection_details.go new file mode 100644 index 000000000..dc09f2918 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_connection_details.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateIpSecConnectionDetails The representation of UpdateIpSecConnectionDetails +type UpdateIpSecConnectionDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Your identifier for your CPE device. Can be either an IP address or a hostname (specifically, the + // fully qualified domain name (FQDN)). The type of identifier you provide here must correspond + // to the value for `cpeLocalIdentifierType`. + // For information about why you'd provide this value, see + // If Your CPE Is Behind a NAT Device (https://docs.oracle.com/iaas/Content/Network/Tasks/overviewIPsec.htm#nat). + // Example IP address: `10.0.3.3` + // Example hostname: `cpe.example.com` + CpeLocalIdentifier *string `mandatory:"false" json:"cpeLocalIdentifier"` + + // The type of identifier for your CPE device. The value you provide here must correspond to the value + // for `cpeLocalIdentifier`. + CpeLocalIdentifierType UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum `mandatory:"false" json:"cpeLocalIdentifierType,omitempty"` + + // Static routes to the CPE. If you provide this attribute, it replaces the entire current set of + // static routes. A static route's CIDR must not be a multicast address or class E address. + // The CIDR can be either IPv4 or IPv6. + // IPv6 addressing is supported for all commercial and government regions. + // See IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // Example: `10.0.1.0/24` + // Example: `2001:db8::/32` + StaticRoutes []string `mandatory:"false" json:"staticRoutes"` +} + +func (m UpdateIpSecConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateIpSecConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum(string(m.CpeLocalIdentifierType)); !ok && m.CpeLocalIdentifierType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CpeLocalIdentifierType: %s. Supported values are: %s.", m.CpeLocalIdentifierType, strings.Join(GetUpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum Enum with underlying type: string +type UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum string + +// Set of constants representing the allowable values for UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum +const ( + UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeIpAddress UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum = "IP_ADDRESS" + UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeHostname UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum = "HOSTNAME" +) + +var mappingUpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum = map[string]UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum{ + "IP_ADDRESS": UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeIpAddress, + "HOSTNAME": UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeHostname, +} + +var mappingUpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnumLowerCase = map[string]UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum{ + "ip_address": UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeIpAddress, + "hostname": UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeHostname, +} + +// GetUpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnumValues Enumerates the set of values for UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum +func GetUpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnumValues() []UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum { + values := make([]UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum, 0) + for _, v := range mappingUpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnumStringValues Enumerates the set of values in String for UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum +func GetUpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnumStringValues() []string { + return []string{ + "IP_ADDRESS", + "HOSTNAME", + } +} + +// GetMappingUpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum(val string) (UpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnum, bool) { + enum, ok := mappingUpdateIpSecConnectionDetailsCpeLocalIdentifierTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_connection_tunnel_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_connection_tunnel_details.go new file mode 100644 index 000000000..4b8aa05b8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_connection_tunnel_details.go @@ -0,0 +1,261 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateIpSecConnectionTunnelDetails The representation of UpdateIpSecConnectionTunnelDetails +type UpdateIpSecConnectionTunnelDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The type of routing to use for this tunnel (BGP dynamic routing, static routing, or policy-based routing). + Routing UpdateIpSecConnectionTunnelDetailsRoutingEnum `mandatory:"false" json:"routing,omitempty"` + + // Internet Key Exchange protocol version. + IkeVersion UpdateIpSecConnectionTunnelDetailsIkeVersionEnum `mandatory:"false" json:"ikeVersion,omitempty"` + + BgpSessionConfig *UpdateIpSecTunnelBgpSessionDetails `mandatory:"false" json:"bgpSessionConfig"` + + // Indicates whether the Oracle end of the IPSec connection is able to initiate starting up the IPSec tunnel. + OracleInitiation UpdateIpSecConnectionTunnelDetailsOracleInitiationEnum `mandatory:"false" json:"oracleInitiation,omitempty"` + + // By default (the `AUTO` setting), IKE sends packets with a source and destination port set to 500, + // and when it detects that the port used to forward packets has changed (most likely because a NAT device + // is between the CPE device and the Oracle VPN headend) it will try to negotiate the use of NAT-T. + // The `ENABLED` option sets the IKE protocol to use port 4500 instead of 500 and forces encapsulating traffic with the ESP protocol inside UDP packets. + // The `DISABLED` option directs IKE to completely refuse to negotiate NAT-T + // even if it senses there may be a NAT device in use. + NatTranslationEnabled UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum `mandatory:"false" json:"natTranslationEnabled,omitempty"` + + PhaseOneConfig *PhaseOneConfigDetails `mandatory:"false" json:"phaseOneConfig"` + + PhaseTwoConfig *PhaseTwoConfigDetails `mandatory:"false" json:"phaseTwoConfig"` + + DpdConfig *DpdConfig `mandatory:"false" json:"dpdConfig"` + + EncryptionDomainConfig *UpdateIpSecTunnelEncryptionDomainDetails `mandatory:"false" json:"encryptionDomainConfig"` +} + +func (m UpdateIpSecConnectionTunnelDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateIpSecConnectionTunnelDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateIpSecConnectionTunnelDetailsRoutingEnum(string(m.Routing)); !ok && m.Routing != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Routing: %s. Supported values are: %s.", m.Routing, strings.Join(GetUpdateIpSecConnectionTunnelDetailsRoutingEnumStringValues(), ","))) + } + if _, ok := GetMappingUpdateIpSecConnectionTunnelDetailsIkeVersionEnum(string(m.IkeVersion)); !ok && m.IkeVersion != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IkeVersion: %s. Supported values are: %s.", m.IkeVersion, strings.Join(GetUpdateIpSecConnectionTunnelDetailsIkeVersionEnumStringValues(), ","))) + } + if _, ok := GetMappingUpdateIpSecConnectionTunnelDetailsOracleInitiationEnum(string(m.OracleInitiation)); !ok && m.OracleInitiation != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OracleInitiation: %s. Supported values are: %s.", m.OracleInitiation, strings.Join(GetUpdateIpSecConnectionTunnelDetailsOracleInitiationEnumStringValues(), ","))) + } + if _, ok := GetMappingUpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum(string(m.NatTranslationEnabled)); !ok && m.NatTranslationEnabled != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NatTranslationEnabled: %s. Supported values are: %s.", m.NatTranslationEnabled, strings.Join(GetUpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateIpSecConnectionTunnelDetailsRoutingEnum Enum with underlying type: string +type UpdateIpSecConnectionTunnelDetailsRoutingEnum string + +// Set of constants representing the allowable values for UpdateIpSecConnectionTunnelDetailsRoutingEnum +const ( + UpdateIpSecConnectionTunnelDetailsRoutingBgp UpdateIpSecConnectionTunnelDetailsRoutingEnum = "BGP" + UpdateIpSecConnectionTunnelDetailsRoutingStatic UpdateIpSecConnectionTunnelDetailsRoutingEnum = "STATIC" + UpdateIpSecConnectionTunnelDetailsRoutingPolicy UpdateIpSecConnectionTunnelDetailsRoutingEnum = "POLICY" +) + +var mappingUpdateIpSecConnectionTunnelDetailsRoutingEnum = map[string]UpdateIpSecConnectionTunnelDetailsRoutingEnum{ + "BGP": UpdateIpSecConnectionTunnelDetailsRoutingBgp, + "STATIC": UpdateIpSecConnectionTunnelDetailsRoutingStatic, + "POLICY": UpdateIpSecConnectionTunnelDetailsRoutingPolicy, +} + +var mappingUpdateIpSecConnectionTunnelDetailsRoutingEnumLowerCase = map[string]UpdateIpSecConnectionTunnelDetailsRoutingEnum{ + "bgp": UpdateIpSecConnectionTunnelDetailsRoutingBgp, + "static": UpdateIpSecConnectionTunnelDetailsRoutingStatic, + "policy": UpdateIpSecConnectionTunnelDetailsRoutingPolicy, +} + +// GetUpdateIpSecConnectionTunnelDetailsRoutingEnumValues Enumerates the set of values for UpdateIpSecConnectionTunnelDetailsRoutingEnum +func GetUpdateIpSecConnectionTunnelDetailsRoutingEnumValues() []UpdateIpSecConnectionTunnelDetailsRoutingEnum { + values := make([]UpdateIpSecConnectionTunnelDetailsRoutingEnum, 0) + for _, v := range mappingUpdateIpSecConnectionTunnelDetailsRoutingEnum { + values = append(values, v) + } + return values +} + +// GetUpdateIpSecConnectionTunnelDetailsRoutingEnumStringValues Enumerates the set of values in String for UpdateIpSecConnectionTunnelDetailsRoutingEnum +func GetUpdateIpSecConnectionTunnelDetailsRoutingEnumStringValues() []string { + return []string{ + "BGP", + "STATIC", + "POLICY", + } +} + +// GetMappingUpdateIpSecConnectionTunnelDetailsRoutingEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateIpSecConnectionTunnelDetailsRoutingEnum(val string) (UpdateIpSecConnectionTunnelDetailsRoutingEnum, bool) { + enum, ok := mappingUpdateIpSecConnectionTunnelDetailsRoutingEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UpdateIpSecConnectionTunnelDetailsIkeVersionEnum Enum with underlying type: string +type UpdateIpSecConnectionTunnelDetailsIkeVersionEnum string + +// Set of constants representing the allowable values for UpdateIpSecConnectionTunnelDetailsIkeVersionEnum +const ( + UpdateIpSecConnectionTunnelDetailsIkeVersionV1 UpdateIpSecConnectionTunnelDetailsIkeVersionEnum = "V1" + UpdateIpSecConnectionTunnelDetailsIkeVersionV2 UpdateIpSecConnectionTunnelDetailsIkeVersionEnum = "V2" +) + +var mappingUpdateIpSecConnectionTunnelDetailsIkeVersionEnum = map[string]UpdateIpSecConnectionTunnelDetailsIkeVersionEnum{ + "V1": UpdateIpSecConnectionTunnelDetailsIkeVersionV1, + "V2": UpdateIpSecConnectionTunnelDetailsIkeVersionV2, +} + +var mappingUpdateIpSecConnectionTunnelDetailsIkeVersionEnumLowerCase = map[string]UpdateIpSecConnectionTunnelDetailsIkeVersionEnum{ + "v1": UpdateIpSecConnectionTunnelDetailsIkeVersionV1, + "v2": UpdateIpSecConnectionTunnelDetailsIkeVersionV2, +} + +// GetUpdateIpSecConnectionTunnelDetailsIkeVersionEnumValues Enumerates the set of values for UpdateIpSecConnectionTunnelDetailsIkeVersionEnum +func GetUpdateIpSecConnectionTunnelDetailsIkeVersionEnumValues() []UpdateIpSecConnectionTunnelDetailsIkeVersionEnum { + values := make([]UpdateIpSecConnectionTunnelDetailsIkeVersionEnum, 0) + for _, v := range mappingUpdateIpSecConnectionTunnelDetailsIkeVersionEnum { + values = append(values, v) + } + return values +} + +// GetUpdateIpSecConnectionTunnelDetailsIkeVersionEnumStringValues Enumerates the set of values in String for UpdateIpSecConnectionTunnelDetailsIkeVersionEnum +func GetUpdateIpSecConnectionTunnelDetailsIkeVersionEnumStringValues() []string { + return []string{ + "V1", + "V2", + } +} + +// GetMappingUpdateIpSecConnectionTunnelDetailsIkeVersionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateIpSecConnectionTunnelDetailsIkeVersionEnum(val string) (UpdateIpSecConnectionTunnelDetailsIkeVersionEnum, bool) { + enum, ok := mappingUpdateIpSecConnectionTunnelDetailsIkeVersionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UpdateIpSecConnectionTunnelDetailsOracleInitiationEnum Enum with underlying type: string +type UpdateIpSecConnectionTunnelDetailsOracleInitiationEnum string + +// Set of constants representing the allowable values for UpdateIpSecConnectionTunnelDetailsOracleInitiationEnum +const ( + UpdateIpSecConnectionTunnelDetailsOracleInitiationInitiatorOrResponder UpdateIpSecConnectionTunnelDetailsOracleInitiationEnum = "INITIATOR_OR_RESPONDER" + UpdateIpSecConnectionTunnelDetailsOracleInitiationResponderOnly UpdateIpSecConnectionTunnelDetailsOracleInitiationEnum = "RESPONDER_ONLY" +) + +var mappingUpdateIpSecConnectionTunnelDetailsOracleInitiationEnum = map[string]UpdateIpSecConnectionTunnelDetailsOracleInitiationEnum{ + "INITIATOR_OR_RESPONDER": UpdateIpSecConnectionTunnelDetailsOracleInitiationInitiatorOrResponder, + "RESPONDER_ONLY": UpdateIpSecConnectionTunnelDetailsOracleInitiationResponderOnly, +} + +var mappingUpdateIpSecConnectionTunnelDetailsOracleInitiationEnumLowerCase = map[string]UpdateIpSecConnectionTunnelDetailsOracleInitiationEnum{ + "initiator_or_responder": UpdateIpSecConnectionTunnelDetailsOracleInitiationInitiatorOrResponder, + "responder_only": UpdateIpSecConnectionTunnelDetailsOracleInitiationResponderOnly, +} + +// GetUpdateIpSecConnectionTunnelDetailsOracleInitiationEnumValues Enumerates the set of values for UpdateIpSecConnectionTunnelDetailsOracleInitiationEnum +func GetUpdateIpSecConnectionTunnelDetailsOracleInitiationEnumValues() []UpdateIpSecConnectionTunnelDetailsOracleInitiationEnum { + values := make([]UpdateIpSecConnectionTunnelDetailsOracleInitiationEnum, 0) + for _, v := range mappingUpdateIpSecConnectionTunnelDetailsOracleInitiationEnum { + values = append(values, v) + } + return values +} + +// GetUpdateIpSecConnectionTunnelDetailsOracleInitiationEnumStringValues Enumerates the set of values in String for UpdateIpSecConnectionTunnelDetailsOracleInitiationEnum +func GetUpdateIpSecConnectionTunnelDetailsOracleInitiationEnumStringValues() []string { + return []string{ + "INITIATOR_OR_RESPONDER", + "RESPONDER_ONLY", + } +} + +// GetMappingUpdateIpSecConnectionTunnelDetailsOracleInitiationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateIpSecConnectionTunnelDetailsOracleInitiationEnum(val string) (UpdateIpSecConnectionTunnelDetailsOracleInitiationEnum, bool) { + enum, ok := mappingUpdateIpSecConnectionTunnelDetailsOracleInitiationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum Enum with underlying type: string +type UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum string + +// Set of constants representing the allowable values for UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum +const ( + UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnabled UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum = "ENABLED" + UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledDisabled UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum = "DISABLED" + UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledAuto UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum = "AUTO" +) + +var mappingUpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum = map[string]UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum{ + "ENABLED": UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnabled, + "DISABLED": UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledDisabled, + "AUTO": UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledAuto, +} + +var mappingUpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnumLowerCase = map[string]UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum{ + "enabled": UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnabled, + "disabled": UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledDisabled, + "auto": UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledAuto, +} + +// GetUpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnumValues Enumerates the set of values for UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum +func GetUpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnumValues() []UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum { + values := make([]UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum, 0) + for _, v := range mappingUpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum { + values = append(values, v) + } + return values +} + +// GetUpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnumStringValues Enumerates the set of values in String for UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum +func GetUpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + "AUTO", + } +} + +// GetMappingUpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum(val string) (UpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnum, bool) { + enum, ok := mappingUpdateIpSecConnectionTunnelDetailsNatTranslationEnabledEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_connection_tunnel_shared_secret_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_connection_tunnel_shared_secret_details.go new file mode 100644 index 000000000..10aae9141 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_connection_tunnel_shared_secret_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateIpSecConnectionTunnelSharedSecretDetails The representation of UpdateIpSecConnectionTunnelSharedSecretDetails +type UpdateIpSecConnectionTunnelSharedSecretDetails struct { + + // The shared secret (pre-shared key) to use for the tunnel. Only numbers, letters, and spaces + // are allowed. + SharedSecret *string `mandatory:"false" json:"sharedSecret"` +} + +func (m UpdateIpSecConnectionTunnelSharedSecretDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateIpSecConnectionTunnelSharedSecretDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_tunnel_bgp_session_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_tunnel_bgp_session_details.go new file mode 100644 index 000000000..a66c30f5d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_tunnel_bgp_session_details.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateIpSecTunnelBgpSessionDetails The representation of UpdateIpSecTunnelBgpSessionDetails +type UpdateIpSecTunnelBgpSessionDetails struct { + + // The IP address for the Oracle end of the inside tunnel interface. + // If the tunnel's `routing` attribute is set to `BGP` + // (see UpdateIPSecConnectionTunnelDetails), this IP address + // is used for the tunnel's BGP session. + // If `routing` is instead set to `STATIC`, you can set this IP address to troubleshoot or + // monitor the tunnel. + // The value must be a /30 or /31. + // If you are switching the tunnel from using BGP dynamic routing to static routing and want + // to remove the value for `oracleInterfaceIp`, you can set the value to an empty string. + // Example: `10.0.0.4/31` + OracleInterfaceIp *string `mandatory:"false" json:"oracleInterfaceIp"` + + // The IP address for the CPE end of the inside tunnel interface. + // If the tunnel's `routing` attribute is set to `BGP` + // (see UpdateIPSecConnectionTunnelDetails), this IP address + // is used for the tunnel's BGP session. + // If `routing` is instead set to `STATIC`, you can set this IP address to troubleshoot or + // monitor the tunnel. + // The value must be a /30 or /31. + // If you are switching the tunnel from using BGP dynamic routing to static routing and want + // to remove the value for `customerInterfaceIp`, you can set the value to an empty string. + // Example: `10.0.0.5/31` + CustomerInterfaceIp *string `mandatory:"false" json:"customerInterfaceIp"` + + // The IPv6 address for the Oracle end of the inside tunnel interface. This IP address is optional. + // If the tunnel's `routing` attribute is set to `BGP` + // (see IPSecConnectionTunnel), this IP address + // is used for the tunnel's BGP session. + // If `routing` is instead set to `STATIC`, you can set this IP + // address to troubleshoot or monitor the tunnel. + // Only subnet masks from /64 up to /127 are allowed. + // Example: `2001:db8::1/64` + OracleInterfaceIpv6 *string `mandatory:"false" json:"oracleInterfaceIpv6"` + + // The IPv6 address for the CPE end of the inside tunnel interface. This IP address is optional. + // If the tunnel's `routing` attribute is set to `BGP` + // (see IPSecConnectionTunnel), this IP address + // is used for the tunnel's BGP session. + // If `routing` is instead set to `STATIC`, you can set this IP + // address to troubleshoot or monitor the tunnel. + // Only subnet masks from /64 up to /127 are allowed. + // Example: `2001:db8::1/64` + CustomerInterfaceIpv6 *string `mandatory:"false" json:"customerInterfaceIpv6"` + + // The BGP ASN of the network on the CPE end of the BGP session. Can be a 2-byte or 4-byte ASN. + // Uses "asplain" format. + // If you are switching the tunnel from using BGP dynamic routing to static routing, the + // `customerBgpAsn` must be null. + // Example: `12345` (2-byte) or `1587232876` (4-byte) + CustomerBgpAsn *string `mandatory:"false" json:"customerBgpAsn"` +} + +func (m UpdateIpSecTunnelBgpSessionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateIpSecTunnelBgpSessionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_tunnel_encryption_domain_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_tunnel_encryption_domain_details.go new file mode 100644 index 000000000..3a6e55224 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ip_sec_tunnel_encryption_domain_details.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateIpSecTunnelEncryptionDomainDetails Request to update a multi-encryption domain policy on the IPSec tunnel. +// There can't be more than 50 security associations in use at one time. See Encryption domain for policy-based +// tunnels (https://docs.oracle.com/iaas/Content/Network/Tasks/ipsecencryptiondomains.htm#spi_policy_based_tunnel) for more. +type UpdateIpSecTunnelEncryptionDomainDetails struct { + + // Lists IPv4 or IPv6-enabled subnets in your Oracle tenancy. + OracleTrafficSelector []string `mandatory:"false" json:"oracleTrafficSelector"` + + // Lists IPv4 or IPv6-enabled subnets in your on-premises network. + CpeTrafficSelector []string `mandatory:"false" json:"cpeTrafficSelector"` +} + +func (m UpdateIpSecTunnelEncryptionDomainDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateIpSecTunnelEncryptionDomainDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ipv6_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ipv6_details.go new file mode 100644 index 000000000..e23980d4d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ipv6_details.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateIpv6Details The representation of UpdateIpv6Details +type UpdateIpv6Details struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC to reassign the IPv6 to. + // The VNIC must be in the same subnet as the current VNIC. + VnicId *string `mandatory:"false" json:"vnicId"` + + // The hostname associated with the IPv6 address. Only the hostname label, not the FQDN. + Hostname *string `mandatory:"false" json:"hostname"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see + // Per-resource Routing (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing). + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // Lifetime of the IP address. + // There are two types of IPs: + // - Ephemeral + // - Reserved + Lifetime UpdateIpv6DetailsLifetimeEnum `mandatory:"false" json:"lifetime,omitempty"` +} + +func (m UpdateIpv6Details) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateIpv6Details) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateIpv6DetailsLifetimeEnum(string(m.Lifetime)); !ok && m.Lifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Lifetime: %s. Supported values are: %s.", m.Lifetime, strings.Join(GetUpdateIpv6DetailsLifetimeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateIpv6DetailsLifetimeEnum Enum with underlying type: string +type UpdateIpv6DetailsLifetimeEnum string + +// Set of constants representing the allowable values for UpdateIpv6DetailsLifetimeEnum +const ( + UpdateIpv6DetailsLifetimeEphemeral UpdateIpv6DetailsLifetimeEnum = "EPHEMERAL" + UpdateIpv6DetailsLifetimeReserved UpdateIpv6DetailsLifetimeEnum = "RESERVED" +) + +var mappingUpdateIpv6DetailsLifetimeEnum = map[string]UpdateIpv6DetailsLifetimeEnum{ + "EPHEMERAL": UpdateIpv6DetailsLifetimeEphemeral, + "RESERVED": UpdateIpv6DetailsLifetimeReserved, +} + +var mappingUpdateIpv6DetailsLifetimeEnumLowerCase = map[string]UpdateIpv6DetailsLifetimeEnum{ + "ephemeral": UpdateIpv6DetailsLifetimeEphemeral, + "reserved": UpdateIpv6DetailsLifetimeReserved, +} + +// GetUpdateIpv6DetailsLifetimeEnumValues Enumerates the set of values for UpdateIpv6DetailsLifetimeEnum +func GetUpdateIpv6DetailsLifetimeEnumValues() []UpdateIpv6DetailsLifetimeEnum { + values := make([]UpdateIpv6DetailsLifetimeEnum, 0) + for _, v := range mappingUpdateIpv6DetailsLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateIpv6DetailsLifetimeEnumStringValues Enumerates the set of values in String for UpdateIpv6DetailsLifetimeEnum +func GetUpdateIpv6DetailsLifetimeEnumStringValues() []string { + return []string{ + "EPHEMERAL", + "RESERVED", + } +} + +// GetMappingUpdateIpv6DetailsLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateIpv6DetailsLifetimeEnum(val string) (UpdateIpv6DetailsLifetimeEnum, bool) { + enum, ok := mappingUpdateIpv6DetailsLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ipv6_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ipv6_request_response.go new file mode 100644 index 000000000..d14ecd78f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_ipv6_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateIpv6Request wrapper for the UpdateIpv6 operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateIpv6.go.html to see an example of how to use UpdateIpv6Request. +type UpdateIpv6Request struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPv6. + Ipv6Id *string `mandatory:"true" contributesTo:"path" name:"ipv6Id"` + + // IPv6 details to be updated. + UpdateIpv6Details `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateIpv6Request) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateIpv6Request) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateIpv6Request) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateIpv6Request) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateIpv6Request) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateIpv6Response wrapper for the UpdateIpv6 operation +type UpdateIpv6Response struct { + + // The underlying http response + RawResponse *http.Response + + // The Ipv6 instance + Ipv6 `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateIpv6Response) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateIpv6Response) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_launch_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_launch_options.go new file mode 100644 index 000000000..d46941e04 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_launch_options.go @@ -0,0 +1,173 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateLaunchOptions Options for tuning the compatibility and performance of VM shapes. +type UpdateLaunchOptions struct { + + // Emulation type for the boot volume. + // * `ISCSI` - ISCSI attached block storage device. + // * `PARAVIRTUALIZED` - Paravirtualized disk. This is the default for boot volumes and remote block + // storage volumes on platform images. + // Before you change the boot volume attachment type, detach all block volumes and VNICs except for + // the boot volume and the primary VNIC. + // If the instance is running when you change the boot volume attachment type, it will be rebooted. + // **Note:** Some instances might not function properly if you change the boot volume attachment type. After + // the instance reboots and is running, connect to it. If the connection fails or the OS doesn't behave + // as expected, the changes are not supported. Revert the instance to the original boot volume attachment type. + BootVolumeType UpdateLaunchOptionsBootVolumeTypeEnum `mandatory:"false" json:"bootVolumeType,omitempty"` + + // Emulation type for the physical network interface card (NIC). + // * `VFIO` - Direct attached Virtual Function network controller. This is the networking type + // when you launch an instance using hardware-assisted (SR-IOV) networking. + // * `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using VirtIO drivers. + // * `ACCELERATEDPV` - VM instances launch with accelerated paravirtualized networking type. + // Before you change the networking type, detach all VNICs and block volumes except for the primary + // VNIC and the boot volume. + // The image must have paravirtualized drivers installed. For more information, see + // Editing an Instance (https://docs.oracle.com/iaas/Content/Compute/Tasks/resizinginstances.htm). + // If the instance is running when you change the network type, it will be rebooted. + // **Note:** Some instances might not function properly if you change the networking type. After + // the instance reboots and is running, connect to it. If the connection fails or the OS doesn't behave + // as expected, the changes are not supported. Revert the instance to the original networking type. + NetworkType UpdateLaunchOptionsNetworkTypeEnum `mandatory:"false" json:"networkType,omitempty"` + + // Whether to enable in-transit encryption for the volume's paravirtualized attachment. + // To enable in-transit encryption for block volumes and boot volumes, this field must be set to `true`. + // Data in transit is transferred over an internal and highly secure network. If you have specific + // compliance requirements related to the encryption of the data while it is moving between the + // instance and the boot volume or the block volume, you can enable in-transit encryption. + // In-transit encryption is not enabled by default. + // All boot volumes and block volumes are encrypted at rest. + // For more information, see Block Volume Encryption (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm#Encrypti). + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` +} + +func (m UpdateLaunchOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateLaunchOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateLaunchOptionsBootVolumeTypeEnum(string(m.BootVolumeType)); !ok && m.BootVolumeType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BootVolumeType: %s. Supported values are: %s.", m.BootVolumeType, strings.Join(GetUpdateLaunchOptionsBootVolumeTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingUpdateLaunchOptionsNetworkTypeEnum(string(m.NetworkType)); !ok && m.NetworkType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NetworkType: %s. Supported values are: %s.", m.NetworkType, strings.Join(GetUpdateLaunchOptionsNetworkTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateLaunchOptionsBootVolumeTypeEnum Enum with underlying type: string +type UpdateLaunchOptionsBootVolumeTypeEnum string + +// Set of constants representing the allowable values for UpdateLaunchOptionsBootVolumeTypeEnum +const ( + UpdateLaunchOptionsBootVolumeTypeIscsi UpdateLaunchOptionsBootVolumeTypeEnum = "ISCSI" + UpdateLaunchOptionsBootVolumeTypeParavirtualized UpdateLaunchOptionsBootVolumeTypeEnum = "PARAVIRTUALIZED" +) + +var mappingUpdateLaunchOptionsBootVolumeTypeEnum = map[string]UpdateLaunchOptionsBootVolumeTypeEnum{ + "ISCSI": UpdateLaunchOptionsBootVolumeTypeIscsi, + "PARAVIRTUALIZED": UpdateLaunchOptionsBootVolumeTypeParavirtualized, +} + +var mappingUpdateLaunchOptionsBootVolumeTypeEnumLowerCase = map[string]UpdateLaunchOptionsBootVolumeTypeEnum{ + "iscsi": UpdateLaunchOptionsBootVolumeTypeIscsi, + "paravirtualized": UpdateLaunchOptionsBootVolumeTypeParavirtualized, +} + +// GetUpdateLaunchOptionsBootVolumeTypeEnumValues Enumerates the set of values for UpdateLaunchOptionsBootVolumeTypeEnum +func GetUpdateLaunchOptionsBootVolumeTypeEnumValues() []UpdateLaunchOptionsBootVolumeTypeEnum { + values := make([]UpdateLaunchOptionsBootVolumeTypeEnum, 0) + for _, v := range mappingUpdateLaunchOptionsBootVolumeTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateLaunchOptionsBootVolumeTypeEnumStringValues Enumerates the set of values in String for UpdateLaunchOptionsBootVolumeTypeEnum +func GetUpdateLaunchOptionsBootVolumeTypeEnumStringValues() []string { + return []string{ + "ISCSI", + "PARAVIRTUALIZED", + } +} + +// GetMappingUpdateLaunchOptionsBootVolumeTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateLaunchOptionsBootVolumeTypeEnum(val string) (UpdateLaunchOptionsBootVolumeTypeEnum, bool) { + enum, ok := mappingUpdateLaunchOptionsBootVolumeTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UpdateLaunchOptionsNetworkTypeEnum Enum with underlying type: string +type UpdateLaunchOptionsNetworkTypeEnum string + +// Set of constants representing the allowable values for UpdateLaunchOptionsNetworkTypeEnum +const ( + UpdateLaunchOptionsNetworkTypeVfio UpdateLaunchOptionsNetworkTypeEnum = "VFIO" + UpdateLaunchOptionsNetworkTypeParavirtualized UpdateLaunchOptionsNetworkTypeEnum = "PARAVIRTUALIZED" + UpdateLaunchOptionsNetworkTypeAcceleratedpv UpdateLaunchOptionsNetworkTypeEnum = "ACCELERATEDPV" +) + +var mappingUpdateLaunchOptionsNetworkTypeEnum = map[string]UpdateLaunchOptionsNetworkTypeEnum{ + "VFIO": UpdateLaunchOptionsNetworkTypeVfio, + "PARAVIRTUALIZED": UpdateLaunchOptionsNetworkTypeParavirtualized, + "ACCELERATEDPV": UpdateLaunchOptionsNetworkTypeAcceleratedpv, +} + +var mappingUpdateLaunchOptionsNetworkTypeEnumLowerCase = map[string]UpdateLaunchOptionsNetworkTypeEnum{ + "vfio": UpdateLaunchOptionsNetworkTypeVfio, + "paravirtualized": UpdateLaunchOptionsNetworkTypeParavirtualized, + "acceleratedpv": UpdateLaunchOptionsNetworkTypeAcceleratedpv, +} + +// GetUpdateLaunchOptionsNetworkTypeEnumValues Enumerates the set of values for UpdateLaunchOptionsNetworkTypeEnum +func GetUpdateLaunchOptionsNetworkTypeEnumValues() []UpdateLaunchOptionsNetworkTypeEnum { + values := make([]UpdateLaunchOptionsNetworkTypeEnum, 0) + for _, v := range mappingUpdateLaunchOptionsNetworkTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateLaunchOptionsNetworkTypeEnumStringValues Enumerates the set of values in String for UpdateLaunchOptionsNetworkTypeEnum +func GetUpdateLaunchOptionsNetworkTypeEnumStringValues() []string { + return []string{ + "VFIO", + "PARAVIRTUALIZED", + "ACCELERATEDPV", + } +} + +// GetMappingUpdateLaunchOptionsNetworkTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateLaunchOptionsNetworkTypeEnum(val string) (UpdateLaunchOptionsNetworkTypeEnum, bool) { + enum, ok := mappingUpdateLaunchOptionsNetworkTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_local_peering_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_local_peering_gateway_details.go new file mode 100644 index 000000000..d227b577b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_local_peering_gateway_details.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateLocalPeeringGatewayDetails The representation of UpdateLocalPeeringGatewayDetails +type UpdateLocalPeeringGatewayDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Security attributes (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels + // for a resource that can be referenced in a Zero Trust Packet Routing (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) + // (ZPR) policy to control access to ZPR-supported resources. + // Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` + SecurityAttributes map[string]map[string]interface{} `mandatory:"false" json:"securityAttributes"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the LPG will use. + // For information about why you would associate a route table with an LPG, see + // Transit Routing: Access to Multiple VCNs in Same Region (https://docs.oracle.com/iaas/Content/Network/Tasks/transitrouting.htm). + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m UpdateLocalPeeringGatewayDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateLocalPeeringGatewayDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_local_peering_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_local_peering_gateway_request_response.go new file mode 100644 index 000000000..3428be082 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_local_peering_gateway_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateLocalPeeringGatewayRequest wrapper for the UpdateLocalPeeringGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateLocalPeeringGateway.go.html to see an example of how to use UpdateLocalPeeringGatewayRequest. +type UpdateLocalPeeringGatewayRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the local peering gateway. + LocalPeeringGatewayId *string `mandatory:"true" contributesTo:"path" name:"localPeeringGatewayId"` + + // Details object for updating a local peering gateway. + UpdateLocalPeeringGatewayDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateLocalPeeringGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateLocalPeeringGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateLocalPeeringGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateLocalPeeringGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateLocalPeeringGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateLocalPeeringGatewayResponse wrapper for the UpdateLocalPeeringGateway operation +type UpdateLocalPeeringGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The LocalPeeringGateway instance + LocalPeeringGateway `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateLocalPeeringGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateLocalPeeringGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_macsec_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_macsec_key.go new file mode 100644 index 000000000..fb47614a5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_macsec_key.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateMacsecKey An object defining the OCID of the Secret held in Vault that represent the MACsec key. +type UpdateMacsecKey struct { + + // Secret OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) containing the Connectivity Association Key Name (CKN) of this MACsec key. + ConnectivityAssociationNameSecretId *string `mandatory:"true" json:"connectivityAssociationNameSecretId"` + + // The secret version of the connectivity association name secret in Vault. + ConnectivityAssociationNameSecretVersion *int64 `mandatory:"true" json:"connectivityAssociationNameSecretVersion"` + + // Secret OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) containing the Connectivity Association Key (CAK) of this MACsec key. + ConnectivityAssociationKeySecretId *string `mandatory:"true" json:"connectivityAssociationKeySecretId"` + + // The secret version of the connectivityAssociationKey secret in Vault. + ConnectivityAssociationKeySecretVersion *int64 `mandatory:"true" json:"connectivityAssociationKeySecretVersion"` +} + +func (m UpdateMacsecKey) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateMacsecKey) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_macsec_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_macsec_properties.go new file mode 100644 index 000000000..134a054c9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_macsec_properties.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateMacsecProperties Properties used to update MACsec settings. +type UpdateMacsecProperties struct { + + // Indicates whether or not MACsec is enabled. + State MacsecStateEnum `mandatory:"true" json:"state"` + + PrimaryKey *UpdateMacsecKey `mandatory:"false" json:"primaryKey"` + + // Type of encryption cipher suite to use for the MACsec connection. + EncryptionCipher MacsecEncryptionCipherEnum `mandatory:"false" json:"encryptionCipher,omitempty"` + + // Indicates whether unencrypted traffic is allowed if MACsec Key Agreement protocol (MKA) fails. + IsUnprotectedTrafficAllowed *bool `mandatory:"false" json:"isUnprotectedTrafficAllowed"` +} + +func (m UpdateMacsecProperties) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateMacsecProperties) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingMacsecStateEnum(string(m.State)); !ok && m.State != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for State: %s. Supported values are: %s.", m.State, strings.Join(GetMacsecStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingMacsecEncryptionCipherEnum(string(m.EncryptionCipher)); !ok && m.EncryptionCipher != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncryptionCipher: %s. Supported values are: %s.", m.EncryptionCipher, strings.Join(GetMacsecEncryptionCipherEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_nat_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_nat_gateway_details.go new file mode 100644 index 000000000..748388b03 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_nat_gateway_details.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateNatGatewayDetails The representation of UpdateNatGatewayDetails +type UpdateNatGatewayDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Whether the NAT gateway blocks traffic through it. The default is `false`. + // Example: `true` + BlockTraffic *bool `mandatory:"false" json:"blockTraffic"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table used by the NAT gateway. + // If you don't specify a route table here, the NAT gateway is created without an associated route + // table. The Networking service does NOT automatically associate the attached VCN's default route + // table with the NAT gateway. + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m UpdateNatGatewayDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateNatGatewayDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_nat_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_nat_gateway_request_response.go new file mode 100644 index 000000000..890f3673f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_nat_gateway_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateNatGatewayRequest wrapper for the UpdateNatGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateNatGateway.go.html to see an example of how to use UpdateNatGatewayRequest. +type UpdateNatGatewayRequest struct { + + // The NAT gateway's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + NatGatewayId *string `mandatory:"true" contributesTo:"path" name:"natGatewayId"` + + // Details object for updating a NAT gateway. + UpdateNatGatewayDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateNatGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateNatGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateNatGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateNatGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateNatGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateNatGatewayResponse wrapper for the UpdateNatGateway operation +type UpdateNatGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NatGateway instance + NatGateway `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateNatGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateNatGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_network_security_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_network_security_group_details.go new file mode 100644 index 000000000..d9b1e0f1b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_network_security_group_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateNetworkSecurityGroupDetails The representation of UpdateNetworkSecurityGroupDetails +type UpdateNetworkSecurityGroupDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateNetworkSecurityGroupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateNetworkSecurityGroupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_network_security_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_network_security_group_request_response.go new file mode 100644 index 000000000..d03209034 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_network_security_group_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateNetworkSecurityGroupRequest wrapper for the UpdateNetworkSecurityGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateNetworkSecurityGroup.go.html to see an example of how to use UpdateNetworkSecurityGroupRequest. +type UpdateNetworkSecurityGroupRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security group. + NetworkSecurityGroupId *string `mandatory:"true" contributesTo:"path" name:"networkSecurityGroupId"` + + // Details object for updating a network security group. + UpdateNetworkSecurityGroupDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateNetworkSecurityGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateNetworkSecurityGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateNetworkSecurityGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateNetworkSecurityGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateNetworkSecurityGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateNetworkSecurityGroupResponse wrapper for the UpdateNetworkSecurityGroup operation +type UpdateNetworkSecurityGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NetworkSecurityGroup instance + NetworkSecurityGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateNetworkSecurityGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateNetworkSecurityGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_network_security_group_security_rules_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_network_security_group_security_rules_details.go new file mode 100644 index 000000000..10b7bcce0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_network_security_group_security_rules_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateNetworkSecurityGroupSecurityRulesDetails The representation of UpdateNetworkSecurityGroupSecurityRulesDetails +type UpdateNetworkSecurityGroupSecurityRulesDetails struct { + + // The NSG security rules to update. + SecurityRules []UpdateSecurityRuleDetails `mandatory:"false" json:"securityRules"` +} + +func (m UpdateNetworkSecurityGroupSecurityRulesDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateNetworkSecurityGroupSecurityRulesDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_network_security_group_security_rules_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_network_security_group_security_rules_request_response.go new file mode 100644 index 000000000..464db8c5c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_network_security_group_security_rules_request_response.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateNetworkSecurityGroupSecurityRulesRequest wrapper for the UpdateNetworkSecurityGroupSecurityRules operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateNetworkSecurityGroupSecurityRules.go.html to see an example of how to use UpdateNetworkSecurityGroupSecurityRulesRequest. +type UpdateNetworkSecurityGroupSecurityRulesRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security group. + NetworkSecurityGroupId *string `mandatory:"true" contributesTo:"path" name:"networkSecurityGroupId"` + + // Request with one or more security rules associated with the network security group that + // will be updated. + UpdateNetworkSecurityGroupSecurityRulesDetails `contributesTo:"body"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateNetworkSecurityGroupSecurityRulesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateNetworkSecurityGroupSecurityRulesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateNetworkSecurityGroupSecurityRulesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateNetworkSecurityGroupSecurityRulesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateNetworkSecurityGroupSecurityRulesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateNetworkSecurityGroupSecurityRulesResponse wrapper for the UpdateNetworkSecurityGroupSecurityRules operation +type UpdateNetworkSecurityGroupSecurityRulesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The UpdatedNetworkSecurityGroupSecurityRules instance + UpdatedNetworkSecurityGroupSecurityRules `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateNetworkSecurityGroupSecurityRulesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateNetworkSecurityGroupSecurityRulesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_private_ip_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_private_ip_details.go new file mode 100644 index 000000000..4a0db6732 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_private_ip_details.go @@ -0,0 +1,126 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePrivateIpDetails The representation of UpdatePrivateIpDetails +type UpdatePrivateIpDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The hostname for the private IP. Used for DNS. The value + // is the hostname portion of the private IP's fully qualified domain name (FQDN) + // (for example, `bminstance1` in FQDN `bminstance1.subnet123.vcn1.oraclevcn.com`). + // Must be unique across all VNICs in the subnet and comply with + // RFC 952 (https://tools.ietf.org/html/rfc952) and + // RFC 1123 (https://tools.ietf.org/html/rfc1123). + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + // Example: `bminstance1` + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC to reassign the private IP to. The VNIC must + // be in the same subnet as the current VNIC. + VnicId *string `mandatory:"false" json:"vnicId"` + + // Lifetime of the IP address. + // There are two types of IPs: + // - Ephemeral + // - Reserved + Lifetime UpdatePrivateIpDetailsLifetimeEnum `mandatory:"false" json:"lifetime,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see + // Per-resource Routing (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing). + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m UpdatePrivateIpDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdatePrivateIpDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdatePrivateIpDetailsLifetimeEnum(string(m.Lifetime)); !ok && m.Lifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Lifetime: %s. Supported values are: %s.", m.Lifetime, strings.Join(GetUpdatePrivateIpDetailsLifetimeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdatePrivateIpDetailsLifetimeEnum Enum with underlying type: string +type UpdatePrivateIpDetailsLifetimeEnum string + +// Set of constants representing the allowable values for UpdatePrivateIpDetailsLifetimeEnum +const ( + UpdatePrivateIpDetailsLifetimeEphemeral UpdatePrivateIpDetailsLifetimeEnum = "EPHEMERAL" + UpdatePrivateIpDetailsLifetimeReserved UpdatePrivateIpDetailsLifetimeEnum = "RESERVED" +) + +var mappingUpdatePrivateIpDetailsLifetimeEnum = map[string]UpdatePrivateIpDetailsLifetimeEnum{ + "EPHEMERAL": UpdatePrivateIpDetailsLifetimeEphemeral, + "RESERVED": UpdatePrivateIpDetailsLifetimeReserved, +} + +var mappingUpdatePrivateIpDetailsLifetimeEnumLowerCase = map[string]UpdatePrivateIpDetailsLifetimeEnum{ + "ephemeral": UpdatePrivateIpDetailsLifetimeEphemeral, + "reserved": UpdatePrivateIpDetailsLifetimeReserved, +} + +// GetUpdatePrivateIpDetailsLifetimeEnumValues Enumerates the set of values for UpdatePrivateIpDetailsLifetimeEnum +func GetUpdatePrivateIpDetailsLifetimeEnumValues() []UpdatePrivateIpDetailsLifetimeEnum { + values := make([]UpdatePrivateIpDetailsLifetimeEnum, 0) + for _, v := range mappingUpdatePrivateIpDetailsLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetUpdatePrivateIpDetailsLifetimeEnumStringValues Enumerates the set of values in String for UpdatePrivateIpDetailsLifetimeEnum +func GetUpdatePrivateIpDetailsLifetimeEnumStringValues() []string { + return []string{ + "EPHEMERAL", + "RESERVED", + } +} + +// GetMappingUpdatePrivateIpDetailsLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdatePrivateIpDetailsLifetimeEnum(val string) (UpdatePrivateIpDetailsLifetimeEnum, bool) { + enum, ok := mappingUpdatePrivateIpDetailsLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_private_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_private_ip_request_response.go new file mode 100644 index 000000000..7fba959c0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_private_ip_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdatePrivateIpRequest wrapper for the UpdatePrivateIp operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdatePrivateIp.go.html to see an example of how to use UpdatePrivateIpRequest. +type UpdatePrivateIpRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private IP or IPv6. + PrivateIpId *string `mandatory:"true" contributesTo:"path" name:"privateIpId"` + + // Private IP details. + UpdatePrivateIpDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdatePrivateIpRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePrivateIpRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdatePrivateIpRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePrivateIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdatePrivateIpRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdatePrivateIpResponse wrapper for the UpdatePrivateIp operation +type UpdatePrivateIpResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PrivateIp instance + PrivateIp `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdatePrivateIpResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePrivateIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_public_ip_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_public_ip_details.go new file mode 100644 index 000000000..a43a6695b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_public_ip_details.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePublicIpDetails The representation of UpdatePublicIpDetails +type UpdatePublicIpDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private IP to assign the public IP to. + // * If the public IP is already assigned to a different private IP, it will be unassigned + // and then reassigned to the specified private IP. + // * If you set this field to an empty string, the public IP will be unassigned from the + // private IP it is currently assigned to. + PrivateIpId *string `mandatory:"false" json:"privateIpId"` +} + +func (m UpdatePublicIpDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdatePublicIpDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_public_ip_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_public_ip_pool_details.go new file mode 100644 index 000000000..167682d22 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_public_ip_pool_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePublicIpPoolDetails The data to update for a public IP pool. +type UpdatePublicIpPoolDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdatePublicIpPoolDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdatePublicIpPoolDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_public_ip_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_public_ip_pool_request_response.go new file mode 100644 index 000000000..25b78d93c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_public_ip_pool_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdatePublicIpPoolRequest wrapper for the UpdatePublicIpPool operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdatePublicIpPool.go.html to see an example of how to use UpdatePublicIpPoolRequest. +type UpdatePublicIpPoolRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP pool. + PublicIpPoolId *string `mandatory:"true" contributesTo:"path" name:"publicIpPoolId"` + + // Public IP pool details. + UpdatePublicIpPoolDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdatePublicIpPoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePublicIpPoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdatePublicIpPoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePublicIpPoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdatePublicIpPoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdatePublicIpPoolResponse wrapper for the UpdatePublicIpPool operation +type UpdatePublicIpPoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIpPool instance + PublicIpPool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdatePublicIpPoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePublicIpPoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_public_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_public_ip_request_response.go new file mode 100644 index 000000000..720be944a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_public_ip_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdatePublicIpRequest wrapper for the UpdatePublicIp operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdatePublicIp.go.html to see an example of how to use UpdatePublicIpRequest. +type UpdatePublicIpRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the public IP. + PublicIpId *string `mandatory:"true" contributesTo:"path" name:"publicIpId"` + + // Public IP details. + UpdatePublicIpDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdatePublicIpRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePublicIpRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdatePublicIpRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePublicIpRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdatePublicIpRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdatePublicIpResponse wrapper for the UpdatePublicIp operation +type UpdatePublicIpResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PublicIp instance + PublicIp `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdatePublicIpResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePublicIpResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_remote_peering_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_remote_peering_connection_details.go new file mode 100644 index 000000000..5380a7e74 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_remote_peering_connection_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateRemotePeeringConnectionDetails The representation of UpdateRemotePeeringConnectionDetails +type UpdateRemotePeeringConnectionDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateRemotePeeringConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateRemotePeeringConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_remote_peering_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_remote_peering_connection_request_response.go new file mode 100644 index 000000000..b758a1dda --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_remote_peering_connection_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateRemotePeeringConnectionRequest wrapper for the UpdateRemotePeeringConnection operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateRemotePeeringConnection.go.html to see an example of how to use UpdateRemotePeeringConnectionRequest. +type UpdateRemotePeeringConnectionRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the remote peering connection (RPC). + RemotePeeringConnectionId *string `mandatory:"true" contributesTo:"path" name:"remotePeeringConnectionId"` + + // Request to the update the peering connection to remote region + UpdateRemotePeeringConnectionDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateRemotePeeringConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateRemotePeeringConnectionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateRemotePeeringConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateRemotePeeringConnectionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateRemotePeeringConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateRemotePeeringConnectionResponse wrapper for the UpdateRemotePeeringConnection operation +type UpdateRemotePeeringConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RemotePeeringConnection instance + RemotePeeringConnection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateRemotePeeringConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateRemotePeeringConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_route_table_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_route_table_details.go new file mode 100644 index 000000000..bb7c24b18 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_route_table_details.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateRouteTableDetails The representation of UpdateRouteTableDetails +type UpdateRouteTableDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The collection of rules used for routing destination IPs to network devices. + RouteRules []RouteRule `mandatory:"false" json:"routeRules"` +} + +func (m UpdateRouteTableDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateRouteTableDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_route_table_request_response.go new file mode 100644 index 000000000..8dd21eedd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_route_table_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateRouteTableRequest wrapper for the UpdateRouteTable operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateRouteTable.go.html to see an example of how to use UpdateRouteTableRequest. +type UpdateRouteTableRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table. + RtId *string `mandatory:"true" contributesTo:"path" name:"rtId"` + + // Details object for updating a route table. + UpdateRouteTableDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateRouteTableRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateRouteTableRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateRouteTableRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateRouteTableRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateRouteTableRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateRouteTableResponse wrapper for the UpdateRouteTable operation +type UpdateRouteTableResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RouteTable instance + RouteTable `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateRouteTableResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateRouteTableResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_security_list_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_security_list_details.go new file mode 100644 index 000000000..fa3927ff0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_security_list_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateSecurityListDetails The representation of UpdateSecurityListDetails +type UpdateSecurityListDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Rules for allowing egress IP packets. + EgressSecurityRules []EgressSecurityRule `mandatory:"false" json:"egressSecurityRules"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Rules for allowing ingress IP packets. + IngressSecurityRules []IngressSecurityRule `mandatory:"false" json:"ingressSecurityRules"` +} + +func (m UpdateSecurityListDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateSecurityListDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_security_list_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_security_list_request_response.go new file mode 100644 index 000000000..af922e02b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_security_list_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateSecurityListRequest wrapper for the UpdateSecurityList operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateSecurityList.go.html to see an example of how to use UpdateSecurityListRequest. +type UpdateSecurityListRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the security list. + SecurityListId *string `mandatory:"true" contributesTo:"path" name:"securityListId"` + + // Updated details for the security list. + UpdateSecurityListDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateSecurityListRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateSecurityListRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateSecurityListRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateSecurityListRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateSecurityListRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateSecurityListResponse wrapper for the UpdateSecurityList operation +type UpdateSecurityListResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SecurityList instance + SecurityList `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateSecurityListResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateSecurityListResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_security_rule_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_security_rule_details.go new file mode 100644 index 000000000..8f5797ca2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_security_rule_details.go @@ -0,0 +1,262 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateSecurityRuleDetails A rule for allowing inbound (`direction`= INGRESS) or outbound (`direction`= EGRESS) IP packets. +type UpdateSecurityRuleDetails struct { + + // Direction of the security rule. Set to `EGRESS` for rules to allow outbound IP packets, + // or `INGRESS` for rules to allow inbound IP packets. + Direction UpdateSecurityRuleDetailsDirectionEnum `mandatory:"true" json:"direction"` + + // The Oracle-assigned ID of the security rule that you want to update. You can't change this value. + // Example: `04ABEC` + Id *string `mandatory:"true" json:"id"` + + // The transport protocol. Specify either `all` or an IPv4 protocol number as + // defined in + // Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). + // Options are supported only for ICMP ("1"), TCP ("6"), UDP ("17"), and ICMPv6 ("58"). + Protocol *string `mandatory:"true" json:"protocol"` + + // An optional description of your choice for the rule. Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Conceptually, this is the range of IP addresses that a packet originating from the instance + // can go to. + // Allowed values: + // * An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + // IPv6 addressing is supported for all commercial and government regions. See + // IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // * The `cidrBlock` value for a Service, if you're + // setting up a security rule for traffic destined for a particular `Service` through + // a service gateway. For example: `oci-phx-objectstorage`. + // * The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a NetworkSecurityGroup in the same + // VCN. The value can be the NSG that the rule belongs to if the rule's intent is to control + // traffic between VNICs in the same NSG. + Destination *string `mandatory:"false" json:"destination"` + + // Type of destination for the rule. Required if `direction` = `EGRESS`. + // Allowed values: + // * `CIDR_BLOCK`: If the rule's `destination` is an IP address range in CIDR notation. + // * `SERVICE_CIDR_BLOCK`: If the rule's `destination` is the `cidrBlock` value for a + // Service (the rule is for traffic destined for a + // particular `Service` through a service gateway). + // * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a + // NetworkSecurityGroup. + DestinationType UpdateSecurityRuleDetailsDestinationTypeEnum `mandatory:"false" json:"destinationType,omitempty"` + + IcmpOptions *IcmpOptions `mandatory:"false" json:"icmpOptions"` + + // A stateless rule allows traffic in one direction. Remember to add a corresponding + // stateless rule in the other direction if you need to support bidirectional traffic. For + // example, if egress traffic allows TCP destination port 80, there should be an ingress + // rule to allow TCP source port 80. Defaults to false, which means the rule is stateful + // and a corresponding rule is not necessary for bidirectional traffic. + IsStateless *bool `mandatory:"false" json:"isStateless"` + + // Conceptually, this is the range of IP addresses that a packet coming into the instance + // can come from. + // Allowed values: + // * An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` + // IPv6 addressing is supported for all commercial and government regions. See + // IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // * The `cidrBlock` value for a Service, if you're + // setting up a security rule for traffic coming from a particular `Service` through + // a service gateway. For example: `oci-phx-objectstorage`. + // * The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a NetworkSecurityGroup in the same + // VCN. The value can be the NSG that the rule belongs to if the rule's intent is to control + // traffic between VNICs in the same NSG. + Source *string `mandatory:"false" json:"source"` + + // Type of source for the rule. Required if `direction` = `INGRESS`. + // * `CIDR_BLOCK`: If the rule's `source` is an IP address range in CIDR notation. + // * `SERVICE_CIDR_BLOCK`: If the rule's `source` is the `cidrBlock` value for a + // Service (the rule is for traffic coming from a + // particular `Service` through a service gateway). + // * `NETWORK_SECURITY_GROUP`: If the rule's `source` is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a + // NetworkSecurityGroup. + SourceType UpdateSecurityRuleDetailsSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` + + TcpOptions *TcpOptions `mandatory:"false" json:"tcpOptions"` + + UdpOptions *UdpOptions `mandatory:"false" json:"udpOptions"` +} + +func (m UpdateSecurityRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateSecurityRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingUpdateSecurityRuleDetailsDirectionEnum(string(m.Direction)); !ok && m.Direction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Direction: %s. Supported values are: %s.", m.Direction, strings.Join(GetUpdateSecurityRuleDetailsDirectionEnumStringValues(), ","))) + } + + if _, ok := GetMappingUpdateSecurityRuleDetailsDestinationTypeEnum(string(m.DestinationType)); !ok && m.DestinationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DestinationType: %s. Supported values are: %s.", m.DestinationType, strings.Join(GetUpdateSecurityRuleDetailsDestinationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingUpdateSecurityRuleDetailsSourceTypeEnum(string(m.SourceType)); !ok && m.SourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceType: %s. Supported values are: %s.", m.SourceType, strings.Join(GetUpdateSecurityRuleDetailsSourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateSecurityRuleDetailsDestinationTypeEnum Enum with underlying type: string +type UpdateSecurityRuleDetailsDestinationTypeEnum string + +// Set of constants representing the allowable values for UpdateSecurityRuleDetailsDestinationTypeEnum +const ( + UpdateSecurityRuleDetailsDestinationTypeCidrBlock UpdateSecurityRuleDetailsDestinationTypeEnum = "CIDR_BLOCK" + UpdateSecurityRuleDetailsDestinationTypeServiceCidrBlock UpdateSecurityRuleDetailsDestinationTypeEnum = "SERVICE_CIDR_BLOCK" + UpdateSecurityRuleDetailsDestinationTypeNetworkSecurityGroup UpdateSecurityRuleDetailsDestinationTypeEnum = "NETWORK_SECURITY_GROUP" +) + +var mappingUpdateSecurityRuleDetailsDestinationTypeEnum = map[string]UpdateSecurityRuleDetailsDestinationTypeEnum{ + "CIDR_BLOCK": UpdateSecurityRuleDetailsDestinationTypeCidrBlock, + "SERVICE_CIDR_BLOCK": UpdateSecurityRuleDetailsDestinationTypeServiceCidrBlock, + "NETWORK_SECURITY_GROUP": UpdateSecurityRuleDetailsDestinationTypeNetworkSecurityGroup, +} + +var mappingUpdateSecurityRuleDetailsDestinationTypeEnumLowerCase = map[string]UpdateSecurityRuleDetailsDestinationTypeEnum{ + "cidr_block": UpdateSecurityRuleDetailsDestinationTypeCidrBlock, + "service_cidr_block": UpdateSecurityRuleDetailsDestinationTypeServiceCidrBlock, + "network_security_group": UpdateSecurityRuleDetailsDestinationTypeNetworkSecurityGroup, +} + +// GetUpdateSecurityRuleDetailsDestinationTypeEnumValues Enumerates the set of values for UpdateSecurityRuleDetailsDestinationTypeEnum +func GetUpdateSecurityRuleDetailsDestinationTypeEnumValues() []UpdateSecurityRuleDetailsDestinationTypeEnum { + values := make([]UpdateSecurityRuleDetailsDestinationTypeEnum, 0) + for _, v := range mappingUpdateSecurityRuleDetailsDestinationTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateSecurityRuleDetailsDestinationTypeEnumStringValues Enumerates the set of values in String for UpdateSecurityRuleDetailsDestinationTypeEnum +func GetUpdateSecurityRuleDetailsDestinationTypeEnumStringValues() []string { + return []string{ + "CIDR_BLOCK", + "SERVICE_CIDR_BLOCK", + "NETWORK_SECURITY_GROUP", + } +} + +// GetMappingUpdateSecurityRuleDetailsDestinationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateSecurityRuleDetailsDestinationTypeEnum(val string) (UpdateSecurityRuleDetailsDestinationTypeEnum, bool) { + enum, ok := mappingUpdateSecurityRuleDetailsDestinationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UpdateSecurityRuleDetailsDirectionEnum Enum with underlying type: string +type UpdateSecurityRuleDetailsDirectionEnum string + +// Set of constants representing the allowable values for UpdateSecurityRuleDetailsDirectionEnum +const ( + UpdateSecurityRuleDetailsDirectionEgress UpdateSecurityRuleDetailsDirectionEnum = "EGRESS" + UpdateSecurityRuleDetailsDirectionIngress UpdateSecurityRuleDetailsDirectionEnum = "INGRESS" +) + +var mappingUpdateSecurityRuleDetailsDirectionEnum = map[string]UpdateSecurityRuleDetailsDirectionEnum{ + "EGRESS": UpdateSecurityRuleDetailsDirectionEgress, + "INGRESS": UpdateSecurityRuleDetailsDirectionIngress, +} + +var mappingUpdateSecurityRuleDetailsDirectionEnumLowerCase = map[string]UpdateSecurityRuleDetailsDirectionEnum{ + "egress": UpdateSecurityRuleDetailsDirectionEgress, + "ingress": UpdateSecurityRuleDetailsDirectionIngress, +} + +// GetUpdateSecurityRuleDetailsDirectionEnumValues Enumerates the set of values for UpdateSecurityRuleDetailsDirectionEnum +func GetUpdateSecurityRuleDetailsDirectionEnumValues() []UpdateSecurityRuleDetailsDirectionEnum { + values := make([]UpdateSecurityRuleDetailsDirectionEnum, 0) + for _, v := range mappingUpdateSecurityRuleDetailsDirectionEnum { + values = append(values, v) + } + return values +} + +// GetUpdateSecurityRuleDetailsDirectionEnumStringValues Enumerates the set of values in String for UpdateSecurityRuleDetailsDirectionEnum +func GetUpdateSecurityRuleDetailsDirectionEnumStringValues() []string { + return []string{ + "EGRESS", + "INGRESS", + } +} + +// GetMappingUpdateSecurityRuleDetailsDirectionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateSecurityRuleDetailsDirectionEnum(val string) (UpdateSecurityRuleDetailsDirectionEnum, bool) { + enum, ok := mappingUpdateSecurityRuleDetailsDirectionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UpdateSecurityRuleDetailsSourceTypeEnum Enum with underlying type: string +type UpdateSecurityRuleDetailsSourceTypeEnum string + +// Set of constants representing the allowable values for UpdateSecurityRuleDetailsSourceTypeEnum +const ( + UpdateSecurityRuleDetailsSourceTypeCidrBlock UpdateSecurityRuleDetailsSourceTypeEnum = "CIDR_BLOCK" + UpdateSecurityRuleDetailsSourceTypeServiceCidrBlock UpdateSecurityRuleDetailsSourceTypeEnum = "SERVICE_CIDR_BLOCK" + UpdateSecurityRuleDetailsSourceTypeNetworkSecurityGroup UpdateSecurityRuleDetailsSourceTypeEnum = "NETWORK_SECURITY_GROUP" +) + +var mappingUpdateSecurityRuleDetailsSourceTypeEnum = map[string]UpdateSecurityRuleDetailsSourceTypeEnum{ + "CIDR_BLOCK": UpdateSecurityRuleDetailsSourceTypeCidrBlock, + "SERVICE_CIDR_BLOCK": UpdateSecurityRuleDetailsSourceTypeServiceCidrBlock, + "NETWORK_SECURITY_GROUP": UpdateSecurityRuleDetailsSourceTypeNetworkSecurityGroup, +} + +var mappingUpdateSecurityRuleDetailsSourceTypeEnumLowerCase = map[string]UpdateSecurityRuleDetailsSourceTypeEnum{ + "cidr_block": UpdateSecurityRuleDetailsSourceTypeCidrBlock, + "service_cidr_block": UpdateSecurityRuleDetailsSourceTypeServiceCidrBlock, + "network_security_group": UpdateSecurityRuleDetailsSourceTypeNetworkSecurityGroup, +} + +// GetUpdateSecurityRuleDetailsSourceTypeEnumValues Enumerates the set of values for UpdateSecurityRuleDetailsSourceTypeEnum +func GetUpdateSecurityRuleDetailsSourceTypeEnumValues() []UpdateSecurityRuleDetailsSourceTypeEnum { + values := make([]UpdateSecurityRuleDetailsSourceTypeEnum, 0) + for _, v := range mappingUpdateSecurityRuleDetailsSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateSecurityRuleDetailsSourceTypeEnumStringValues Enumerates the set of values in String for UpdateSecurityRuleDetailsSourceTypeEnum +func GetUpdateSecurityRuleDetailsSourceTypeEnumStringValues() []string { + return []string{ + "CIDR_BLOCK", + "SERVICE_CIDR_BLOCK", + "NETWORK_SECURITY_GROUP", + } +} + +// GetMappingUpdateSecurityRuleDetailsSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateSecurityRuleDetailsSourceTypeEnum(val string) (UpdateSecurityRuleDetailsSourceTypeEnum, bool) { + enum, ok := mappingUpdateSecurityRuleDetailsSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_service_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_service_gateway_details.go new file mode 100644 index 000000000..57da10484 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_service_gateway_details.go @@ -0,0 +1,77 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateServiceGatewayDetails The representation of UpdateServiceGatewayDetails +type UpdateServiceGatewayDetails struct { + + // Whether the service gateway blocks all traffic through it. The default is `false`. When + // this is `true`, traffic is not routed to any services, regardless of route rules. + // Example: `true` + BlockTraffic *bool `mandatory:"false" json:"blockTraffic"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the service gateway will use. + // For information about why you would associate a route table with a service gateway, see + // Transit Routing: Private Access to Oracle Services (https://docs.oracle.com/iaas/Content/Network/Tasks/transitroutingoracleservices.htm). + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // List of all the `Service` objects you want enabled on this service gateway. Sending an empty list + // means you want to disable all services. Omitting this parameter entirely keeps the + // existing list of services intact. + // You can also enable or disable a particular `Service` by using + // AttachServiceId or + // DetachServiceId. + // For each enabled `Service`, make sure there's a route rule with the `Service` object's `cidrBlock` + // as the rule's destination and the service gateway as the rule's target. See + // RouteTable. + Services []ServiceIdRequestDetails `mandatory:"false" json:"services"` +} + +func (m UpdateServiceGatewayDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateServiceGatewayDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_service_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_service_gateway_request_response.go new file mode 100644 index 000000000..9df26850d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_service_gateway_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateServiceGatewayRequest wrapper for the UpdateServiceGateway operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateServiceGateway.go.html to see an example of how to use UpdateServiceGatewayRequest. +type UpdateServiceGatewayRequest struct { + + // The service gateway's OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + ServiceGatewayId *string `mandatory:"true" contributesTo:"path" name:"serviceGatewayId"` + + // Details object for updating a service gateway. + UpdateServiceGatewayDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateServiceGatewayRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateServiceGatewayRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateServiceGatewayRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateServiceGatewayRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateServiceGatewayRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateServiceGatewayResponse wrapper for the UpdateServiceGateway operation +type UpdateServiceGatewayResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ServiceGateway instance + ServiceGateway `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateServiceGatewayResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateServiceGatewayResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_subnet_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_subnet_details.go new file mode 100644 index 000000000..6c729bd65 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_subnet_details.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateSubnetDetails The representation of UpdateSubnetDetails +type UpdateSubnetDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the set of DHCP options the subnet will use. + DhcpOptionsId *string `mandatory:"false" json:"dhcpOptionsId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the subnet will use. + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // The OCIDs of the security list or lists the subnet will use. This + // replaces the entire current set of security lists. Remember that + // security lists are associated *with the subnet*, but the rules are + // applied to the individual VNICs in the subnet. + SecurityListIds []string `mandatory:"false" json:"securityListIds"` + + // The CIDR block of the subnet. The new CIDR block must meet the following criteria: + // - Must be valid. + // - The CIDR block's IP range must be completely within one of the VCN's CIDR block ranges. + // - The old and new CIDR block ranges must use the same network address. Example: `10.0.0.0/25` and `10.0.0.0/24`. + // - Must contain all IP addresses in use in the old CIDR range. + // - The new CIDR range's broadcast address (last IP address of CIDR range) must not be an IP address in use in the old CIDR range. + // **Note:** If you are changing the CIDR block, you cannot create VNICs or private IPs for this resource while the update is in progress. + // Example: `172.16.0.0/16` + CidrBlock *string `mandatory:"false" json:"cidrBlock"` + + // This is the IPv6 prefix for the subnet's IP address space. + // The subnet size is always /64. + // See IPv6 Addresses (https://docs.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). + // The provided prefix must maintain the following rules - + // a. The IPv6 prefix is valid and correctly formatted. + // b. The IPv6 prefix is within the parent VCN IPv6 range. + // Example: `2001:0db8:0123:1111::/64` + Ipv6CidrBlock *string `mandatory:"false" json:"ipv6CidrBlock"` + + // The list of all IPv6 prefixes (Oracle allocated IPv6 GUA, ULA or private IPv6 prefix, BYOIPv6 prefixes) for the subnet that meets the following criteria: + // - The prefixes must be valid. + // - Multiple prefixes must not overlap each other or the on-premises network prefix. + // - The number of prefixes must not exceed the limit of IPv6 prefixes allowed to a subnet. + Ipv6CidrBlocks []string `mandatory:"false" json:"ipv6CidrBlocks"` +} + +func (m UpdateSubnetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateSubnetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_subnet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_subnet_request_response.go new file mode 100644 index 000000000..b8692ee5d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_subnet_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateSubnetRequest wrapper for the UpdateSubnet operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateSubnet.go.html to see an example of how to use UpdateSubnetRequest. +type UpdateSubnetRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // Details object for updating a subnet. + UpdateSubnetDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateSubnetRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateSubnetRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateSubnetRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateSubnetRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateSubnetRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateSubnetResponse wrapper for the UpdateSubnet operation +type UpdateSubnetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Subnet instance + Subnet `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateSubnetResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateSubnetResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_tunnel_cpe_device_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_tunnel_cpe_device_config_details.go new file mode 100644 index 000000000..e75e64f2e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_tunnel_cpe_device_config_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateTunnelCpeDeviceConfigDetails The representation of UpdateTunnelCpeDeviceConfigDetails +type UpdateTunnelCpeDeviceConfigDetails struct { + + // The set of configuration answers for a CPE device. + TunnelCpeDeviceConfig []CpeDeviceConfigAnswer `mandatory:"false" json:"tunnelCpeDeviceConfig"` +} + +func (m UpdateTunnelCpeDeviceConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateTunnelCpeDeviceConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_tunnel_cpe_device_config_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_tunnel_cpe_device_config_request_response.go new file mode 100644 index 000000000..fe95624a0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_tunnel_cpe_device_config_request_response.go @@ -0,0 +1,112 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateTunnelCpeDeviceConfigRequest wrapper for the UpdateTunnelCpeDeviceConfig operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateTunnelCpeDeviceConfig.go.html to see an example of how to use UpdateTunnelCpeDeviceConfigRequest. +type UpdateTunnelCpeDeviceConfigRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tunnel. + TunnelId *string `mandatory:"true" contributesTo:"path" name:"tunnelId"` + + // Request to input the tunnel's cpe configuration parameters + UpdateTunnelCpeDeviceConfigDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateTunnelCpeDeviceConfigRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateTunnelCpeDeviceConfigRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateTunnelCpeDeviceConfigRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateTunnelCpeDeviceConfigRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateTunnelCpeDeviceConfigRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateTunnelCpeDeviceConfigResponse wrapper for the UpdateTunnelCpeDeviceConfig operation +type UpdateTunnelCpeDeviceConfigResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The TunnelCpeDeviceConfig instance + TunnelCpeDeviceConfig `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateTunnelCpeDeviceConfigResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateTunnelCpeDeviceConfigResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vcn_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vcn_details.go new file mode 100644 index 000000000..7036e66a7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vcn_details.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateVcnDetails The representation of UpdateVcnDetails +type UpdateVcnDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Security attributes (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels + // for a resource that can be referenced in a Zero Trust Packet Routing (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) + // (ZPR) policy to control access to ZPR-supported resources. + // Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` + SecurityAttributes map[string]map[string]interface{} `mandatory:"false" json:"securityAttributes"` + + // Indicates whether ZPR Only mode is enforced. + IsZprOnly *bool `mandatory:"false" json:"isZprOnly"` +} + +func (m UpdateVcnDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateVcnDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vcn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vcn_request_response.go new file mode 100644 index 000000000..c824f732e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vcn_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateVcnRequest wrapper for the UpdateVcn operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVcn.go.html to see an example of how to use UpdateVcnRequest. +type UpdateVcnRequest struct { + + // Specify the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` + + // Details object for updating a VCN. + UpdateVcnDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVcnRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVcnRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateVcnRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVcnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateVcnRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVcnResponse wrapper for the UpdateVcn operation +type UpdateVcnResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Vcn instance + Vcn `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateVcnResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVcnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_virtual_circuit_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_virtual_circuit_details.go new file mode 100644 index 000000000..122a5554b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_virtual_circuit_details.go @@ -0,0 +1,272 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateVirtualCircuitDetails The representation of UpdateVirtualCircuitDetails +type UpdateVirtualCircuitDetails struct { + + // The provisioned data rate of the connection. To get a list of the + // available bandwidth levels (that is, shapes), see + // ListFastConnectProviderVirtualCircuitBandwidthShapes. + // To be updated only by the customer who owns the virtual circuit. + BandwidthShapeName *string `mandatory:"false" json:"bandwidthShapeName"` + + // An array of mappings, each containing properties for a cross-connect or + // cross-connect group associated with this virtual circuit. + // The customer and provider can update different properties in the mapping + // depending on the situation. See the description of the + // CrossConnectMapping. + CrossConnectMappings []CrossConnectMapping `mandatory:"false" json:"crossConnectMappings"` + + // The routing policy sets how routing information about the Oracle cloud is shared over a public virtual circuit. + // Policies available are: `ORACLE_SERVICE_NETWORK`, `REGIONAL`, `MARKET_LEVEL`, and `GLOBAL`. + // See Route Filtering (https://docs.oracle.com/iaas/Content/Network/Concepts/routingonprem.htm#route_filtering) for details. + // By default, routing information is shared for all routes in the same market. + RoutingPolicy []UpdateVirtualCircuitDetailsRoutingPolicyEnum `mandatory:"false" json:"routingPolicy,omitempty"` + + // Set to `ENABLED` (the default) to activate the BGP session of the virtual circuit, set to `DISABLED` to deactivate the virtual circuit. + BgpAdminState UpdateVirtualCircuitDetailsBgpAdminStateEnum `mandatory:"false" json:"bgpAdminState,omitempty"` + + // Set to `true` to enable BFD for IPv4 BGP peering, or set to `false` to disable BFD. If this is not set, the default is `false`. + IsBfdEnabled *bool `mandatory:"false" json:"isBfdEnabled"` + + // Set to `true` for the virtual circuit to carry only encrypted traffic, or set to `false` for the virtual circuit to carry unencrypted traffic. If this is not set, the default is `false`. + IsTransportMode *bool `mandatory:"false" json:"isTransportMode"` + + // Deprecated. Instead use `customerAsn`. + // If you specify values for both, the request will be rejected. + CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` + + // The BGP ASN of the network at the other end of the BGP + // session from Oracle. + // If the BGP session is from the customer's edge router to Oracle, the + // required value is the customer's ASN, and it can be updated only + // by the customer. + // If the BGP session is from the provider's edge router to Oracle, the + // required value is the provider's ASN, and it can be updated only + // by the provider. + // Can be a 2-byte or 4-byte ASN. Uses "asplain" format. + CustomerAsn *int64 `mandatory:"false" json:"customerAsn"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Drg + // that this private virtual circuit uses. + // To be updated only by the customer who owns the virtual circuit. + GatewayId *string `mandatory:"false" json:"gatewayId"` + + // The provider's state in relation to this virtual circuit. Relevant only + // if the customer is using FastConnect via a provider. ACTIVE + // means the provider has provisioned the virtual circuit from their + // end. INACTIVE means the provider has not yet provisioned the virtual + // circuit, or has de-provisioned it. + // To be updated only by the provider. + ProviderState UpdateVirtualCircuitDetailsProviderStateEnum `mandatory:"false" json:"providerState,omitempty"` + + // The service key name offered by the provider (if the customer is connecting via a provider). + ProviderServiceKeyName *string `mandatory:"false" json:"providerServiceKeyName"` + + // Provider-supplied reference information about this virtual circuit. + // Relevant only if the customer is using FastConnect via a provider. + // To be updated only by the provider. + ReferenceComment *string `mandatory:"false" json:"referenceComment"` + + // The layer 3 IP MTU to use on this virtual circuit. + IpMtu VirtualCircuitIpMtuEnum `mandatory:"false" json:"ipMtu,omitempty"` +} + +func (m UpdateVirtualCircuitDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateVirtualCircuitDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.RoutingPolicy { + if _, ok := GetMappingUpdateVirtualCircuitDetailsRoutingPolicyEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RoutingPolicy: %s. Supported values are: %s.", val, strings.Join(GetUpdateVirtualCircuitDetailsRoutingPolicyEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingUpdateVirtualCircuitDetailsBgpAdminStateEnum(string(m.BgpAdminState)); !ok && m.BgpAdminState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BgpAdminState: %s. Supported values are: %s.", m.BgpAdminState, strings.Join(GetUpdateVirtualCircuitDetailsBgpAdminStateEnumStringValues(), ","))) + } + if _, ok := GetMappingUpdateVirtualCircuitDetailsProviderStateEnum(string(m.ProviderState)); !ok && m.ProviderState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProviderState: %s. Supported values are: %s.", m.ProviderState, strings.Join(GetUpdateVirtualCircuitDetailsProviderStateEnumStringValues(), ","))) + } + if _, ok := GetMappingVirtualCircuitIpMtuEnum(string(m.IpMtu)); !ok && m.IpMtu != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IpMtu: %s. Supported values are: %s.", m.IpMtu, strings.Join(GetVirtualCircuitIpMtuEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVirtualCircuitDetailsRoutingPolicyEnum Enum with underlying type: string +type UpdateVirtualCircuitDetailsRoutingPolicyEnum string + +// Set of constants representing the allowable values for UpdateVirtualCircuitDetailsRoutingPolicyEnum +const ( + UpdateVirtualCircuitDetailsRoutingPolicyOracleServiceNetwork UpdateVirtualCircuitDetailsRoutingPolicyEnum = "ORACLE_SERVICE_NETWORK" + UpdateVirtualCircuitDetailsRoutingPolicyRegional UpdateVirtualCircuitDetailsRoutingPolicyEnum = "REGIONAL" + UpdateVirtualCircuitDetailsRoutingPolicyMarketLevel UpdateVirtualCircuitDetailsRoutingPolicyEnum = "MARKET_LEVEL" + UpdateVirtualCircuitDetailsRoutingPolicyGlobal UpdateVirtualCircuitDetailsRoutingPolicyEnum = "GLOBAL" +) + +var mappingUpdateVirtualCircuitDetailsRoutingPolicyEnum = map[string]UpdateVirtualCircuitDetailsRoutingPolicyEnum{ + "ORACLE_SERVICE_NETWORK": UpdateVirtualCircuitDetailsRoutingPolicyOracleServiceNetwork, + "REGIONAL": UpdateVirtualCircuitDetailsRoutingPolicyRegional, + "MARKET_LEVEL": UpdateVirtualCircuitDetailsRoutingPolicyMarketLevel, + "GLOBAL": UpdateVirtualCircuitDetailsRoutingPolicyGlobal, +} + +var mappingUpdateVirtualCircuitDetailsRoutingPolicyEnumLowerCase = map[string]UpdateVirtualCircuitDetailsRoutingPolicyEnum{ + "oracle_service_network": UpdateVirtualCircuitDetailsRoutingPolicyOracleServiceNetwork, + "regional": UpdateVirtualCircuitDetailsRoutingPolicyRegional, + "market_level": UpdateVirtualCircuitDetailsRoutingPolicyMarketLevel, + "global": UpdateVirtualCircuitDetailsRoutingPolicyGlobal, +} + +// GetUpdateVirtualCircuitDetailsRoutingPolicyEnumValues Enumerates the set of values for UpdateVirtualCircuitDetailsRoutingPolicyEnum +func GetUpdateVirtualCircuitDetailsRoutingPolicyEnumValues() []UpdateVirtualCircuitDetailsRoutingPolicyEnum { + values := make([]UpdateVirtualCircuitDetailsRoutingPolicyEnum, 0) + for _, v := range mappingUpdateVirtualCircuitDetailsRoutingPolicyEnum { + values = append(values, v) + } + return values +} + +// GetUpdateVirtualCircuitDetailsRoutingPolicyEnumStringValues Enumerates the set of values in String for UpdateVirtualCircuitDetailsRoutingPolicyEnum +func GetUpdateVirtualCircuitDetailsRoutingPolicyEnumStringValues() []string { + return []string{ + "ORACLE_SERVICE_NETWORK", + "REGIONAL", + "MARKET_LEVEL", + "GLOBAL", + } +} + +// GetMappingUpdateVirtualCircuitDetailsRoutingPolicyEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateVirtualCircuitDetailsRoutingPolicyEnum(val string) (UpdateVirtualCircuitDetailsRoutingPolicyEnum, bool) { + enum, ok := mappingUpdateVirtualCircuitDetailsRoutingPolicyEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UpdateVirtualCircuitDetailsBgpAdminStateEnum Enum with underlying type: string +type UpdateVirtualCircuitDetailsBgpAdminStateEnum string + +// Set of constants representing the allowable values for UpdateVirtualCircuitDetailsBgpAdminStateEnum +const ( + UpdateVirtualCircuitDetailsBgpAdminStateEnabled UpdateVirtualCircuitDetailsBgpAdminStateEnum = "ENABLED" + UpdateVirtualCircuitDetailsBgpAdminStateDisabled UpdateVirtualCircuitDetailsBgpAdminStateEnum = "DISABLED" +) + +var mappingUpdateVirtualCircuitDetailsBgpAdminStateEnum = map[string]UpdateVirtualCircuitDetailsBgpAdminStateEnum{ + "ENABLED": UpdateVirtualCircuitDetailsBgpAdminStateEnabled, + "DISABLED": UpdateVirtualCircuitDetailsBgpAdminStateDisabled, +} + +var mappingUpdateVirtualCircuitDetailsBgpAdminStateEnumLowerCase = map[string]UpdateVirtualCircuitDetailsBgpAdminStateEnum{ + "enabled": UpdateVirtualCircuitDetailsBgpAdminStateEnabled, + "disabled": UpdateVirtualCircuitDetailsBgpAdminStateDisabled, +} + +// GetUpdateVirtualCircuitDetailsBgpAdminStateEnumValues Enumerates the set of values for UpdateVirtualCircuitDetailsBgpAdminStateEnum +func GetUpdateVirtualCircuitDetailsBgpAdminStateEnumValues() []UpdateVirtualCircuitDetailsBgpAdminStateEnum { + values := make([]UpdateVirtualCircuitDetailsBgpAdminStateEnum, 0) + for _, v := range mappingUpdateVirtualCircuitDetailsBgpAdminStateEnum { + values = append(values, v) + } + return values +} + +// GetUpdateVirtualCircuitDetailsBgpAdminStateEnumStringValues Enumerates the set of values in String for UpdateVirtualCircuitDetailsBgpAdminStateEnum +func GetUpdateVirtualCircuitDetailsBgpAdminStateEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + } +} + +// GetMappingUpdateVirtualCircuitDetailsBgpAdminStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateVirtualCircuitDetailsBgpAdminStateEnum(val string) (UpdateVirtualCircuitDetailsBgpAdminStateEnum, bool) { + enum, ok := mappingUpdateVirtualCircuitDetailsBgpAdminStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UpdateVirtualCircuitDetailsProviderStateEnum Enum with underlying type: string +type UpdateVirtualCircuitDetailsProviderStateEnum string + +// Set of constants representing the allowable values for UpdateVirtualCircuitDetailsProviderStateEnum +const ( + UpdateVirtualCircuitDetailsProviderStateActive UpdateVirtualCircuitDetailsProviderStateEnum = "ACTIVE" + UpdateVirtualCircuitDetailsProviderStateInactive UpdateVirtualCircuitDetailsProviderStateEnum = "INACTIVE" +) + +var mappingUpdateVirtualCircuitDetailsProviderStateEnum = map[string]UpdateVirtualCircuitDetailsProviderStateEnum{ + "ACTIVE": UpdateVirtualCircuitDetailsProviderStateActive, + "INACTIVE": UpdateVirtualCircuitDetailsProviderStateInactive, +} + +var mappingUpdateVirtualCircuitDetailsProviderStateEnumLowerCase = map[string]UpdateVirtualCircuitDetailsProviderStateEnum{ + "active": UpdateVirtualCircuitDetailsProviderStateActive, + "inactive": UpdateVirtualCircuitDetailsProviderStateInactive, +} + +// GetUpdateVirtualCircuitDetailsProviderStateEnumValues Enumerates the set of values for UpdateVirtualCircuitDetailsProviderStateEnum +func GetUpdateVirtualCircuitDetailsProviderStateEnumValues() []UpdateVirtualCircuitDetailsProviderStateEnum { + values := make([]UpdateVirtualCircuitDetailsProviderStateEnum, 0) + for _, v := range mappingUpdateVirtualCircuitDetailsProviderStateEnum { + values = append(values, v) + } + return values +} + +// GetUpdateVirtualCircuitDetailsProviderStateEnumStringValues Enumerates the set of values in String for UpdateVirtualCircuitDetailsProviderStateEnum +func GetUpdateVirtualCircuitDetailsProviderStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + } +} + +// GetMappingUpdateVirtualCircuitDetailsProviderStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateVirtualCircuitDetailsProviderStateEnum(val string) (UpdateVirtualCircuitDetailsProviderStateEnum, bool) { + enum, ok := mappingUpdateVirtualCircuitDetailsProviderStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_virtual_circuit_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_virtual_circuit_request_response.go new file mode 100644 index 000000000..0ce04a29c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_virtual_circuit_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateVirtualCircuitRequest wrapper for the UpdateVirtualCircuit operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVirtualCircuit.go.html to see an example of how to use UpdateVirtualCircuitRequest. +type UpdateVirtualCircuitRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit. + VirtualCircuitId *string `mandatory:"true" contributesTo:"path" name:"virtualCircuitId"` + + // Update VirtualCircuit fields. + UpdateVirtualCircuitDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVirtualCircuitRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVirtualCircuitRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateVirtualCircuitRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVirtualCircuitRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateVirtualCircuitRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVirtualCircuitResponse wrapper for the UpdateVirtualCircuit operation +type UpdateVirtualCircuitResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VirtualCircuit instance + VirtualCircuit `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateVirtualCircuitResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVirtualCircuitResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vlan_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vlan_details.go new file mode 100644 index 000000000..ce8defc7b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vlan_details.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateVlanDetails The representation of UpdateVlanDetails +type UpdateVlanDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // A list of the OCIDs of the network security groups (NSGs) to use with + // this VLAN. All VNICs in the VLAN will belong to these NSGs. For more + // information about NSGs, see + // NetworkSecurityGroup. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the VLAN will use. + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // The CIDR block of the VLAN. The new CIDR block must meet the following criteria: + // - Must be valid. + // - The CIDR block's IP range must be completely within one of the VCN's CIDR block ranges. + // - The old and new CIDR block ranges must use the same network address. Example: `10.0.0.0/25` and `10.0.0.0/24`. + // - Must contain all IP addresses in use in the old CIDR range. + // - The new CIDR range's broadcast address (last IP address of CIDR range) must not be an IP address in use in the old CIDR range. + // **Note:** If you are changing the CIDR block, you cannot create VNICs or private IPs for this resource while the update is in progress. + CidrBlock *string `mandatory:"false" json:"cidrBlock"` +} + +func (m UpdateVlanDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateVlanDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vlan_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vlan_request_response.go new file mode 100644 index 000000000..c0815fdbf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vlan_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateVlanRequest wrapper for the UpdateVlan operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVlan.go.html to see an example of how to use UpdateVlanRequest. +type UpdateVlanRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VLAN. + VlanId *string `mandatory:"true" contributesTo:"path" name:"vlanId"` + + // Details object for updating a subnet. + UpdateVlanDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVlanRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVlanRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateVlanRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVlanRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateVlanRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVlanResponse wrapper for the UpdateVlan operation +type UpdateVlanResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Vlan instance + Vlan `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateVlanResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVlanResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vnic_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vnic_details.go new file mode 100644 index 000000000..bc247f087 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vnic_details.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateVnicDetails The representation of UpdateVnicDetails +type UpdateVnicDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Security attributes (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels + // for a resource that can be referenced in a Zero Trust Packet Routing (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) + // (ZPR) policy to control access to ZPR-supported resources. + // Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` + SecurityAttributes map[string]map[string]interface{} `mandatory:"false" json:"securityAttributes"` + + // The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname + // portion of the primary private IP's fully qualified domain name (FQDN) + // (for example, `bminstance1` in FQDN `bminstance1.subnet123.vcn1.oraclevcn.com`). + // Must be unique across all VNICs in the subnet and comply with + // RFC 952 (https://tools.ietf.org/html/rfc952) and + // RFC 1123 (https://tools.ietf.org/html/rfc1123). + // The value appears in the Vnic object and also the + // PrivateIp object returned by + // ListPrivateIps and + // GetPrivateIp. + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. Setting this as + // an empty array removes the VNIC from all network security groups. + // If the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution (instead of + // belonging to a subnet), the value of the `nsgIds` attribute is ignored. Instead, the + // VNIC belongs to the NSGs that are associated with the VLAN itself. See Vlan. + // For more information about NSGs, see + // NetworkSecurityGroup. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // Whether the source/destination check is disabled on the VNIC. + // Defaults to `false`, which means the check is performed. For information about why you would + // skip the source/destination check, see + // Using a Private IP as a Route Target (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#privateip). + // If the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution (instead of + // belonging to a subnet), the value of the `skipSourceDestCheck` attribute is ignored. + // This is because the source/destination check is always disabled for VNICs in a VLAN. + // Example: `true` + SkipSourceDestCheck *bool `mandatory:"false" json:"skipSourceDestCheck"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see + // Per-resource Routing (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing). + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m UpdateVnicDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateVnicDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vnic_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vnic_request_response.go new file mode 100644 index 000000000..f92dfe005 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vnic_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateVnicRequest wrapper for the UpdateVnic operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVnic.go.html to see an example of how to use UpdateVnicRequest. +type UpdateVnicRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC. + VnicId *string `mandatory:"true" contributesTo:"path" name:"vnicId"` + + // Details object for updating a VNIC. + UpdateVnicDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVnicRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVnicRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateVnicRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVnicRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateVnicRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVnicResponse wrapper for the UpdateVnic operation +type UpdateVnicResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Vnic instance + Vnic `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateVnicResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVnicResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_attachment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_attachment_details.go new file mode 100644 index 000000000..a075f6f37 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_attachment_details.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateVolumeAttachmentDetails details for updating a volume attachment. +type UpdateVolumeAttachmentDetails struct { + + // The iscsi login state of the volume attachment. For a multipath volume attachment, + // all iscsi sessions need to be all logged-in or logged-out to be in logged-in or logged-out state. + IscsiLoginState UpdateVolumeAttachmentDetailsIscsiLoginStateEnum `mandatory:"false" json:"iscsiLoginState,omitempty"` +} + +func (m UpdateVolumeAttachmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateVolumeAttachmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateVolumeAttachmentDetailsIscsiLoginStateEnum(string(m.IscsiLoginState)); !ok && m.IscsiLoginState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IscsiLoginState: %s. Supported values are: %s.", m.IscsiLoginState, strings.Join(GetUpdateVolumeAttachmentDetailsIscsiLoginStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVolumeAttachmentDetailsIscsiLoginStateEnum Enum with underlying type: string +type UpdateVolumeAttachmentDetailsIscsiLoginStateEnum string + +// Set of constants representing the allowable values for UpdateVolumeAttachmentDetailsIscsiLoginStateEnum +const ( + UpdateVolumeAttachmentDetailsIscsiLoginStateUnknown UpdateVolumeAttachmentDetailsIscsiLoginStateEnum = "UNKNOWN" + UpdateVolumeAttachmentDetailsIscsiLoginStateLoggingIn UpdateVolumeAttachmentDetailsIscsiLoginStateEnum = "LOGGING_IN" + UpdateVolumeAttachmentDetailsIscsiLoginStateLoginSucceeded UpdateVolumeAttachmentDetailsIscsiLoginStateEnum = "LOGIN_SUCCEEDED" + UpdateVolumeAttachmentDetailsIscsiLoginStateLoginFailed UpdateVolumeAttachmentDetailsIscsiLoginStateEnum = "LOGIN_FAILED" + UpdateVolumeAttachmentDetailsIscsiLoginStateLoggingOut UpdateVolumeAttachmentDetailsIscsiLoginStateEnum = "LOGGING_OUT" + UpdateVolumeAttachmentDetailsIscsiLoginStateLogoutSucceeded UpdateVolumeAttachmentDetailsIscsiLoginStateEnum = "LOGOUT_SUCCEEDED" + UpdateVolumeAttachmentDetailsIscsiLoginStateLogoutFailed UpdateVolumeAttachmentDetailsIscsiLoginStateEnum = "LOGOUT_FAILED" +) + +var mappingUpdateVolumeAttachmentDetailsIscsiLoginStateEnum = map[string]UpdateVolumeAttachmentDetailsIscsiLoginStateEnum{ + "UNKNOWN": UpdateVolumeAttachmentDetailsIscsiLoginStateUnknown, + "LOGGING_IN": UpdateVolumeAttachmentDetailsIscsiLoginStateLoggingIn, + "LOGIN_SUCCEEDED": UpdateVolumeAttachmentDetailsIscsiLoginStateLoginSucceeded, + "LOGIN_FAILED": UpdateVolumeAttachmentDetailsIscsiLoginStateLoginFailed, + "LOGGING_OUT": UpdateVolumeAttachmentDetailsIscsiLoginStateLoggingOut, + "LOGOUT_SUCCEEDED": UpdateVolumeAttachmentDetailsIscsiLoginStateLogoutSucceeded, + "LOGOUT_FAILED": UpdateVolumeAttachmentDetailsIscsiLoginStateLogoutFailed, +} + +var mappingUpdateVolumeAttachmentDetailsIscsiLoginStateEnumLowerCase = map[string]UpdateVolumeAttachmentDetailsIscsiLoginStateEnum{ + "unknown": UpdateVolumeAttachmentDetailsIscsiLoginStateUnknown, + "logging_in": UpdateVolumeAttachmentDetailsIscsiLoginStateLoggingIn, + "login_succeeded": UpdateVolumeAttachmentDetailsIscsiLoginStateLoginSucceeded, + "login_failed": UpdateVolumeAttachmentDetailsIscsiLoginStateLoginFailed, + "logging_out": UpdateVolumeAttachmentDetailsIscsiLoginStateLoggingOut, + "logout_succeeded": UpdateVolumeAttachmentDetailsIscsiLoginStateLogoutSucceeded, + "logout_failed": UpdateVolumeAttachmentDetailsIscsiLoginStateLogoutFailed, +} + +// GetUpdateVolumeAttachmentDetailsIscsiLoginStateEnumValues Enumerates the set of values for UpdateVolumeAttachmentDetailsIscsiLoginStateEnum +func GetUpdateVolumeAttachmentDetailsIscsiLoginStateEnumValues() []UpdateVolumeAttachmentDetailsIscsiLoginStateEnum { + values := make([]UpdateVolumeAttachmentDetailsIscsiLoginStateEnum, 0) + for _, v := range mappingUpdateVolumeAttachmentDetailsIscsiLoginStateEnum { + values = append(values, v) + } + return values +} + +// GetUpdateVolumeAttachmentDetailsIscsiLoginStateEnumStringValues Enumerates the set of values in String for UpdateVolumeAttachmentDetailsIscsiLoginStateEnum +func GetUpdateVolumeAttachmentDetailsIscsiLoginStateEnumStringValues() []string { + return []string{ + "UNKNOWN", + "LOGGING_IN", + "LOGIN_SUCCEEDED", + "LOGIN_FAILED", + "LOGGING_OUT", + "LOGOUT_SUCCEEDED", + "LOGOUT_FAILED", + } +} + +// GetMappingUpdateVolumeAttachmentDetailsIscsiLoginStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateVolumeAttachmentDetailsIscsiLoginStateEnum(val string) (UpdateVolumeAttachmentDetailsIscsiLoginStateEnum, bool) { + enum, ok := mappingUpdateVolumeAttachmentDetailsIscsiLoginStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_attachment_request_response.go new file mode 100644 index 000000000..b0d7f396f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_attachment_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateVolumeAttachmentRequest wrapper for the UpdateVolumeAttachment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeAttachment.go.html to see an example of how to use UpdateVolumeAttachmentRequest. +type UpdateVolumeAttachmentRequest struct { + + // The OCID of the volume attachment. + VolumeAttachmentId *string `mandatory:"true" contributesTo:"path" name:"volumeAttachmentId"` + + // Update information about the specified volume attachment. + UpdateVolumeAttachmentDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVolumeAttachmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVolumeAttachmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateVolumeAttachmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVolumeAttachmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateVolumeAttachmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVolumeAttachmentResponse wrapper for the UpdateVolumeAttachment operation +type UpdateVolumeAttachmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeAttachment instance + VolumeAttachment `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateVolumeAttachmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVolumeAttachmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_details.go new file mode 100644 index 000000000..bf9a72481 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateVolumeBackupDetails The representation of UpdateVolumeBackupDetails +type UpdateVolumeBackupDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID of the Vault service key which is the master encryption key for the volume backup. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m UpdateVolumeBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateVolumeBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_policy_details.go new file mode 100644 index 000000000..c8e133e0e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_policy_details.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateVolumeBackupPolicyDetails Specifies the properties for updating a user defined backup policy. +// For more information about user defined backup policies, +// see User Defined Policies (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#UserDefinedBackupPolicies) in +// Policy-Based Backups (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm). +type UpdateVolumeBackupPolicyDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The paired destination region for copying scheduled backups to. Example: `us-ashburn-1`. + // Specify `none` to reset the `destinationRegion` parameter. + // See Region Pairs (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#RegionPairs) for details about paired regions. + DestinationRegion *string `mandatory:"false" json:"destinationRegion"` + + // The collection of schedules for the volume backup policy. See + // see Schedules (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#schedules) in + // Policy-Based Backups (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm) for more information. + Schedules []VolumeBackupSchedule `mandatory:"false" json:"schedules"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateVolumeBackupPolicyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateVolumeBackupPolicyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_policy_request_response.go new file mode 100644 index 000000000..43d3b4e65 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_policy_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateVolumeBackupPolicyRequest wrapper for the UpdateVolumeBackupPolicy operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeBackupPolicy.go.html to see an example of how to use UpdateVolumeBackupPolicyRequest. +type UpdateVolumeBackupPolicyRequest struct { + + // The OCID of the volume backup policy. + PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` + + // Update volume backup policy fields + UpdateVolumeBackupPolicyDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVolumeBackupPolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVolumeBackupPolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateVolumeBackupPolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVolumeBackupPolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateVolumeBackupPolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVolumeBackupPolicyResponse wrapper for the UpdateVolumeBackupPolicy operation +type UpdateVolumeBackupPolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeBackupPolicy instance + VolumeBackupPolicy `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateVolumeBackupPolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVolumeBackupPolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_request_response.go new file mode 100644 index 000000000..f68e7f0d9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_backup_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateVolumeBackupRequest wrapper for the UpdateVolumeBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeBackup.go.html to see an example of how to use UpdateVolumeBackupRequest. +type UpdateVolumeBackupRequest struct { + + // The OCID of the volume backup. + VolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeBackupId"` + + // Update volume backup fields + UpdateVolumeBackupDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVolumeBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateVolumeBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVolumeBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateVolumeBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVolumeBackupResponse wrapper for the UpdateVolumeBackup operation +type UpdateVolumeBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeBackup instance + VolumeBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateVolumeBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVolumeBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_details.go new file mode 100644 index 000000000..a8e0160bc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_details.go @@ -0,0 +1,136 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateVolumeDetails The representation of UpdateVolumeDetails +type UpdateVolumeDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The number of volume performance units (VPUs) that will be applied to this volume per GB, + // representing the Block Volume service's elastic performance options. + // See Block Volume Performance Levels (https://docs.oracle.com/iaas/Content/Block/Concepts/blockvolumeperformance.htm#perf_levels) for more information. + // Allowed values: + // * `0`: Represents Lower Cost option. + // * `10`: Represents Balanced option. + // * `20`: Represents Higher Performance option. + // * `30`-`120`: Represents the Ultra High Performance option. + // For performance autotune enabled volumes, it would be the Default(Minimum) VPUs/GB. + VpusPerGB *int64 `mandatory:"false" json:"vpusPerGB"` + + // The size to resize the volume to in GBs. Has to be larger than the current size. + SizeInGBs *int64 `mandatory:"false" json:"sizeInGBs"` + + // Specifies whether the auto-tune performance is enabled for this volume. This field is deprecated. + // Use the `DetachedVolumeAutotunePolicy` instead to enable the volume for detached autotune. + IsAutoTuneEnabled *bool `mandatory:"false" json:"isAutoTuneEnabled"` + + // The list of block volume replicas that this volume will be updated to have + // in the specified destination availability domains. + BlockVolumeReplicas []BlockVolumeReplicaDetails `mandatory:"false" json:"blockVolumeReplicas"` + + // The list of autotune policies enabled for this volume. + AutotunePolicies []AutotunePolicy `mandatory:"false" json:"autotunePolicies"` + + // When set to true, enables SCSI Persistent Reservation (SCSI PR) for the volume. For more information, see + // Persistent Reservations (https://docs.oracle.com/iaas/Content/Block/Concepts/persistent-reservations.htm). + IsReservationsEnabled *bool `mandatory:"false" json:"isReservationsEnabled"` +} + +func (m UpdateVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *UpdateVolumeDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + VpusPerGB *int64 `json:"vpusPerGB"` + SizeInGBs *int64 `json:"sizeInGBs"` + IsAutoTuneEnabled *bool `json:"isAutoTuneEnabled"` + BlockVolumeReplicas []BlockVolumeReplicaDetails `json:"blockVolumeReplicas"` + AutotunePolicies []autotunepolicy `json:"autotunePolicies"` + IsReservationsEnabled *bool `json:"isReservationsEnabled"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.VpusPerGB = model.VpusPerGB + + m.SizeInGBs = model.SizeInGBs + + m.IsAutoTuneEnabled = model.IsAutoTuneEnabled + + m.BlockVolumeReplicas = make([]BlockVolumeReplicaDetails, len(model.BlockVolumeReplicas)) + copy(m.BlockVolumeReplicas, model.BlockVolumeReplicas) + m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) + for i, n := range model.AutotunePolicies { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.AutotunePolicies[i] = nn.(AutotunePolicy) + } else { + m.AutotunePolicies[i] = nil + } + } + m.IsReservationsEnabled = model.IsReservationsEnabled + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_group_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_group_backup_details.go new file mode 100644 index 000000000..c17f8419b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_group_backup_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateVolumeGroupBackupDetails The representation of UpdateVolumeGroupBackupDetails +type UpdateVolumeGroupBackupDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateVolumeGroupBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateVolumeGroupBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_group_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_group_backup_request_response.go new file mode 100644 index 000000000..1e67ef954 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_group_backup_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateVolumeGroupBackupRequest wrapper for the UpdateVolumeGroupBackup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeGroupBackup.go.html to see an example of how to use UpdateVolumeGroupBackupRequest. +type UpdateVolumeGroupBackupRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup. + VolumeGroupBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupBackupId"` + + // Update volume group backup fields + UpdateVolumeGroupBackupDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVolumeGroupBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVolumeGroupBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateVolumeGroupBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVolumeGroupBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateVolumeGroupBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVolumeGroupBackupResponse wrapper for the UpdateVolumeGroupBackup operation +type UpdateVolumeGroupBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeGroupBackup instance + VolumeGroupBackup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateVolumeGroupBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVolumeGroupBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_group_details.go new file mode 100644 index 000000000..288deda2e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_group_details.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateVolumeGroupDetails The representation of UpdateVolumeGroupDetails +type UpdateVolumeGroupDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // OCIDs for the volumes in this volume group. + VolumeIds []string `mandatory:"false" json:"volumeIds"` + + // The list of volume group replicas that this volume group will be updated to have + // in the specified destination availability domains. + VolumeGroupReplicas []VolumeGroupReplicaDetails `mandatory:"false" json:"volumeGroupReplicas"` +} + +func (m UpdateVolumeGroupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateVolumeGroupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_group_request_response.go new file mode 100644 index 000000000..27e0323a9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_group_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateVolumeGroupRequest wrapper for the UpdateVolumeGroup operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeGroup.go.html to see an example of how to use UpdateVolumeGroupRequest. +type UpdateVolumeGroupRequest struct { + + // The Oracle Cloud ID (OCID) that uniquely identifies the volume group. + VolumeGroupId *string `mandatory:"true" contributesTo:"path" name:"volumeGroupId"` + + // Update volume group's set of volumes and/or display name + UpdateVolumeGroupDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Specifies whether to disable or preserve the individual volume replication when removing a volume from the + // replication enabled volume group. When set to `true`, the individual volume replica is preserved. The default + // value is `true`. + PreserveVolumeReplica *bool `mandatory:"false" contributesTo:"query" name:"preserveVolumeReplica"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVolumeGroupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVolumeGroupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateVolumeGroupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVolumeGroupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateVolumeGroupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVolumeGroupResponse wrapper for the UpdateVolumeGroup operation +type UpdateVolumeGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeGroup instance + VolumeGroup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateVolumeGroupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVolumeGroupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_kms_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_kms_key_details.go new file mode 100644 index 000000000..6fce62323 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_kms_key_details.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateVolumeKmsKeyDetails The representation of UpdateVolumeKmsKeyDetails +type UpdateVolumeKmsKeyDetails struct { + + // The OCID of the new Vault service key to assign to protect the specified volume. + // This key has to be a valid Vault service key, and policies must exist to allow the user and the Block Volume service to access this key. + // If you specify the same OCID as the previous key's OCID, the Block Volume service will use it to regenerate a volume encryption key. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m UpdateVolumeKmsKeyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateVolumeKmsKeyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_kms_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_kms_key_request_response.go new file mode 100644 index 000000000..966e57b35 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_kms_key_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateVolumeKmsKeyRequest wrapper for the UpdateVolumeKmsKey operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolumeKmsKey.go.html to see an example of how to use UpdateVolumeKmsKeyRequest. +type UpdateVolumeKmsKeyRequest struct { + + // The OCID of the volume. + VolumeId *string `mandatory:"true" contributesTo:"path" name:"volumeId"` + + // Updates the Vault service master encryption key assigned to the specified volume. + UpdateVolumeKmsKeyDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVolumeKmsKeyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVolumeKmsKeyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateVolumeKmsKeyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVolumeKmsKeyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateVolumeKmsKeyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVolumeKmsKeyResponse wrapper for the UpdateVolumeKmsKey operation +type UpdateVolumeKmsKeyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VolumeKmsKey instance + VolumeKmsKey `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateVolumeKmsKeyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVolumeKmsKeyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_request_response.go new file mode 100644 index 000000000..6823f616d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_volume_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateVolumeRequest wrapper for the UpdateVolume operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVolume.go.html to see an example of how to use UpdateVolumeRequest. +type UpdateVolumeRequest struct { + + // The OCID of the volume. + VolumeId *string `mandatory:"true" contributesTo:"path" name:"volumeId"` + + // Update volume's display name. Avoid entering confidential information. + UpdateVolumeDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVolumeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVolumeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateVolumeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVolumeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateVolumeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVolumeResponse wrapper for the UpdateVolume operation +type UpdateVolumeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Volume instance + Volume `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateVolumeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVolumeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vtap_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vtap_details.go new file mode 100644 index 000000000..9fd2b05bd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vtap_details.go @@ -0,0 +1,293 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateVtapDetails These details can be included in a request to update a virtual test access point (VTAP). +type UpdateVtapDetails struct { + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the source point where packets are captured. + SourceId *string `mandatory:"false" json:"sourceId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the destination resource where mirrored packets are sent. + TargetId *string `mandatory:"false" json:"targetId"` + + // The IP address of the destination resource where mirrored packets are sent. + TargetIp *string `mandatory:"false" json:"targetIp"` + + // The capture filter's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + CaptureFilterId *string `mandatory:"false" json:"captureFilterId"` + + // Defines an encapsulation header type for the VTAP's mirrored traffic. + EncapsulationProtocol UpdateVtapDetailsEncapsulationProtocolEnum `mandatory:"false" json:"encapsulationProtocol,omitempty"` + + // The virtual extensible LAN (VXLAN) network identifier (or VXLAN segment ID) that uniquely identifies the VXLAN. + VxlanNetworkIdentifier *int64 `mandatory:"false" json:"vxlanNetworkIdentifier"` + + // Used to start or stop a `Vtap` resource. + // * `TRUE` directs the VTAP to start mirroring traffic. + // * `FALSE` (Default) directs the VTAP to stop mirroring traffic. + IsVtapEnabled *bool `mandatory:"false" json:"isVtapEnabled"` + + // Used to control the priority of traffic. It is an optional field. If it not passed, the value is DEFAULT + TrafficMode UpdateVtapDetailsTrafficModeEnum `mandatory:"false" json:"trafficMode,omitempty"` + + // The maximum size of the packets to be included in the filter. + MaxPacketSize *int `mandatory:"false" json:"maxPacketSize"` + + // The IP Address of the source private endpoint. + SourcePrivateEndpointIp *string `mandatory:"false" json:"sourcePrivateEndpointIp"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet that source private endpoint belongs to. + SourcePrivateEndpointSubnetId *string `mandatory:"false" json:"sourcePrivateEndpointSubnetId"` + + // The target type for the VTAP. + TargetType UpdateVtapDetailsTargetTypeEnum `mandatory:"false" json:"targetType,omitempty"` + + // The source type for the VTAP. + SourceType UpdateVtapDetailsSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` +} + +func (m UpdateVtapDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateVtapDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateVtapDetailsEncapsulationProtocolEnum(string(m.EncapsulationProtocol)); !ok && m.EncapsulationProtocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncapsulationProtocol: %s. Supported values are: %s.", m.EncapsulationProtocol, strings.Join(GetUpdateVtapDetailsEncapsulationProtocolEnumStringValues(), ","))) + } + if _, ok := GetMappingUpdateVtapDetailsTrafficModeEnum(string(m.TrafficMode)); !ok && m.TrafficMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TrafficMode: %s. Supported values are: %s.", m.TrafficMode, strings.Join(GetUpdateVtapDetailsTrafficModeEnumStringValues(), ","))) + } + if _, ok := GetMappingUpdateVtapDetailsTargetTypeEnum(string(m.TargetType)); !ok && m.TargetType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TargetType: %s. Supported values are: %s.", m.TargetType, strings.Join(GetUpdateVtapDetailsTargetTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingUpdateVtapDetailsSourceTypeEnum(string(m.SourceType)); !ok && m.SourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceType: %s. Supported values are: %s.", m.SourceType, strings.Join(GetUpdateVtapDetailsSourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVtapDetailsEncapsulationProtocolEnum Enum with underlying type: string +type UpdateVtapDetailsEncapsulationProtocolEnum string + +// Set of constants representing the allowable values for UpdateVtapDetailsEncapsulationProtocolEnum +const ( + UpdateVtapDetailsEncapsulationProtocolVxlan UpdateVtapDetailsEncapsulationProtocolEnum = "VXLAN" +) + +var mappingUpdateVtapDetailsEncapsulationProtocolEnum = map[string]UpdateVtapDetailsEncapsulationProtocolEnum{ + "VXLAN": UpdateVtapDetailsEncapsulationProtocolVxlan, +} + +var mappingUpdateVtapDetailsEncapsulationProtocolEnumLowerCase = map[string]UpdateVtapDetailsEncapsulationProtocolEnum{ + "vxlan": UpdateVtapDetailsEncapsulationProtocolVxlan, +} + +// GetUpdateVtapDetailsEncapsulationProtocolEnumValues Enumerates the set of values for UpdateVtapDetailsEncapsulationProtocolEnum +func GetUpdateVtapDetailsEncapsulationProtocolEnumValues() []UpdateVtapDetailsEncapsulationProtocolEnum { + values := make([]UpdateVtapDetailsEncapsulationProtocolEnum, 0) + for _, v := range mappingUpdateVtapDetailsEncapsulationProtocolEnum { + values = append(values, v) + } + return values +} + +// GetUpdateVtapDetailsEncapsulationProtocolEnumStringValues Enumerates the set of values in String for UpdateVtapDetailsEncapsulationProtocolEnum +func GetUpdateVtapDetailsEncapsulationProtocolEnumStringValues() []string { + return []string{ + "VXLAN", + } +} + +// GetMappingUpdateVtapDetailsEncapsulationProtocolEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateVtapDetailsEncapsulationProtocolEnum(val string) (UpdateVtapDetailsEncapsulationProtocolEnum, bool) { + enum, ok := mappingUpdateVtapDetailsEncapsulationProtocolEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UpdateVtapDetailsTrafficModeEnum Enum with underlying type: string +type UpdateVtapDetailsTrafficModeEnum string + +// Set of constants representing the allowable values for UpdateVtapDetailsTrafficModeEnum +const ( + UpdateVtapDetailsTrafficModeDefault UpdateVtapDetailsTrafficModeEnum = "DEFAULT" + UpdateVtapDetailsTrafficModePriority UpdateVtapDetailsTrafficModeEnum = "PRIORITY" +) + +var mappingUpdateVtapDetailsTrafficModeEnum = map[string]UpdateVtapDetailsTrafficModeEnum{ + "DEFAULT": UpdateVtapDetailsTrafficModeDefault, + "PRIORITY": UpdateVtapDetailsTrafficModePriority, +} + +var mappingUpdateVtapDetailsTrafficModeEnumLowerCase = map[string]UpdateVtapDetailsTrafficModeEnum{ + "default": UpdateVtapDetailsTrafficModeDefault, + "priority": UpdateVtapDetailsTrafficModePriority, +} + +// GetUpdateVtapDetailsTrafficModeEnumValues Enumerates the set of values for UpdateVtapDetailsTrafficModeEnum +func GetUpdateVtapDetailsTrafficModeEnumValues() []UpdateVtapDetailsTrafficModeEnum { + values := make([]UpdateVtapDetailsTrafficModeEnum, 0) + for _, v := range mappingUpdateVtapDetailsTrafficModeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateVtapDetailsTrafficModeEnumStringValues Enumerates the set of values in String for UpdateVtapDetailsTrafficModeEnum +func GetUpdateVtapDetailsTrafficModeEnumStringValues() []string { + return []string{ + "DEFAULT", + "PRIORITY", + } +} + +// GetMappingUpdateVtapDetailsTrafficModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateVtapDetailsTrafficModeEnum(val string) (UpdateVtapDetailsTrafficModeEnum, bool) { + enum, ok := mappingUpdateVtapDetailsTrafficModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UpdateVtapDetailsTargetTypeEnum Enum with underlying type: string +type UpdateVtapDetailsTargetTypeEnum string + +// Set of constants representing the allowable values for UpdateVtapDetailsTargetTypeEnum +const ( + UpdateVtapDetailsTargetTypeVnic UpdateVtapDetailsTargetTypeEnum = "VNIC" + UpdateVtapDetailsTargetTypeNetworkLoadBalancer UpdateVtapDetailsTargetTypeEnum = "NETWORK_LOAD_BALANCER" + UpdateVtapDetailsTargetTypeIpAddress UpdateVtapDetailsTargetTypeEnum = "IP_ADDRESS" +) + +var mappingUpdateVtapDetailsTargetTypeEnum = map[string]UpdateVtapDetailsTargetTypeEnum{ + "VNIC": UpdateVtapDetailsTargetTypeVnic, + "NETWORK_LOAD_BALANCER": UpdateVtapDetailsTargetTypeNetworkLoadBalancer, + "IP_ADDRESS": UpdateVtapDetailsTargetTypeIpAddress, +} + +var mappingUpdateVtapDetailsTargetTypeEnumLowerCase = map[string]UpdateVtapDetailsTargetTypeEnum{ + "vnic": UpdateVtapDetailsTargetTypeVnic, + "network_load_balancer": UpdateVtapDetailsTargetTypeNetworkLoadBalancer, + "ip_address": UpdateVtapDetailsTargetTypeIpAddress, +} + +// GetUpdateVtapDetailsTargetTypeEnumValues Enumerates the set of values for UpdateVtapDetailsTargetTypeEnum +func GetUpdateVtapDetailsTargetTypeEnumValues() []UpdateVtapDetailsTargetTypeEnum { + values := make([]UpdateVtapDetailsTargetTypeEnum, 0) + for _, v := range mappingUpdateVtapDetailsTargetTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateVtapDetailsTargetTypeEnumStringValues Enumerates the set of values in String for UpdateVtapDetailsTargetTypeEnum +func GetUpdateVtapDetailsTargetTypeEnumStringValues() []string { + return []string{ + "VNIC", + "NETWORK_LOAD_BALANCER", + "IP_ADDRESS", + } +} + +// GetMappingUpdateVtapDetailsTargetTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateVtapDetailsTargetTypeEnum(val string) (UpdateVtapDetailsTargetTypeEnum, bool) { + enum, ok := mappingUpdateVtapDetailsTargetTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UpdateVtapDetailsSourceTypeEnum Enum with underlying type: string +type UpdateVtapDetailsSourceTypeEnum string + +// Set of constants representing the allowable values for UpdateVtapDetailsSourceTypeEnum +const ( + UpdateVtapDetailsSourceTypeVnic UpdateVtapDetailsSourceTypeEnum = "VNIC" + UpdateVtapDetailsSourceTypeSubnet UpdateVtapDetailsSourceTypeEnum = "SUBNET" + UpdateVtapDetailsSourceTypeLoadBalancer UpdateVtapDetailsSourceTypeEnum = "LOAD_BALANCER" + UpdateVtapDetailsSourceTypeDbSystem UpdateVtapDetailsSourceTypeEnum = "DB_SYSTEM" + UpdateVtapDetailsSourceTypeExadataVmCluster UpdateVtapDetailsSourceTypeEnum = "EXADATA_VM_CLUSTER" + UpdateVtapDetailsSourceTypeAutonomousDataWarehouse UpdateVtapDetailsSourceTypeEnum = "AUTONOMOUS_DATA_WAREHOUSE" +) + +var mappingUpdateVtapDetailsSourceTypeEnum = map[string]UpdateVtapDetailsSourceTypeEnum{ + "VNIC": UpdateVtapDetailsSourceTypeVnic, + "SUBNET": UpdateVtapDetailsSourceTypeSubnet, + "LOAD_BALANCER": UpdateVtapDetailsSourceTypeLoadBalancer, + "DB_SYSTEM": UpdateVtapDetailsSourceTypeDbSystem, + "EXADATA_VM_CLUSTER": UpdateVtapDetailsSourceTypeExadataVmCluster, + "AUTONOMOUS_DATA_WAREHOUSE": UpdateVtapDetailsSourceTypeAutonomousDataWarehouse, +} + +var mappingUpdateVtapDetailsSourceTypeEnumLowerCase = map[string]UpdateVtapDetailsSourceTypeEnum{ + "vnic": UpdateVtapDetailsSourceTypeVnic, + "subnet": UpdateVtapDetailsSourceTypeSubnet, + "load_balancer": UpdateVtapDetailsSourceTypeLoadBalancer, + "db_system": UpdateVtapDetailsSourceTypeDbSystem, + "exadata_vm_cluster": UpdateVtapDetailsSourceTypeExadataVmCluster, + "autonomous_data_warehouse": UpdateVtapDetailsSourceTypeAutonomousDataWarehouse, +} + +// GetUpdateVtapDetailsSourceTypeEnumValues Enumerates the set of values for UpdateVtapDetailsSourceTypeEnum +func GetUpdateVtapDetailsSourceTypeEnumValues() []UpdateVtapDetailsSourceTypeEnum { + values := make([]UpdateVtapDetailsSourceTypeEnum, 0) + for _, v := range mappingUpdateVtapDetailsSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateVtapDetailsSourceTypeEnumStringValues Enumerates the set of values in String for UpdateVtapDetailsSourceTypeEnum +func GetUpdateVtapDetailsSourceTypeEnumStringValues() []string { + return []string{ + "VNIC", + "SUBNET", + "LOAD_BALANCER", + "DB_SYSTEM", + "EXADATA_VM_CLUSTER", + "AUTONOMOUS_DATA_WAREHOUSE", + } +} + +// GetMappingUpdateVtapDetailsSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateVtapDetailsSourceTypeEnum(val string) (UpdateVtapDetailsSourceTypeEnum, bool) { + enum, ok := mappingUpdateVtapDetailsSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vtap_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vtap_request_response.go new file mode 100644 index 000000000..2a88a0038 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_vtap_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateVtapRequest wrapper for the UpdateVtap operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateVtap.go.html to see an example of how to use UpdateVtapRequest. +type UpdateVtapRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VTAP. + VtapId *string `mandatory:"true" contributesTo:"path" name:"vtapId"` + + // Details object for updating a VTAP. + UpdateVtapDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVtapRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVtapRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateVtapRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVtapRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateVtapRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVtapResponse wrapper for the UpdateVtap operation +type UpdateVtapResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Vtap instance + Vtap `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateVtapResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVtapResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/updated_network_security_group_security_rules.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/updated_network_security_group_security_rules.go new file mode 100644 index 000000000..7097b690d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/updated_network_security_group_security_rules.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatedNetworkSecurityGroupSecurityRules The representation of UpdatedNetworkSecurityGroupSecurityRules +type UpdatedNetworkSecurityGroupSecurityRules struct { + + // The NSG security rules that were updated. + SecurityRules []SecurityRule `mandatory:"false" json:"securityRules"` +} + +func (m UpdatedNetworkSecurityGroupSecurityRules) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdatedNetworkSecurityGroupSecurityRules) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/upgrade_drg_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/upgrade_drg_request_response.go new file mode 100644 index 000000000..8dda93963 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/upgrade_drg_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpgradeDrgRequest wrapper for the UpgradeDrg operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpgradeDrg.go.html to see an example of how to use UpgradeDrgRequest. +type UpgradeDrgRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG. + DrgId *string `mandatory:"true" contributesTo:"path" name:"drgId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpgradeDrgRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpgradeDrgRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpgradeDrgRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpgradeDrgRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpgradeDrgRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpgradeDrgResponse wrapper for the UpgradeDrg operation +type UpgradeDrgResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpgradeDrgResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpgradeDrgResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/upgrade_status.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/upgrade_status.go new file mode 100644 index 000000000..72ce4799b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/upgrade_status.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpgradeStatus The upgrade status of a DRG. +type UpgradeStatus struct { + + // The `drgId` of the upgraded DRG. + DrgId *string `mandatory:"true" json:"drgId"` + + // The current upgrade status of the DRG attachment. + Status UpgradeStatusStatusEnum `mandatory:"true" json:"status"` + + // The number of upgraded connections. + UpgradedConnections *string `mandatory:"true" json:"upgradedConnections"` +} + +func (m UpgradeStatus) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpgradeStatus) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingUpgradeStatusStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetUpgradeStatusStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpgradeStatusStatusEnum Enum with underlying type: string +type UpgradeStatusStatusEnum string + +// Set of constants representing the allowable values for UpgradeStatusStatusEnum +const ( + UpgradeStatusStatusNotUpgraded UpgradeStatusStatusEnum = "NOT_UPGRADED" + UpgradeStatusStatusInProgress UpgradeStatusStatusEnum = "IN_PROGRESS" + UpgradeStatusStatusUpgraded UpgradeStatusStatusEnum = "UPGRADED" +) + +var mappingUpgradeStatusStatusEnum = map[string]UpgradeStatusStatusEnum{ + "NOT_UPGRADED": UpgradeStatusStatusNotUpgraded, + "IN_PROGRESS": UpgradeStatusStatusInProgress, + "UPGRADED": UpgradeStatusStatusUpgraded, +} + +var mappingUpgradeStatusStatusEnumLowerCase = map[string]UpgradeStatusStatusEnum{ + "not_upgraded": UpgradeStatusStatusNotUpgraded, + "in_progress": UpgradeStatusStatusInProgress, + "upgraded": UpgradeStatusStatusUpgraded, +} + +// GetUpgradeStatusStatusEnumValues Enumerates the set of values for UpgradeStatusStatusEnum +func GetUpgradeStatusStatusEnumValues() []UpgradeStatusStatusEnum { + values := make([]UpgradeStatusStatusEnum, 0) + for _, v := range mappingUpgradeStatusStatusEnum { + values = append(values, v) + } + return values +} + +// GetUpgradeStatusStatusEnumStringValues Enumerates the set of values in String for UpgradeStatusStatusEnum +func GetUpgradeStatusStatusEnumStringValues() []string { + return []string{ + "NOT_UPGRADED", + "IN_PROGRESS", + "UPGRADED", + } +} + +// GetMappingUpgradeStatusStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpgradeStatusStatusEnum(val string) (UpgradeStatusStatusEnum, bool) { + enum, ok := mappingUpgradeStatusStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/validate_byoasn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/validate_byoasn_request_response.go new file mode 100644 index 000000000..41be79e4b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/validate_byoasn_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ValidateByoasnRequest wrapper for the ValidateByoasn operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ValidateByoasn.go.html to see an example of how to use ValidateByoasnRequest. +type ValidateByoasnRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `Byoasn` resource. + ByoasnId *string `mandatory:"true" contributesTo:"path" name:"byoasnId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ValidateByoasnRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ValidateByoasnRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ValidateByoasnRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ValidateByoasnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ValidateByoasnRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ValidateByoasnResponse wrapper for the ValidateByoasn operation +type ValidateByoasnResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ValidateByoasnResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ValidateByoasnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/validate_byoip_range_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/validate_byoip_range_request_response.go new file mode 100644 index 000000000..964cb5ecc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/validate_byoip_range_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ValidateByoipRangeRequest wrapper for the ValidateByoipRange operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ValidateByoipRange.go.html to see an example of how to use ValidateByoipRangeRequest. +type ValidateByoipRangeRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource containing the BYOIP CIDR block. + ByoipRangeId *string `mandatory:"true" contributesTo:"path" name:"byoipRangeId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ValidateByoipRangeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ValidateByoipRangeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ValidateByoipRangeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ValidateByoipRangeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ValidateByoipRangeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ValidateByoipRangeResponse wrapper for the ValidateByoipRange operation +type ValidateByoipRangeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.oracle.com/iaas/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ValidateByoipRangeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ValidateByoipRangeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn.go new file mode 100644 index 000000000..d1e80d4f0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn.go @@ -0,0 +1,184 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Vcn A virtual cloud network (VCN). For more information, see +// Overview of the Networking Service (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type Vcn struct { + + // Deprecated. The first CIDR IP address from cidrBlocks. + // Example: `172.16.0.0/16` + CidrBlock *string `mandatory:"true" json:"cidrBlock"` + + // The list of IPv4 CIDR blocks the VCN will use. + CidrBlocks []string `mandatory:"true" json:"cidrBlocks"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the VCN. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The VCN's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // The VCN's current state. + LifecycleState VcnLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The list of BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 ranges. + Byoipv6CidrBlocks []string `mandatory:"false" json:"byoipv6CidrBlocks"` + + // For an IPv6-enabled VCN, this is the list of Private IPv6 prefixes for the VCN's IP address space. + Ipv6PrivateCidrBlocks []string `mandatory:"false" json:"ipv6PrivateCidrBlocks"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the VCN's default set of DHCP options. + DefaultDhcpOptionsId *string `mandatory:"false" json:"defaultDhcpOptionsId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the VCN's default route table. + DefaultRouteTableId *string `mandatory:"false" json:"defaultRouteTableId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the VCN's default security list. + DefaultSecurityListId *string `mandatory:"false" json:"defaultSecurityListId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // A DNS label for the VCN, used in conjunction with the VNIC's hostname and + // subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC + // within this subnet (for example, `bminstance1.subnet123.vcn1.oraclevcn.com`). + // Must be an alphanumeric string that begins with a letter. + // The value cannot be changed. + // The absence of this parameter means the Internet and VCN Resolver will + // not work for this VCN. + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + // Example: `vcn1` + DnsLabel *string `mandatory:"false" json:"dnsLabel"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Security attributes (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels + // for a resource that can be referenced in a Zero Trust Packet Routing (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) + // (ZPR) policy to control access to ZPR-supported resources. + // Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` + SecurityAttributes map[string]map[string]interface{} `mandatory:"false" json:"securityAttributes"` + + // For an IPv6-enabled VCN, this is the list of IPv6 prefixes for the VCN's IP address space. + // The prefixes are provided by Oracle and the sizes are always /56. + Ipv6CidrBlocks []string `mandatory:"false" json:"ipv6CidrBlocks"` + + // The date and time the VCN was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The VCN's domain name, which consists of the VCN's DNS label, and the + // `oraclevcn.com` domain. + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + // Example: `vcn1.oraclevcn.com` + VcnDomainName *string `mandatory:"false" json:"vcnDomainName"` + + // Indicates whether ZPR Only mode is enforced. + IsZprOnly *bool `mandatory:"false" json:"isZprOnly"` +} + +func (m Vcn) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Vcn) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVcnLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVcnLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VcnLifecycleStateEnum Enum with underlying type: string +type VcnLifecycleStateEnum string + +// Set of constants representing the allowable values for VcnLifecycleStateEnum +const ( + VcnLifecycleStateProvisioning VcnLifecycleStateEnum = "PROVISIONING" + VcnLifecycleStateAvailable VcnLifecycleStateEnum = "AVAILABLE" + VcnLifecycleStateTerminating VcnLifecycleStateEnum = "TERMINATING" + VcnLifecycleStateTerminated VcnLifecycleStateEnum = "TERMINATED" + VcnLifecycleStateUpdating VcnLifecycleStateEnum = "UPDATING" +) + +var mappingVcnLifecycleStateEnum = map[string]VcnLifecycleStateEnum{ + "PROVISIONING": VcnLifecycleStateProvisioning, + "AVAILABLE": VcnLifecycleStateAvailable, + "TERMINATING": VcnLifecycleStateTerminating, + "TERMINATED": VcnLifecycleStateTerminated, + "UPDATING": VcnLifecycleStateUpdating, +} + +var mappingVcnLifecycleStateEnumLowerCase = map[string]VcnLifecycleStateEnum{ + "provisioning": VcnLifecycleStateProvisioning, + "available": VcnLifecycleStateAvailable, + "terminating": VcnLifecycleStateTerminating, + "terminated": VcnLifecycleStateTerminated, + "updating": VcnLifecycleStateUpdating, +} + +// GetVcnLifecycleStateEnumValues Enumerates the set of values for VcnLifecycleStateEnum +func GetVcnLifecycleStateEnumValues() []VcnLifecycleStateEnum { + values := make([]VcnLifecycleStateEnum, 0) + for _, v := range mappingVcnLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVcnLifecycleStateEnumStringValues Enumerates the set of values in String for VcnLifecycleStateEnum +func GetVcnLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + "UPDATING", + } +} + +// GetMappingVcnLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVcnLifecycleStateEnum(val string) (VcnLifecycleStateEnum, bool) { + enum, ok := mappingVcnLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_dns_resolver_association.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_dns_resolver_association.go new file mode 100644 index 000000000..545ccef60 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_dns_resolver_association.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VcnDnsResolverAssociation The information about the VCN and the DNS resolver in the association. +type VcnDnsResolverAssociation struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN in the association. + VcnId *string `mandatory:"true" json:"vcnId"` + + // The current state of the association. + LifecycleState VcnDnsResolverAssociationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DNS resolver in the association. + DnsResolverId *string `mandatory:"false" json:"dnsResolverId"` +} + +func (m VcnDnsResolverAssociation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VcnDnsResolverAssociation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVcnDnsResolverAssociationLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVcnDnsResolverAssociationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VcnDnsResolverAssociationLifecycleStateEnum Enum with underlying type: string +type VcnDnsResolverAssociationLifecycleStateEnum string + +// Set of constants representing the allowable values for VcnDnsResolverAssociationLifecycleStateEnum +const ( + VcnDnsResolverAssociationLifecycleStateProvisioning VcnDnsResolverAssociationLifecycleStateEnum = "PROVISIONING" + VcnDnsResolverAssociationLifecycleStateAvailable VcnDnsResolverAssociationLifecycleStateEnum = "AVAILABLE" + VcnDnsResolverAssociationLifecycleStateTerminating VcnDnsResolverAssociationLifecycleStateEnum = "TERMINATING" + VcnDnsResolverAssociationLifecycleStateTerminated VcnDnsResolverAssociationLifecycleStateEnum = "TERMINATED" +) + +var mappingVcnDnsResolverAssociationLifecycleStateEnum = map[string]VcnDnsResolverAssociationLifecycleStateEnum{ + "PROVISIONING": VcnDnsResolverAssociationLifecycleStateProvisioning, + "AVAILABLE": VcnDnsResolverAssociationLifecycleStateAvailable, + "TERMINATING": VcnDnsResolverAssociationLifecycleStateTerminating, + "TERMINATED": VcnDnsResolverAssociationLifecycleStateTerminated, +} + +var mappingVcnDnsResolverAssociationLifecycleStateEnumLowerCase = map[string]VcnDnsResolverAssociationLifecycleStateEnum{ + "provisioning": VcnDnsResolverAssociationLifecycleStateProvisioning, + "available": VcnDnsResolverAssociationLifecycleStateAvailable, + "terminating": VcnDnsResolverAssociationLifecycleStateTerminating, + "terminated": VcnDnsResolverAssociationLifecycleStateTerminated, +} + +// GetVcnDnsResolverAssociationLifecycleStateEnumValues Enumerates the set of values for VcnDnsResolverAssociationLifecycleStateEnum +func GetVcnDnsResolverAssociationLifecycleStateEnumValues() []VcnDnsResolverAssociationLifecycleStateEnum { + values := make([]VcnDnsResolverAssociationLifecycleStateEnum, 0) + for _, v := range mappingVcnDnsResolverAssociationLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVcnDnsResolverAssociationLifecycleStateEnumStringValues Enumerates the set of values in String for VcnDnsResolverAssociationLifecycleStateEnum +func GetVcnDnsResolverAssociationLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingVcnDnsResolverAssociationLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVcnDnsResolverAssociationLifecycleStateEnum(val string) (VcnDnsResolverAssociationLifecycleStateEnum, bool) { + enum, ok := mappingVcnDnsResolverAssociationLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_create_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_create_details.go new file mode 100644 index 000000000..92b1a6564 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_create_details.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VcnDrgAttachmentNetworkCreateDetails Specifies the VCN Attachment +type VcnDrgAttachmentNetworkCreateDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. + Id *string `mandatory:"false" json:"id"` + + // This is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table that is used to route the traffic as it enters a VCN through this attachment. + // For information about why you would associate a route table with a DRG attachment, see + // Advanced Scenario: Transit Routing (https://docs.oracle.com/iaas/Content/Network/Tasks/transitrouting.htm). + // For information about why you would associate a route table with a DRG attachment, see: + // * Transit Routing: Access to Multiple VCNs in Same Region (https://docs.oracle.com/iaas/Content/Network/Tasks/transitrouting.htm) + // * Transit Routing: Private Access to Oracle Services (https://docs.oracle.com/iaas/Content/Network/Tasks/transitroutingoracleservices.htm) + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // Indicates whether the VCN CIDRs or the individual subnet CIDRs are imported from the attachment. + // Routes from the VCN ingress route table are always imported. + VcnRouteType VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum `mandatory:"false" json:"vcnRouteType,omitempty"` +} + +// GetId returns Id +func (m VcnDrgAttachmentNetworkCreateDetails) GetId() *string { + return m.Id +} + +func (m VcnDrgAttachmentNetworkCreateDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VcnDrgAttachmentNetworkCreateDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum(string(m.VcnRouteType)); !ok && m.VcnRouteType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for VcnRouteType: %s. Supported values are: %s.", m.VcnRouteType, strings.Join(GetVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VcnDrgAttachmentNetworkCreateDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVcnDrgAttachmentNetworkCreateDetails VcnDrgAttachmentNetworkCreateDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVcnDrgAttachmentNetworkCreateDetails + }{ + "VCN", + (MarshalTypeVcnDrgAttachmentNetworkCreateDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_details.go new file mode 100644 index 000000000..5661afa29 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_details.go @@ -0,0 +1,120 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VcnDrgAttachmentNetworkDetails Specifies details within the VCN. +type VcnDrgAttachmentNetworkDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. + Id *string `mandatory:"false" json:"id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the DRG attachment is using. + // For information about why you would associate a route table with a DRG attachment, see: + // * Transit Routing: Access to Multiple VCNs in Same Region (https://docs.oracle.com/iaas/Content/Network/Tasks/transitrouting.htm) + // * Transit Routing: Private Access to Oracle Services (https://docs.oracle.com/iaas/Content/Network/Tasks/transitroutingoracleservices.htm) + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // Indicates whether the VCN CIDRs or the individual subnet CIDRs are imported from the attachment. + // Routes from the VCN ingress route table are always imported. + VcnRouteType VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum `mandatory:"false" json:"vcnRouteType,omitempty"` +} + +// GetId returns Id +func (m VcnDrgAttachmentNetworkDetails) GetId() *string { + return m.Id +} + +func (m VcnDrgAttachmentNetworkDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VcnDrgAttachmentNetworkDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum(string(m.VcnRouteType)); !ok && m.VcnRouteType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for VcnRouteType: %s. Supported values are: %s.", m.VcnRouteType, strings.Join(GetVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VcnDrgAttachmentNetworkDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVcnDrgAttachmentNetworkDetails VcnDrgAttachmentNetworkDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVcnDrgAttachmentNetworkDetails + }{ + "VCN", + (MarshalTypeVcnDrgAttachmentNetworkDetails)(m), + } + + return json.Marshal(&s) +} + +// VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum Enum with underlying type: string +type VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum string + +// Set of constants representing the allowable values for VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum +const ( + VcnDrgAttachmentNetworkDetailsVcnRouteTypeVcnCidrs VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum = "VCN_CIDRS" + VcnDrgAttachmentNetworkDetailsVcnRouteTypeSubnetCidrs VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum = "SUBNET_CIDRS" +) + +var mappingVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum = map[string]VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum{ + "VCN_CIDRS": VcnDrgAttachmentNetworkDetailsVcnRouteTypeVcnCidrs, + "SUBNET_CIDRS": VcnDrgAttachmentNetworkDetailsVcnRouteTypeSubnetCidrs, +} + +var mappingVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnumLowerCase = map[string]VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum{ + "vcn_cidrs": VcnDrgAttachmentNetworkDetailsVcnRouteTypeVcnCidrs, + "subnet_cidrs": VcnDrgAttachmentNetworkDetailsVcnRouteTypeSubnetCidrs, +} + +// GetVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnumValues Enumerates the set of values for VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum +func GetVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnumValues() []VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum { + values := make([]VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum, 0) + for _, v := range mappingVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum { + values = append(values, v) + } + return values +} + +// GetVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnumStringValues Enumerates the set of values in String for VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum +func GetVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnumStringValues() []string { + return []string{ + "VCN_CIDRS", + "SUBNET_CIDRS", + } +} + +// GetMappingVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum(val string) (VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum, bool) { + enum, ok := mappingVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_update_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_update_details.go new file mode 100644 index 000000000..f26163009 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_drg_attachment_network_update_details.go @@ -0,0 +1,70 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VcnDrgAttachmentNetworkUpdateDetails Specifies the update details for the VCN attachment. +type VcnDrgAttachmentNetworkUpdateDetails struct { + + // This is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table that is used to route the traffic as it enters a VCN through this attachment. + // For information about why you would associate a route table with a DRG attachment, see: + // * Transit Routing: Access to Multiple VCNs in Same Region (https://docs.oracle.com/iaas/Content/Network/Tasks/transitrouting.htm) + // * Transit Routing: Private Access to Oracle Services (https://docs.oracle.com/iaas/Content/Network/Tasks/transitroutingoracleservices.htm) + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // Indicates whether the VCN CIDRs or the individual subnet CIDRs are imported from the attachment. + // Routes from the VCN ingress route table are always imported. + VcnRouteType VcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum `mandatory:"false" json:"vcnRouteType,omitempty"` +} + +func (m VcnDrgAttachmentNetworkUpdateDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VcnDrgAttachmentNetworkUpdateDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnum(string(m.VcnRouteType)); !ok && m.VcnRouteType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for VcnRouteType: %s. Supported values are: %s.", m.VcnRouteType, strings.Join(GetVcnDrgAttachmentNetworkDetailsVcnRouteTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VcnDrgAttachmentNetworkUpdateDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVcnDrgAttachmentNetworkUpdateDetails VcnDrgAttachmentNetworkUpdateDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVcnDrgAttachmentNetworkUpdateDetails + }{ + "VCN", + (MarshalTypeVcnDrgAttachmentNetworkUpdateDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_topology.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_topology.go new file mode 100644 index 000000000..efb604cf0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vcn_topology.go @@ -0,0 +1,134 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VcnTopology Defines the representation of a virtual network topology for a VCN. +// See Network Visualizer Documentation (https://docs.oracle.com/iaas/Content/Network/Concepts/network_visualizer.htm) for more information, including +// conventions and pictures of symbols. +type VcnTopology struct { + + // Lists entities comprising the virtual network topology. + Entities []interface{} `mandatory:"true" json:"entities"` + + // Lists relationships between entities in the virtual network topology. + Relationships []TopologyEntityRelationship `mandatory:"true" json:"relationships"` + + // Lists entities that are limited during ingestion. + // The values for the items in the list are the entity type names of the limitedEntities. + // Example: `vcn` + LimitedEntities []string `mandatory:"true" json:"limitedEntities"` + + // Records when the virtual network topology was created, in RFC3339 (https://tools.ietf.org/html/rfc3339) format for date and time. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN for which the topology is generated. + VcnId *string `mandatory:"false" json:"vcnId"` +} + +// GetEntities returns Entities +func (m VcnTopology) GetEntities() []interface{} { + return m.Entities +} + +// GetRelationships returns Relationships +func (m VcnTopology) GetRelationships() []TopologyEntityRelationship { + return m.Relationships +} + +// GetLimitedEntities returns LimitedEntities +func (m VcnTopology) GetLimitedEntities() []string { + return m.LimitedEntities +} + +// GetTimeCreated returns TimeCreated +func (m VcnTopology) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +func (m VcnTopology) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VcnTopology) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VcnTopology) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVcnTopology VcnTopology + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVcnTopology + }{ + "VCN", + (MarshalTypeVcnTopology)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *VcnTopology) UnmarshalJSON(data []byte) (e error) { + model := struct { + VcnId *string `json:"vcnId"` + Entities []interface{} `json:"entities"` + Relationships []topologyentityrelationship `json:"relationships"` + LimitedEntities []string `json:"limitedEntities"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.VcnId = model.VcnId + + m.Entities = make([]interface{}, len(model.Entities)) + copy(m.Entities, model.Entities) + m.Relationships = make([]TopologyEntityRelationship, len(model.Relationships)) + for i, n := range model.Relationships { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Relationships[i] = nn.(TopologyEntityRelationship) + } else { + m.Relationships[i] = nil + } + } + m.LimitedEntities = make([]string, len(model.LimitedEntities)) + copy(m.LimitedEntities, model.LimitedEntities) + m.TimeCreated = model.TimeCreated + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit.go new file mode 100644 index 000000000..984e3ac61 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit.go @@ -0,0 +1,636 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualCircuit For use with Oracle Cloud Infrastructure FastConnect. +// A virtual circuit is an isolated network path that runs over one or more physical +// network connections to provide a single, logical connection between the edge router +// on the customer's existing network and Oracle Cloud Infrastructure. *Private* +// virtual circuits support private peering, and *public* virtual circuits support +// public peering. For more information, see FastConnect Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +// Each virtual circuit is made up of information shared between a customer, Oracle, +// and a provider (if the customer is using FastConnect via a provider). Who fills in +// a given property of a virtual circuit depends on whether the BGP session related to +// that virtual circuit goes from the customer's edge router to Oracle, or from the provider's +// edge router to Oracle. Also, in the case where the customer is using a provider, values +// for some of the properties may not be present immediately, but may get filled in as the +// provider and Oracle each do their part to provision the virtual circuit. +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type VirtualCircuit struct { + + // The provisioned data rate of the connection. To get a list of the + // available bandwidth levels (that is, shapes), see + // ListFastConnectProviderVirtualCircuitBandwidthShapes. + // Example: `10 Gbps` + BandwidthShapeName *string `mandatory:"false" json:"bandwidthShapeName"` + + // Deprecated. Instead use the information in + // FastConnectProviderService. + BgpManagement VirtualCircuitBgpManagementEnum `mandatory:"false" json:"bgpManagement,omitempty"` + + // The state of the Ipv4 BGP session associated with the virtual circuit. + BgpSessionState VirtualCircuitBgpSessionStateEnum `mandatory:"false" json:"bgpSessionState,omitempty"` + + // The state of the Ipv6 BGP session associated with the virtual circuit. + BgpIpv6SessionState VirtualCircuitBgpIpv6SessionStateEnum `mandatory:"false" json:"bgpIpv6SessionState,omitempty"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the virtual circuit. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // An array of mappings, each containing properties for a + // cross-connect or cross-connect group that is associated with this + // virtual circuit. + CrossConnectMappings []CrossConnectMapping `mandatory:"false" json:"crossConnectMappings"` + + // The routing policy sets how routing information about the Oracle cloud is shared over a public virtual circuit. + // Policies available are: `ORACLE_SERVICE_NETWORK`, `REGIONAL`, `MARKET_LEVEL`, and `GLOBAL`. + // See Route Filtering (https://docs.oracle.com/iaas/Content/Network/Concepts/routingonprem.htm#route_filtering) for details. + // By default, routing information is shared for all routes in the same market. + RoutingPolicy []VirtualCircuitRoutingPolicyEnum `mandatory:"false" json:"routingPolicy,omitempty"` + + // Set to `ENABLED` (the default) to activate the BGP session of the virtual circuit, set to `DISABLED` to deactivate the virtual circuit. + BgpAdminState VirtualCircuitBgpAdminStateEnum `mandatory:"false" json:"bgpAdminState,omitempty"` + + // Set to `true` to enable BFD for IPv4 BGP peering, or set to `false` to disable BFD. If this is not set, the default is `false`. + IsBfdEnabled *bool `mandatory:"false" json:"isBfdEnabled"` + + // Set to `true` for the virtual circuit to carry only encrypted traffic, or set to `false` for the virtual circuit to carry unencrypted traffic. If this is not set, the default is `false`. + IsTransportMode *bool `mandatory:"false" json:"isTransportMode"` + + // Deprecated. Instead use `customerAsn`. + // If you specify values for both, the request will be rejected. + CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` + + // The BGP ASN of the network at the other end of the BGP + // session from Oracle. If the session is between the customer's + // edge router and Oracle, the value is the customer's ASN. If the BGP + // session is between the provider's edge router and Oracle, the value + // is the provider's ASN. + // Can be a 2-byte or 4-byte ASN. Uses "asplain" format. + CustomerAsn *int64 `mandatory:"false" json:"customerAsn"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the customer's Drg + // that this virtual circuit uses. Applicable only to private virtual circuits. + GatewayId *string `mandatory:"false" json:"gatewayId"` + + // The virtual circuit's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"false" json:"id"` + + // The virtual circuit's current state. For information about + // the different states, see + // FastConnect Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). + LifecycleState VirtualCircuitLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The Oracle BGP ASN. + OracleBgpAsn *int `mandatory:"false" json:"oracleBgpAsn"` + + // Deprecated. Instead use `providerServiceId`. + ProviderName *string `mandatory:"false" json:"providerName"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the service offered by the provider (if the customer is connecting via a provider). + ProviderServiceId *string `mandatory:"false" json:"providerServiceId"` + + // The service key name offered by the provider (if the customer is connecting via a provider). + ProviderServiceKeyName *string `mandatory:"false" json:"providerServiceKeyName"` + + // Deprecated. Instead use `providerServiceId`. + ProviderServiceName *string `mandatory:"false" json:"providerServiceName"` + + // The provider's state in relation to this virtual circuit (if the + // customer is connecting via a provider). ACTIVE means + // the provider has provisioned the virtual circuit from their end. + // INACTIVE means the provider has not yet provisioned the virtual + // circuit, or has de-provisioned it. + ProviderState VirtualCircuitProviderStateEnum `mandatory:"false" json:"providerState,omitempty"` + + // For a public virtual circuit. The public IP prefixes (CIDRs) the customer wants to + // advertise across the connection. All prefix sizes are allowed. + PublicPrefixes []string `mandatory:"false" json:"publicPrefixes"` + + // Provider-supplied reference information about this virtual circuit + // (if the customer is connecting via a provider). + ReferenceComment *string `mandatory:"false" json:"referenceComment"` + + // The Oracle Cloud Infrastructure region where this virtual + // circuit is located. + Region *string `mandatory:"false" json:"region"` + + // Provider service type. + ServiceType VirtualCircuitServiceTypeEnum `mandatory:"false" json:"serviceType,omitempty"` + + // The date and time the virtual circuit was created, + // in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Whether the virtual circuit supports private or public peering. For more information, + // see FastConnect Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). + Type VirtualCircuitTypeEnum `mandatory:"false" json:"type,omitempty"` + + // The layer 3 IP MTU to use on this virtual circuit. + IpMtu VirtualCircuitIpMtuEnum `mandatory:"false" json:"ipMtu,omitempty"` + + VirtualCircuitRedundancyMetadata *VirtualCircuitRedundancyMetadata `mandatory:"false" json:"virtualCircuitRedundancyMetadata"` +} + +func (m VirtualCircuit) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualCircuit) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingVirtualCircuitBgpManagementEnum(string(m.BgpManagement)); !ok && m.BgpManagement != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BgpManagement: %s. Supported values are: %s.", m.BgpManagement, strings.Join(GetVirtualCircuitBgpManagementEnumStringValues(), ","))) + } + if _, ok := GetMappingVirtualCircuitBgpSessionStateEnum(string(m.BgpSessionState)); !ok && m.BgpSessionState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BgpSessionState: %s. Supported values are: %s.", m.BgpSessionState, strings.Join(GetVirtualCircuitBgpSessionStateEnumStringValues(), ","))) + } + if _, ok := GetMappingVirtualCircuitBgpIpv6SessionStateEnum(string(m.BgpIpv6SessionState)); !ok && m.BgpIpv6SessionState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BgpIpv6SessionState: %s. Supported values are: %s.", m.BgpIpv6SessionState, strings.Join(GetVirtualCircuitBgpIpv6SessionStateEnumStringValues(), ","))) + } + for _, val := range m.RoutingPolicy { + if _, ok := GetMappingVirtualCircuitRoutingPolicyEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RoutingPolicy: %s. Supported values are: %s.", val, strings.Join(GetVirtualCircuitRoutingPolicyEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingVirtualCircuitBgpAdminStateEnum(string(m.BgpAdminState)); !ok && m.BgpAdminState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BgpAdminState: %s. Supported values are: %s.", m.BgpAdminState, strings.Join(GetVirtualCircuitBgpAdminStateEnumStringValues(), ","))) + } + if _, ok := GetMappingVirtualCircuitLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVirtualCircuitLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingVirtualCircuitProviderStateEnum(string(m.ProviderState)); !ok && m.ProviderState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProviderState: %s. Supported values are: %s.", m.ProviderState, strings.Join(GetVirtualCircuitProviderStateEnumStringValues(), ","))) + } + if _, ok := GetMappingVirtualCircuitServiceTypeEnum(string(m.ServiceType)); !ok && m.ServiceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ServiceType: %s. Supported values are: %s.", m.ServiceType, strings.Join(GetVirtualCircuitServiceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingVirtualCircuitTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetVirtualCircuitTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingVirtualCircuitIpMtuEnum(string(m.IpMtu)); !ok && m.IpMtu != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IpMtu: %s. Supported values are: %s.", m.IpMtu, strings.Join(GetVirtualCircuitIpMtuEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VirtualCircuitBgpManagementEnum Enum with underlying type: string +type VirtualCircuitBgpManagementEnum string + +// Set of constants representing the allowable values for VirtualCircuitBgpManagementEnum +const ( + VirtualCircuitBgpManagementCustomerManaged VirtualCircuitBgpManagementEnum = "CUSTOMER_MANAGED" + VirtualCircuitBgpManagementProviderManaged VirtualCircuitBgpManagementEnum = "PROVIDER_MANAGED" + VirtualCircuitBgpManagementOracleManaged VirtualCircuitBgpManagementEnum = "ORACLE_MANAGED" +) + +var mappingVirtualCircuitBgpManagementEnum = map[string]VirtualCircuitBgpManagementEnum{ + "CUSTOMER_MANAGED": VirtualCircuitBgpManagementCustomerManaged, + "PROVIDER_MANAGED": VirtualCircuitBgpManagementProviderManaged, + "ORACLE_MANAGED": VirtualCircuitBgpManagementOracleManaged, +} + +var mappingVirtualCircuitBgpManagementEnumLowerCase = map[string]VirtualCircuitBgpManagementEnum{ + "customer_managed": VirtualCircuitBgpManagementCustomerManaged, + "provider_managed": VirtualCircuitBgpManagementProviderManaged, + "oracle_managed": VirtualCircuitBgpManagementOracleManaged, +} + +// GetVirtualCircuitBgpManagementEnumValues Enumerates the set of values for VirtualCircuitBgpManagementEnum +func GetVirtualCircuitBgpManagementEnumValues() []VirtualCircuitBgpManagementEnum { + values := make([]VirtualCircuitBgpManagementEnum, 0) + for _, v := range mappingVirtualCircuitBgpManagementEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitBgpManagementEnumStringValues Enumerates the set of values in String for VirtualCircuitBgpManagementEnum +func GetVirtualCircuitBgpManagementEnumStringValues() []string { + return []string{ + "CUSTOMER_MANAGED", + "PROVIDER_MANAGED", + "ORACLE_MANAGED", + } +} + +// GetMappingVirtualCircuitBgpManagementEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitBgpManagementEnum(val string) (VirtualCircuitBgpManagementEnum, bool) { + enum, ok := mappingVirtualCircuitBgpManagementEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VirtualCircuitBgpSessionStateEnum Enum with underlying type: string +type VirtualCircuitBgpSessionStateEnum string + +// Set of constants representing the allowable values for VirtualCircuitBgpSessionStateEnum +const ( + VirtualCircuitBgpSessionStateUp VirtualCircuitBgpSessionStateEnum = "UP" + VirtualCircuitBgpSessionStateDown VirtualCircuitBgpSessionStateEnum = "DOWN" +) + +var mappingVirtualCircuitBgpSessionStateEnum = map[string]VirtualCircuitBgpSessionStateEnum{ + "UP": VirtualCircuitBgpSessionStateUp, + "DOWN": VirtualCircuitBgpSessionStateDown, +} + +var mappingVirtualCircuitBgpSessionStateEnumLowerCase = map[string]VirtualCircuitBgpSessionStateEnum{ + "up": VirtualCircuitBgpSessionStateUp, + "down": VirtualCircuitBgpSessionStateDown, +} + +// GetVirtualCircuitBgpSessionStateEnumValues Enumerates the set of values for VirtualCircuitBgpSessionStateEnum +func GetVirtualCircuitBgpSessionStateEnumValues() []VirtualCircuitBgpSessionStateEnum { + values := make([]VirtualCircuitBgpSessionStateEnum, 0) + for _, v := range mappingVirtualCircuitBgpSessionStateEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitBgpSessionStateEnumStringValues Enumerates the set of values in String for VirtualCircuitBgpSessionStateEnum +func GetVirtualCircuitBgpSessionStateEnumStringValues() []string { + return []string{ + "UP", + "DOWN", + } +} + +// GetMappingVirtualCircuitBgpSessionStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitBgpSessionStateEnum(val string) (VirtualCircuitBgpSessionStateEnum, bool) { + enum, ok := mappingVirtualCircuitBgpSessionStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VirtualCircuitBgpIpv6SessionStateEnum Enum with underlying type: string +type VirtualCircuitBgpIpv6SessionStateEnum string + +// Set of constants representing the allowable values for VirtualCircuitBgpIpv6SessionStateEnum +const ( + VirtualCircuitBgpIpv6SessionStateUp VirtualCircuitBgpIpv6SessionStateEnum = "UP" + VirtualCircuitBgpIpv6SessionStateDown VirtualCircuitBgpIpv6SessionStateEnum = "DOWN" +) + +var mappingVirtualCircuitBgpIpv6SessionStateEnum = map[string]VirtualCircuitBgpIpv6SessionStateEnum{ + "UP": VirtualCircuitBgpIpv6SessionStateUp, + "DOWN": VirtualCircuitBgpIpv6SessionStateDown, +} + +var mappingVirtualCircuitBgpIpv6SessionStateEnumLowerCase = map[string]VirtualCircuitBgpIpv6SessionStateEnum{ + "up": VirtualCircuitBgpIpv6SessionStateUp, + "down": VirtualCircuitBgpIpv6SessionStateDown, +} + +// GetVirtualCircuitBgpIpv6SessionStateEnumValues Enumerates the set of values for VirtualCircuitBgpIpv6SessionStateEnum +func GetVirtualCircuitBgpIpv6SessionStateEnumValues() []VirtualCircuitBgpIpv6SessionStateEnum { + values := make([]VirtualCircuitBgpIpv6SessionStateEnum, 0) + for _, v := range mappingVirtualCircuitBgpIpv6SessionStateEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitBgpIpv6SessionStateEnumStringValues Enumerates the set of values in String for VirtualCircuitBgpIpv6SessionStateEnum +func GetVirtualCircuitBgpIpv6SessionStateEnumStringValues() []string { + return []string{ + "UP", + "DOWN", + } +} + +// GetMappingVirtualCircuitBgpIpv6SessionStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitBgpIpv6SessionStateEnum(val string) (VirtualCircuitBgpIpv6SessionStateEnum, bool) { + enum, ok := mappingVirtualCircuitBgpIpv6SessionStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VirtualCircuitRoutingPolicyEnum Enum with underlying type: string +type VirtualCircuitRoutingPolicyEnum string + +// Set of constants representing the allowable values for VirtualCircuitRoutingPolicyEnum +const ( + VirtualCircuitRoutingPolicyOracleServiceNetwork VirtualCircuitRoutingPolicyEnum = "ORACLE_SERVICE_NETWORK" + VirtualCircuitRoutingPolicyRegional VirtualCircuitRoutingPolicyEnum = "REGIONAL" + VirtualCircuitRoutingPolicyMarketLevel VirtualCircuitRoutingPolicyEnum = "MARKET_LEVEL" + VirtualCircuitRoutingPolicyGlobal VirtualCircuitRoutingPolicyEnum = "GLOBAL" +) + +var mappingVirtualCircuitRoutingPolicyEnum = map[string]VirtualCircuitRoutingPolicyEnum{ + "ORACLE_SERVICE_NETWORK": VirtualCircuitRoutingPolicyOracleServiceNetwork, + "REGIONAL": VirtualCircuitRoutingPolicyRegional, + "MARKET_LEVEL": VirtualCircuitRoutingPolicyMarketLevel, + "GLOBAL": VirtualCircuitRoutingPolicyGlobal, +} + +var mappingVirtualCircuitRoutingPolicyEnumLowerCase = map[string]VirtualCircuitRoutingPolicyEnum{ + "oracle_service_network": VirtualCircuitRoutingPolicyOracleServiceNetwork, + "regional": VirtualCircuitRoutingPolicyRegional, + "market_level": VirtualCircuitRoutingPolicyMarketLevel, + "global": VirtualCircuitRoutingPolicyGlobal, +} + +// GetVirtualCircuitRoutingPolicyEnumValues Enumerates the set of values for VirtualCircuitRoutingPolicyEnum +func GetVirtualCircuitRoutingPolicyEnumValues() []VirtualCircuitRoutingPolicyEnum { + values := make([]VirtualCircuitRoutingPolicyEnum, 0) + for _, v := range mappingVirtualCircuitRoutingPolicyEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitRoutingPolicyEnumStringValues Enumerates the set of values in String for VirtualCircuitRoutingPolicyEnum +func GetVirtualCircuitRoutingPolicyEnumStringValues() []string { + return []string{ + "ORACLE_SERVICE_NETWORK", + "REGIONAL", + "MARKET_LEVEL", + "GLOBAL", + } +} + +// GetMappingVirtualCircuitRoutingPolicyEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitRoutingPolicyEnum(val string) (VirtualCircuitRoutingPolicyEnum, bool) { + enum, ok := mappingVirtualCircuitRoutingPolicyEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VirtualCircuitBgpAdminStateEnum Enum with underlying type: string +type VirtualCircuitBgpAdminStateEnum string + +// Set of constants representing the allowable values for VirtualCircuitBgpAdminStateEnum +const ( + VirtualCircuitBgpAdminStateEnabled VirtualCircuitBgpAdminStateEnum = "ENABLED" + VirtualCircuitBgpAdminStateDisabled VirtualCircuitBgpAdminStateEnum = "DISABLED" +) + +var mappingVirtualCircuitBgpAdminStateEnum = map[string]VirtualCircuitBgpAdminStateEnum{ + "ENABLED": VirtualCircuitBgpAdminStateEnabled, + "DISABLED": VirtualCircuitBgpAdminStateDisabled, +} + +var mappingVirtualCircuitBgpAdminStateEnumLowerCase = map[string]VirtualCircuitBgpAdminStateEnum{ + "enabled": VirtualCircuitBgpAdminStateEnabled, + "disabled": VirtualCircuitBgpAdminStateDisabled, +} + +// GetVirtualCircuitBgpAdminStateEnumValues Enumerates the set of values for VirtualCircuitBgpAdminStateEnum +func GetVirtualCircuitBgpAdminStateEnumValues() []VirtualCircuitBgpAdminStateEnum { + values := make([]VirtualCircuitBgpAdminStateEnum, 0) + for _, v := range mappingVirtualCircuitBgpAdminStateEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitBgpAdminStateEnumStringValues Enumerates the set of values in String for VirtualCircuitBgpAdminStateEnum +func GetVirtualCircuitBgpAdminStateEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + } +} + +// GetMappingVirtualCircuitBgpAdminStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitBgpAdminStateEnum(val string) (VirtualCircuitBgpAdminStateEnum, bool) { + enum, ok := mappingVirtualCircuitBgpAdminStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VirtualCircuitLifecycleStateEnum Enum with underlying type: string +type VirtualCircuitLifecycleStateEnum string + +// Set of constants representing the allowable values for VirtualCircuitLifecycleStateEnum +const ( + VirtualCircuitLifecycleStatePendingProvider VirtualCircuitLifecycleStateEnum = "PENDING_PROVIDER" + VirtualCircuitLifecycleStateVerifying VirtualCircuitLifecycleStateEnum = "VERIFYING" + VirtualCircuitLifecycleStateProvisioning VirtualCircuitLifecycleStateEnum = "PROVISIONING" + VirtualCircuitLifecycleStateProvisioned VirtualCircuitLifecycleStateEnum = "PROVISIONED" + VirtualCircuitLifecycleStateFailed VirtualCircuitLifecycleStateEnum = "FAILED" + VirtualCircuitLifecycleStateInactive VirtualCircuitLifecycleStateEnum = "INACTIVE" + VirtualCircuitLifecycleStateTerminating VirtualCircuitLifecycleStateEnum = "TERMINATING" + VirtualCircuitLifecycleStateTerminated VirtualCircuitLifecycleStateEnum = "TERMINATED" +) + +var mappingVirtualCircuitLifecycleStateEnum = map[string]VirtualCircuitLifecycleStateEnum{ + "PENDING_PROVIDER": VirtualCircuitLifecycleStatePendingProvider, + "VERIFYING": VirtualCircuitLifecycleStateVerifying, + "PROVISIONING": VirtualCircuitLifecycleStateProvisioning, + "PROVISIONED": VirtualCircuitLifecycleStateProvisioned, + "FAILED": VirtualCircuitLifecycleStateFailed, + "INACTIVE": VirtualCircuitLifecycleStateInactive, + "TERMINATING": VirtualCircuitLifecycleStateTerminating, + "TERMINATED": VirtualCircuitLifecycleStateTerminated, +} + +var mappingVirtualCircuitLifecycleStateEnumLowerCase = map[string]VirtualCircuitLifecycleStateEnum{ + "pending_provider": VirtualCircuitLifecycleStatePendingProvider, + "verifying": VirtualCircuitLifecycleStateVerifying, + "provisioning": VirtualCircuitLifecycleStateProvisioning, + "provisioned": VirtualCircuitLifecycleStateProvisioned, + "failed": VirtualCircuitLifecycleStateFailed, + "inactive": VirtualCircuitLifecycleStateInactive, + "terminating": VirtualCircuitLifecycleStateTerminating, + "terminated": VirtualCircuitLifecycleStateTerminated, +} + +// GetVirtualCircuitLifecycleStateEnumValues Enumerates the set of values for VirtualCircuitLifecycleStateEnum +func GetVirtualCircuitLifecycleStateEnumValues() []VirtualCircuitLifecycleStateEnum { + values := make([]VirtualCircuitLifecycleStateEnum, 0) + for _, v := range mappingVirtualCircuitLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitLifecycleStateEnumStringValues Enumerates the set of values in String for VirtualCircuitLifecycleStateEnum +func GetVirtualCircuitLifecycleStateEnumStringValues() []string { + return []string{ + "PENDING_PROVIDER", + "VERIFYING", + "PROVISIONING", + "PROVISIONED", + "FAILED", + "INACTIVE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingVirtualCircuitLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitLifecycleStateEnum(val string) (VirtualCircuitLifecycleStateEnum, bool) { + enum, ok := mappingVirtualCircuitLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VirtualCircuitProviderStateEnum Enum with underlying type: string +type VirtualCircuitProviderStateEnum string + +// Set of constants representing the allowable values for VirtualCircuitProviderStateEnum +const ( + VirtualCircuitProviderStateActive VirtualCircuitProviderStateEnum = "ACTIVE" + VirtualCircuitProviderStateInactive VirtualCircuitProviderStateEnum = "INACTIVE" +) + +var mappingVirtualCircuitProviderStateEnum = map[string]VirtualCircuitProviderStateEnum{ + "ACTIVE": VirtualCircuitProviderStateActive, + "INACTIVE": VirtualCircuitProviderStateInactive, +} + +var mappingVirtualCircuitProviderStateEnumLowerCase = map[string]VirtualCircuitProviderStateEnum{ + "active": VirtualCircuitProviderStateActive, + "inactive": VirtualCircuitProviderStateInactive, +} + +// GetVirtualCircuitProviderStateEnumValues Enumerates the set of values for VirtualCircuitProviderStateEnum +func GetVirtualCircuitProviderStateEnumValues() []VirtualCircuitProviderStateEnum { + values := make([]VirtualCircuitProviderStateEnum, 0) + for _, v := range mappingVirtualCircuitProviderStateEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitProviderStateEnumStringValues Enumerates the set of values in String for VirtualCircuitProviderStateEnum +func GetVirtualCircuitProviderStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + } +} + +// GetMappingVirtualCircuitProviderStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitProviderStateEnum(val string) (VirtualCircuitProviderStateEnum, bool) { + enum, ok := mappingVirtualCircuitProviderStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VirtualCircuitServiceTypeEnum Enum with underlying type: string +type VirtualCircuitServiceTypeEnum string + +// Set of constants representing the allowable values for VirtualCircuitServiceTypeEnum +const ( + VirtualCircuitServiceTypeColocated VirtualCircuitServiceTypeEnum = "COLOCATED" + VirtualCircuitServiceTypeLayer2 VirtualCircuitServiceTypeEnum = "LAYER2" + VirtualCircuitServiceTypeLayer3 VirtualCircuitServiceTypeEnum = "LAYER3" +) + +var mappingVirtualCircuitServiceTypeEnum = map[string]VirtualCircuitServiceTypeEnum{ + "COLOCATED": VirtualCircuitServiceTypeColocated, + "LAYER2": VirtualCircuitServiceTypeLayer2, + "LAYER3": VirtualCircuitServiceTypeLayer3, +} + +var mappingVirtualCircuitServiceTypeEnumLowerCase = map[string]VirtualCircuitServiceTypeEnum{ + "colocated": VirtualCircuitServiceTypeColocated, + "layer2": VirtualCircuitServiceTypeLayer2, + "layer3": VirtualCircuitServiceTypeLayer3, +} + +// GetVirtualCircuitServiceTypeEnumValues Enumerates the set of values for VirtualCircuitServiceTypeEnum +func GetVirtualCircuitServiceTypeEnumValues() []VirtualCircuitServiceTypeEnum { + values := make([]VirtualCircuitServiceTypeEnum, 0) + for _, v := range mappingVirtualCircuitServiceTypeEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitServiceTypeEnumStringValues Enumerates the set of values in String for VirtualCircuitServiceTypeEnum +func GetVirtualCircuitServiceTypeEnumStringValues() []string { + return []string{ + "COLOCATED", + "LAYER2", + "LAYER3", + } +} + +// GetMappingVirtualCircuitServiceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitServiceTypeEnum(val string) (VirtualCircuitServiceTypeEnum, bool) { + enum, ok := mappingVirtualCircuitServiceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VirtualCircuitTypeEnum Enum with underlying type: string +type VirtualCircuitTypeEnum string + +// Set of constants representing the allowable values for VirtualCircuitTypeEnum +const ( + VirtualCircuitTypePublic VirtualCircuitTypeEnum = "PUBLIC" + VirtualCircuitTypePrivate VirtualCircuitTypeEnum = "PRIVATE" +) + +var mappingVirtualCircuitTypeEnum = map[string]VirtualCircuitTypeEnum{ + "PUBLIC": VirtualCircuitTypePublic, + "PRIVATE": VirtualCircuitTypePrivate, +} + +var mappingVirtualCircuitTypeEnumLowerCase = map[string]VirtualCircuitTypeEnum{ + "public": VirtualCircuitTypePublic, + "private": VirtualCircuitTypePrivate, +} + +// GetVirtualCircuitTypeEnumValues Enumerates the set of values for VirtualCircuitTypeEnum +func GetVirtualCircuitTypeEnumValues() []VirtualCircuitTypeEnum { + values := make([]VirtualCircuitTypeEnum, 0) + for _, v := range mappingVirtualCircuitTypeEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitTypeEnumStringValues Enumerates the set of values in String for VirtualCircuitTypeEnum +func GetVirtualCircuitTypeEnumStringValues() []string { + return []string{ + "PUBLIC", + "PRIVATE", + } +} + +// GetMappingVirtualCircuitTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitTypeEnum(val string) (VirtualCircuitTypeEnum, bool) { + enum, ok := mappingVirtualCircuitTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_associated_tunnel_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_associated_tunnel_details.go new file mode 100644 index 000000000..dfdeab083 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_associated_tunnel_details.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualCircuitAssociatedTunnelDetails Detailed private tunnel info associated with the virtual circuit. +type VirtualCircuitAssociatedTunnelDetails struct { + + // The type of the tunnel associated with the virtual circuit. + TunnelType VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum `mandatory:"true" json:"tunnelType"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec tunnel associated with the virtual circuit. + TunnelId *string `mandatory:"true" json:"tunnelId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of IPSec connection associated with the virtual circuit. + IpsecConnectionId *string `mandatory:"false" json:"ipsecConnectionId"` +} + +func (m VirtualCircuitAssociatedTunnelDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualCircuitAssociatedTunnelDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum(string(m.TunnelType)); !ok && m.TunnelType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TunnelType: %s. Supported values are: %s.", m.TunnelType, strings.Join(GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum Enum with underlying type: string +type VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum string + +// Set of constants representing the allowable values for VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum +const ( + VirtualCircuitAssociatedTunnelDetailsTunnelTypeIpsec VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum = "IPSEC" +) + +var mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum = map[string]VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum{ + "IPSEC": VirtualCircuitAssociatedTunnelDetailsTunnelTypeIpsec, +} + +var mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumLowerCase = map[string]VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum{ + "ipsec": VirtualCircuitAssociatedTunnelDetailsTunnelTypeIpsec, +} + +// GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumValues Enumerates the set of values for VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum +func GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumValues() []VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum { + values := make([]VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum, 0) + for _, v := range mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumStringValues Enumerates the set of values in String for VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum +func GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumStringValues() []string { + return []string{ + "IPSEC", + } +} + +// GetMappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum(val string) (VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum, bool) { + enum, ok := mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_bandwidth_shape.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_bandwidth_shape.go new file mode 100644 index 000000000..d48831a2a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_bandwidth_shape.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualCircuitBandwidthShape An individual bandwidth level for virtual circuits. +type VirtualCircuitBandwidthShape struct { + + // The name of the bandwidth shape. + // Example: `10 Gbps` + Name *string `mandatory:"true" json:"name"` + + // The bandwidth in Mbps. + // Example: `10000` + BandwidthInMbps *int `mandatory:"false" json:"bandwidthInMbps"` +} + +func (m VirtualCircuitBandwidthShape) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualCircuitBandwidthShape) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_drg_attachment_network_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_drg_attachment_network_details.go new file mode 100644 index 000000000..2ebbd40a9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_drg_attachment_network_details.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualCircuitDrgAttachmentNetworkDetails Specifies the virtual circuit attached to the DRG. +type VirtualCircuitDrgAttachmentNetworkDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. + Id *string `mandatory:"false" json:"id"` + + // Boolean flag that determines wether all traffic over the virtual circuits is encrypted. + // Example: `true` + TransportOnlyMode *bool `mandatory:"false" json:"transportOnlyMode"` +} + +// GetId returns Id +func (m VirtualCircuitDrgAttachmentNetworkDetails) GetId() *string { + return m.Id +} + +func (m VirtualCircuitDrgAttachmentNetworkDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualCircuitDrgAttachmentNetworkDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VirtualCircuitDrgAttachmentNetworkDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVirtualCircuitDrgAttachmentNetworkDetails VirtualCircuitDrgAttachmentNetworkDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVirtualCircuitDrgAttachmentNetworkDetails + }{ + "VIRTUAL_CIRCUIT", + (MarshalTypeVirtualCircuitDrgAttachmentNetworkDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_ip_mtu.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_ip_mtu.go new file mode 100644 index 000000000..4672ced57 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_ip_mtu.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "strings" +) + +// VirtualCircuitIpMtuEnum Enum with underlying type: string +type VirtualCircuitIpMtuEnum string + +// Set of constants representing the allowable values for VirtualCircuitIpMtuEnum +const ( + VirtualCircuitIpMtuMtu1500 VirtualCircuitIpMtuEnum = "MTU_1500" + VirtualCircuitIpMtuMtu9000 VirtualCircuitIpMtuEnum = "MTU_9000" +) + +var mappingVirtualCircuitIpMtuEnum = map[string]VirtualCircuitIpMtuEnum{ + "MTU_1500": VirtualCircuitIpMtuMtu1500, + "MTU_9000": VirtualCircuitIpMtuMtu9000, +} + +var mappingVirtualCircuitIpMtuEnumLowerCase = map[string]VirtualCircuitIpMtuEnum{ + "mtu_1500": VirtualCircuitIpMtuMtu1500, + "mtu_9000": VirtualCircuitIpMtuMtu9000, +} + +// GetVirtualCircuitIpMtuEnumValues Enumerates the set of values for VirtualCircuitIpMtuEnum +func GetVirtualCircuitIpMtuEnumValues() []VirtualCircuitIpMtuEnum { + values := make([]VirtualCircuitIpMtuEnum, 0) + for _, v := range mappingVirtualCircuitIpMtuEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitIpMtuEnumStringValues Enumerates the set of values in String for VirtualCircuitIpMtuEnum +func GetVirtualCircuitIpMtuEnumStringValues() []string { + return []string{ + "MTU_1500", + "MTU_9000", + } +} + +// GetMappingVirtualCircuitIpMtuEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitIpMtuEnum(val string) (VirtualCircuitIpMtuEnum, bool) { + enum, ok := mappingVirtualCircuitIpMtuEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_public_prefix.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_public_prefix.go new file mode 100644 index 000000000..08596b39c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_public_prefix.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualCircuitPublicPrefix A public IP prefix and its details. With a public virtual circuit, the customer +// specifies the customer-owned public IP prefixes to advertise across the connection. +// For more information, see FastConnect Overview (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +type VirtualCircuitPublicPrefix struct { + + // Publix IP prefix (CIDR) that the customer specified. + CidrBlock *string `mandatory:"true" json:"cidrBlock"` + + // Oracle must verify that the customer owns the public IP prefix before traffic + // for that prefix can flow across the virtual circuit. Verification can take a + // few business days. `IN_PROGRESS` means Oracle is verifying the prefix. `COMPLETED` + // means verification succeeded. `FAILED` means verification failed and traffic for + // this prefix will not flow across the connection. + VerificationState VirtualCircuitPublicPrefixVerificationStateEnum `mandatory:"true" json:"verificationState"` +} + +func (m VirtualCircuitPublicPrefix) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualCircuitPublicPrefix) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVirtualCircuitPublicPrefixVerificationStateEnum(string(m.VerificationState)); !ok && m.VerificationState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for VerificationState: %s. Supported values are: %s.", m.VerificationState, strings.Join(GetVirtualCircuitPublicPrefixVerificationStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VirtualCircuitPublicPrefixVerificationStateEnum Enum with underlying type: string +type VirtualCircuitPublicPrefixVerificationStateEnum string + +// Set of constants representing the allowable values for VirtualCircuitPublicPrefixVerificationStateEnum +const ( + VirtualCircuitPublicPrefixVerificationStateInProgress VirtualCircuitPublicPrefixVerificationStateEnum = "IN_PROGRESS" + VirtualCircuitPublicPrefixVerificationStateCompleted VirtualCircuitPublicPrefixVerificationStateEnum = "COMPLETED" + VirtualCircuitPublicPrefixVerificationStateFailed VirtualCircuitPublicPrefixVerificationStateEnum = "FAILED" +) + +var mappingVirtualCircuitPublicPrefixVerificationStateEnum = map[string]VirtualCircuitPublicPrefixVerificationStateEnum{ + "IN_PROGRESS": VirtualCircuitPublicPrefixVerificationStateInProgress, + "COMPLETED": VirtualCircuitPublicPrefixVerificationStateCompleted, + "FAILED": VirtualCircuitPublicPrefixVerificationStateFailed, +} + +var mappingVirtualCircuitPublicPrefixVerificationStateEnumLowerCase = map[string]VirtualCircuitPublicPrefixVerificationStateEnum{ + "in_progress": VirtualCircuitPublicPrefixVerificationStateInProgress, + "completed": VirtualCircuitPublicPrefixVerificationStateCompleted, + "failed": VirtualCircuitPublicPrefixVerificationStateFailed, +} + +// GetVirtualCircuitPublicPrefixVerificationStateEnumValues Enumerates the set of values for VirtualCircuitPublicPrefixVerificationStateEnum +func GetVirtualCircuitPublicPrefixVerificationStateEnumValues() []VirtualCircuitPublicPrefixVerificationStateEnum { + values := make([]VirtualCircuitPublicPrefixVerificationStateEnum, 0) + for _, v := range mappingVirtualCircuitPublicPrefixVerificationStateEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitPublicPrefixVerificationStateEnumStringValues Enumerates the set of values in String for VirtualCircuitPublicPrefixVerificationStateEnum +func GetVirtualCircuitPublicPrefixVerificationStateEnumStringValues() []string { + return []string{ + "IN_PROGRESS", + "COMPLETED", + "FAILED", + } +} + +// GetMappingVirtualCircuitPublicPrefixVerificationStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitPublicPrefixVerificationStateEnum(val string) (VirtualCircuitPublicPrefixVerificationStateEnum, bool) { + enum, ok := mappingVirtualCircuitPublicPrefixVerificationStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_redundancy_metadata.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_redundancy_metadata.go new file mode 100644 index 000000000..4290281bd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_redundancy_metadata.go @@ -0,0 +1,206 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualCircuitRedundancyMetadata This resource provides redundancy level details for the virtual circuit. For more about redundancy, see FastConnect Redundancy Best Practices (https://docs.oracle.com/iaas/Content/Network/Concepts/fastconnectresiliency.htm). +type VirtualCircuitRedundancyMetadata struct { + + // The configured redundancy level of the virtual circuit. + ConfiguredRedundancyLevel VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum `mandatory:"false" json:"configuredRedundancyLevel,omitempty"` + + // Indicates if the configured level is met for IPv4 BGP redundancy. + Ipv4bgpSessionRedundancyStatus VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum `mandatory:"false" json:"ipv4bgpSessionRedundancyStatus,omitempty"` + + // Indicates if the configured level is met for IPv6 BGP redundancy. + Ipv6bgpSessionRedundancyStatus VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum `mandatory:"false" json:"ipv6bgpSessionRedundancyStatus,omitempty"` +} + +func (m VirtualCircuitRedundancyMetadata) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualCircuitRedundancyMetadata) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum(string(m.ConfiguredRedundancyLevel)); !ok && m.ConfiguredRedundancyLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ConfiguredRedundancyLevel: %s. Supported values are: %s.", m.ConfiguredRedundancyLevel, strings.Join(GetVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnumStringValues(), ","))) + } + if _, ok := GetMappingVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum(string(m.Ipv4bgpSessionRedundancyStatus)); !ok && m.Ipv4bgpSessionRedundancyStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Ipv4bgpSessionRedundancyStatus: %s. Supported values are: %s.", m.Ipv4bgpSessionRedundancyStatus, strings.Join(GetVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum(string(m.Ipv6bgpSessionRedundancyStatus)); !ok && m.Ipv6bgpSessionRedundancyStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Ipv6bgpSessionRedundancyStatus: %s. Supported values are: %s.", m.Ipv6bgpSessionRedundancyStatus, strings.Join(GetVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum Enum with underlying type: string +type VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum string + +// Set of constants representing the allowable values for VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum +const ( + VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelDevice VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum = "DEVICE" + VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelPop VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum = "POP" + VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelRegion VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum = "REGION" + VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelNonRedundant VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum = "NON_REDUNDANT" + VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelPending VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum = "PENDING" +) + +var mappingVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum = map[string]VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum{ + "DEVICE": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelDevice, + "POP": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelPop, + "REGION": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelRegion, + "NON_REDUNDANT": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelNonRedundant, + "PENDING": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelPending, +} + +var mappingVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnumLowerCase = map[string]VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum{ + "device": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelDevice, + "pop": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelPop, + "region": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelRegion, + "non_redundant": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelNonRedundant, + "pending": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelPending, +} + +// GetVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnumValues Enumerates the set of values for VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum +func GetVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnumValues() []VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum { + values := make([]VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum, 0) + for _, v := range mappingVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnumStringValues Enumerates the set of values in String for VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum +func GetVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnumStringValues() []string { + return []string{ + "DEVICE", + "POP", + "REGION", + "NON_REDUNDANT", + "PENDING", + } +} + +// GetMappingVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum(val string) (VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum, bool) { + enum, ok := mappingVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum Enum with underlying type: string +type VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum string + +// Set of constants representing the allowable values for VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum +const ( + VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusConfigurationMatch VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum = "CONFIGURATION_MATCH" + VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusConfigurationMismatch VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum = "CONFIGURATION_MISMATCH" + VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusNotMetSla VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum = "NOT_MET_SLA" +) + +var mappingVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum = map[string]VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum{ + "CONFIGURATION_MATCH": VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusConfigurationMatch, + "CONFIGURATION_MISMATCH": VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusConfigurationMismatch, + "NOT_MET_SLA": VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusNotMetSla, +} + +var mappingVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnumLowerCase = map[string]VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum{ + "configuration_match": VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusConfigurationMatch, + "configuration_mismatch": VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusConfigurationMismatch, + "not_met_sla": VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusNotMetSla, +} + +// GetVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnumValues Enumerates the set of values for VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum +func GetVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnumValues() []VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum { + values := make([]VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum, 0) + for _, v := range mappingVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnumStringValues Enumerates the set of values in String for VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum +func GetVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnumStringValues() []string { + return []string{ + "CONFIGURATION_MATCH", + "CONFIGURATION_MISMATCH", + "NOT_MET_SLA", + } +} + +// GetMappingVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum(val string) (VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum, bool) { + enum, ok := mappingVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum Enum with underlying type: string +type VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum string + +// Set of constants representing the allowable values for VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum +const ( + VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusConfigurationMatch VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum = "CONFIGURATION_MATCH" + VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusConfigurationMismatch VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum = "CONFIGURATION_MISMATCH" + VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusNotMetSla VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum = "NOT_MET_SLA" +) + +var mappingVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum = map[string]VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum{ + "CONFIGURATION_MATCH": VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusConfigurationMatch, + "CONFIGURATION_MISMATCH": VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusConfigurationMismatch, + "NOT_MET_SLA": VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusNotMetSla, +} + +var mappingVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnumLowerCase = map[string]VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum{ + "configuration_match": VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusConfigurationMatch, + "configuration_mismatch": VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusConfigurationMismatch, + "not_met_sla": VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusNotMetSla, +} + +// GetVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnumValues Enumerates the set of values for VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum +func GetVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnumValues() []VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum { + values := make([]VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum, 0) + for _, v := range mappingVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnumStringValues Enumerates the set of values in String for VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum +func GetVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnumStringValues() []string { + return []string{ + "CONFIGURATION_MATCH", + "CONFIGURATION_MISMATCH", + "NOT_MET_SLA", + } +} + +// GetMappingVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum(val string) (VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum, bool) { + enum, ok := mappingVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vlan.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vlan.go new file mode 100644 index 000000000..9ec9fd391 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vlan.go @@ -0,0 +1,159 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Vlan A resource to be used only with the Oracle Cloud VMware Solution. +// Conceptually, a virtual LAN (VLAN) is a broadcast domain that is created +// by partitioning and isolating a network at the data link layer (a *layer 2 network*). +// VLANs work by using IEEE 802.1Q VLAN tags. Layer 2 traffic is forwarded within the +// VLAN based on MAC learning. +// In the Networking service, a VLAN is an object within a VCN. You use VLANs to +// partition the VCN at the data link layer (layer 2). A VLAN is analagous to a subnet, +// which is an object for partitioning the VCN at the IP layer (layer 3). +type Vlan struct { + + // The range of IPv4 addresses that will be used for layer 3 communication with + // hosts outside the VLAN. + // Example: `192.168.1.0/24` + CidrBlock *string `mandatory:"true" json:"cidrBlock"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the VLAN. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The VLAN's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // The VLAN's current state. + LifecycleState VlanLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN the VLAN is in. + VcnId *string `mandatory:"true" json:"vcnId"` + + // The VLAN's availability domain. This attribute will be null if this is a regional VLAN + // rather than an AD-specific VLAN. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // A list of the OCIDs of the network security groups (NSGs) to use with this VLAN. + // All VNICs in the VLAN belong to these NSGs. For more + // information about NSGs, see + // NetworkSecurityGroup. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The IEEE 802.1Q VLAN tag of this VLAN. + // Example: `100` + VlanTag *int `mandatory:"false" json:"vlanTag"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table that the VLAN uses. + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // The date and time the VLAN was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m Vlan) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Vlan) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVlanLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVlanLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VlanLifecycleStateEnum Enum with underlying type: string +type VlanLifecycleStateEnum string + +// Set of constants representing the allowable values for VlanLifecycleStateEnum +const ( + VlanLifecycleStateProvisioning VlanLifecycleStateEnum = "PROVISIONING" + VlanLifecycleStateAvailable VlanLifecycleStateEnum = "AVAILABLE" + VlanLifecycleStateTerminating VlanLifecycleStateEnum = "TERMINATING" + VlanLifecycleStateTerminated VlanLifecycleStateEnum = "TERMINATED" + VlanLifecycleStateUpdating VlanLifecycleStateEnum = "UPDATING" +) + +var mappingVlanLifecycleStateEnum = map[string]VlanLifecycleStateEnum{ + "PROVISIONING": VlanLifecycleStateProvisioning, + "AVAILABLE": VlanLifecycleStateAvailable, + "TERMINATING": VlanLifecycleStateTerminating, + "TERMINATED": VlanLifecycleStateTerminated, + "UPDATING": VlanLifecycleStateUpdating, +} + +var mappingVlanLifecycleStateEnumLowerCase = map[string]VlanLifecycleStateEnum{ + "provisioning": VlanLifecycleStateProvisioning, + "available": VlanLifecycleStateAvailable, + "terminating": VlanLifecycleStateTerminating, + "terminated": VlanLifecycleStateTerminated, + "updating": VlanLifecycleStateUpdating, +} + +// GetVlanLifecycleStateEnumValues Enumerates the set of values for VlanLifecycleStateEnum +func GetVlanLifecycleStateEnumValues() []VlanLifecycleStateEnum { + values := make([]VlanLifecycleStateEnum, 0) + for _, v := range mappingVlanLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVlanLifecycleStateEnumStringValues Enumerates the set of values in String for VlanLifecycleStateEnum +func GetVlanLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + "UPDATING", + } +} + +// GetMappingVlanLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVlanLifecycleStateEnum(val string) (VlanLifecycleStateEnum, bool) { + enum, ok := mappingVlanLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vnic.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vnic.go new file mode 100644 index 000000000..2537a4095 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vnic.go @@ -0,0 +1,213 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Vnic A virtual network interface card. Each VNIC resides in a subnet in a VCN. +// An instance attaches to a VNIC to obtain a network connection into the VCN +// through that subnet. Each instance has a *primary VNIC* that is automatically +// created and attached during launch. You can add *secondary VNICs* to an +// instance after it's launched. For more information, see +// Virtual Network Interface Cards (VNICs) (https://docs.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). +// Each VNIC has a *primary private IP* that is automatically assigned during launch. +// You can add *secondary private IPs* to a VNIC after it's created. For more +// information, see CreatePrivateIp and +// IP Addresses (https://docs.oracle.com/iaas/Content/Network/Tasks/managingIPaddresses.htm). +// +// If you are an Oracle Cloud VMware Solution customer, you will have secondary VNICs +// that reside in a VLAN instead of a subnet. These VNICs have other differences, which +// are called out in the descriptions of the relevant attributes in the `Vnic` object. +// Also see Vlan. +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type Vnic struct { + + // The VNIC's availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the VNIC. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC. + Id *string `mandatory:"true" json:"id"` + + // The current state of the VNIC. + LifecycleState VnicLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the VNIC was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Security attributes (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels + // for a resource that can be referenced in a Zero Trust Packet Routing (https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) + // (ZPR) policy to control access to ZPR-supported resources. + // Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` + SecurityAttributes map[string]map[string]interface{} `mandatory:"false" json:"securityAttributes"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname + // portion of the primary private IP's fully qualified domain name (FQDN) + // (for example, `bminstance1` in FQDN `bminstance1.subnet123.vcn1.oraclevcn.com`). + // Must be unique across all VNICs in the subnet and comply with + // RFC 952 (https://tools.ietf.org/html/rfc952) and + // RFC 1123 (https://tools.ietf.org/html/rfc1123). + // For more information, see + // DNS in Your Virtual Cloud Network (https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm). + // Example: `bminstance1` + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // Whether the VNIC is the primary VNIC (the VNIC that is automatically created + // and attached during instance launch). + IsPrimary *bool `mandatory:"false" json:"isPrimary"` + + // The MAC address of the VNIC. + // If the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution, + // the MAC address is learned. If the VNIC belongs to a subnet, the + // MAC address is a static, Oracle-provided value. + // Example: `00:00:00:00:00:01` + MacAddress *string `mandatory:"false" json:"macAddress"` + + // A list of the OCIDs of the network security groups that the VNIC belongs to. + // If the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution (instead of + // belonging to a subnet), the value of the `nsgIds` attribute is ignored. Instead, the + // VNIC belongs to the NSGs that are associated with the VLAN itself. See Vlan. + // For more information about NSGs, see + // NetworkSecurityGroup. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // If the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution (instead of + // belonging to a subnet), the `vlanId` is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VLAN the VNIC is in. See + // Vlan. If the VNIC is instead in a subnet, `subnetId` has a value. + VlanId *string `mandatory:"false" json:"vlanId"` + + // The private IP address of the primary `privateIp` object on the VNIC. + // The address is within the CIDR of the VNIC's subnet. + // Example: `10.0.3.3` + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // The public IP address of the VNIC, if one is assigned. + PublicIp *string `mandatory:"false" json:"publicIp"` + + // Whether the source/destination check is disabled on the VNIC. + // Defaults to `false`, which means the check is performed. For information + // about why you would skip the source/destination check, see + // Using a Private IP as a Route Target (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#privateip). + // If the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution (instead of + // belonging to a subnet), the `skipSourceDestCheck` attribute is `true`. + // This is because the source/destination check is always disabled for VNICs in a VLAN. + // Example: `true` + SkipSourceDestCheck *bool `mandatory:"false" json:"skipSourceDestCheck"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet the VNIC is in. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // List of IPv6 addresses assigned to the VNIC. + // Example: `2001:DB8::` + Ipv6Addresses []string `mandatory:"false" json:"ipv6Addresses"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see + // Per-resource Routing (https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing). + RouteTableId *string `mandatory:"false" json:"routeTableId"` +} + +func (m Vnic) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Vnic) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVnicLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVnicLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VnicLifecycleStateEnum Enum with underlying type: string +type VnicLifecycleStateEnum string + +// Set of constants representing the allowable values for VnicLifecycleStateEnum +const ( + VnicLifecycleStateProvisioning VnicLifecycleStateEnum = "PROVISIONING" + VnicLifecycleStateAvailable VnicLifecycleStateEnum = "AVAILABLE" + VnicLifecycleStateTerminating VnicLifecycleStateEnum = "TERMINATING" + VnicLifecycleStateTerminated VnicLifecycleStateEnum = "TERMINATED" +) + +var mappingVnicLifecycleStateEnum = map[string]VnicLifecycleStateEnum{ + "PROVISIONING": VnicLifecycleStateProvisioning, + "AVAILABLE": VnicLifecycleStateAvailable, + "TERMINATING": VnicLifecycleStateTerminating, + "TERMINATED": VnicLifecycleStateTerminated, +} + +var mappingVnicLifecycleStateEnumLowerCase = map[string]VnicLifecycleStateEnum{ + "provisioning": VnicLifecycleStateProvisioning, + "available": VnicLifecycleStateAvailable, + "terminating": VnicLifecycleStateTerminating, + "terminated": VnicLifecycleStateTerminated, +} + +// GetVnicLifecycleStateEnumValues Enumerates the set of values for VnicLifecycleStateEnum +func GetVnicLifecycleStateEnumValues() []VnicLifecycleStateEnum { + values := make([]VnicLifecycleStateEnum, 0) + for _, v := range mappingVnicLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVnicLifecycleStateEnumStringValues Enumerates the set of values in String for VnicLifecycleStateEnum +func GetVnicLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingVnicLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVnicLifecycleStateEnum(val string) (VnicLifecycleStateEnum, bool) { + enum, ok := mappingVnicLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vnic_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vnic_attachment.go new file mode 100644 index 000000000..2a52d8cfe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vnic_attachment.go @@ -0,0 +1,150 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VnicAttachment Represents an attachment between a VNIC and an instance. For more information, see +// Virtual Network Interface Cards (VNICs) (https://docs.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type VnicAttachment struct { + + // The availability domain of the instance. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment the VNIC attachment is in, which is the same + // compartment the instance is in. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the VNIC attachment. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the instance. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The current state of the VNIC attachment. + LifecycleState VnicAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the VNIC attachment was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Which physical network interface card (NIC) the VNIC uses. + // Certain bare metal instance shapes have two active physical NICs (0 and 1). If + // you add a secondary VNIC to one of these instances, you can specify which NIC + // the VNIC will use. For more information, see + // Virtual Network Interface Cards (VNICs) (https://docs.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). + NicIndex *int `mandatory:"false" json:"nicIndex"` + + // The OCID of the subnet to create the VNIC in. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // The OCID of the VLAN to create the VNIC in. Creating the VNIC in a VLAN (instead + // of a subnet) is possible only if you are an Oracle Cloud VMware Solution customer. + // See Vlan. + // An error is returned if the instance already has a VNIC attached to it from this VLAN. + VlanId *string `mandatory:"false" json:"vlanId"` + + // The Oracle-assigned VLAN tag of the attached VNIC. Available after the + // attachment process is complete. + // However, if the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution, + // the `vlanTag` value is instead the value of the `vlanTag` attribute for the VLAN. + // See Vlan. + // Example: `0` + VlanTag *int `mandatory:"false" json:"vlanTag"` + + // The OCID of the VNIC. Available after the attachment process is complete. + VnicId *string `mandatory:"false" json:"vnicId"` +} + +func (m VnicAttachment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VnicAttachment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVnicAttachmentLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVnicAttachmentLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VnicAttachmentLifecycleStateEnum Enum with underlying type: string +type VnicAttachmentLifecycleStateEnum string + +// Set of constants representing the allowable values for VnicAttachmentLifecycleStateEnum +const ( + VnicAttachmentLifecycleStateAttaching VnicAttachmentLifecycleStateEnum = "ATTACHING" + VnicAttachmentLifecycleStateAttached VnicAttachmentLifecycleStateEnum = "ATTACHED" + VnicAttachmentLifecycleStateDetaching VnicAttachmentLifecycleStateEnum = "DETACHING" + VnicAttachmentLifecycleStateDetached VnicAttachmentLifecycleStateEnum = "DETACHED" +) + +var mappingVnicAttachmentLifecycleStateEnum = map[string]VnicAttachmentLifecycleStateEnum{ + "ATTACHING": VnicAttachmentLifecycleStateAttaching, + "ATTACHED": VnicAttachmentLifecycleStateAttached, + "DETACHING": VnicAttachmentLifecycleStateDetaching, + "DETACHED": VnicAttachmentLifecycleStateDetached, +} + +var mappingVnicAttachmentLifecycleStateEnumLowerCase = map[string]VnicAttachmentLifecycleStateEnum{ + "attaching": VnicAttachmentLifecycleStateAttaching, + "attached": VnicAttachmentLifecycleStateAttached, + "detaching": VnicAttachmentLifecycleStateDetaching, + "detached": VnicAttachmentLifecycleStateDetached, +} + +// GetVnicAttachmentLifecycleStateEnumValues Enumerates the set of values for VnicAttachmentLifecycleStateEnum +func GetVnicAttachmentLifecycleStateEnumValues() []VnicAttachmentLifecycleStateEnum { + values := make([]VnicAttachmentLifecycleStateEnum, 0) + for _, v := range mappingVnicAttachmentLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVnicAttachmentLifecycleStateEnumStringValues Enumerates the set of values in String for VnicAttachmentLifecycleStateEnum +func GetVnicAttachmentLifecycleStateEnumStringValues() []string { + return []string{ + "ATTACHING", + "ATTACHED", + "DETACHING", + "DETACHED", + } +} + +// GetMappingVnicAttachmentLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVnicAttachmentLifecycleStateEnum(val string) (VnicAttachmentLifecycleStateEnum, bool) { + enum, ok := mappingVnicAttachmentLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume.go new file mode 100644 index 000000000..ad1975946 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume.go @@ -0,0 +1,291 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Volume A detachable block volume device that allows you to dynamically expand +// the storage capacity of an instance. For more information, see +// Overview of Cloud Volume Storage (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type Volume struct { + + // The availability domain of the volume. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the volume. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the volume. + Id *string `mandatory:"true" json:"id"` + + // The current state of a volume. + LifecycleState VolumeLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The size of the volume in MBs. This field is deprecated. Use + // sizeInGBs instead. + SizeInMBs *int64 `mandatory:"true" json:"sizeInMBs"` + + // The date and time the volume was created. Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Specifies whether the cloned volume's data has finished copying from the source volume or backup. + IsHydrated *bool `mandatory:"false" json:"isHydrated"` + + // The OCID of the Vault service key which is the master encryption key for the volume. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // The number of volume performance units (VPUs) that will be applied to this volume per GB, + // representing the Block Volume service's elastic performance options. + // See Block Volume Performance Levels (https://docs.oracle.com/iaas/Content/Block/Concepts/blockvolumeperformance.htm#perf_levels) for more information. + // Allowed values: + // * `0`: Represents Lower Cost option. + // * `10`: Represents Balanced option. + // * `20`: Represents Higher Performance option. + // * `30`-`120`: Represents the Ultra High Performance option. + // For performance autotune enabled volumes, It would be the Default(Minimum) VPUs/GB. + VpusPerGB *int64 `mandatory:"false" json:"vpusPerGB"` + + // The clusterPlacementGroup Id of the volume for volume placement. + ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` + + // The size of the volume in GBs. + SizeInGBs *int64 `mandatory:"false" json:"sizeInGBs"` + + SourceDetails VolumeSourceDetails `mandatory:"false" json:"sourceDetails"` + + // The OCID of the source volume group. + VolumeGroupId *string `mandatory:"false" json:"volumeGroupId"` + + // Specifies whether the auto-tune performance is enabled for this volume. This field is deprecated. + // Use the `DetachedVolumeAutotunePolicy` instead to enable the volume for detached autotune. + IsAutoTuneEnabled *bool `mandatory:"false" json:"isAutoTuneEnabled"` + + // The number of Volume Performance Units per GB that this volume is effectively tuned to. + AutoTunedVpusPerGB *int64 `mandatory:"false" json:"autoTunedVpusPerGB"` + + // The list of block volume replicas of this volume. + BlockVolumeReplicas []BlockVolumeReplicaInfo `mandatory:"false" json:"blockVolumeReplicas"` + + // The list of autotune policies enabled for this volume. + AutotunePolicies []AutotunePolicy `mandatory:"false" json:"autotunePolicies"` + + // When set to true, enables SCSI Persistent Reservation (SCSI PR) for the volume. For more information, see + // Persistent Reservations (https://docs.oracle.com/iaas/Content/Block/Concepts/persistent-reservations.htm). + IsReservationsEnabled *bool `mandatory:"false" json:"isReservationsEnabled"` +} + +func (m Volume) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Volume) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVolumeLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVolumeLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *Volume) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + FreeformTags map[string]string `json:"freeformTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + IsHydrated *bool `json:"isHydrated"` + KmsKeyId *string `json:"kmsKeyId"` + VpusPerGB *int64 `json:"vpusPerGB"` + ClusterPlacementGroupId *string `json:"clusterPlacementGroupId"` + SizeInGBs *int64 `json:"sizeInGBs"` + SourceDetails volumesourcedetails `json:"sourceDetails"` + VolumeGroupId *string `json:"volumeGroupId"` + IsAutoTuneEnabled *bool `json:"isAutoTuneEnabled"` + AutoTunedVpusPerGB *int64 `json:"autoTunedVpusPerGB"` + BlockVolumeReplicas []BlockVolumeReplicaInfo `json:"blockVolumeReplicas"` + AutotunePolicies []autotunepolicy `json:"autotunePolicies"` + IsReservationsEnabled *bool `json:"isReservationsEnabled"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + DisplayName *string `json:"displayName"` + Id *string `json:"id"` + LifecycleState VolumeLifecycleStateEnum `json:"lifecycleState"` + SizeInMBs *int64 `json:"sizeInMBs"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.FreeformTags = model.FreeformTags + + m.SystemTags = model.SystemTags + + m.IsHydrated = model.IsHydrated + + m.KmsKeyId = model.KmsKeyId + + m.VpusPerGB = model.VpusPerGB + + m.ClusterPlacementGroupId = model.ClusterPlacementGroupId + + m.SizeInGBs = model.SizeInGBs + + nn, e = model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.SourceDetails = nn.(VolumeSourceDetails) + } else { + m.SourceDetails = nil + } + + m.VolumeGroupId = model.VolumeGroupId + + m.IsAutoTuneEnabled = model.IsAutoTuneEnabled + + m.AutoTunedVpusPerGB = model.AutoTunedVpusPerGB + + m.BlockVolumeReplicas = make([]BlockVolumeReplicaInfo, len(model.BlockVolumeReplicas)) + copy(m.BlockVolumeReplicas, model.BlockVolumeReplicas) + m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) + for i, n := range model.AutotunePolicies { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.AutotunePolicies[i] = nn.(AutotunePolicy) + } else { + m.AutotunePolicies[i] = nil + } + } + m.IsReservationsEnabled = model.IsReservationsEnabled + + m.AvailabilityDomain = model.AvailabilityDomain + + m.CompartmentId = model.CompartmentId + + m.DisplayName = model.DisplayName + + m.Id = model.Id + + m.LifecycleState = model.LifecycleState + + m.SizeInMBs = model.SizeInMBs + + m.TimeCreated = model.TimeCreated + + return +} + +// VolumeLifecycleStateEnum Enum with underlying type: string +type VolumeLifecycleStateEnum string + +// Set of constants representing the allowable values for VolumeLifecycleStateEnum +const ( + VolumeLifecycleStateProvisioning VolumeLifecycleStateEnum = "PROVISIONING" + VolumeLifecycleStateRestoring VolumeLifecycleStateEnum = "RESTORING" + VolumeLifecycleStateAvailable VolumeLifecycleStateEnum = "AVAILABLE" + VolumeLifecycleStateTerminating VolumeLifecycleStateEnum = "TERMINATING" + VolumeLifecycleStateTerminated VolumeLifecycleStateEnum = "TERMINATED" + VolumeLifecycleStateFaulty VolumeLifecycleStateEnum = "FAULTY" +) + +var mappingVolumeLifecycleStateEnum = map[string]VolumeLifecycleStateEnum{ + "PROVISIONING": VolumeLifecycleStateProvisioning, + "RESTORING": VolumeLifecycleStateRestoring, + "AVAILABLE": VolumeLifecycleStateAvailable, + "TERMINATING": VolumeLifecycleStateTerminating, + "TERMINATED": VolumeLifecycleStateTerminated, + "FAULTY": VolumeLifecycleStateFaulty, +} + +var mappingVolumeLifecycleStateEnumLowerCase = map[string]VolumeLifecycleStateEnum{ + "provisioning": VolumeLifecycleStateProvisioning, + "restoring": VolumeLifecycleStateRestoring, + "available": VolumeLifecycleStateAvailable, + "terminating": VolumeLifecycleStateTerminating, + "terminated": VolumeLifecycleStateTerminated, + "faulty": VolumeLifecycleStateFaulty, +} + +// GetVolumeLifecycleStateEnumValues Enumerates the set of values for VolumeLifecycleStateEnum +func GetVolumeLifecycleStateEnumValues() []VolumeLifecycleStateEnum { + values := make([]VolumeLifecycleStateEnum, 0) + for _, v := range mappingVolumeLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVolumeLifecycleStateEnumStringValues Enumerates the set of values in String for VolumeLifecycleStateEnum +func GetVolumeLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "RESTORING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + "FAULTY", + } +} + +// GetMappingVolumeLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeLifecycleStateEnum(val string) (VolumeLifecycleStateEnum, bool) { + enum, ok := mappingVolumeLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_attachment.go new file mode 100644 index 000000000..b28b574a8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_attachment.go @@ -0,0 +1,373 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeAttachment A base object for all types of attachments between a storage volume and an instance. +// For specific details about iSCSI attachments, see +// IScsiVolumeAttachment. +// For general information about volume attachments, see +// Overview of Block Volume Storage (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm). +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type VolumeAttachment interface { + + // The availability domain of an instance. + // Example: `Uocm:PHX-AD-1` + GetAvailabilityDomain() *string + + // The OCID of the compartment. + GetCompartmentId() *string + + // The OCID of the volume attachment. + GetId() *string + + // The OCID of the instance the volume is attached to. + GetInstanceId() *string + + // The current state of the volume attachment. + GetLifecycleState() VolumeAttachmentLifecycleStateEnum + + // The date and time the volume was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + GetTimeCreated() *common.SDKTime + + // The OCID of the volume. + GetVolumeId() *string + + // The device name. + GetDevice() *string + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + GetDisplayName() *string + + // Whether the attachment was created in read-only mode. + GetIsReadOnly() *bool + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + GetIsShareable() *bool + + // Whether in-transit encryption for the data volume's paravirtualized attachment is enabled or not. + GetIsPvEncryptionInTransitEnabled() *bool + + // Whether the Iscsi or Paravirtualized attachment is multipath or not, it is not applicable to NVMe attachment. + GetIsMultipath() *bool + + // The iscsi login state of the volume attachment. For a Iscsi volume attachment, + // all iscsi sessions need to be all logged-in or logged-out to be in logged-in or logged-out state. + GetIscsiLoginState() VolumeAttachmentIscsiLoginStateEnum + + // Flag indicating if this volume was created for the customer as part of a simplified launch. + // Used to determine whether the volume requires deletion on instance termination. + GetIsVolumeCreatedDuringLaunch() *bool +} + +type volumeattachment struct { + JsonData []byte + Device *string `mandatory:"false" json:"device"` + DisplayName *string `mandatory:"false" json:"displayName"` + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + IsShareable *bool `mandatory:"false" json:"isShareable"` + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` + IsMultipath *bool `mandatory:"false" json:"isMultipath"` + IscsiLoginState VolumeAttachmentIscsiLoginStateEnum `mandatory:"false" json:"iscsiLoginState,omitempty"` + IsVolumeCreatedDuringLaunch *bool `mandatory:"false" json:"isVolumeCreatedDuringLaunch"` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + Id *string `mandatory:"true" json:"id"` + InstanceId *string `mandatory:"true" json:"instanceId"` + LifecycleState VolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + VolumeId *string `mandatory:"true" json:"volumeId"` + AttachmentType string `json:"attachmentType"` +} + +// UnmarshalJSON unmarshals json +func (m *volumeattachment) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalervolumeattachment volumeattachment + s := struct { + Model Unmarshalervolumeattachment + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.AvailabilityDomain = s.Model.AvailabilityDomain + m.CompartmentId = s.Model.CompartmentId + m.Id = s.Model.Id + m.InstanceId = s.Model.InstanceId + m.LifecycleState = s.Model.LifecycleState + m.TimeCreated = s.Model.TimeCreated + m.VolumeId = s.Model.VolumeId + m.Device = s.Model.Device + m.DisplayName = s.Model.DisplayName + m.IsReadOnly = s.Model.IsReadOnly + m.IsShareable = s.Model.IsShareable + m.IsPvEncryptionInTransitEnabled = s.Model.IsPvEncryptionInTransitEnabled + m.IsMultipath = s.Model.IsMultipath + m.IscsiLoginState = s.Model.IscsiLoginState + m.IsVolumeCreatedDuringLaunch = s.Model.IsVolumeCreatedDuringLaunch + m.AttachmentType = s.Model.AttachmentType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *volumeattachment) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.AttachmentType { + case "iscsi": + mm := IScsiVolumeAttachment{} + err = json.Unmarshal(data, &mm) + return mm, err + case "emulated": + mm := EmulatedVolumeAttachment{} + err = json.Unmarshal(data, &mm) + return mm, err + case "paravirtualized": + mm := ParavirtualizedVolumeAttachment{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for VolumeAttachment: %s.", m.AttachmentType) + return *m, nil + } +} + +// GetDevice returns Device +func (m volumeattachment) GetDevice() *string { + return m.Device +} + +// GetDisplayName returns DisplayName +func (m volumeattachment) GetDisplayName() *string { + return m.DisplayName +} + +// GetIsReadOnly returns IsReadOnly +func (m volumeattachment) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetIsShareable returns IsShareable +func (m volumeattachment) GetIsShareable() *bool { + return m.IsShareable +} + +// GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled +func (m volumeattachment) GetIsPvEncryptionInTransitEnabled() *bool { + return m.IsPvEncryptionInTransitEnabled +} + +// GetIsMultipath returns IsMultipath +func (m volumeattachment) GetIsMultipath() *bool { + return m.IsMultipath +} + +// GetIscsiLoginState returns IscsiLoginState +func (m volumeattachment) GetIscsiLoginState() VolumeAttachmentIscsiLoginStateEnum { + return m.IscsiLoginState +} + +// GetIsVolumeCreatedDuringLaunch returns IsVolumeCreatedDuringLaunch +func (m volumeattachment) GetIsVolumeCreatedDuringLaunch() *bool { + return m.IsVolumeCreatedDuringLaunch +} + +// GetAvailabilityDomain returns AvailabilityDomain +func (m volumeattachment) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetCompartmentId returns CompartmentId +func (m volumeattachment) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetId returns Id +func (m volumeattachment) GetId() *string { + return m.Id +} + +// GetInstanceId returns InstanceId +func (m volumeattachment) GetInstanceId() *string { + return m.InstanceId +} + +// GetLifecycleState returns LifecycleState +func (m volumeattachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum { + return m.LifecycleState +} + +// GetTimeCreated returns TimeCreated +func (m volumeattachment) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetVolumeId returns VolumeId +func (m volumeattachment) GetVolumeId() *string { + return m.VolumeId +} + +func (m volumeattachment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m volumeattachment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVolumeAttachmentLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVolumeAttachmentLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingVolumeAttachmentIscsiLoginStateEnum(string(m.IscsiLoginState)); !ok && m.IscsiLoginState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IscsiLoginState: %s. Supported values are: %s.", m.IscsiLoginState, strings.Join(GetVolumeAttachmentIscsiLoginStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VolumeAttachmentLifecycleStateEnum Enum with underlying type: string +type VolumeAttachmentLifecycleStateEnum string + +// Set of constants representing the allowable values for VolumeAttachmentLifecycleStateEnum +const ( + VolumeAttachmentLifecycleStateAttaching VolumeAttachmentLifecycleStateEnum = "ATTACHING" + VolumeAttachmentLifecycleStateAttached VolumeAttachmentLifecycleStateEnum = "ATTACHED" + VolumeAttachmentLifecycleStateDetaching VolumeAttachmentLifecycleStateEnum = "DETACHING" + VolumeAttachmentLifecycleStateDetached VolumeAttachmentLifecycleStateEnum = "DETACHED" +) + +var mappingVolumeAttachmentLifecycleStateEnum = map[string]VolumeAttachmentLifecycleStateEnum{ + "ATTACHING": VolumeAttachmentLifecycleStateAttaching, + "ATTACHED": VolumeAttachmentLifecycleStateAttached, + "DETACHING": VolumeAttachmentLifecycleStateDetaching, + "DETACHED": VolumeAttachmentLifecycleStateDetached, +} + +var mappingVolumeAttachmentLifecycleStateEnumLowerCase = map[string]VolumeAttachmentLifecycleStateEnum{ + "attaching": VolumeAttachmentLifecycleStateAttaching, + "attached": VolumeAttachmentLifecycleStateAttached, + "detaching": VolumeAttachmentLifecycleStateDetaching, + "detached": VolumeAttachmentLifecycleStateDetached, +} + +// GetVolumeAttachmentLifecycleStateEnumValues Enumerates the set of values for VolumeAttachmentLifecycleStateEnum +func GetVolumeAttachmentLifecycleStateEnumValues() []VolumeAttachmentLifecycleStateEnum { + values := make([]VolumeAttachmentLifecycleStateEnum, 0) + for _, v := range mappingVolumeAttachmentLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVolumeAttachmentLifecycleStateEnumStringValues Enumerates the set of values in String for VolumeAttachmentLifecycleStateEnum +func GetVolumeAttachmentLifecycleStateEnumStringValues() []string { + return []string{ + "ATTACHING", + "ATTACHED", + "DETACHING", + "DETACHED", + } +} + +// GetMappingVolumeAttachmentLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeAttachmentLifecycleStateEnum(val string) (VolumeAttachmentLifecycleStateEnum, bool) { + enum, ok := mappingVolumeAttachmentLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VolumeAttachmentIscsiLoginStateEnum Enum with underlying type: string +type VolumeAttachmentIscsiLoginStateEnum string + +// Set of constants representing the allowable values for VolumeAttachmentIscsiLoginStateEnum +const ( + VolumeAttachmentIscsiLoginStateUnknown VolumeAttachmentIscsiLoginStateEnum = "UNKNOWN" + VolumeAttachmentIscsiLoginStateLoggingIn VolumeAttachmentIscsiLoginStateEnum = "LOGGING_IN" + VolumeAttachmentIscsiLoginStateLoginSucceeded VolumeAttachmentIscsiLoginStateEnum = "LOGIN_SUCCEEDED" + VolumeAttachmentIscsiLoginStateLoginFailed VolumeAttachmentIscsiLoginStateEnum = "LOGIN_FAILED" + VolumeAttachmentIscsiLoginStateLoggingOut VolumeAttachmentIscsiLoginStateEnum = "LOGGING_OUT" + VolumeAttachmentIscsiLoginStateLogoutSucceeded VolumeAttachmentIscsiLoginStateEnum = "LOGOUT_SUCCEEDED" + VolumeAttachmentIscsiLoginStateLogoutFailed VolumeAttachmentIscsiLoginStateEnum = "LOGOUT_FAILED" +) + +var mappingVolumeAttachmentIscsiLoginStateEnum = map[string]VolumeAttachmentIscsiLoginStateEnum{ + "UNKNOWN": VolumeAttachmentIscsiLoginStateUnknown, + "LOGGING_IN": VolumeAttachmentIscsiLoginStateLoggingIn, + "LOGIN_SUCCEEDED": VolumeAttachmentIscsiLoginStateLoginSucceeded, + "LOGIN_FAILED": VolumeAttachmentIscsiLoginStateLoginFailed, + "LOGGING_OUT": VolumeAttachmentIscsiLoginStateLoggingOut, + "LOGOUT_SUCCEEDED": VolumeAttachmentIscsiLoginStateLogoutSucceeded, + "LOGOUT_FAILED": VolumeAttachmentIscsiLoginStateLogoutFailed, +} + +var mappingVolumeAttachmentIscsiLoginStateEnumLowerCase = map[string]VolumeAttachmentIscsiLoginStateEnum{ + "unknown": VolumeAttachmentIscsiLoginStateUnknown, + "logging_in": VolumeAttachmentIscsiLoginStateLoggingIn, + "login_succeeded": VolumeAttachmentIscsiLoginStateLoginSucceeded, + "login_failed": VolumeAttachmentIscsiLoginStateLoginFailed, + "logging_out": VolumeAttachmentIscsiLoginStateLoggingOut, + "logout_succeeded": VolumeAttachmentIscsiLoginStateLogoutSucceeded, + "logout_failed": VolumeAttachmentIscsiLoginStateLogoutFailed, +} + +// GetVolumeAttachmentIscsiLoginStateEnumValues Enumerates the set of values for VolumeAttachmentIscsiLoginStateEnum +func GetVolumeAttachmentIscsiLoginStateEnumValues() []VolumeAttachmentIscsiLoginStateEnum { + values := make([]VolumeAttachmentIscsiLoginStateEnum, 0) + for _, v := range mappingVolumeAttachmentIscsiLoginStateEnum { + values = append(values, v) + } + return values +} + +// GetVolumeAttachmentIscsiLoginStateEnumStringValues Enumerates the set of values in String for VolumeAttachmentIscsiLoginStateEnum +func GetVolumeAttachmentIscsiLoginStateEnumStringValues() []string { + return []string{ + "UNKNOWN", + "LOGGING_IN", + "LOGIN_SUCCEEDED", + "LOGIN_FAILED", + "LOGGING_OUT", + "LOGOUT_SUCCEEDED", + "LOGOUT_FAILED", + } +} + +// GetMappingVolumeAttachmentIscsiLoginStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeAttachmentIscsiLoginStateEnum(val string) (VolumeAttachmentIscsiLoginStateEnum, bool) { + enum, ok := mappingVolumeAttachmentIscsiLoginStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_backup.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_backup.go new file mode 100644 index 000000000..2be73b4a8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_backup.go @@ -0,0 +1,275 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeBackup A point-in-time copy of a volume that can then be used to create a new block volume +// or recover a block volume. For more information, see +// Overview of Cloud Volume Storage (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type VolumeBackup struct { + + // The OCID of the compartment that contains the volume backup. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the volume backup. + Id *string `mandatory:"true" json:"id"` + + // The current state of a volume backup. + LifecycleState VolumeBackupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the volume backup was created. This is the time the actual point-in-time image + // of the volume data was taken. Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The type of a volume backup. + Type VolumeBackupTypeEnum `mandatory:"true" json:"type"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The date and time the volume backup will expire and be automatically deleted. + // Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). This parameter will always be present for backups that + // were created automatically by a scheduled-backup policy. For manually created backups, + // it will be absent, signifying that there is no expiration time and the backup will + // last forever until manually deleted. + ExpirationTime *common.SDKTime `mandatory:"false" json:"expirationTime"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The OCID of the Vault service key which is the master encryption key for the volume backup. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // The size of the volume, in GBs. + SizeInGBs *int64 `mandatory:"false" json:"sizeInGBs"` + + // The size of the volume in MBs. The value must be a multiple of 1024. + // This field is deprecated. Please use sizeInGBs. + SizeInMBs *int64 `mandatory:"false" json:"sizeInMBs"` + + // Specifies whether the backup was created manually, or via scheduled backup policy. + SourceType VolumeBackupSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` + + // The OCID of the source volume backup. + SourceVolumeBackupId *string `mandatory:"false" json:"sourceVolumeBackupId"` + + // The date and time the request to create the volume backup was received. Format defined by [RFC3339]https://tools.ietf.org/html/rfc3339. + TimeRequestReceived *common.SDKTime `mandatory:"false" json:"timeRequestReceived"` + + // The size used by the backup, in GBs. It is typically smaller than sizeInGBs, depending on the space + // consumed on the volume and whether the backup is full or incremental. + UniqueSizeInGBs *int64 `mandatory:"false" json:"uniqueSizeInGBs"` + + // The size used by the backup, in MBs. It is typically smaller than sizeInMBs, depending on the space + // consumed on the volume and whether the backup is full or incremental. + // This field is deprecated. Please use uniqueSizeInGBs. + UniqueSizeInMbs *int64 `mandatory:"false" json:"uniqueSizeInMbs"` + + // The OCID of the volume. + VolumeId *string `mandatory:"false" json:"volumeId"` +} + +func (m VolumeBackup) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeBackup) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVolumeBackupLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVolumeBackupLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingVolumeBackupTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetVolumeBackupTypeEnumStringValues(), ","))) + } + + if _, ok := GetMappingVolumeBackupSourceTypeEnum(string(m.SourceType)); !ok && m.SourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceType: %s. Supported values are: %s.", m.SourceType, strings.Join(GetVolumeBackupSourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VolumeBackupLifecycleStateEnum Enum with underlying type: string +type VolumeBackupLifecycleStateEnum string + +// Set of constants representing the allowable values for VolumeBackupLifecycleStateEnum +const ( + VolumeBackupLifecycleStateCreating VolumeBackupLifecycleStateEnum = "CREATING" + VolumeBackupLifecycleStateAvailable VolumeBackupLifecycleStateEnum = "AVAILABLE" + VolumeBackupLifecycleStateTerminating VolumeBackupLifecycleStateEnum = "TERMINATING" + VolumeBackupLifecycleStateTerminated VolumeBackupLifecycleStateEnum = "TERMINATED" + VolumeBackupLifecycleStateFaulty VolumeBackupLifecycleStateEnum = "FAULTY" + VolumeBackupLifecycleStateRequestReceived VolumeBackupLifecycleStateEnum = "REQUEST_RECEIVED" +) + +var mappingVolumeBackupLifecycleStateEnum = map[string]VolumeBackupLifecycleStateEnum{ + "CREATING": VolumeBackupLifecycleStateCreating, + "AVAILABLE": VolumeBackupLifecycleStateAvailable, + "TERMINATING": VolumeBackupLifecycleStateTerminating, + "TERMINATED": VolumeBackupLifecycleStateTerminated, + "FAULTY": VolumeBackupLifecycleStateFaulty, + "REQUEST_RECEIVED": VolumeBackupLifecycleStateRequestReceived, +} + +var mappingVolumeBackupLifecycleStateEnumLowerCase = map[string]VolumeBackupLifecycleStateEnum{ + "creating": VolumeBackupLifecycleStateCreating, + "available": VolumeBackupLifecycleStateAvailable, + "terminating": VolumeBackupLifecycleStateTerminating, + "terminated": VolumeBackupLifecycleStateTerminated, + "faulty": VolumeBackupLifecycleStateFaulty, + "request_received": VolumeBackupLifecycleStateRequestReceived, +} + +// GetVolumeBackupLifecycleStateEnumValues Enumerates the set of values for VolumeBackupLifecycleStateEnum +func GetVolumeBackupLifecycleStateEnumValues() []VolumeBackupLifecycleStateEnum { + values := make([]VolumeBackupLifecycleStateEnum, 0) + for _, v := range mappingVolumeBackupLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVolumeBackupLifecycleStateEnumStringValues Enumerates the set of values in String for VolumeBackupLifecycleStateEnum +func GetVolumeBackupLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + "FAULTY", + "REQUEST_RECEIVED", + } +} + +// GetMappingVolumeBackupLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeBackupLifecycleStateEnum(val string) (VolumeBackupLifecycleStateEnum, bool) { + enum, ok := mappingVolumeBackupLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VolumeBackupSourceTypeEnum Enum with underlying type: string +type VolumeBackupSourceTypeEnum string + +// Set of constants representing the allowable values for VolumeBackupSourceTypeEnum +const ( + VolumeBackupSourceTypeManual VolumeBackupSourceTypeEnum = "MANUAL" + VolumeBackupSourceTypeScheduled VolumeBackupSourceTypeEnum = "SCHEDULED" +) + +var mappingVolumeBackupSourceTypeEnum = map[string]VolumeBackupSourceTypeEnum{ + "MANUAL": VolumeBackupSourceTypeManual, + "SCHEDULED": VolumeBackupSourceTypeScheduled, +} + +var mappingVolumeBackupSourceTypeEnumLowerCase = map[string]VolumeBackupSourceTypeEnum{ + "manual": VolumeBackupSourceTypeManual, + "scheduled": VolumeBackupSourceTypeScheduled, +} + +// GetVolumeBackupSourceTypeEnumValues Enumerates the set of values for VolumeBackupSourceTypeEnum +func GetVolumeBackupSourceTypeEnumValues() []VolumeBackupSourceTypeEnum { + values := make([]VolumeBackupSourceTypeEnum, 0) + for _, v := range mappingVolumeBackupSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetVolumeBackupSourceTypeEnumStringValues Enumerates the set of values in String for VolumeBackupSourceTypeEnum +func GetVolumeBackupSourceTypeEnumStringValues() []string { + return []string{ + "MANUAL", + "SCHEDULED", + } +} + +// GetMappingVolumeBackupSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeBackupSourceTypeEnum(val string) (VolumeBackupSourceTypeEnum, bool) { + enum, ok := mappingVolumeBackupSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VolumeBackupTypeEnum Enum with underlying type: string +type VolumeBackupTypeEnum string + +// Set of constants representing the allowable values for VolumeBackupTypeEnum +const ( + VolumeBackupTypeFull VolumeBackupTypeEnum = "FULL" + VolumeBackupTypeIncremental VolumeBackupTypeEnum = "INCREMENTAL" +) + +var mappingVolumeBackupTypeEnum = map[string]VolumeBackupTypeEnum{ + "FULL": VolumeBackupTypeFull, + "INCREMENTAL": VolumeBackupTypeIncremental, +} + +var mappingVolumeBackupTypeEnumLowerCase = map[string]VolumeBackupTypeEnum{ + "full": VolumeBackupTypeFull, + "incremental": VolumeBackupTypeIncremental, +} + +// GetVolumeBackupTypeEnumValues Enumerates the set of values for VolumeBackupTypeEnum +func GetVolumeBackupTypeEnumValues() []VolumeBackupTypeEnum { + values := make([]VolumeBackupTypeEnum, 0) + for _, v := range mappingVolumeBackupTypeEnum { + values = append(values, v) + } + return values +} + +// GetVolumeBackupTypeEnumStringValues Enumerates the set of values in String for VolumeBackupTypeEnum +func GetVolumeBackupTypeEnumStringValues() []string { + return []string{ + "FULL", + "INCREMENTAL", + } +} + +// GetMappingVolumeBackupTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeBackupTypeEnum(val string) (VolumeBackupTypeEnum, bool) { + enum, ok := mappingVolumeBackupTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_backup_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_backup_policy.go new file mode 100644 index 000000000..271e7f0c0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_backup_policy.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeBackupPolicy A policy for automatically creating volume backups according to a +// recurring schedule. Has a set of one or more schedules that control when and +// how backups are created. +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type VolumeBackupPolicy struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the volume backup policy. + Id *string `mandatory:"true" json:"id"` + + // The collection of schedules that this policy will apply. + Schedules []VolumeBackupSchedule `mandatory:"true" json:"schedules"` + + // The date and time the volume backup policy was created. Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The paired destination region for copying scheduled backups to. Example `us-ashburn-1`. + // See Region Pairs (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm#RegionPairs) for details about paired regions. + DestinationRegion *string `mandatory:"false" json:"destinationRegion"` + + // The OCID of the compartment that contains the volume backup. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m VolumeBackupPolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeBackupPolicy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_backup_policy_assignment.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_backup_policy_assignment.go new file mode 100644 index 000000000..8273da2c9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_backup_policy_assignment.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeBackupPolicyAssignment Specifies the volume that the volume backup policy is assigned to. +// For more information about Oracle defined backup policies and custom backup policies, +// see Policy-Based Backups (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm). +type VolumeBackupPolicyAssignment struct { + + // The OCID of the volume the policy has been assigned to. + AssetId *string `mandatory:"true" json:"assetId"` + + // The OCID of the volume backup policy assignment. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the volume backup policy that has been assigned to the volume. + PolicyId *string `mandatory:"true" json:"policyId"` + + // The date and time the volume backup policy was assigned to the volume. The format is + // defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the Vault service key which is the master encryption key for the block / boot volume cross region backups, which will be used in the destination region to encrypt the backup's encryption keys. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + XrcKmsKeyId *string `mandatory:"false" json:"xrcKmsKeyId"` +} + +func (m VolumeBackupPolicyAssignment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeBackupPolicyAssignment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_backup_schedule.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_backup_schedule.go new file mode 100644 index 000000000..d700d0612 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_backup_schedule.go @@ -0,0 +1,432 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeBackupSchedule Defines the backup frequency and retention period for a volume backup policy. For more information, +// see Policy-Based Backups (https://docs.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm). +type VolumeBackupSchedule struct { + + // The type of volume backup to create. + BackupType VolumeBackupScheduleBackupTypeEnum `mandatory:"true" json:"backupType"` + + // The volume backup frequency. + Period VolumeBackupSchedulePeriodEnum `mandatory:"true" json:"period"` + + // How long, in seconds, to keep the volume backups created by this schedule. + RetentionSeconds *int `mandatory:"true" json:"retentionSeconds"` + + // The number of seconds that the volume backup start + // time should be shifted from the default interval boundaries specified by + // the period. The volume backup start time is the frequency start time plus the offset. + OffsetSeconds *int `mandatory:"false" json:"offsetSeconds"` + + // Indicates how the offset is defined. If value is `STRUCTURED`, + // then `hourOfDay`, `dayOfWeek`, `dayOfMonth`, and `month` fields are used + // and `offsetSeconds` will be ignored in requests and users should ignore its + // value from the responses. + // `hourOfDay` is applicable for periods `ONE_DAY`, + // `ONE_WEEK`, `ONE_MONTH` and `ONE_YEAR`. + // `dayOfWeek` is applicable for period + // `ONE_WEEK`. + // `dayOfMonth` is applicable for periods `ONE_MONTH` and `ONE_YEAR`. + // 'month' is applicable for period 'ONE_YEAR'. + // They will be ignored in the requests for inapplicable periods. + // If value is `NUMERIC_SECONDS`, then `offsetSeconds` + // will be used for both requests and responses and the structured fields will be + // ignored in the requests and users should ignore their values from the responses. + // For clients using older versions of Apis and not sending `offsetType` in their + // requests, the behaviour is just like `NUMERIC_SECONDS`. + OffsetType VolumeBackupScheduleOffsetTypeEnum `mandatory:"false" json:"offsetType,omitempty"` + + // The hour of the day to schedule the volume backup. + HourOfDay *int `mandatory:"false" json:"hourOfDay"` + + // The day of the week to schedule the volume backup. + DayOfWeek VolumeBackupScheduleDayOfWeekEnum `mandatory:"false" json:"dayOfWeek,omitempty"` + + // The day of the month to schedule the volume backup. + DayOfMonth *int `mandatory:"false" json:"dayOfMonth"` + + // The month of the year to schedule the volume backup. + Month VolumeBackupScheduleMonthEnum `mandatory:"false" json:"month,omitempty"` + + // Specifies what time zone is the schedule in + TimeZone VolumeBackupScheduleTimeZoneEnum `mandatory:"false" json:"timeZone,omitempty"` +} + +func (m VolumeBackupSchedule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeBackupSchedule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVolumeBackupScheduleBackupTypeEnum(string(m.BackupType)); !ok && m.BackupType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BackupType: %s. Supported values are: %s.", m.BackupType, strings.Join(GetVolumeBackupScheduleBackupTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingVolumeBackupSchedulePeriodEnum(string(m.Period)); !ok && m.Period != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Period: %s. Supported values are: %s.", m.Period, strings.Join(GetVolumeBackupSchedulePeriodEnumStringValues(), ","))) + } + + if _, ok := GetMappingVolumeBackupScheduleOffsetTypeEnum(string(m.OffsetType)); !ok && m.OffsetType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OffsetType: %s. Supported values are: %s.", m.OffsetType, strings.Join(GetVolumeBackupScheduleOffsetTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingVolumeBackupScheduleDayOfWeekEnum(string(m.DayOfWeek)); !ok && m.DayOfWeek != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DayOfWeek: %s. Supported values are: %s.", m.DayOfWeek, strings.Join(GetVolumeBackupScheduleDayOfWeekEnumStringValues(), ","))) + } + if _, ok := GetMappingVolumeBackupScheduleMonthEnum(string(m.Month)); !ok && m.Month != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Month: %s. Supported values are: %s.", m.Month, strings.Join(GetVolumeBackupScheduleMonthEnumStringValues(), ","))) + } + if _, ok := GetMappingVolumeBackupScheduleTimeZoneEnum(string(m.TimeZone)); !ok && m.TimeZone != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TimeZone: %s. Supported values are: %s.", m.TimeZone, strings.Join(GetVolumeBackupScheduleTimeZoneEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VolumeBackupScheduleBackupTypeEnum Enum with underlying type: string +type VolumeBackupScheduleBackupTypeEnum string + +// Set of constants representing the allowable values for VolumeBackupScheduleBackupTypeEnum +const ( + VolumeBackupScheduleBackupTypeFull VolumeBackupScheduleBackupTypeEnum = "FULL" + VolumeBackupScheduleBackupTypeIncremental VolumeBackupScheduleBackupTypeEnum = "INCREMENTAL" +) + +var mappingVolumeBackupScheduleBackupTypeEnum = map[string]VolumeBackupScheduleBackupTypeEnum{ + "FULL": VolumeBackupScheduleBackupTypeFull, + "INCREMENTAL": VolumeBackupScheduleBackupTypeIncremental, +} + +var mappingVolumeBackupScheduleBackupTypeEnumLowerCase = map[string]VolumeBackupScheduleBackupTypeEnum{ + "full": VolumeBackupScheduleBackupTypeFull, + "incremental": VolumeBackupScheduleBackupTypeIncremental, +} + +// GetVolumeBackupScheduleBackupTypeEnumValues Enumerates the set of values for VolumeBackupScheduleBackupTypeEnum +func GetVolumeBackupScheduleBackupTypeEnumValues() []VolumeBackupScheduleBackupTypeEnum { + values := make([]VolumeBackupScheduleBackupTypeEnum, 0) + for _, v := range mappingVolumeBackupScheduleBackupTypeEnum { + values = append(values, v) + } + return values +} + +// GetVolumeBackupScheduleBackupTypeEnumStringValues Enumerates the set of values in String for VolumeBackupScheduleBackupTypeEnum +func GetVolumeBackupScheduleBackupTypeEnumStringValues() []string { + return []string{ + "FULL", + "INCREMENTAL", + } +} + +// GetMappingVolumeBackupScheduleBackupTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeBackupScheduleBackupTypeEnum(val string) (VolumeBackupScheduleBackupTypeEnum, bool) { + enum, ok := mappingVolumeBackupScheduleBackupTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VolumeBackupSchedulePeriodEnum Enum with underlying type: string +type VolumeBackupSchedulePeriodEnum string + +// Set of constants representing the allowable values for VolumeBackupSchedulePeriodEnum +const ( + VolumeBackupSchedulePeriodHour VolumeBackupSchedulePeriodEnum = "ONE_HOUR" + VolumeBackupSchedulePeriodDay VolumeBackupSchedulePeriodEnum = "ONE_DAY" + VolumeBackupSchedulePeriodWeek VolumeBackupSchedulePeriodEnum = "ONE_WEEK" + VolumeBackupSchedulePeriodMonth VolumeBackupSchedulePeriodEnum = "ONE_MONTH" + VolumeBackupSchedulePeriodYear VolumeBackupSchedulePeriodEnum = "ONE_YEAR" +) + +var mappingVolumeBackupSchedulePeriodEnum = map[string]VolumeBackupSchedulePeriodEnum{ + "ONE_HOUR": VolumeBackupSchedulePeriodHour, + "ONE_DAY": VolumeBackupSchedulePeriodDay, + "ONE_WEEK": VolumeBackupSchedulePeriodWeek, + "ONE_MONTH": VolumeBackupSchedulePeriodMonth, + "ONE_YEAR": VolumeBackupSchedulePeriodYear, +} + +var mappingVolumeBackupSchedulePeriodEnumLowerCase = map[string]VolumeBackupSchedulePeriodEnum{ + "one_hour": VolumeBackupSchedulePeriodHour, + "one_day": VolumeBackupSchedulePeriodDay, + "one_week": VolumeBackupSchedulePeriodWeek, + "one_month": VolumeBackupSchedulePeriodMonth, + "one_year": VolumeBackupSchedulePeriodYear, +} + +// GetVolumeBackupSchedulePeriodEnumValues Enumerates the set of values for VolumeBackupSchedulePeriodEnum +func GetVolumeBackupSchedulePeriodEnumValues() []VolumeBackupSchedulePeriodEnum { + values := make([]VolumeBackupSchedulePeriodEnum, 0) + for _, v := range mappingVolumeBackupSchedulePeriodEnum { + values = append(values, v) + } + return values +} + +// GetVolumeBackupSchedulePeriodEnumStringValues Enumerates the set of values in String for VolumeBackupSchedulePeriodEnum +func GetVolumeBackupSchedulePeriodEnumStringValues() []string { + return []string{ + "ONE_HOUR", + "ONE_DAY", + "ONE_WEEK", + "ONE_MONTH", + "ONE_YEAR", + } +} + +// GetMappingVolumeBackupSchedulePeriodEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeBackupSchedulePeriodEnum(val string) (VolumeBackupSchedulePeriodEnum, bool) { + enum, ok := mappingVolumeBackupSchedulePeriodEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VolumeBackupScheduleOffsetTypeEnum Enum with underlying type: string +type VolumeBackupScheduleOffsetTypeEnum string + +// Set of constants representing the allowable values for VolumeBackupScheduleOffsetTypeEnum +const ( + VolumeBackupScheduleOffsetTypeStructured VolumeBackupScheduleOffsetTypeEnum = "STRUCTURED" + VolumeBackupScheduleOffsetTypeNumericSeconds VolumeBackupScheduleOffsetTypeEnum = "NUMERIC_SECONDS" +) + +var mappingVolumeBackupScheduleOffsetTypeEnum = map[string]VolumeBackupScheduleOffsetTypeEnum{ + "STRUCTURED": VolumeBackupScheduleOffsetTypeStructured, + "NUMERIC_SECONDS": VolumeBackupScheduleOffsetTypeNumericSeconds, +} + +var mappingVolumeBackupScheduleOffsetTypeEnumLowerCase = map[string]VolumeBackupScheduleOffsetTypeEnum{ + "structured": VolumeBackupScheduleOffsetTypeStructured, + "numeric_seconds": VolumeBackupScheduleOffsetTypeNumericSeconds, +} + +// GetVolumeBackupScheduleOffsetTypeEnumValues Enumerates the set of values for VolumeBackupScheduleOffsetTypeEnum +func GetVolumeBackupScheduleOffsetTypeEnumValues() []VolumeBackupScheduleOffsetTypeEnum { + values := make([]VolumeBackupScheduleOffsetTypeEnum, 0) + for _, v := range mappingVolumeBackupScheduleOffsetTypeEnum { + values = append(values, v) + } + return values +} + +// GetVolumeBackupScheduleOffsetTypeEnumStringValues Enumerates the set of values in String for VolumeBackupScheduleOffsetTypeEnum +func GetVolumeBackupScheduleOffsetTypeEnumStringValues() []string { + return []string{ + "STRUCTURED", + "NUMERIC_SECONDS", + } +} + +// GetMappingVolumeBackupScheduleOffsetTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeBackupScheduleOffsetTypeEnum(val string) (VolumeBackupScheduleOffsetTypeEnum, bool) { + enum, ok := mappingVolumeBackupScheduleOffsetTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VolumeBackupScheduleDayOfWeekEnum Enum with underlying type: string +type VolumeBackupScheduleDayOfWeekEnum string + +// Set of constants representing the allowable values for VolumeBackupScheduleDayOfWeekEnum +const ( + VolumeBackupScheduleDayOfWeekMonday VolumeBackupScheduleDayOfWeekEnum = "MONDAY" + VolumeBackupScheduleDayOfWeekTuesday VolumeBackupScheduleDayOfWeekEnum = "TUESDAY" + VolumeBackupScheduleDayOfWeekWednesday VolumeBackupScheduleDayOfWeekEnum = "WEDNESDAY" + VolumeBackupScheduleDayOfWeekThursday VolumeBackupScheduleDayOfWeekEnum = "THURSDAY" + VolumeBackupScheduleDayOfWeekFriday VolumeBackupScheduleDayOfWeekEnum = "FRIDAY" + VolumeBackupScheduleDayOfWeekSaturday VolumeBackupScheduleDayOfWeekEnum = "SATURDAY" + VolumeBackupScheduleDayOfWeekSunday VolumeBackupScheduleDayOfWeekEnum = "SUNDAY" +) + +var mappingVolumeBackupScheduleDayOfWeekEnum = map[string]VolumeBackupScheduleDayOfWeekEnum{ + "MONDAY": VolumeBackupScheduleDayOfWeekMonday, + "TUESDAY": VolumeBackupScheduleDayOfWeekTuesday, + "WEDNESDAY": VolumeBackupScheduleDayOfWeekWednesday, + "THURSDAY": VolumeBackupScheduleDayOfWeekThursday, + "FRIDAY": VolumeBackupScheduleDayOfWeekFriday, + "SATURDAY": VolumeBackupScheduleDayOfWeekSaturday, + "SUNDAY": VolumeBackupScheduleDayOfWeekSunday, +} + +var mappingVolumeBackupScheduleDayOfWeekEnumLowerCase = map[string]VolumeBackupScheduleDayOfWeekEnum{ + "monday": VolumeBackupScheduleDayOfWeekMonday, + "tuesday": VolumeBackupScheduleDayOfWeekTuesday, + "wednesday": VolumeBackupScheduleDayOfWeekWednesday, + "thursday": VolumeBackupScheduleDayOfWeekThursday, + "friday": VolumeBackupScheduleDayOfWeekFriday, + "saturday": VolumeBackupScheduleDayOfWeekSaturday, + "sunday": VolumeBackupScheduleDayOfWeekSunday, +} + +// GetVolumeBackupScheduleDayOfWeekEnumValues Enumerates the set of values for VolumeBackupScheduleDayOfWeekEnum +func GetVolumeBackupScheduleDayOfWeekEnumValues() []VolumeBackupScheduleDayOfWeekEnum { + values := make([]VolumeBackupScheduleDayOfWeekEnum, 0) + for _, v := range mappingVolumeBackupScheduleDayOfWeekEnum { + values = append(values, v) + } + return values +} + +// GetVolumeBackupScheduleDayOfWeekEnumStringValues Enumerates the set of values in String for VolumeBackupScheduleDayOfWeekEnum +func GetVolumeBackupScheduleDayOfWeekEnumStringValues() []string { + return []string{ + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY", + } +} + +// GetMappingVolumeBackupScheduleDayOfWeekEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeBackupScheduleDayOfWeekEnum(val string) (VolumeBackupScheduleDayOfWeekEnum, bool) { + enum, ok := mappingVolumeBackupScheduleDayOfWeekEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VolumeBackupScheduleMonthEnum Enum with underlying type: string +type VolumeBackupScheduleMonthEnum string + +// Set of constants representing the allowable values for VolumeBackupScheduleMonthEnum +const ( + VolumeBackupScheduleMonthJanuary VolumeBackupScheduleMonthEnum = "JANUARY" + VolumeBackupScheduleMonthFebruary VolumeBackupScheduleMonthEnum = "FEBRUARY" + VolumeBackupScheduleMonthMarch VolumeBackupScheduleMonthEnum = "MARCH" + VolumeBackupScheduleMonthApril VolumeBackupScheduleMonthEnum = "APRIL" + VolumeBackupScheduleMonthMay VolumeBackupScheduleMonthEnum = "MAY" + VolumeBackupScheduleMonthJune VolumeBackupScheduleMonthEnum = "JUNE" + VolumeBackupScheduleMonthJuly VolumeBackupScheduleMonthEnum = "JULY" + VolumeBackupScheduleMonthAugust VolumeBackupScheduleMonthEnum = "AUGUST" + VolumeBackupScheduleMonthSeptember VolumeBackupScheduleMonthEnum = "SEPTEMBER" + VolumeBackupScheduleMonthOctober VolumeBackupScheduleMonthEnum = "OCTOBER" + VolumeBackupScheduleMonthNovember VolumeBackupScheduleMonthEnum = "NOVEMBER" + VolumeBackupScheduleMonthDecember VolumeBackupScheduleMonthEnum = "DECEMBER" +) + +var mappingVolumeBackupScheduleMonthEnum = map[string]VolumeBackupScheduleMonthEnum{ + "JANUARY": VolumeBackupScheduleMonthJanuary, + "FEBRUARY": VolumeBackupScheduleMonthFebruary, + "MARCH": VolumeBackupScheduleMonthMarch, + "APRIL": VolumeBackupScheduleMonthApril, + "MAY": VolumeBackupScheduleMonthMay, + "JUNE": VolumeBackupScheduleMonthJune, + "JULY": VolumeBackupScheduleMonthJuly, + "AUGUST": VolumeBackupScheduleMonthAugust, + "SEPTEMBER": VolumeBackupScheduleMonthSeptember, + "OCTOBER": VolumeBackupScheduleMonthOctober, + "NOVEMBER": VolumeBackupScheduleMonthNovember, + "DECEMBER": VolumeBackupScheduleMonthDecember, +} + +var mappingVolumeBackupScheduleMonthEnumLowerCase = map[string]VolumeBackupScheduleMonthEnum{ + "january": VolumeBackupScheduleMonthJanuary, + "february": VolumeBackupScheduleMonthFebruary, + "march": VolumeBackupScheduleMonthMarch, + "april": VolumeBackupScheduleMonthApril, + "may": VolumeBackupScheduleMonthMay, + "june": VolumeBackupScheduleMonthJune, + "july": VolumeBackupScheduleMonthJuly, + "august": VolumeBackupScheduleMonthAugust, + "september": VolumeBackupScheduleMonthSeptember, + "october": VolumeBackupScheduleMonthOctober, + "november": VolumeBackupScheduleMonthNovember, + "december": VolumeBackupScheduleMonthDecember, +} + +// GetVolumeBackupScheduleMonthEnumValues Enumerates the set of values for VolumeBackupScheduleMonthEnum +func GetVolumeBackupScheduleMonthEnumValues() []VolumeBackupScheduleMonthEnum { + values := make([]VolumeBackupScheduleMonthEnum, 0) + for _, v := range mappingVolumeBackupScheduleMonthEnum { + values = append(values, v) + } + return values +} + +// GetVolumeBackupScheduleMonthEnumStringValues Enumerates the set of values in String for VolumeBackupScheduleMonthEnum +func GetVolumeBackupScheduleMonthEnumStringValues() []string { + return []string{ + "JANUARY", + "FEBRUARY", + "MARCH", + "APRIL", + "MAY", + "JUNE", + "JULY", + "AUGUST", + "SEPTEMBER", + "OCTOBER", + "NOVEMBER", + "DECEMBER", + } +} + +// GetMappingVolumeBackupScheduleMonthEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeBackupScheduleMonthEnum(val string) (VolumeBackupScheduleMonthEnum, bool) { + enum, ok := mappingVolumeBackupScheduleMonthEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VolumeBackupScheduleTimeZoneEnum Enum with underlying type: string +type VolumeBackupScheduleTimeZoneEnum string + +// Set of constants representing the allowable values for VolumeBackupScheduleTimeZoneEnum +const ( + VolumeBackupScheduleTimeZoneUtc VolumeBackupScheduleTimeZoneEnum = "UTC" + VolumeBackupScheduleTimeZoneRegionalDataCenterTime VolumeBackupScheduleTimeZoneEnum = "REGIONAL_DATA_CENTER_TIME" +) + +var mappingVolumeBackupScheduleTimeZoneEnum = map[string]VolumeBackupScheduleTimeZoneEnum{ + "UTC": VolumeBackupScheduleTimeZoneUtc, + "REGIONAL_DATA_CENTER_TIME": VolumeBackupScheduleTimeZoneRegionalDataCenterTime, +} + +var mappingVolumeBackupScheduleTimeZoneEnumLowerCase = map[string]VolumeBackupScheduleTimeZoneEnum{ + "utc": VolumeBackupScheduleTimeZoneUtc, + "regional_data_center_time": VolumeBackupScheduleTimeZoneRegionalDataCenterTime, +} + +// GetVolumeBackupScheduleTimeZoneEnumValues Enumerates the set of values for VolumeBackupScheduleTimeZoneEnum +func GetVolumeBackupScheduleTimeZoneEnumValues() []VolumeBackupScheduleTimeZoneEnum { + values := make([]VolumeBackupScheduleTimeZoneEnum, 0) + for _, v := range mappingVolumeBackupScheduleTimeZoneEnum { + values = append(values, v) + } + return values +} + +// GetVolumeBackupScheduleTimeZoneEnumStringValues Enumerates the set of values in String for VolumeBackupScheduleTimeZoneEnum +func GetVolumeBackupScheduleTimeZoneEnumStringValues() []string { + return []string{ + "UTC", + "REGIONAL_DATA_CENTER_TIME", + } +} + +// GetMappingVolumeBackupScheduleTimeZoneEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeBackupScheduleTimeZoneEnum(val string) (VolumeBackupScheduleTimeZoneEnum, bool) { + enum, ok := mappingVolumeBackupScheduleTimeZoneEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group.go new file mode 100644 index 000000000..a4eb3af81 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group.go @@ -0,0 +1,217 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeGroup Specifies a volume group which is a collection of +// volumes. For more information, see Volume Groups (https://docs.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type VolumeGroup struct { + + // The availability domain of the volume group. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the volume group. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID for the volume group. + Id *string `mandatory:"true" json:"id"` + + // The current state of a volume group. + LifecycleState VolumeGroupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The aggregate size of the volume group in MBs. + SizeInMBs *int64 `mandatory:"true" json:"sizeInMBs"` + + // The date and time the volume group was created. Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // OCIDs for the volumes in this volume group. + VolumeIds []string `mandatory:"true" json:"volumeIds"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The aggregate size of the volume group in GBs. + SizeInGBs *int64 `mandatory:"false" json:"sizeInGBs"` + + SourceDetails VolumeGroupSourceDetails `mandatory:"false" json:"sourceDetails"` + + // Specifies whether the newly created cloned volume group's data has finished copying + // from the source volume group or backup. + IsHydrated *bool `mandatory:"false" json:"isHydrated"` + + // The list of volume group replicas of this volume group. + VolumeGroupReplicas []VolumeGroupReplicaInfo `mandatory:"false" json:"volumeGroupReplicas"` +} + +func (m VolumeGroup) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeGroup) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVolumeGroupLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVolumeGroupLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *VolumeGroup) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + FreeformTags map[string]string `json:"freeformTags"` + SizeInGBs *int64 `json:"sizeInGBs"` + SourceDetails volumegroupsourcedetails `json:"sourceDetails"` + IsHydrated *bool `json:"isHydrated"` + VolumeGroupReplicas []VolumeGroupReplicaInfo `json:"volumeGroupReplicas"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + DisplayName *string `json:"displayName"` + Id *string `json:"id"` + LifecycleState VolumeGroupLifecycleStateEnum `json:"lifecycleState"` + SizeInMBs *int64 `json:"sizeInMBs"` + TimeCreated *common.SDKTime `json:"timeCreated"` + VolumeIds []string `json:"volumeIds"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.FreeformTags = model.FreeformTags + + m.SizeInGBs = model.SizeInGBs + + nn, e = model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.SourceDetails = nn.(VolumeGroupSourceDetails) + } else { + m.SourceDetails = nil + } + + m.IsHydrated = model.IsHydrated + + m.VolumeGroupReplicas = make([]VolumeGroupReplicaInfo, len(model.VolumeGroupReplicas)) + copy(m.VolumeGroupReplicas, model.VolumeGroupReplicas) + m.AvailabilityDomain = model.AvailabilityDomain + + m.CompartmentId = model.CompartmentId + + m.DisplayName = model.DisplayName + + m.Id = model.Id + + m.LifecycleState = model.LifecycleState + + m.SizeInMBs = model.SizeInMBs + + m.TimeCreated = model.TimeCreated + + m.VolumeIds = make([]string, len(model.VolumeIds)) + copy(m.VolumeIds, model.VolumeIds) + return +} + +// VolumeGroupLifecycleStateEnum Enum with underlying type: string +type VolumeGroupLifecycleStateEnum string + +// Set of constants representing the allowable values for VolumeGroupLifecycleStateEnum +const ( + VolumeGroupLifecycleStateProvisioning VolumeGroupLifecycleStateEnum = "PROVISIONING" + VolumeGroupLifecycleStateAvailable VolumeGroupLifecycleStateEnum = "AVAILABLE" + VolumeGroupLifecycleStateTerminating VolumeGroupLifecycleStateEnum = "TERMINATING" + VolumeGroupLifecycleStateTerminated VolumeGroupLifecycleStateEnum = "TERMINATED" + VolumeGroupLifecycleStateFaulty VolumeGroupLifecycleStateEnum = "FAULTY" + VolumeGroupLifecycleStateUpdatePending VolumeGroupLifecycleStateEnum = "UPDATE_PENDING" +) + +var mappingVolumeGroupLifecycleStateEnum = map[string]VolumeGroupLifecycleStateEnum{ + "PROVISIONING": VolumeGroupLifecycleStateProvisioning, + "AVAILABLE": VolumeGroupLifecycleStateAvailable, + "TERMINATING": VolumeGroupLifecycleStateTerminating, + "TERMINATED": VolumeGroupLifecycleStateTerminated, + "FAULTY": VolumeGroupLifecycleStateFaulty, + "UPDATE_PENDING": VolumeGroupLifecycleStateUpdatePending, +} + +var mappingVolumeGroupLifecycleStateEnumLowerCase = map[string]VolumeGroupLifecycleStateEnum{ + "provisioning": VolumeGroupLifecycleStateProvisioning, + "available": VolumeGroupLifecycleStateAvailable, + "terminating": VolumeGroupLifecycleStateTerminating, + "terminated": VolumeGroupLifecycleStateTerminated, + "faulty": VolumeGroupLifecycleStateFaulty, + "update_pending": VolumeGroupLifecycleStateUpdatePending, +} + +// GetVolumeGroupLifecycleStateEnumValues Enumerates the set of values for VolumeGroupLifecycleStateEnum +func GetVolumeGroupLifecycleStateEnumValues() []VolumeGroupLifecycleStateEnum { + values := make([]VolumeGroupLifecycleStateEnum, 0) + for _, v := range mappingVolumeGroupLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVolumeGroupLifecycleStateEnumStringValues Enumerates the set of values in String for VolumeGroupLifecycleStateEnum +func GetVolumeGroupLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + "FAULTY", + "UPDATE_PENDING", + } +} + +// GetMappingVolumeGroupLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeGroupLifecycleStateEnum(val string) (VolumeGroupLifecycleStateEnum, bool) { + enum, ok := mappingVolumeGroupLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_backup.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_backup.go new file mode 100644 index 000000000..235ededd7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_backup.go @@ -0,0 +1,272 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeGroupBackup A point-in-time copy of a volume group that can then be used to create a new volume group +// or restore a volume group. For more information, see Volume Groups (https://docs.oracle.com/iaas/Content/Block/Concepts/volumegroups.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type VolumeGroupBackup struct { + + // The OCID of the compartment that contains the volume group backup. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the volume group backup. + Id *string `mandatory:"true" json:"id"` + + // The current state of a volume group backup. + LifecycleState VolumeGroupBackupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time the volume group backup was created. This is the time the actual point-in-time image + // of the volume group data was taken. Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The type of backup. + Type VolumeGroupBackupTypeEnum `mandatory:"true" json:"type"` + + // OCIDs for the volume backups in this volume group backup. + VolumeBackupIds []string `mandatory:"true" json:"volumeBackupIds"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The date and time the volume group backup will expire and be automatically deleted. + // Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). This parameter will always be present for volume group + // backups that were created automatically by a scheduled-backup policy. For manually + // created volume group backups, it will be absent, signifying that there is no expiration + // time and the backup will last forever until manually deleted. + ExpirationTime *common.SDKTime `mandatory:"false" json:"expirationTime"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The aggregate size of the volume group backup, in MBs. + SizeInMBs *int64 `mandatory:"false" json:"sizeInMBs"` + + // The aggregate size of the volume group backup, in GBs. + SizeInGBs *int64 `mandatory:"false" json:"sizeInGBs"` + + // Specifies whether the volume group backup was created manually, or via scheduled + // backup policy. + SourceType VolumeGroupBackupSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` + + // The date and time the request to create the volume group backup was received. Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeRequestReceived *common.SDKTime `mandatory:"false" json:"timeRequestReceived"` + + // The aggregate size used by the volume group backup, in MBs. + // It is typically smaller than sizeInMBs, depending on the spaceconsumed + // on the volume group and whether the volume backup is full or incremental. + UniqueSizeInMbs *int64 `mandatory:"false" json:"uniqueSizeInMbs"` + + // The aggregate size used by the volume group backup, in GBs. + // It is typically smaller than sizeInGBs, depending on the spaceconsumed + // on the volume group and whether the volume backup is full or incremental. + UniqueSizeInGbs *int64 `mandatory:"false" json:"uniqueSizeInGbs"` + + // The OCID of the source volume group. + VolumeGroupId *string `mandatory:"false" json:"volumeGroupId"` + + // The OCID of the source volume group backup. + SourceVolumeGroupBackupId *string `mandatory:"false" json:"sourceVolumeGroupBackupId"` +} + +func (m VolumeGroupBackup) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeGroupBackup) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVolumeGroupBackupLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVolumeGroupBackupLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingVolumeGroupBackupTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetVolumeGroupBackupTypeEnumStringValues(), ","))) + } + + if _, ok := GetMappingVolumeGroupBackupSourceTypeEnum(string(m.SourceType)); !ok && m.SourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceType: %s. Supported values are: %s.", m.SourceType, strings.Join(GetVolumeGroupBackupSourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VolumeGroupBackupLifecycleStateEnum Enum with underlying type: string +type VolumeGroupBackupLifecycleStateEnum string + +// Set of constants representing the allowable values for VolumeGroupBackupLifecycleStateEnum +const ( + VolumeGroupBackupLifecycleStateCreating VolumeGroupBackupLifecycleStateEnum = "CREATING" + VolumeGroupBackupLifecycleStateCommitted VolumeGroupBackupLifecycleStateEnum = "COMMITTED" + VolumeGroupBackupLifecycleStateAvailable VolumeGroupBackupLifecycleStateEnum = "AVAILABLE" + VolumeGroupBackupLifecycleStateTerminating VolumeGroupBackupLifecycleStateEnum = "TERMINATING" + VolumeGroupBackupLifecycleStateTerminated VolumeGroupBackupLifecycleStateEnum = "TERMINATED" + VolumeGroupBackupLifecycleStateFaulty VolumeGroupBackupLifecycleStateEnum = "FAULTY" + VolumeGroupBackupLifecycleStateRequestReceived VolumeGroupBackupLifecycleStateEnum = "REQUEST_RECEIVED" +) + +var mappingVolumeGroupBackupLifecycleStateEnum = map[string]VolumeGroupBackupLifecycleStateEnum{ + "CREATING": VolumeGroupBackupLifecycleStateCreating, + "COMMITTED": VolumeGroupBackupLifecycleStateCommitted, + "AVAILABLE": VolumeGroupBackupLifecycleStateAvailable, + "TERMINATING": VolumeGroupBackupLifecycleStateTerminating, + "TERMINATED": VolumeGroupBackupLifecycleStateTerminated, + "FAULTY": VolumeGroupBackupLifecycleStateFaulty, + "REQUEST_RECEIVED": VolumeGroupBackupLifecycleStateRequestReceived, +} + +var mappingVolumeGroupBackupLifecycleStateEnumLowerCase = map[string]VolumeGroupBackupLifecycleStateEnum{ + "creating": VolumeGroupBackupLifecycleStateCreating, + "committed": VolumeGroupBackupLifecycleStateCommitted, + "available": VolumeGroupBackupLifecycleStateAvailable, + "terminating": VolumeGroupBackupLifecycleStateTerminating, + "terminated": VolumeGroupBackupLifecycleStateTerminated, + "faulty": VolumeGroupBackupLifecycleStateFaulty, + "request_received": VolumeGroupBackupLifecycleStateRequestReceived, +} + +// GetVolumeGroupBackupLifecycleStateEnumValues Enumerates the set of values for VolumeGroupBackupLifecycleStateEnum +func GetVolumeGroupBackupLifecycleStateEnumValues() []VolumeGroupBackupLifecycleStateEnum { + values := make([]VolumeGroupBackupLifecycleStateEnum, 0) + for _, v := range mappingVolumeGroupBackupLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVolumeGroupBackupLifecycleStateEnumStringValues Enumerates the set of values in String for VolumeGroupBackupLifecycleStateEnum +func GetVolumeGroupBackupLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "COMMITTED", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + "FAULTY", + "REQUEST_RECEIVED", + } +} + +// GetMappingVolumeGroupBackupLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeGroupBackupLifecycleStateEnum(val string) (VolumeGroupBackupLifecycleStateEnum, bool) { + enum, ok := mappingVolumeGroupBackupLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VolumeGroupBackupSourceTypeEnum Enum with underlying type: string +type VolumeGroupBackupSourceTypeEnum string + +// Set of constants representing the allowable values for VolumeGroupBackupSourceTypeEnum +const ( + VolumeGroupBackupSourceTypeManual VolumeGroupBackupSourceTypeEnum = "MANUAL" + VolumeGroupBackupSourceTypeScheduled VolumeGroupBackupSourceTypeEnum = "SCHEDULED" +) + +var mappingVolumeGroupBackupSourceTypeEnum = map[string]VolumeGroupBackupSourceTypeEnum{ + "MANUAL": VolumeGroupBackupSourceTypeManual, + "SCHEDULED": VolumeGroupBackupSourceTypeScheduled, +} + +var mappingVolumeGroupBackupSourceTypeEnumLowerCase = map[string]VolumeGroupBackupSourceTypeEnum{ + "manual": VolumeGroupBackupSourceTypeManual, + "scheduled": VolumeGroupBackupSourceTypeScheduled, +} + +// GetVolumeGroupBackupSourceTypeEnumValues Enumerates the set of values for VolumeGroupBackupSourceTypeEnum +func GetVolumeGroupBackupSourceTypeEnumValues() []VolumeGroupBackupSourceTypeEnum { + values := make([]VolumeGroupBackupSourceTypeEnum, 0) + for _, v := range mappingVolumeGroupBackupSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetVolumeGroupBackupSourceTypeEnumStringValues Enumerates the set of values in String for VolumeGroupBackupSourceTypeEnum +func GetVolumeGroupBackupSourceTypeEnumStringValues() []string { + return []string{ + "MANUAL", + "SCHEDULED", + } +} + +// GetMappingVolumeGroupBackupSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeGroupBackupSourceTypeEnum(val string) (VolumeGroupBackupSourceTypeEnum, bool) { + enum, ok := mappingVolumeGroupBackupSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VolumeGroupBackupTypeEnum Enum with underlying type: string +type VolumeGroupBackupTypeEnum string + +// Set of constants representing the allowable values for VolumeGroupBackupTypeEnum +const ( + VolumeGroupBackupTypeFull VolumeGroupBackupTypeEnum = "FULL" + VolumeGroupBackupTypeIncremental VolumeGroupBackupTypeEnum = "INCREMENTAL" +) + +var mappingVolumeGroupBackupTypeEnum = map[string]VolumeGroupBackupTypeEnum{ + "FULL": VolumeGroupBackupTypeFull, + "INCREMENTAL": VolumeGroupBackupTypeIncremental, +} + +var mappingVolumeGroupBackupTypeEnumLowerCase = map[string]VolumeGroupBackupTypeEnum{ + "full": VolumeGroupBackupTypeFull, + "incremental": VolumeGroupBackupTypeIncremental, +} + +// GetVolumeGroupBackupTypeEnumValues Enumerates the set of values for VolumeGroupBackupTypeEnum +func GetVolumeGroupBackupTypeEnumValues() []VolumeGroupBackupTypeEnum { + values := make([]VolumeGroupBackupTypeEnum, 0) + for _, v := range mappingVolumeGroupBackupTypeEnum { + values = append(values, v) + } + return values +} + +// GetVolumeGroupBackupTypeEnumStringValues Enumerates the set of values in String for VolumeGroupBackupTypeEnum +func GetVolumeGroupBackupTypeEnumStringValues() []string { + return []string{ + "FULL", + "INCREMENTAL", + } +} + +// GetMappingVolumeGroupBackupTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeGroupBackupTypeEnum(val string) (VolumeGroupBackupTypeEnum, bool) { + enum, ok := mappingVolumeGroupBackupTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_replica.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_replica.go new file mode 100644 index 000000000..806c9339d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_replica.go @@ -0,0 +1,151 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeGroupReplica An asynchronous replica of a volume group that can then be used to create a new volume group +// or recover a volume group. For more information, see Volume Group Replication (https://docs.oracle.com/iaas/Content/Block/Concepts/volumegroupreplication.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. If you're an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// **Warning:** Oracle recommends that you avoid using any confidential information when you +// supply string values using the API. +type VolumeGroupReplica struct { + + // The availability domain of the volume group replica. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment that contains the volume group replica. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID for the volume group replica. + Id *string `mandatory:"true" json:"id"` + + // The current state of a volume group. + LifecycleState VolumeGroupReplicaLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The aggregate size of the volume group replica in GBs. + SizeInGBs *int64 `mandatory:"true" json:"sizeInGBs"` + + // The OCID of the source volume group. + VolumeGroupId *string `mandatory:"true" json:"volumeGroupId"` + + // The date and time the volume group replica was created. Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Volume replicas within this volume group replica. + MemberReplicas []MemberReplica `mandatory:"true" json:"memberReplicas"` + + // The date and time the volume group replica was last synced from the source volume group. + // Format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeLastSynced *common.SDKTime `mandatory:"true" json:"timeLastSynced"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m VolumeGroupReplica) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeGroupReplica) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVolumeGroupReplicaLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVolumeGroupReplicaLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VolumeGroupReplicaLifecycleStateEnum Enum with underlying type: string +type VolumeGroupReplicaLifecycleStateEnum string + +// Set of constants representing the allowable values for VolumeGroupReplicaLifecycleStateEnum +const ( + VolumeGroupReplicaLifecycleStateProvisioning VolumeGroupReplicaLifecycleStateEnum = "PROVISIONING" + VolumeGroupReplicaLifecycleStateAvailable VolumeGroupReplicaLifecycleStateEnum = "AVAILABLE" + VolumeGroupReplicaLifecycleStateActivating VolumeGroupReplicaLifecycleStateEnum = "ACTIVATING" + VolumeGroupReplicaLifecycleStateTerminating VolumeGroupReplicaLifecycleStateEnum = "TERMINATING" + VolumeGroupReplicaLifecycleStateTerminated VolumeGroupReplicaLifecycleStateEnum = "TERMINATED" + VolumeGroupReplicaLifecycleStateFaulty VolumeGroupReplicaLifecycleStateEnum = "FAULTY" +) + +var mappingVolumeGroupReplicaLifecycleStateEnum = map[string]VolumeGroupReplicaLifecycleStateEnum{ + "PROVISIONING": VolumeGroupReplicaLifecycleStateProvisioning, + "AVAILABLE": VolumeGroupReplicaLifecycleStateAvailable, + "ACTIVATING": VolumeGroupReplicaLifecycleStateActivating, + "TERMINATING": VolumeGroupReplicaLifecycleStateTerminating, + "TERMINATED": VolumeGroupReplicaLifecycleStateTerminated, + "FAULTY": VolumeGroupReplicaLifecycleStateFaulty, +} + +var mappingVolumeGroupReplicaLifecycleStateEnumLowerCase = map[string]VolumeGroupReplicaLifecycleStateEnum{ + "provisioning": VolumeGroupReplicaLifecycleStateProvisioning, + "available": VolumeGroupReplicaLifecycleStateAvailable, + "activating": VolumeGroupReplicaLifecycleStateActivating, + "terminating": VolumeGroupReplicaLifecycleStateTerminating, + "terminated": VolumeGroupReplicaLifecycleStateTerminated, + "faulty": VolumeGroupReplicaLifecycleStateFaulty, +} + +// GetVolumeGroupReplicaLifecycleStateEnumValues Enumerates the set of values for VolumeGroupReplicaLifecycleStateEnum +func GetVolumeGroupReplicaLifecycleStateEnumValues() []VolumeGroupReplicaLifecycleStateEnum { + values := make([]VolumeGroupReplicaLifecycleStateEnum, 0) + for _, v := range mappingVolumeGroupReplicaLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVolumeGroupReplicaLifecycleStateEnumStringValues Enumerates the set of values in String for VolumeGroupReplicaLifecycleStateEnum +func GetVolumeGroupReplicaLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "ACTIVATING", + "TERMINATING", + "TERMINATED", + "FAULTY", + } +} + +// GetMappingVolumeGroupReplicaLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVolumeGroupReplicaLifecycleStateEnum(val string) (VolumeGroupReplicaLifecycleStateEnum, bool) { + enum, ok := mappingVolumeGroupReplicaLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_replica_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_replica_details.go new file mode 100644 index 000000000..8b363bf8b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_replica_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeGroupReplicaDetails Contains the details for the volume group replica. +type VolumeGroupReplicaDetails struct { + + // The availability domain of the volume group replica. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID of the Vault service key which is the master encryption key for the cross region volume group's replicas, which will be used in the destination region to encrypt the volume group's replicas encryption keys. + // For more information about the Vault service and encryption keys, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + XrrKmsKeyId *string `mandatory:"false" json:"xrrKmsKeyId"` +} + +func (m VolumeGroupReplicaDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeGroupReplicaDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_replica_info.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_replica_info.go new file mode 100644 index 000000000..eb96d0521 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_replica_info.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeGroupReplicaInfo Information about the volume group replica in the destination availability domain. +type VolumeGroupReplicaInfo struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The volume group replica's Oracle ID (OCID). + VolumeGroupReplicaId *string `mandatory:"true" json:"volumeGroupReplicaId"` + + // The availability domain of the boot volume replica replica. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see + // Overview of Vault service (https://docs.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and + // Using Keys (https://docs.oracle.com/iaas/Content/KeyManagement/Tasks/usingkeys.htm). + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m VolumeGroupReplicaInfo) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeGroupReplicaInfo) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_details.go new file mode 100644 index 000000000..c323547ce --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_details.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeGroupSourceDetails Specifies the source for a volume group. +type VolumeGroupSourceDetails interface { +} + +type volumegroupsourcedetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *volumegroupsourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalervolumegroupsourcedetails volumegroupsourcedetails + s := struct { + Model Unmarshalervolumegroupsourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *volumegroupsourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "volumeGroupReplicaId": + mm := VolumeGroupSourceFromVolumeGroupReplicaDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "volumeGroupId": + mm := VolumeGroupSourceFromVolumeGroupDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "volumeIds": + mm := VolumeGroupSourceFromVolumesDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "volumeGroupBackupId": + mm := VolumeGroupSourceFromVolumeGroupBackupDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for VolumeGroupSourceDetails: %s.", m.Type) + return *m, nil + } +} + +func (m volumegroupsourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m volumegroupsourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_from_volume_group_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_from_volume_group_backup_details.go new file mode 100644 index 000000000..794f8e11a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_from_volume_group_backup_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeGroupSourceFromVolumeGroupBackupDetails Specifies the volume group backup to restore from. +type VolumeGroupSourceFromVolumeGroupBackupDetails struct { + + // The OCID of the volume group backup to restore from. + VolumeGroupBackupId *string `mandatory:"true" json:"volumeGroupBackupId"` +} + +func (m VolumeGroupSourceFromVolumeGroupBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeGroupSourceFromVolumeGroupBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VolumeGroupSourceFromVolumeGroupBackupDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVolumeGroupSourceFromVolumeGroupBackupDetails VolumeGroupSourceFromVolumeGroupBackupDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVolumeGroupSourceFromVolumeGroupBackupDetails + }{ + "volumeGroupBackupId", + (MarshalTypeVolumeGroupSourceFromVolumeGroupBackupDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_from_volume_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_from_volume_group_details.go new file mode 100644 index 000000000..3b82a94c1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_from_volume_group_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeGroupSourceFromVolumeGroupDetails Specifies the volume group to clone from. +type VolumeGroupSourceFromVolumeGroupDetails struct { + + // The OCID of the volume group to clone from. + VolumeGroupId *string `mandatory:"true" json:"volumeGroupId"` +} + +func (m VolumeGroupSourceFromVolumeGroupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeGroupSourceFromVolumeGroupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VolumeGroupSourceFromVolumeGroupDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVolumeGroupSourceFromVolumeGroupDetails VolumeGroupSourceFromVolumeGroupDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVolumeGroupSourceFromVolumeGroupDetails + }{ + "volumeGroupId", + (MarshalTypeVolumeGroupSourceFromVolumeGroupDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_from_volume_group_replica_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_from_volume_group_replica_details.go new file mode 100644 index 000000000..a59f94d91 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_from_volume_group_replica_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeGroupSourceFromVolumeGroupReplicaDetails Specifies the source volume replica which the volume group will be created from. +// The volume group replica shoulbe be in the same availability domain as the volume group. +// Only one volume group can be created from a volume group replica at the same time. +type VolumeGroupSourceFromVolumeGroupReplicaDetails struct { + + // The OCID of the volume group replica. + VolumeGroupReplicaId *string `mandatory:"true" json:"volumeGroupReplicaId"` +} + +func (m VolumeGroupSourceFromVolumeGroupReplicaDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeGroupSourceFromVolumeGroupReplicaDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VolumeGroupSourceFromVolumeGroupReplicaDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVolumeGroupSourceFromVolumeGroupReplicaDetails VolumeGroupSourceFromVolumeGroupReplicaDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVolumeGroupSourceFromVolumeGroupReplicaDetails + }{ + "volumeGroupReplicaId", + (MarshalTypeVolumeGroupSourceFromVolumeGroupReplicaDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_from_volumes_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_from_volumes_details.go new file mode 100644 index 000000000..5cbcc1254 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_group_source_from_volumes_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeGroupSourceFromVolumesDetails Specifies the volumes in a volume group. +type VolumeGroupSourceFromVolumesDetails struct { + + // OCIDs for the volumes in this volume group. + VolumeIds []string `mandatory:"true" json:"volumeIds"` +} + +func (m VolumeGroupSourceFromVolumesDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeGroupSourceFromVolumesDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VolumeGroupSourceFromVolumesDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVolumeGroupSourceFromVolumesDetails VolumeGroupSourceFromVolumesDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVolumeGroupSourceFromVolumesDetails + }{ + "volumeIds", + (MarshalTypeVolumeGroupSourceFromVolumesDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_kms_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_kms_key.go new file mode 100644 index 000000000..baccbfa21 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_kms_key.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeKmsKey The Vault service master encryption key associated with this volume. +type VolumeKmsKey struct { + + // The OCID of the Vault service key assigned to this volume. If the volume is not using Vault service, then the `kmsKeyId` will be a null string. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m VolumeKmsKey) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeKmsKey) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_details.go new file mode 100644 index 000000000..30097005d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_details.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeSourceDetails Specifies the volume source details for a new Block volume. The volume source is either another Block volume in the same Availability Domain or a Block volume backup. +// This is an optional field. If not specified or set to null, the new Block volume will be empty. +// When specified, the new Block volume will contain data from the source volume or backup. +type VolumeSourceDetails interface { +} + +type volumesourcedetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *volumesourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalervolumesourcedetails volumesourcedetails + s := struct { + Model Unmarshalervolumesourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *volumesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "blockVolumeReplica": + mm := VolumeSourceFromBlockVolumeReplicaDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "volume": + mm := VolumeSourceFromVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "volumeBackup": + mm := VolumeSourceFromVolumeBackupDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "volumeBackupDelta": + mm := VolumeSourceFromVolumeBackupDeltaDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for VolumeSourceDetails: %s.", m.Type) + return *m, nil + } +} + +func (m volumesourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m volumesourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_from_block_volume_replica_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_from_block_volume_replica_details.go new file mode 100644 index 000000000..65881489d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_from_block_volume_replica_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeSourceFromBlockVolumeReplicaDetails Specifies the source block volume replica which the block volume will be created from. +// The block volume replica shoulbe be in the same availability domain as the block volume. +// Only one volume can be created from a replica at the same time. +type VolumeSourceFromBlockVolumeReplicaDetails struct { + + // The OCID of the block volume replica. + Id *string `mandatory:"true" json:"id"` +} + +func (m VolumeSourceFromBlockVolumeReplicaDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeSourceFromBlockVolumeReplicaDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VolumeSourceFromBlockVolumeReplicaDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVolumeSourceFromBlockVolumeReplicaDetails VolumeSourceFromBlockVolumeReplicaDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVolumeSourceFromBlockVolumeReplicaDetails + }{ + "blockVolumeReplica", + (MarshalTypeVolumeSourceFromBlockVolumeReplicaDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_from_volume_backup_delta_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_from_volume_backup_delta_details.go new file mode 100644 index 000000000..323360943 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_from_volume_backup_delta_details.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeSourceFromVolumeBackupDeltaDetails Specifies the volume backups (first & second) and block size in bytes. +type VolumeSourceFromVolumeBackupDeltaDetails struct { + + // The OCID of the first volume backup. + FirstBackupId *string `mandatory:"true" json:"firstBackupId"` + + // The OCID of the second volume backup. + SecondBackupId *string `mandatory:"true" json:"secondBackupId"` + + // Block size in bytes to be considered while performing volume restore. The value must be a power of 2; ranging from 4KB (4096 bytes) to 1MB (1048576 bytes). If omitted, defaults to 4,096 bytes (4 KiB). + ChangeBlockSizeInBytes *int64 `mandatory:"false" json:"changeBlockSizeInBytes"` +} + +func (m VolumeSourceFromVolumeBackupDeltaDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeSourceFromVolumeBackupDeltaDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VolumeSourceFromVolumeBackupDeltaDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVolumeSourceFromVolumeBackupDeltaDetails VolumeSourceFromVolumeBackupDeltaDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVolumeSourceFromVolumeBackupDeltaDetails + }{ + "volumeBackupDelta", + (MarshalTypeVolumeSourceFromVolumeBackupDeltaDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_from_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_from_volume_backup_details.go new file mode 100644 index 000000000..ae21ed683 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_from_volume_backup_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeSourceFromVolumeBackupDetails Specifies the volume backup. +type VolumeSourceFromVolumeBackupDetails struct { + + // The OCID of the volume backup. + Id *string `mandatory:"true" json:"id"` +} + +func (m VolumeSourceFromVolumeBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeSourceFromVolumeBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VolumeSourceFromVolumeBackupDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVolumeSourceFromVolumeBackupDetails VolumeSourceFromVolumeBackupDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVolumeSourceFromVolumeBackupDetails + }{ + "volumeBackup", + (MarshalTypeVolumeSourceFromVolumeBackupDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_from_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_from_volume_details.go new file mode 100644 index 000000000..efa7821f9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/volume_source_from_volume_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeSourceFromVolumeDetails Specifies the source volume. +type VolumeSourceFromVolumeDetails struct { + + // The OCID of the volume. + Id *string `mandatory:"true" json:"id"` +} + +func (m VolumeSourceFromVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeSourceFromVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VolumeSourceFromVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVolumeSourceFromVolumeDetails VolumeSourceFromVolumeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVolumeSourceFromVolumeDetails + }{ + "volume", + (MarshalTypeVolumeSourceFromVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vtap.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vtap.go new file mode 100644 index 000000000..3193ec880 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vtap.go @@ -0,0 +1,416 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Vtap A virtual test access point (VTAP) provides a way to mirror all traffic from a designated source to a selected target in order to facilitate troubleshooting, security analysis, and data monitoring. +// A VTAP is functionally similar to a test access point (TAP) you might deploy in your on-premises network. +// A *CaptureFilter* contains a set of *CaptureFilterRuleDetails* governing what traffic a VTAP mirrors. +type Vtap struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the `Vtap` resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN containing the `Vtap` resource. + VcnId *string `mandatory:"true" json:"vcnId"` + + // The VTAP's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + Id *string `mandatory:"true" json:"id"` + + // The VTAP's administrative lifecycle state. + LifecycleState VtapLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the source point where packets are captured. + SourceId *string `mandatory:"true" json:"sourceId"` + + // The capture filter's Oracle ID (OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). + CaptureFilterId *string `mandatory:"true" json:"captureFilterId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The VTAP's current running state. + LifecycleStateDetails VtapLifecycleStateDetailsEnum `mandatory:"false" json:"lifecycleStateDetails,omitempty"` + + // The date and time the VTAP was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2020-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the destination resource where mirrored packets are sent. + TargetId *string `mandatory:"false" json:"targetId"` + + // The IP address of the destination resource where mirrored packets are sent. + TargetIp *string `mandatory:"false" json:"targetIp"` + + // Defines an encapsulation header type for the VTAP's mirrored traffic. + EncapsulationProtocol VtapEncapsulationProtocolEnum `mandatory:"false" json:"encapsulationProtocol,omitempty"` + + // The virtual extensible LAN (VXLAN) network identifier (or VXLAN segment ID) that uniquely identifies the VXLAN. + VxlanNetworkIdentifier *int64 `mandatory:"false" json:"vxlanNetworkIdentifier"` + + // Used to start or stop a `Vtap` resource. + // * `TRUE` directs the VTAP to start mirroring traffic. + // * `FALSE` (Default) directs the VTAP to stop mirroring traffic. + IsVtapEnabled *bool `mandatory:"false" json:"isVtapEnabled"` + + // The source type for the VTAP. + SourceType VtapSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` + + // Used to control the priority of traffic. It is an optional field. If it not passed, the value is DEFAULT + TrafficMode VtapTrafficModeEnum `mandatory:"false" json:"trafficMode,omitempty"` + + // The maximum size of the packets to be included in the filter. + MaxPacketSize *int `mandatory:"false" json:"maxPacketSize"` + + // The target type for the VTAP. + TargetType VtapTargetTypeEnum `mandatory:"false" json:"targetType,omitempty"` + + // The IP Address of the source private endpoint. + SourcePrivateEndpointIp *string `mandatory:"false" json:"sourcePrivateEndpointIp"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet that source private endpoint belongs to. + SourcePrivateEndpointSubnetId *string `mandatory:"false" json:"sourcePrivateEndpointSubnetId"` +} + +func (m Vtap) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Vtap) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVtapLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVtapLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingVtapLifecycleStateDetailsEnum(string(m.LifecycleStateDetails)); !ok && m.LifecycleStateDetails != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleStateDetails: %s. Supported values are: %s.", m.LifecycleStateDetails, strings.Join(GetVtapLifecycleStateDetailsEnumStringValues(), ","))) + } + if _, ok := GetMappingVtapEncapsulationProtocolEnum(string(m.EncapsulationProtocol)); !ok && m.EncapsulationProtocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncapsulationProtocol: %s. Supported values are: %s.", m.EncapsulationProtocol, strings.Join(GetVtapEncapsulationProtocolEnumStringValues(), ","))) + } + if _, ok := GetMappingVtapSourceTypeEnum(string(m.SourceType)); !ok && m.SourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceType: %s. Supported values are: %s.", m.SourceType, strings.Join(GetVtapSourceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingVtapTrafficModeEnum(string(m.TrafficMode)); !ok && m.TrafficMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TrafficMode: %s. Supported values are: %s.", m.TrafficMode, strings.Join(GetVtapTrafficModeEnumStringValues(), ","))) + } + if _, ok := GetMappingVtapTargetTypeEnum(string(m.TargetType)); !ok && m.TargetType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TargetType: %s. Supported values are: %s.", m.TargetType, strings.Join(GetVtapTargetTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VtapLifecycleStateEnum Enum with underlying type: string +type VtapLifecycleStateEnum string + +// Set of constants representing the allowable values for VtapLifecycleStateEnum +const ( + VtapLifecycleStateProvisioning VtapLifecycleStateEnum = "PROVISIONING" + VtapLifecycleStateAvailable VtapLifecycleStateEnum = "AVAILABLE" + VtapLifecycleStateUpdating VtapLifecycleStateEnum = "UPDATING" + VtapLifecycleStateTerminating VtapLifecycleStateEnum = "TERMINATING" + VtapLifecycleStateTerminated VtapLifecycleStateEnum = "TERMINATED" +) + +var mappingVtapLifecycleStateEnum = map[string]VtapLifecycleStateEnum{ + "PROVISIONING": VtapLifecycleStateProvisioning, + "AVAILABLE": VtapLifecycleStateAvailable, + "UPDATING": VtapLifecycleStateUpdating, + "TERMINATING": VtapLifecycleStateTerminating, + "TERMINATED": VtapLifecycleStateTerminated, +} + +var mappingVtapLifecycleStateEnumLowerCase = map[string]VtapLifecycleStateEnum{ + "provisioning": VtapLifecycleStateProvisioning, + "available": VtapLifecycleStateAvailable, + "updating": VtapLifecycleStateUpdating, + "terminating": VtapLifecycleStateTerminating, + "terminated": VtapLifecycleStateTerminated, +} + +// GetVtapLifecycleStateEnumValues Enumerates the set of values for VtapLifecycleStateEnum +func GetVtapLifecycleStateEnumValues() []VtapLifecycleStateEnum { + values := make([]VtapLifecycleStateEnum, 0) + for _, v := range mappingVtapLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVtapLifecycleStateEnumStringValues Enumerates the set of values in String for VtapLifecycleStateEnum +func GetVtapLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "UPDATING", + "TERMINATING", + "TERMINATED", + } +} + +// GetMappingVtapLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVtapLifecycleStateEnum(val string) (VtapLifecycleStateEnum, bool) { + enum, ok := mappingVtapLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VtapLifecycleStateDetailsEnum Enum with underlying type: string +type VtapLifecycleStateDetailsEnum string + +// Set of constants representing the allowable values for VtapLifecycleStateDetailsEnum +const ( + VtapLifecycleStateDetailsRunning VtapLifecycleStateDetailsEnum = "RUNNING" + VtapLifecycleStateDetailsStopped VtapLifecycleStateDetailsEnum = "STOPPED" +) + +var mappingVtapLifecycleStateDetailsEnum = map[string]VtapLifecycleStateDetailsEnum{ + "RUNNING": VtapLifecycleStateDetailsRunning, + "STOPPED": VtapLifecycleStateDetailsStopped, +} + +var mappingVtapLifecycleStateDetailsEnumLowerCase = map[string]VtapLifecycleStateDetailsEnum{ + "running": VtapLifecycleStateDetailsRunning, + "stopped": VtapLifecycleStateDetailsStopped, +} + +// GetVtapLifecycleStateDetailsEnumValues Enumerates the set of values for VtapLifecycleStateDetailsEnum +func GetVtapLifecycleStateDetailsEnumValues() []VtapLifecycleStateDetailsEnum { + values := make([]VtapLifecycleStateDetailsEnum, 0) + for _, v := range mappingVtapLifecycleStateDetailsEnum { + values = append(values, v) + } + return values +} + +// GetVtapLifecycleStateDetailsEnumStringValues Enumerates the set of values in String for VtapLifecycleStateDetailsEnum +func GetVtapLifecycleStateDetailsEnumStringValues() []string { + return []string{ + "RUNNING", + "STOPPED", + } +} + +// GetMappingVtapLifecycleStateDetailsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVtapLifecycleStateDetailsEnum(val string) (VtapLifecycleStateDetailsEnum, bool) { + enum, ok := mappingVtapLifecycleStateDetailsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VtapEncapsulationProtocolEnum Enum with underlying type: string +type VtapEncapsulationProtocolEnum string + +// Set of constants representing the allowable values for VtapEncapsulationProtocolEnum +const ( + VtapEncapsulationProtocolVxlan VtapEncapsulationProtocolEnum = "VXLAN" +) + +var mappingVtapEncapsulationProtocolEnum = map[string]VtapEncapsulationProtocolEnum{ + "VXLAN": VtapEncapsulationProtocolVxlan, +} + +var mappingVtapEncapsulationProtocolEnumLowerCase = map[string]VtapEncapsulationProtocolEnum{ + "vxlan": VtapEncapsulationProtocolVxlan, +} + +// GetVtapEncapsulationProtocolEnumValues Enumerates the set of values for VtapEncapsulationProtocolEnum +func GetVtapEncapsulationProtocolEnumValues() []VtapEncapsulationProtocolEnum { + values := make([]VtapEncapsulationProtocolEnum, 0) + for _, v := range mappingVtapEncapsulationProtocolEnum { + values = append(values, v) + } + return values +} + +// GetVtapEncapsulationProtocolEnumStringValues Enumerates the set of values in String for VtapEncapsulationProtocolEnum +func GetVtapEncapsulationProtocolEnumStringValues() []string { + return []string{ + "VXLAN", + } +} + +// GetMappingVtapEncapsulationProtocolEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVtapEncapsulationProtocolEnum(val string) (VtapEncapsulationProtocolEnum, bool) { + enum, ok := mappingVtapEncapsulationProtocolEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VtapSourceTypeEnum Enum with underlying type: string +type VtapSourceTypeEnum string + +// Set of constants representing the allowable values for VtapSourceTypeEnum +const ( + VtapSourceTypeVnic VtapSourceTypeEnum = "VNIC" + VtapSourceTypeSubnet VtapSourceTypeEnum = "SUBNET" + VtapSourceTypeLoadBalancer VtapSourceTypeEnum = "LOAD_BALANCER" + VtapSourceTypeDbSystem VtapSourceTypeEnum = "DB_SYSTEM" + VtapSourceTypeExadataVmCluster VtapSourceTypeEnum = "EXADATA_VM_CLUSTER" + VtapSourceTypeAutonomousDataWarehouse VtapSourceTypeEnum = "AUTONOMOUS_DATA_WAREHOUSE" +) + +var mappingVtapSourceTypeEnum = map[string]VtapSourceTypeEnum{ + "VNIC": VtapSourceTypeVnic, + "SUBNET": VtapSourceTypeSubnet, + "LOAD_BALANCER": VtapSourceTypeLoadBalancer, + "DB_SYSTEM": VtapSourceTypeDbSystem, + "EXADATA_VM_CLUSTER": VtapSourceTypeExadataVmCluster, + "AUTONOMOUS_DATA_WAREHOUSE": VtapSourceTypeAutonomousDataWarehouse, +} + +var mappingVtapSourceTypeEnumLowerCase = map[string]VtapSourceTypeEnum{ + "vnic": VtapSourceTypeVnic, + "subnet": VtapSourceTypeSubnet, + "load_balancer": VtapSourceTypeLoadBalancer, + "db_system": VtapSourceTypeDbSystem, + "exadata_vm_cluster": VtapSourceTypeExadataVmCluster, + "autonomous_data_warehouse": VtapSourceTypeAutonomousDataWarehouse, +} + +// GetVtapSourceTypeEnumValues Enumerates the set of values for VtapSourceTypeEnum +func GetVtapSourceTypeEnumValues() []VtapSourceTypeEnum { + values := make([]VtapSourceTypeEnum, 0) + for _, v := range mappingVtapSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetVtapSourceTypeEnumStringValues Enumerates the set of values in String for VtapSourceTypeEnum +func GetVtapSourceTypeEnumStringValues() []string { + return []string{ + "VNIC", + "SUBNET", + "LOAD_BALANCER", + "DB_SYSTEM", + "EXADATA_VM_CLUSTER", + "AUTONOMOUS_DATA_WAREHOUSE", + } +} + +// GetMappingVtapSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVtapSourceTypeEnum(val string) (VtapSourceTypeEnum, bool) { + enum, ok := mappingVtapSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VtapTrafficModeEnum Enum with underlying type: string +type VtapTrafficModeEnum string + +// Set of constants representing the allowable values for VtapTrafficModeEnum +const ( + VtapTrafficModeDefault VtapTrafficModeEnum = "DEFAULT" + VtapTrafficModePriority VtapTrafficModeEnum = "PRIORITY" +) + +var mappingVtapTrafficModeEnum = map[string]VtapTrafficModeEnum{ + "DEFAULT": VtapTrafficModeDefault, + "PRIORITY": VtapTrafficModePriority, +} + +var mappingVtapTrafficModeEnumLowerCase = map[string]VtapTrafficModeEnum{ + "default": VtapTrafficModeDefault, + "priority": VtapTrafficModePriority, +} + +// GetVtapTrafficModeEnumValues Enumerates the set of values for VtapTrafficModeEnum +func GetVtapTrafficModeEnumValues() []VtapTrafficModeEnum { + values := make([]VtapTrafficModeEnum, 0) + for _, v := range mappingVtapTrafficModeEnum { + values = append(values, v) + } + return values +} + +// GetVtapTrafficModeEnumStringValues Enumerates the set of values in String for VtapTrafficModeEnum +func GetVtapTrafficModeEnumStringValues() []string { + return []string{ + "DEFAULT", + "PRIORITY", + } +} + +// GetMappingVtapTrafficModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVtapTrafficModeEnum(val string) (VtapTrafficModeEnum, bool) { + enum, ok := mappingVtapTrafficModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VtapTargetTypeEnum Enum with underlying type: string +type VtapTargetTypeEnum string + +// Set of constants representing the allowable values for VtapTargetTypeEnum +const ( + VtapTargetTypeVnic VtapTargetTypeEnum = "VNIC" + VtapTargetTypeNetworkLoadBalancer VtapTargetTypeEnum = "NETWORK_LOAD_BALANCER" + VtapTargetTypeIpAddress VtapTargetTypeEnum = "IP_ADDRESS" +) + +var mappingVtapTargetTypeEnum = map[string]VtapTargetTypeEnum{ + "VNIC": VtapTargetTypeVnic, + "NETWORK_LOAD_BALANCER": VtapTargetTypeNetworkLoadBalancer, + "IP_ADDRESS": VtapTargetTypeIpAddress, +} + +var mappingVtapTargetTypeEnumLowerCase = map[string]VtapTargetTypeEnum{ + "vnic": VtapTargetTypeVnic, + "network_load_balancer": VtapTargetTypeNetworkLoadBalancer, + "ip_address": VtapTargetTypeIpAddress, +} + +// GetVtapTargetTypeEnumValues Enumerates the set of values for VtapTargetTypeEnum +func GetVtapTargetTypeEnumValues() []VtapTargetTypeEnum { + values := make([]VtapTargetTypeEnum, 0) + for _, v := range mappingVtapTargetTypeEnum { + values = append(values, v) + } + return values +} + +// GetVtapTargetTypeEnumStringValues Enumerates the set of values in String for VtapTargetTypeEnum +func GetVtapTargetTypeEnumStringValues() []string { + return []string{ + "VNIC", + "NETWORK_LOAD_BALANCER", + "IP_ADDRESS", + } +} + +// GetMappingVtapTargetTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVtapTargetTypeEnum(val string) (VtapTargetTypeEnum, bool) { + enum, ok := mappingVtapTargetTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/vtap_capture_filter_rule_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/vtap_capture_filter_rule_details.go new file mode 100644 index 000000000..bd1464046 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/vtap_capture_filter_rule_details.go @@ -0,0 +1,157 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VtapCaptureFilterRuleDetails This resource contains the rules governing what traffic a VTAP mirrors. +type VtapCaptureFilterRuleDetails struct { + + // The traffic direction the VTAP is configured to mirror. + TrafficDirection VtapCaptureFilterRuleDetailsTrafficDirectionEnum `mandatory:"true" json:"trafficDirection"` + + // Include or exclude packets meeting this definition from mirrored traffic. + RuleAction VtapCaptureFilterRuleDetailsRuleActionEnum `mandatory:"false" json:"ruleAction,omitempty"` + + // Traffic from this CIDR block to the VTAP source will be mirrored to the VTAP target. + SourceCidr *string `mandatory:"false" json:"sourceCidr"` + + // Traffic sent to this CIDR block through the VTAP source will be mirrored to the VTAP target. + DestinationCidr *string `mandatory:"false" json:"destinationCidr"` + + // The transport protocol used in the filter. If do not choose a protocol, all protocols will be used in the filter. + // Supported options are: + // * 1 = ICMP + // * 6 = TCP + // * 17 = UDP + Protocol *string `mandatory:"false" json:"protocol"` + + IcmpOptions *IcmpOptions `mandatory:"false" json:"icmpOptions"` + + TcpOptions *TcpOptions `mandatory:"false" json:"tcpOptions"` + + UdpOptions *UdpOptions `mandatory:"false" json:"udpOptions"` +} + +func (m VtapCaptureFilterRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VtapCaptureFilterRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVtapCaptureFilterRuleDetailsTrafficDirectionEnum(string(m.TrafficDirection)); !ok && m.TrafficDirection != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TrafficDirection: %s. Supported values are: %s.", m.TrafficDirection, strings.Join(GetVtapCaptureFilterRuleDetailsTrafficDirectionEnumStringValues(), ","))) + } + + if _, ok := GetMappingVtapCaptureFilterRuleDetailsRuleActionEnum(string(m.RuleAction)); !ok && m.RuleAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RuleAction: %s. Supported values are: %s.", m.RuleAction, strings.Join(GetVtapCaptureFilterRuleDetailsRuleActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VtapCaptureFilterRuleDetailsTrafficDirectionEnum Enum with underlying type: string +type VtapCaptureFilterRuleDetailsTrafficDirectionEnum string + +// Set of constants representing the allowable values for VtapCaptureFilterRuleDetailsTrafficDirectionEnum +const ( + VtapCaptureFilterRuleDetailsTrafficDirectionIngress VtapCaptureFilterRuleDetailsTrafficDirectionEnum = "INGRESS" + VtapCaptureFilterRuleDetailsTrafficDirectionEgress VtapCaptureFilterRuleDetailsTrafficDirectionEnum = "EGRESS" +) + +var mappingVtapCaptureFilterRuleDetailsTrafficDirectionEnum = map[string]VtapCaptureFilterRuleDetailsTrafficDirectionEnum{ + "INGRESS": VtapCaptureFilterRuleDetailsTrafficDirectionIngress, + "EGRESS": VtapCaptureFilterRuleDetailsTrafficDirectionEgress, +} + +var mappingVtapCaptureFilterRuleDetailsTrafficDirectionEnumLowerCase = map[string]VtapCaptureFilterRuleDetailsTrafficDirectionEnum{ + "ingress": VtapCaptureFilterRuleDetailsTrafficDirectionIngress, + "egress": VtapCaptureFilterRuleDetailsTrafficDirectionEgress, +} + +// GetVtapCaptureFilterRuleDetailsTrafficDirectionEnumValues Enumerates the set of values for VtapCaptureFilterRuleDetailsTrafficDirectionEnum +func GetVtapCaptureFilterRuleDetailsTrafficDirectionEnumValues() []VtapCaptureFilterRuleDetailsTrafficDirectionEnum { + values := make([]VtapCaptureFilterRuleDetailsTrafficDirectionEnum, 0) + for _, v := range mappingVtapCaptureFilterRuleDetailsTrafficDirectionEnum { + values = append(values, v) + } + return values +} + +// GetVtapCaptureFilterRuleDetailsTrafficDirectionEnumStringValues Enumerates the set of values in String for VtapCaptureFilterRuleDetailsTrafficDirectionEnum +func GetVtapCaptureFilterRuleDetailsTrafficDirectionEnumStringValues() []string { + return []string{ + "INGRESS", + "EGRESS", + } +} + +// GetMappingVtapCaptureFilterRuleDetailsTrafficDirectionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVtapCaptureFilterRuleDetailsTrafficDirectionEnum(val string) (VtapCaptureFilterRuleDetailsTrafficDirectionEnum, bool) { + enum, ok := mappingVtapCaptureFilterRuleDetailsTrafficDirectionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VtapCaptureFilterRuleDetailsRuleActionEnum Enum with underlying type: string +type VtapCaptureFilterRuleDetailsRuleActionEnum string + +// Set of constants representing the allowable values for VtapCaptureFilterRuleDetailsRuleActionEnum +const ( + VtapCaptureFilterRuleDetailsRuleActionInclude VtapCaptureFilterRuleDetailsRuleActionEnum = "INCLUDE" + VtapCaptureFilterRuleDetailsRuleActionExclude VtapCaptureFilterRuleDetailsRuleActionEnum = "EXCLUDE" +) + +var mappingVtapCaptureFilterRuleDetailsRuleActionEnum = map[string]VtapCaptureFilterRuleDetailsRuleActionEnum{ + "INCLUDE": VtapCaptureFilterRuleDetailsRuleActionInclude, + "EXCLUDE": VtapCaptureFilterRuleDetailsRuleActionExclude, +} + +var mappingVtapCaptureFilterRuleDetailsRuleActionEnumLowerCase = map[string]VtapCaptureFilterRuleDetailsRuleActionEnum{ + "include": VtapCaptureFilterRuleDetailsRuleActionInclude, + "exclude": VtapCaptureFilterRuleDetailsRuleActionExclude, +} + +// GetVtapCaptureFilterRuleDetailsRuleActionEnumValues Enumerates the set of values for VtapCaptureFilterRuleDetailsRuleActionEnum +func GetVtapCaptureFilterRuleDetailsRuleActionEnumValues() []VtapCaptureFilterRuleDetailsRuleActionEnum { + values := make([]VtapCaptureFilterRuleDetailsRuleActionEnum, 0) + for _, v := range mappingVtapCaptureFilterRuleDetailsRuleActionEnum { + values = append(values, v) + } + return values +} + +// GetVtapCaptureFilterRuleDetailsRuleActionEnumStringValues Enumerates the set of values in String for VtapCaptureFilterRuleDetailsRuleActionEnum +func GetVtapCaptureFilterRuleDetailsRuleActionEnumStringValues() []string { + return []string{ + "INCLUDE", + "EXCLUDE", + } +} + +// GetMappingVtapCaptureFilterRuleDetailsRuleActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVtapCaptureFilterRuleDetailsRuleActionEnum(val string) (VtapCaptureFilterRuleDetailsRuleActionEnum, bool) { + enum, ok := mappingVtapCaptureFilterRuleDetailsRuleActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/withdraw_byoip_range_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/withdraw_byoip_range_request_response.go new file mode 100644 index 000000000..226703efd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/withdraw_byoip_range_request_response.go @@ -0,0 +1,88 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// WithdrawByoipRangeRequest wrapper for the WithdrawByoipRange operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/WithdrawByoipRange.go.html to see an example of how to use WithdrawByoipRangeRequest. +type WithdrawByoipRangeRequest struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the `ByoipRange` resource containing the BYOIP CIDR block. + ByoipRangeId *string `mandatory:"true" contributesTo:"path" name:"byoipRangeId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request WithdrawByoipRangeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request WithdrawByoipRangeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request WithdrawByoipRangeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request WithdrawByoipRangeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request WithdrawByoipRangeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// WithdrawByoipRangeResponse wrapper for the WithdrawByoipRange operation +type WithdrawByoipRangeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response WithdrawByoipRangeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response WithdrawByoipRangeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/abort_multipart_upload_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/abort_multipart_upload_request_response.go new file mode 100644 index 000000000..b998ef392 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/abort_multipart_upload_request_response.go @@ -0,0 +1,146 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AbortMultipartUploadRequest wrapper for the AbortMultipartUpload operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/AbortMultipartUpload.go.html to see an example of how to use AbortMultipartUploadRequest. +type AbortMultipartUploadRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. Avoid entering confidential information. + // Example: `test/object1.log` + ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` + + // The upload ID for a multipart upload. + UploadId *string `mandatory:"true" contributesTo:"query" name:"uploadId"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AbortMultipartUploadRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AbortMultipartUploadRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AbortMultipartUploadRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request AbortMultipartUploadRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["objectName"] != nil { + templateParam := mandatoryParamMap["objectName"] + for _, template := range templateParam { + replacementParam := *request.ObjectName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["uploadId"] != nil { + templateParam := mandatoryParamMap["uploadId"] + for _, template := range templateParam { + replacementParam := *request.UploadId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AbortMultipartUploadRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AbortMultipartUploadRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AbortMultipartUploadResponse wrapper for the AbortMultipartUpload operation +type AbortMultipartUploadResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AbortMultipartUploadResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AbortMultipartUploadResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/access_target_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/access_target_details.go new file mode 100644 index 000000000..b3222d8c9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/access_target_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AccessTargetDetails Details of the targets that can be accessed by the private endpoint. +type AccessTargetDetails struct { + + // The Object Storage namespace which the private endpoint can access. Wildcards ('*') are allowed. If value is '*', it means all namespaces can be accessed. It cannot be a regex. + Namespace *string `mandatory:"true" json:"namespace"` + + // The compartment ID which the private endpoint can access. Wildcards ('*') are allowed. If value is '*', it means all compartments in the specified namespace can be accessed. It cannot be a regex. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name of the bucket. Avoid entering confidential information. Wildcards ('*') are allowed. If value is '*', it means all buckets in the specified namespace and compartment can be accessed. It cannot be a regex. + // Example: my-new-bucket1 + Bucket *string `mandatory:"true" json:"bucket"` +} + +func (m AccessTargetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AccessTargetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/archival_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/archival_state.go new file mode 100644 index 000000000..96bcf675f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/archival_state.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "strings" +) + +// ArchivalStateEnum Enum with underlying type: string +type ArchivalStateEnum string + +// Set of constants representing the allowable values for ArchivalStateEnum +const ( + ArchivalStateArchived ArchivalStateEnum = "Archived" + ArchivalStateRestoring ArchivalStateEnum = "Restoring" + ArchivalStateRestored ArchivalStateEnum = "Restored" +) + +var mappingArchivalStateEnum = map[string]ArchivalStateEnum{ + "Archived": ArchivalStateArchived, + "Restoring": ArchivalStateRestoring, + "Restored": ArchivalStateRestored, +} + +var mappingArchivalStateEnumLowerCase = map[string]ArchivalStateEnum{ + "archived": ArchivalStateArchived, + "restoring": ArchivalStateRestoring, + "restored": ArchivalStateRestored, +} + +// GetArchivalStateEnumValues Enumerates the set of values for ArchivalStateEnum +func GetArchivalStateEnumValues() []ArchivalStateEnum { + values := make([]ArchivalStateEnum, 0) + for _, v := range mappingArchivalStateEnum { + values = append(values, v) + } + return values +} + +// GetArchivalStateEnumStringValues Enumerates the set of values in String for ArchivalStateEnum +func GetArchivalStateEnumStringValues() []string { + return []string{ + "Archived", + "Restoring", + "Restored", + } +} + +// GetMappingArchivalStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingArchivalStateEnum(val string) (ArchivalStateEnum, bool) { + enum, ok := mappingArchivalStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/batch_delete_object_identifier.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/batch_delete_object_identifier.go new file mode 100644 index 000000000..5ff891502 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/batch_delete_object_identifier.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BatchDeleteObjectIdentifier Delete object details. +type BatchDeleteObjectIdentifier struct { + + // The name of the object to delete. Avoid entering confidential information. + // Example: test/object1.log + ObjectName *string `mandatory:"true" json:"objectName"` + + // The entity tag (ETag) to match. Avoid entering confidential information. + // Example: etag1 + IfMatch *string `mandatory:"false" json:"ifMatch"` +} + +func (m BatchDeleteObjectIdentifier) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BatchDeleteObjectIdentifier) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/batch_delete_objects_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/batch_delete_objects_details.go new file mode 100644 index 000000000..95b65696c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/batch_delete_objects_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BatchDeleteObjectsDetails Batch delete request details. +type BatchDeleteObjectsDetails struct { + + // The list of the objects to delete. + Objects []BatchDeleteObjectIdentifier `mandatory:"true" json:"objects"` + + // Specifies whether to skip the details of successfully deleted objects in the response. If specified true + // then only the details of failed deletes will be available in the response. Defaults to false. + IsSkipDeletedResult *bool `mandatory:"false" json:"isSkipDeletedResult"` +} + +func (m BatchDeleteObjectsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BatchDeleteObjectsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/batch_delete_objects_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/batch_delete_objects_request_response.go new file mode 100644 index 000000000..3626d44de --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/batch_delete_objects_request_response.go @@ -0,0 +1,125 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// BatchDeleteObjectsRequest wrapper for the BatchDeleteObjects operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/BatchDeleteObjects.go.html to see an example of how to use BatchDeleteObjectsRequest. +type BatchDeleteObjectsRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // Details about batch of objects to be deleted. + BatchDeleteObjectsDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request BatchDeleteObjectsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request BatchDeleteObjectsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request BatchDeleteObjectsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request BatchDeleteObjectsRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request BatchDeleteObjectsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request BatchDeleteObjectsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BatchDeleteObjectsResponse wrapper for the BatchDeleteObjects operation +type BatchDeleteObjectsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BatchDeleteObjectsResult instance + BatchDeleteObjectsResult `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response BatchDeleteObjectsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response BatchDeleteObjectsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/batch_delete_objects_result.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/batch_delete_objects_result.go new file mode 100644 index 000000000..70b196e74 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/batch_delete_objects_result.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BatchDeleteObjectsResult Result of a batch delete operation. +type BatchDeleteObjectsResult struct { + + // Details of successfully deleted objects. + Deleted []DeletedObjectResult `mandatory:"true" json:"deleted"` + + // Details of failed delete operations. + Failed []FailedObjectResult `mandatory:"false" json:"failed"` +} + +func (m BatchDeleteObjectsResult) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BatchDeleteObjectsResult) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/bucket.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/bucket.go new file mode 100644 index 000000000..768541c20 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/bucket.go @@ -0,0 +1,368 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Bucket A bucket is a container for storing objects in a compartment within a namespace. A bucket is associated with a single compartment. +// The compartment has policies that indicate what actions a user can perform on a bucket and all the objects in the bucket. For more +// information, see Managing Buckets (https://docs.oracle.com/iaas/Content/Object/Tasks/managingbuckets.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type Bucket struct { + + // The Object Storage namespace in which the bucket resides. + Namespace *string `mandatory:"true" json:"namespace"` + + // The name of the bucket. Avoid entering confidential information. + // Example: my-new-bucket1 + Name *string `mandatory:"true" json:"name"` + + // The compartment ID in which the bucket is authorized. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Arbitrary string keys and values for user-defined metadata. + Metadata map[string]string `mandatory:"true" json:"metadata"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the bucket. + CreatedBy *string `mandatory:"true" json:"createdBy"` + + // The date and time the bucket was created, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The entity tag (ETag) for the bucket. + Etag *string `mandatory:"true" json:"etag"` + + // The type of public access enabled on this bucket. + // A bucket is set to `NoPublicAccess` by default, which only allows an authenticated caller to access the + // bucket and its contents. When `ObjectRead` is enabled on the bucket, public access is allowed for the + // `GetObject`, `HeadObject`, and `ListObjects` operations. When `ObjectReadWithoutList` is enabled on the + // bucket, public access is allowed for the `GetObject` and `HeadObject` operations. + PublicAccessType BucketPublicAccessTypeEnum `mandatory:"false" json:"publicAccessType,omitempty"` + + // The storage tier type assigned to the bucket. A bucket is set to `Standard` tier by default, which means + // objects uploaded or copied to the bucket will be in the standard storage tier. When the `Archive` tier type + // is set explicitly for a bucket, objects uploaded or copied to the bucket will be stored in archive storage. + // The `storageTier` property is immutable after bucket is created. + StorageTier BucketStorageTierEnum `mandatory:"false" json:"storageTier,omitempty"` + + // Whether or not events are emitted for object state changes in this bucket. By default, `objectEventsEnabled` is + // set to `false`. Set `objectEventsEnabled` to `true` to emit events for object state changes. For more information + // about events, see Overview of Events (https://docs.oracle.com/iaas/Content/Events/Concepts/eventsoverview.htm). + ObjectEventsEnabled *bool `mandatory:"false" json:"objectEventsEnabled"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a master encryption key used to call the Key Management + // service to generate a data encryption key or to encrypt or decrypt a data encryption key. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // The entity tag (ETag) for the live object lifecycle policy on the bucket. + ObjectLifecyclePolicyEtag *string `mandatory:"false" json:"objectLifecyclePolicyEtag"` + + // The approximate number of objects in the bucket. Count statistics are reported periodically. You will see a + // lag between what is displayed and the actual object count. + ApproximateCount *int64 `mandatory:"false" json:"approximateCount"` + + // The approximate total size in bytes of all objects in the bucket. Size statistics are reported periodically. You will + // see a lag between what is displayed and the actual size of the bucket. + ApproximateSize *int64 `mandatory:"false" json:"approximateSize"` + + // Whether or not this bucket is a replication source. By default, `replicationEnabled` is set to `false`. This will + // be set to 'true' when you create a replication policy for the bucket. + ReplicationEnabled *bool `mandatory:"false" json:"replicationEnabled"` + + // Whether or not this bucket is read only. By default, `isReadOnly` is set to `false`. This will + // be set to 'true' when this bucket is configured as a destination in a replication policy. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the bucket. + Id *string `mandatory:"false" json:"id"` + + // The versioning status on the bucket. A bucket is created with versioning `Disabled` by default. + // For versioning `Enabled`, objects are protected from overwrites and deletes, by maintaining their version history. When versioning is `Suspended`, the previous versions will still remain but new versions will no longer be created when overwitten or deleted. + Versioning BucketVersioningEnum `mandatory:"false" json:"versioning,omitempty"` + + // The auto tiering status on the bucket. A bucket is created with auto tiering `Disabled` by default. + // For auto tiering `InfrequentAccess`, objects are transitioned automatically between the 'Standard' + // and 'InfrequentAccess' tiers based on the access pattern of the objects. + AutoTiering BucketAutoTieringEnum `mandatory:"false" json:"autoTiering,omitempty"` + + // Scope in which the bucket is unique. Default value is NAMESPACE. + // Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other + // tenancies can have a bucket with same name in their namespace. + // Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with + // same name and scope REGION. + BucketScope BucketBucketScopeEnum `mandatory:"false" json:"bucketScope,omitempty"` +} + +func (m Bucket) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Bucket) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingBucketPublicAccessTypeEnum(string(m.PublicAccessType)); !ok && m.PublicAccessType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PublicAccessType: %s. Supported values are: %s.", m.PublicAccessType, strings.Join(GetBucketPublicAccessTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingBucketStorageTierEnum(string(m.StorageTier)); !ok && m.StorageTier != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for StorageTier: %s. Supported values are: %s.", m.StorageTier, strings.Join(GetBucketStorageTierEnumStringValues(), ","))) + } + if _, ok := GetMappingBucketVersioningEnum(string(m.Versioning)); !ok && m.Versioning != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Versioning: %s. Supported values are: %s.", m.Versioning, strings.Join(GetBucketVersioningEnumStringValues(), ","))) + } + if _, ok := GetMappingBucketAutoTieringEnum(string(m.AutoTiering)); !ok && m.AutoTiering != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AutoTiering: %s. Supported values are: %s.", m.AutoTiering, strings.Join(GetBucketAutoTieringEnumStringValues(), ","))) + } + if _, ok := GetMappingBucketBucketScopeEnum(string(m.BucketScope)); !ok && m.BucketScope != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BucketScope: %s. Supported values are: %s.", m.BucketScope, strings.Join(GetBucketBucketScopeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BucketPublicAccessTypeEnum Enum with underlying type: string +type BucketPublicAccessTypeEnum string + +// Set of constants representing the allowable values for BucketPublicAccessTypeEnum +const ( + BucketPublicAccessTypeNopublicaccess BucketPublicAccessTypeEnum = "NoPublicAccess" + BucketPublicAccessTypeObjectread BucketPublicAccessTypeEnum = "ObjectRead" + BucketPublicAccessTypeObjectreadwithoutlist BucketPublicAccessTypeEnum = "ObjectReadWithoutList" +) + +var mappingBucketPublicAccessTypeEnum = map[string]BucketPublicAccessTypeEnum{ + "NoPublicAccess": BucketPublicAccessTypeNopublicaccess, + "ObjectRead": BucketPublicAccessTypeObjectread, + "ObjectReadWithoutList": BucketPublicAccessTypeObjectreadwithoutlist, +} + +var mappingBucketPublicAccessTypeEnumLowerCase = map[string]BucketPublicAccessTypeEnum{ + "nopublicaccess": BucketPublicAccessTypeNopublicaccess, + "objectread": BucketPublicAccessTypeObjectread, + "objectreadwithoutlist": BucketPublicAccessTypeObjectreadwithoutlist, +} + +// GetBucketPublicAccessTypeEnumValues Enumerates the set of values for BucketPublicAccessTypeEnum +func GetBucketPublicAccessTypeEnumValues() []BucketPublicAccessTypeEnum { + values := make([]BucketPublicAccessTypeEnum, 0) + for _, v := range mappingBucketPublicAccessTypeEnum { + values = append(values, v) + } + return values +} + +// GetBucketPublicAccessTypeEnumStringValues Enumerates the set of values in String for BucketPublicAccessTypeEnum +func GetBucketPublicAccessTypeEnumStringValues() []string { + return []string{ + "NoPublicAccess", + "ObjectRead", + "ObjectReadWithoutList", + } +} + +// GetMappingBucketPublicAccessTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBucketPublicAccessTypeEnum(val string) (BucketPublicAccessTypeEnum, bool) { + enum, ok := mappingBucketPublicAccessTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// BucketStorageTierEnum Enum with underlying type: string +type BucketStorageTierEnum string + +// Set of constants representing the allowable values for BucketStorageTierEnum +const ( + BucketStorageTierStandard BucketStorageTierEnum = "Standard" + BucketStorageTierArchive BucketStorageTierEnum = "Archive" +) + +var mappingBucketStorageTierEnum = map[string]BucketStorageTierEnum{ + "Standard": BucketStorageTierStandard, + "Archive": BucketStorageTierArchive, +} + +var mappingBucketStorageTierEnumLowerCase = map[string]BucketStorageTierEnum{ + "standard": BucketStorageTierStandard, + "archive": BucketStorageTierArchive, +} + +// GetBucketStorageTierEnumValues Enumerates the set of values for BucketStorageTierEnum +func GetBucketStorageTierEnumValues() []BucketStorageTierEnum { + values := make([]BucketStorageTierEnum, 0) + for _, v := range mappingBucketStorageTierEnum { + values = append(values, v) + } + return values +} + +// GetBucketStorageTierEnumStringValues Enumerates the set of values in String for BucketStorageTierEnum +func GetBucketStorageTierEnumStringValues() []string { + return []string{ + "Standard", + "Archive", + } +} + +// GetMappingBucketStorageTierEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBucketStorageTierEnum(val string) (BucketStorageTierEnum, bool) { + enum, ok := mappingBucketStorageTierEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// BucketVersioningEnum Enum with underlying type: string +type BucketVersioningEnum string + +// Set of constants representing the allowable values for BucketVersioningEnum +const ( + BucketVersioningEnabled BucketVersioningEnum = "Enabled" + BucketVersioningSuspended BucketVersioningEnum = "Suspended" + BucketVersioningDisabled BucketVersioningEnum = "Disabled" +) + +var mappingBucketVersioningEnum = map[string]BucketVersioningEnum{ + "Enabled": BucketVersioningEnabled, + "Suspended": BucketVersioningSuspended, + "Disabled": BucketVersioningDisabled, +} + +var mappingBucketVersioningEnumLowerCase = map[string]BucketVersioningEnum{ + "enabled": BucketVersioningEnabled, + "suspended": BucketVersioningSuspended, + "disabled": BucketVersioningDisabled, +} + +// GetBucketVersioningEnumValues Enumerates the set of values for BucketVersioningEnum +func GetBucketVersioningEnumValues() []BucketVersioningEnum { + values := make([]BucketVersioningEnum, 0) + for _, v := range mappingBucketVersioningEnum { + values = append(values, v) + } + return values +} + +// GetBucketVersioningEnumStringValues Enumerates the set of values in String for BucketVersioningEnum +func GetBucketVersioningEnumStringValues() []string { + return []string{ + "Enabled", + "Suspended", + "Disabled", + } +} + +// GetMappingBucketVersioningEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBucketVersioningEnum(val string) (BucketVersioningEnum, bool) { + enum, ok := mappingBucketVersioningEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// BucketAutoTieringEnum Enum with underlying type: string +type BucketAutoTieringEnum string + +// Set of constants representing the allowable values for BucketAutoTieringEnum +const ( + BucketAutoTieringDisabled BucketAutoTieringEnum = "Disabled" + BucketAutoTieringInfrequentaccess BucketAutoTieringEnum = "InfrequentAccess" +) + +var mappingBucketAutoTieringEnum = map[string]BucketAutoTieringEnum{ + "Disabled": BucketAutoTieringDisabled, + "InfrequentAccess": BucketAutoTieringInfrequentaccess, +} + +var mappingBucketAutoTieringEnumLowerCase = map[string]BucketAutoTieringEnum{ + "disabled": BucketAutoTieringDisabled, + "infrequentaccess": BucketAutoTieringInfrequentaccess, +} + +// GetBucketAutoTieringEnumValues Enumerates the set of values for BucketAutoTieringEnum +func GetBucketAutoTieringEnumValues() []BucketAutoTieringEnum { + values := make([]BucketAutoTieringEnum, 0) + for _, v := range mappingBucketAutoTieringEnum { + values = append(values, v) + } + return values +} + +// GetBucketAutoTieringEnumStringValues Enumerates the set of values in String for BucketAutoTieringEnum +func GetBucketAutoTieringEnumStringValues() []string { + return []string{ + "Disabled", + "InfrequentAccess", + } +} + +// GetMappingBucketAutoTieringEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBucketAutoTieringEnum(val string) (BucketAutoTieringEnum, bool) { + enum, ok := mappingBucketAutoTieringEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// BucketBucketScopeEnum Enum with underlying type: string +type BucketBucketScopeEnum string + +// Set of constants representing the allowable values for BucketBucketScopeEnum +const ( + BucketBucketScopeNamespace BucketBucketScopeEnum = "NAMESPACE" + BucketBucketScopeRegion BucketBucketScopeEnum = "REGION" +) + +var mappingBucketBucketScopeEnum = map[string]BucketBucketScopeEnum{ + "NAMESPACE": BucketBucketScopeNamespace, + "REGION": BucketBucketScopeRegion, +} + +var mappingBucketBucketScopeEnumLowerCase = map[string]BucketBucketScopeEnum{ + "namespace": BucketBucketScopeNamespace, + "region": BucketBucketScopeRegion, +} + +// GetBucketBucketScopeEnumValues Enumerates the set of values for BucketBucketScopeEnum +func GetBucketBucketScopeEnumValues() []BucketBucketScopeEnum { + values := make([]BucketBucketScopeEnum, 0) + for _, v := range mappingBucketBucketScopeEnum { + values = append(values, v) + } + return values +} + +// GetBucketBucketScopeEnumStringValues Enumerates the set of values in String for BucketBucketScopeEnum +func GetBucketBucketScopeEnumStringValues() []string { + return []string{ + "NAMESPACE", + "REGION", + } +} + +// GetMappingBucketBucketScopeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBucketBucketScopeEnum(val string) (BucketBucketScopeEnum, bool) { + enum, ok := mappingBucketBucketScopeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/bucket_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/bucket_summary.go new file mode 100644 index 000000000..ef1adbe83 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/bucket_summary.go @@ -0,0 +1,79 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BucketSummary To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type BucketSummary struct { + + // The Object Storage namespace in which the bucket lives. + Namespace *string `mandatory:"true" json:"namespace"` + + // The name of the bucket. Avoid entering confidential information. + // Example: my-new-bucket1 + Name *string `mandatory:"true" json:"name"` + + // The compartment ID in which the bucket is authorized. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the bucket. + CreatedBy *string `mandatory:"true" json:"createdBy"` + + // The date and time the bucket was created, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The entity tag (ETag) for the bucket. + Etag *string `mandatory:"true" json:"etag"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Scope in which the bucket is unique. Default value is NAMESPACE. + // Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other + // tenancies can have a bucket with same name in their namespace. + // Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with + // same name and scope REGION. + BucketScope BucketBucketScopeEnum `mandatory:"false" json:"bucketScope,omitempty"` +} + +func (m BucketSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BucketSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingBucketBucketScopeEnum(string(m.BucketScope)); !ok && m.BucketScope != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BucketScope: %s. Supported values are: %s.", m.BucketScope, strings.Join(GetBucketBucketScopeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/cancel_work_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/cancel_work_request_request_response.go new file mode 100644 index 000000000..75717d539 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/cancel_work_request_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CancelWorkRequestRequest wrapper for the CancelWorkRequest operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CancelWorkRequest.go.html to see an example of how to use CancelWorkRequestRequest. +type CancelWorkRequestRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CancelWorkRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CancelWorkRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CancelWorkRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request CancelWorkRequestRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["workRequestId"] != nil { + templateParam := mandatoryParamMap["workRequestId"] + for _, template := range templateParam { + replacementParam := *request.WorkRequestId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CancelWorkRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CancelWorkRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CancelWorkRequestResponse wrapper for the CancelWorkRequest operation +type CancelWorkRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, + // provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` +} + +func (response CancelWorkRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CancelWorkRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/checksum_algorithm.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/checksum_algorithm.go new file mode 100644 index 000000000..1f2b5d647 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/checksum_algorithm.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "strings" +) + +// ChecksumAlgorithmEnum Enum with underlying type: string +type ChecksumAlgorithmEnum string + +// Set of constants representing the allowable values for ChecksumAlgorithmEnum +const ( + ChecksumAlgorithmCrc32C ChecksumAlgorithmEnum = "CRC32C" + ChecksumAlgorithmSha256 ChecksumAlgorithmEnum = "SHA256" + ChecksumAlgorithmSha384 ChecksumAlgorithmEnum = "SHA384" +) + +var mappingChecksumAlgorithmEnum = map[string]ChecksumAlgorithmEnum{ + "CRC32C": ChecksumAlgorithmCrc32C, + "SHA256": ChecksumAlgorithmSha256, + "SHA384": ChecksumAlgorithmSha384, +} + +var mappingChecksumAlgorithmEnumLowerCase = map[string]ChecksumAlgorithmEnum{ + "crc32c": ChecksumAlgorithmCrc32C, + "sha256": ChecksumAlgorithmSha256, + "sha384": ChecksumAlgorithmSha384, +} + +// GetChecksumAlgorithmEnumValues Enumerates the set of values for ChecksumAlgorithmEnum +func GetChecksumAlgorithmEnumValues() []ChecksumAlgorithmEnum { + values := make([]ChecksumAlgorithmEnum, 0) + for _, v := range mappingChecksumAlgorithmEnum { + values = append(values, v) + } + return values +} + +// GetChecksumAlgorithmEnumStringValues Enumerates the set of values in String for ChecksumAlgorithmEnum +func GetChecksumAlgorithmEnumStringValues() []string { + return []string{ + "CRC32C", + "SHA256", + "SHA384", + } +} + +// GetMappingChecksumAlgorithmEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingChecksumAlgorithmEnum(val string) (ChecksumAlgorithmEnum, bool) { + enum, ok := mappingChecksumAlgorithmEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/commit_multipart_upload_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/commit_multipart_upload_details.go new file mode 100644 index 000000000..4c3ba5ac4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/commit_multipart_upload_details.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CommitMultipartUploadDetails To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type CommitMultipartUploadDetails struct { + + // The part numbers and entity tags (ETags) for the parts to be committed. + PartsToCommit []CommitMultipartUploadPartDetails `mandatory:"true" json:"partsToCommit"` + + // The part numbers for the parts to be excluded from the completed object. + // Each part created for this upload must be in either partsToExclude or partsToCommit, but cannot be in both. + PartsToExclude []int `mandatory:"false" json:"partsToExclude"` +} + +func (m CommitMultipartUploadDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CommitMultipartUploadDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/commit_multipart_upload_part_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/commit_multipart_upload_part_details.go new file mode 100644 index 000000000..32e7fc69e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/commit_multipart_upload_part_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CommitMultipartUploadPartDetails To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type CommitMultipartUploadPartDetails struct { + + // The part number for this part. + PartNum *int `mandatory:"true" json:"partNum"` + + // The entity tag (ETag) returned when this part was uploaded. + Etag *string `mandatory:"true" json:"etag"` +} + +func (m CommitMultipartUploadPartDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CommitMultipartUploadPartDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/commit_multipart_upload_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/commit_multipart_upload_request_response.go new file mode 100644 index 000000000..fc4dec6be --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/commit_multipart_upload_request_response.go @@ -0,0 +1,193 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CommitMultipartUploadRequest wrapper for the CommitMultipartUpload operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CommitMultipartUpload.go.html to see an example of how to use CommitMultipartUploadRequest. +type CommitMultipartUploadRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. Avoid entering confidential information. + // Example: `test/object1.log` + ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` + + // The upload ID for a multipart upload. + UploadId *string `mandatory:"true" contributesTo:"query" name:"uploadId"` + + // The part numbers and entity tags (ETags) for the parts you want to commit. + CommitMultipartUploadDetails `contributesTo:"body"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should + // fail if the resource already exists. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CommitMultipartUploadRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CommitMultipartUploadRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CommitMultipartUploadRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request CommitMultipartUploadRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["objectName"] != nil { + templateParam := mandatoryParamMap["objectName"] + for _, template := range templateParam { + replacementParam := *request.ObjectName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["uploadId"] != nil { + templateParam := mandatoryParamMap["uploadId"] + for _, template := range templateParam { + replacementParam := *request.UploadId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CommitMultipartUploadRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CommitMultipartUploadRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CommitMultipartUploadResponse wrapper for the CommitMultipartUpload operation +type CommitMultipartUploadResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Base-64 representation of the multipart object MD5 hash. + // The multipart object hash is calculated by taking the MD5 hashes of the parts passed to this call, + // concatenating the binary representation of those hashes in order of their part numbers, + // and then calculating the MD5 hash of the concatenated values. The multipart object hash is followed + // by a hyphen and the total number of parts (for example, '-6'). + OpcMultipartMd5 *string `presentIn:"header" name:"opc-multipart-md5"` + + // The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + // Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + // of the complete reconstructed object. + OpcContentCrc32c *string `presentIn:"header" name:"opc-content-crc32c"` + + // Base-64 representation of the multipart object SHA256 hash. + // The multipart object hash is calculated by taking the SHA256 hashes of the parts passed to this call, + // concatenating the binary representation of those hashes in order of their part numbers, + // and then calculating the SHA256 hash of the concatenated values. The multipart object hash is followed + // by a hyphen and the total number of parts (for example, '-6'). + OpcMultipartSha256 *string `presentIn:"header" name:"opc-multipart-sha256"` + + // Base-64 representation of the multipart object SHA384 hash. + // The multipart object hash is calculated by taking the SHA384 hashes of the parts passed to this call, + // concatenating the binary representation of those hashes in order of their part numbers, + // and then calculating the SHA384 hash of the concatenated values. The multipart object hash is followed + // by a hyphen and the total number of parts (for example, '-6'). + OpcMultipartSha384 *string `presentIn:"header" name:"opc-multipart-sha384"` + + // The entity tag (ETag) for the object. + ETag *string `presentIn:"header" name:"etag"` + + // The time the object was last modified, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` + + // VersionId of the newly created object + VersionId *string `presentIn:"header" name:"version-id"` +} + +func (response CommitMultipartUploadResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CommitMultipartUploadResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/copy_object_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/copy_object_details.go new file mode 100644 index 000000000..1bc0d8f46 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/copy_object_details.go @@ -0,0 +1,85 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CopyObjectDetails The parameters required by Object Storage to process a request to copy an object to another bucket. +// To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type CopyObjectDetails struct { + + // The name of the object to be copied. + SourceObjectName *string `mandatory:"true" json:"sourceObjectName"` + + // The destination region the object will be copied to, for example "us-ashburn-1". + DestinationRegion *string `mandatory:"true" json:"destinationRegion"` + + // The destination Object Storage namespace the object will be copied to. + DestinationNamespace *string `mandatory:"true" json:"destinationNamespace"` + + // The destination bucket the object will be copied to. + DestinationBucket *string `mandatory:"true" json:"destinationBucket"` + + // The name of the destination object resulting from the copy operation. Avoid entering confidential information. + DestinationObjectName *string `mandatory:"true" json:"destinationObjectName"` + + // The entity tag (ETag) to match against that of the source object. Used to confirm that the source object + // with a given name is the version of that object storing a specified ETag. + SourceObjectIfMatchETag *string `mandatory:"false" json:"sourceObjectIfMatchETag"` + + // VersionId of the object to copy. If not provided then current version is copied by default. + SourceVersionId *string `mandatory:"false" json:"sourceVersionId"` + + // The entity tag (ETag) to match against that of the destination object (an object intended to be overwritten). + // Used to confirm that the destination object stored under a given name is the version of that object + // storing a specified entity tag. + DestinationObjectIfMatchETag *string `mandatory:"false" json:"destinationObjectIfMatchETag"` + + // The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should fail + // if the object already exists in the destination bucket. + DestinationObjectIfNoneMatchETag *string `mandatory:"false" json:"destinationObjectIfNoneMatchETag"` + + // Arbitrary string keys and values for the user-defined metadata for the object. Keys must be in + // "opc-meta-*" format. Avoid entering confidential information. Metadata key-value pairs entered + // in this field are assigned to the destination object. If you enter no metadata values, the destination + // object will inherit any existing metadata values associated with the source object. + DestinationObjectMetadata map[string]string `mandatory:"false" json:"destinationObjectMetadata"` + + // The storage tier that the object should be stored in. If not specified, the object will be stored in + // the same storage tier as the bucket. + DestinationObjectStorageTier StorageTierEnum `mandatory:"false" json:"destinationObjectStorageTier,omitempty"` +} + +func (m CopyObjectDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CopyObjectDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingStorageTierEnum(string(m.DestinationObjectStorageTier)); !ok && m.DestinationObjectStorageTier != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DestinationObjectStorageTier: %s. Supported values are: %s.", m.DestinationObjectStorageTier, strings.Join(GetStorageTierEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/copy_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/copy_object_request_response.go new file mode 100644 index 000000000..cce3b544e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/copy_object_request_response.go @@ -0,0 +1,160 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CopyObjectRequest wrapper for the CopyObject operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CopyObject.go.html to see an example of how to use CopyObjectRequest. +type CopyObjectRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The source and destination of the object to be copied. + CopyObjectDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // The optional header that specifies "AES256" as the encryption algorithm. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerAlgorithm *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-algorithm"` + + // The optional header that specifies the base64-encoded 256-bit encryption key to use to encrypt or + // decrypt the data. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerKey *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-key"` + + // The optional header that specifies the base64-encoded SHA256 hash of the encryption key. This + // value is used to check the integrity of the encryption key. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerKeySha256 *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-key-sha256"` + + // The optional header that specifies "AES256" as the encryption algorithm to use to decrypt the source + // object. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSourceSseCustomerAlgorithm *string `mandatory:"false" contributesTo:"header" name:"opc-source-sse-customer-algorithm"` + + // The optional header that specifies the base64-encoded 256-bit encryption key to use to decrypt + // the source object. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSourceSseCustomerKey *string `mandatory:"false" contributesTo:"header" name:"opc-source-sse-customer-key"` + + // The optional header that specifies the base64-encoded SHA256 hash of the encryption key used to + // decrypt the source object. This value is used to check the integrity of the encryption key. For + // more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSourceSseCustomerKeySha256 *string `mandatory:"false" contributesTo:"header" name:"opc-source-sse-customer-key-sha256"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a master encryption key used to call the Key + // Management service to generate a data encryption key or to encrypt or decrypt a data encryption key. + OpcSseKmsKeyId *string `mandatory:"false" contributesTo:"header" name:"opc-sse-kms-key-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CopyObjectRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CopyObjectRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CopyObjectRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request CopyObjectRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CopyObjectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CopyObjectRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CopyObjectResponse wrapper for the CopyObject operation +type CopyObjectResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + // particular request, provide this request ID. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` +} + +func (response CopyObjectResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CopyObjectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_bucket_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_bucket_details.go new file mode 100644 index 000000000..198c8af74 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_bucket_details.go @@ -0,0 +1,244 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateBucketDetails To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type CreateBucketDetails struct { + + // The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + // Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. + // example: Example: my-new-bucket1 + Name *string `mandatory:"true" json:"name"` + + // The ID of the compartment in which to create the bucket. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Arbitrary string, up to 4KB, of keys and values for user-defined metadata. + Metadata map[string]string `mandatory:"false" json:"metadata"` + + // The type of public access enabled on this bucket. + // A bucket is set to `NoPublicAccess` by default, which only allows an authenticated caller to access the + // bucket and its contents. When `ObjectRead` is enabled on the bucket, public access is allowed for the + // `GetObject`, `HeadObject`, and `ListObjects` operations. When `ObjectReadWithoutList` is enabled on the bucket, + // public access is allowed for the `GetObject` and `HeadObject` operations. + PublicAccessType CreateBucketDetailsPublicAccessTypeEnum `mandatory:"false" json:"publicAccessType,omitempty"` + + // The type of storage tier of this bucket. + // A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. + // When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' + // property is immutable after bucket is created. + StorageTier CreateBucketDetailsStorageTierEnum `mandatory:"false" json:"storageTier,omitempty"` + + // Whether or not events are emitted for object state changes in this bucket. By default, `objectEventsEnabled` is + // set to `false`. Set `objectEventsEnabled` to `true` to emit events for object state changes. For more information + // about events, see Overview of Events (https://docs.oracle.com/iaas/Content/Events/Concepts/eventsoverview.htm). + ObjectEventsEnabled *bool `mandatory:"false" json:"objectEventsEnabled"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a master encryption key used to call the Key + // Management service to generate a data encryption key or to encrypt or decrypt a data encryption key. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // Set the versioning status on the bucket. By default, a bucket is created with versioning `Disabled`. Use this option to enable versioning during bucket creation. Objects in a version enabled bucket are protected from overwrites and deletions. Previous versions of the same object will be available in the bucket. + Versioning CreateBucketDetailsVersioningEnum `mandatory:"false" json:"versioning,omitempty"` + + // Set the auto tiering status on the bucket. By default, a bucket is created with auto tiering `Disabled`. + // Use this option to enable auto tiering during bucket creation. Objects in a bucket with auto tiering set to + // `InfrequentAccess` are transitioned automatically between the 'Standard' and 'InfrequentAccess' + // tiers based on the access pattern of the objects. + AutoTiering BucketAutoTieringEnum `mandatory:"false" json:"autoTiering,omitempty"` + + // Scope in which the bucket is unique. Default value is NAMESPACE. + // Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other + // tenancies can have a bucket with same name in their namespace. + // Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with + // same name and scope REGION. + BucketScope BucketBucketScopeEnum `mandatory:"false" json:"bucketScope,omitempty"` +} + +func (m CreateBucketDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateBucketDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCreateBucketDetailsPublicAccessTypeEnum(string(m.PublicAccessType)); !ok && m.PublicAccessType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PublicAccessType: %s. Supported values are: %s.", m.PublicAccessType, strings.Join(GetCreateBucketDetailsPublicAccessTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingCreateBucketDetailsStorageTierEnum(string(m.StorageTier)); !ok && m.StorageTier != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for StorageTier: %s. Supported values are: %s.", m.StorageTier, strings.Join(GetCreateBucketDetailsStorageTierEnumStringValues(), ","))) + } + if _, ok := GetMappingCreateBucketDetailsVersioningEnum(string(m.Versioning)); !ok && m.Versioning != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Versioning: %s. Supported values are: %s.", m.Versioning, strings.Join(GetCreateBucketDetailsVersioningEnumStringValues(), ","))) + } + if _, ok := GetMappingBucketAutoTieringEnum(string(m.AutoTiering)); !ok && m.AutoTiering != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AutoTiering: %s. Supported values are: %s.", m.AutoTiering, strings.Join(GetBucketAutoTieringEnumStringValues(), ","))) + } + if _, ok := GetMappingBucketBucketScopeEnum(string(m.BucketScope)); !ok && m.BucketScope != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BucketScope: %s. Supported values are: %s.", m.BucketScope, strings.Join(GetBucketBucketScopeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateBucketDetailsPublicAccessTypeEnum Enum with underlying type: string +type CreateBucketDetailsPublicAccessTypeEnum string + +// Set of constants representing the allowable values for CreateBucketDetailsPublicAccessTypeEnum +const ( + CreateBucketDetailsPublicAccessTypeNopublicaccess CreateBucketDetailsPublicAccessTypeEnum = "NoPublicAccess" + CreateBucketDetailsPublicAccessTypeObjectread CreateBucketDetailsPublicAccessTypeEnum = "ObjectRead" + CreateBucketDetailsPublicAccessTypeObjectreadwithoutlist CreateBucketDetailsPublicAccessTypeEnum = "ObjectReadWithoutList" +) + +var mappingCreateBucketDetailsPublicAccessTypeEnum = map[string]CreateBucketDetailsPublicAccessTypeEnum{ + "NoPublicAccess": CreateBucketDetailsPublicAccessTypeNopublicaccess, + "ObjectRead": CreateBucketDetailsPublicAccessTypeObjectread, + "ObjectReadWithoutList": CreateBucketDetailsPublicAccessTypeObjectreadwithoutlist, +} + +var mappingCreateBucketDetailsPublicAccessTypeEnumLowerCase = map[string]CreateBucketDetailsPublicAccessTypeEnum{ + "nopublicaccess": CreateBucketDetailsPublicAccessTypeNopublicaccess, + "objectread": CreateBucketDetailsPublicAccessTypeObjectread, + "objectreadwithoutlist": CreateBucketDetailsPublicAccessTypeObjectreadwithoutlist, +} + +// GetCreateBucketDetailsPublicAccessTypeEnumValues Enumerates the set of values for CreateBucketDetailsPublicAccessTypeEnum +func GetCreateBucketDetailsPublicAccessTypeEnumValues() []CreateBucketDetailsPublicAccessTypeEnum { + values := make([]CreateBucketDetailsPublicAccessTypeEnum, 0) + for _, v := range mappingCreateBucketDetailsPublicAccessTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateBucketDetailsPublicAccessTypeEnumStringValues Enumerates the set of values in String for CreateBucketDetailsPublicAccessTypeEnum +func GetCreateBucketDetailsPublicAccessTypeEnumStringValues() []string { + return []string{ + "NoPublicAccess", + "ObjectRead", + "ObjectReadWithoutList", + } +} + +// GetMappingCreateBucketDetailsPublicAccessTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateBucketDetailsPublicAccessTypeEnum(val string) (CreateBucketDetailsPublicAccessTypeEnum, bool) { + enum, ok := mappingCreateBucketDetailsPublicAccessTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CreateBucketDetailsStorageTierEnum Enum with underlying type: string +type CreateBucketDetailsStorageTierEnum string + +// Set of constants representing the allowable values for CreateBucketDetailsStorageTierEnum +const ( + CreateBucketDetailsStorageTierStandard CreateBucketDetailsStorageTierEnum = "Standard" + CreateBucketDetailsStorageTierArchive CreateBucketDetailsStorageTierEnum = "Archive" +) + +var mappingCreateBucketDetailsStorageTierEnum = map[string]CreateBucketDetailsStorageTierEnum{ + "Standard": CreateBucketDetailsStorageTierStandard, + "Archive": CreateBucketDetailsStorageTierArchive, +} + +var mappingCreateBucketDetailsStorageTierEnumLowerCase = map[string]CreateBucketDetailsStorageTierEnum{ + "standard": CreateBucketDetailsStorageTierStandard, + "archive": CreateBucketDetailsStorageTierArchive, +} + +// GetCreateBucketDetailsStorageTierEnumValues Enumerates the set of values for CreateBucketDetailsStorageTierEnum +func GetCreateBucketDetailsStorageTierEnumValues() []CreateBucketDetailsStorageTierEnum { + values := make([]CreateBucketDetailsStorageTierEnum, 0) + for _, v := range mappingCreateBucketDetailsStorageTierEnum { + values = append(values, v) + } + return values +} + +// GetCreateBucketDetailsStorageTierEnumStringValues Enumerates the set of values in String for CreateBucketDetailsStorageTierEnum +func GetCreateBucketDetailsStorageTierEnumStringValues() []string { + return []string{ + "Standard", + "Archive", + } +} + +// GetMappingCreateBucketDetailsStorageTierEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateBucketDetailsStorageTierEnum(val string) (CreateBucketDetailsStorageTierEnum, bool) { + enum, ok := mappingCreateBucketDetailsStorageTierEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CreateBucketDetailsVersioningEnum Enum with underlying type: string +type CreateBucketDetailsVersioningEnum string + +// Set of constants representing the allowable values for CreateBucketDetailsVersioningEnum +const ( + CreateBucketDetailsVersioningEnabled CreateBucketDetailsVersioningEnum = "Enabled" + CreateBucketDetailsVersioningDisabled CreateBucketDetailsVersioningEnum = "Disabled" +) + +var mappingCreateBucketDetailsVersioningEnum = map[string]CreateBucketDetailsVersioningEnum{ + "Enabled": CreateBucketDetailsVersioningEnabled, + "Disabled": CreateBucketDetailsVersioningDisabled, +} + +var mappingCreateBucketDetailsVersioningEnumLowerCase = map[string]CreateBucketDetailsVersioningEnum{ + "enabled": CreateBucketDetailsVersioningEnabled, + "disabled": CreateBucketDetailsVersioningDisabled, +} + +// GetCreateBucketDetailsVersioningEnumValues Enumerates the set of values for CreateBucketDetailsVersioningEnum +func GetCreateBucketDetailsVersioningEnumValues() []CreateBucketDetailsVersioningEnum { + values := make([]CreateBucketDetailsVersioningEnum, 0) + for _, v := range mappingCreateBucketDetailsVersioningEnum { + values = append(values, v) + } + return values +} + +// GetCreateBucketDetailsVersioningEnumStringValues Enumerates the set of values in String for CreateBucketDetailsVersioningEnum +func GetCreateBucketDetailsVersioningEnumStringValues() []string { + return []string{ + "Enabled", + "Disabled", + } +} + +// GetMappingCreateBucketDetailsVersioningEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateBucketDetailsVersioningEnum(val string) (CreateBucketDetailsVersioningEnum, bool) { + enum, ok := mappingCreateBucketDetailsVersioningEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_bucket_request_response.go new file mode 100644 index 000000000..1f01ef9c3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_bucket_request_response.go @@ -0,0 +1,117 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateBucketRequest wrapper for the CreateBucket operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CreateBucket.go.html to see an example of how to use CreateBucketRequest. +type CreateBucketRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // Request object for creating a bucket. + CreateBucketDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateBucketRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateBucketRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateBucketRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request CreateBucketRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateBucketRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateBucketRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateBucketResponse wrapper for the CreateBucket operation +type CreateBucketResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Bucket instance + Bucket `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The entity tag (ETag) for the bucket that was created. + ETag *string `presentIn:"header" name:"etag"` + + // The full path to the bucket that was created. + Location *string `presentIn:"header" name:"location"` +} + +func (response CreateBucketResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateBucketResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_multipart_upload_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_multipart_upload_details.go new file mode 100644 index 000000000..46b12afc0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_multipart_upload_details.go @@ -0,0 +1,86 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateMultipartUploadDetails To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type CreateMultipartUploadDetails struct { + + // The name of the object to which this multi-part upload is targeted. Avoid entering confidential information. + // Example: test/object1.log + Object *string `mandatory:"true" json:"object"` + + // The optional Content-Type header that defines the standard MIME type format of the object to upload. + // Specifying values for this header has no effect on Object Storage behavior. Programs that read the object + // determine what to do based on the value provided. For example, you could use this header to identify and + // perform special operations on text only objects. + ContentType *string `mandatory:"false" json:"contentType"` + + // The optional Content-Language header that defines the content language of the object to upload. Specifying + // values for this header has no effect on Object Storage behavior. Programs that read the object determine what + // to do based on the value provided. For example, you could use this header to identify and differentiate objects + // based on a particular language. + ContentLanguage *string `mandatory:"false" json:"contentLanguage"` + + // The optional Content-Encoding header that defines the content encodings that were applied to the object to + // upload. Specifying values for this header has no effect on Object Storage behavior. Programs that read the + // object determine what to do based on the value provided. For example, you could use this header to determine + // what decoding mechanisms need to be applied to obtain the media-type specified by the Content-Type header of + // the object. + ContentEncoding *string `mandatory:"false" json:"contentEncoding"` + + // The optional Content-Disposition header that defines presentational information for the object to be + // returned in GetObject and HeadObject responses. Specifying values for this header has no effect on Object + // Storage behavior. Programs that read the object determine what to do based on the value provided. + // For example, you could use this header to let users download objects with custom filenames in a browser. + ContentDisposition *string `mandatory:"false" json:"contentDisposition"` + + // The optional Cache-Control header that defines the caching behavior value to be returned in GetObject and + // HeadObject responses. Specifying values for this header has no effect on Object Storage behavior. Programs + // that read the object determine what to do based on the value provided. + // For example, you could use this header to identify objects that require caching restrictions. + CacheControl *string `mandatory:"false" json:"cacheControl"` + + // The storage tier that the object should be stored in. If not specified, the object will be stored in + // the same storage tier as the bucket. + StorageTier StorageTierEnum `mandatory:"false" json:"storageTier,omitempty"` + + // Arbitrary string keys and values for the user-defined metadata for the object. + // Keys must be in "opc-meta-*" format. Avoid entering confidential information. + Metadata map[string]string `mandatory:"false" json:"metadata"` +} + +func (m CreateMultipartUploadDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateMultipartUploadDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingStorageTierEnum(string(m.StorageTier)); !ok && m.StorageTier != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for StorageTier: %s. Supported values are: %s.", m.StorageTier, strings.Join(GetStorageTierEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_multipart_upload_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_multipart_upload_request_response.go new file mode 100644 index 000000000..3be8cc95c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_multipart_upload_request_response.go @@ -0,0 +1,208 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateMultipartUploadRequest wrapper for the CreateMultipartUpload operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CreateMultipartUpload.go.html to see an example of how to use CreateMultipartUploadRequest. +type CreateMultipartUploadRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // Request object for creating a multipart upload. + CreateMultipartUploadDetails `contributesTo:"body"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should + // fail if the resource already exists. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // The optional header that specifies "AES256" as the encryption algorithm. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerAlgorithm *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-algorithm"` + + // The optional header that specifies the base64-encoded 256-bit encryption key to use to encrypt or + // decrypt the data. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerKey *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-key"` + + // The optional header that specifies the base64-encoded SHA256 hash of the encryption key. This + // value is used to check the integrity of the encryption key. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerKeySha256 *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-key-sha256"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a master encryption key used to call the Key + // Management service to generate a data encryption key or to encrypt or decrypt a data encryption key. + OpcSseKmsKeyId *string `mandatory:"false" contributesTo:"header" name:"opc-sse-kms-key-id"` + + // The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + // in addition to the default MD5 checksum. + OpcChecksumAlgorithm CreateMultipartUploadOpcChecksumAlgorithmEnum `mandatory:"false" contributesTo:"header" name:"opc-checksum-algorithm"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateMultipartUploadRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateMultipartUploadRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateMultipartUploadRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request CreateMultipartUploadRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateMultipartUploadRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateMultipartUploadRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCreateMultipartUploadOpcChecksumAlgorithmEnum(string(request.OpcChecksumAlgorithm)); !ok && request.OpcChecksumAlgorithm != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OpcChecksumAlgorithm: %s. Supported values are: %s.", request.OpcChecksumAlgorithm, strings.Join(GetCreateMultipartUploadOpcChecksumAlgorithmEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateMultipartUploadResponse wrapper for the CreateMultipartUpload operation +type CreateMultipartUploadResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The MultipartUpload instance + MultipartUpload `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The full path to the new upload. + Location *string `presentIn:"header" name:"location"` +} + +func (response CreateMultipartUploadResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateMultipartUploadResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// CreateMultipartUploadOpcChecksumAlgorithmEnum Enum with underlying type: string +type CreateMultipartUploadOpcChecksumAlgorithmEnum string + +// Set of constants representing the allowable values for CreateMultipartUploadOpcChecksumAlgorithmEnum +const ( + CreateMultipartUploadOpcChecksumAlgorithmCrc32c CreateMultipartUploadOpcChecksumAlgorithmEnum = "CRC32C" + CreateMultipartUploadOpcChecksumAlgorithmSha256 CreateMultipartUploadOpcChecksumAlgorithmEnum = "SHA256" + CreateMultipartUploadOpcChecksumAlgorithmSha384 CreateMultipartUploadOpcChecksumAlgorithmEnum = "SHA384" +) + +var mappingCreateMultipartUploadOpcChecksumAlgorithmEnum = map[string]CreateMultipartUploadOpcChecksumAlgorithmEnum{ + "CRC32C": CreateMultipartUploadOpcChecksumAlgorithmCrc32c, + "SHA256": CreateMultipartUploadOpcChecksumAlgorithmSha256, + "SHA384": CreateMultipartUploadOpcChecksumAlgorithmSha384, +} + +var mappingCreateMultipartUploadOpcChecksumAlgorithmEnumLowerCase = map[string]CreateMultipartUploadOpcChecksumAlgorithmEnum{ + "crc32c": CreateMultipartUploadOpcChecksumAlgorithmCrc32c, + "sha256": CreateMultipartUploadOpcChecksumAlgorithmSha256, + "sha384": CreateMultipartUploadOpcChecksumAlgorithmSha384, +} + +// GetCreateMultipartUploadOpcChecksumAlgorithmEnumValues Enumerates the set of values for CreateMultipartUploadOpcChecksumAlgorithmEnum +func GetCreateMultipartUploadOpcChecksumAlgorithmEnumValues() []CreateMultipartUploadOpcChecksumAlgorithmEnum { + values := make([]CreateMultipartUploadOpcChecksumAlgorithmEnum, 0) + for _, v := range mappingCreateMultipartUploadOpcChecksumAlgorithmEnum { + values = append(values, v) + } + return values +} + +// GetCreateMultipartUploadOpcChecksumAlgorithmEnumStringValues Enumerates the set of values in String for CreateMultipartUploadOpcChecksumAlgorithmEnum +func GetCreateMultipartUploadOpcChecksumAlgorithmEnumStringValues() []string { + return []string{ + "CRC32C", + "SHA256", + "SHA384", + } +} + +// GetMappingCreateMultipartUploadOpcChecksumAlgorithmEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateMultipartUploadOpcChecksumAlgorithmEnum(val string) (CreateMultipartUploadOpcChecksumAlgorithmEnum, bool) { + enum, ok := mappingCreateMultipartUploadOpcChecksumAlgorithmEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_preauthenticated_request_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_preauthenticated_request_details.go new file mode 100644 index 000000000..8a89d27a5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_preauthenticated_request_details.go @@ -0,0 +1,124 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreatePreauthenticatedRequestDetails The representation of CreatePreauthenticatedRequestDetails +type CreatePreauthenticatedRequestDetails struct { + + // A user-specified name for the pre-authenticated request. Names can be helpful in managing pre-authenticated requests. + // Avoid entering confidential information. + Name *string `mandatory:"true" json:"name"` + + // The operation that can be performed on this resource. + AccessType CreatePreauthenticatedRequestDetailsAccessTypeEnum `mandatory:"true" json:"accessType"` + + // The expiration date for the pre-authenticated request as per RFC 3339 (https://tools.ietf.org/html/rfc3339). + // After this date the pre-authenticated request will no longer be valid. + TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` + + // Specifies whether a list operation is allowed on a PAR with accessType "AnyObjectRead" or "AnyObjectReadWrite". + // Deny: Prevents the user from performing a list operation. + // ListObjects: Authorizes the user to perform a list operation. + BucketListingAction PreauthenticatedRequestBucketListingActionEnum `mandatory:"false" json:"bucketListingAction,omitempty"` + + // The name of the object that is being granted access to by the pre-authenticated request. Avoid entering confidential + // information. The object name can be null and if so, the pre-authenticated request grants access to the entire bucket + // if the access type allows that. The object name can be a prefix as well, in that case pre-authenticated request + // grants access to all the objects within the bucket starting with that prefix provided that we have the correct access type. + ObjectName *string `mandatory:"false" json:"objectName"` +} + +func (m CreatePreauthenticatedRequestDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreatePreauthenticatedRequestDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCreatePreauthenticatedRequestDetailsAccessTypeEnum(string(m.AccessType)); !ok && m.AccessType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccessType: %s. Supported values are: %s.", m.AccessType, strings.Join(GetCreatePreauthenticatedRequestDetailsAccessTypeEnumStringValues(), ","))) + } + + if _, ok := GetMappingPreauthenticatedRequestBucketListingActionEnum(string(m.BucketListingAction)); !ok && m.BucketListingAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BucketListingAction: %s. Supported values are: %s.", m.BucketListingAction, strings.Join(GetPreauthenticatedRequestBucketListingActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePreauthenticatedRequestDetailsAccessTypeEnum Enum with underlying type: string +type CreatePreauthenticatedRequestDetailsAccessTypeEnum string + +// Set of constants representing the allowable values for CreatePreauthenticatedRequestDetailsAccessTypeEnum +const ( + CreatePreauthenticatedRequestDetailsAccessTypeObjectread CreatePreauthenticatedRequestDetailsAccessTypeEnum = "ObjectRead" + CreatePreauthenticatedRequestDetailsAccessTypeObjectwrite CreatePreauthenticatedRequestDetailsAccessTypeEnum = "ObjectWrite" + CreatePreauthenticatedRequestDetailsAccessTypeObjectreadwrite CreatePreauthenticatedRequestDetailsAccessTypeEnum = "ObjectReadWrite" + CreatePreauthenticatedRequestDetailsAccessTypeAnyobjectwrite CreatePreauthenticatedRequestDetailsAccessTypeEnum = "AnyObjectWrite" + CreatePreauthenticatedRequestDetailsAccessTypeAnyobjectread CreatePreauthenticatedRequestDetailsAccessTypeEnum = "AnyObjectRead" + CreatePreauthenticatedRequestDetailsAccessTypeAnyobjectreadwrite CreatePreauthenticatedRequestDetailsAccessTypeEnum = "AnyObjectReadWrite" +) + +var mappingCreatePreauthenticatedRequestDetailsAccessTypeEnum = map[string]CreatePreauthenticatedRequestDetailsAccessTypeEnum{ + "ObjectRead": CreatePreauthenticatedRequestDetailsAccessTypeObjectread, + "ObjectWrite": CreatePreauthenticatedRequestDetailsAccessTypeObjectwrite, + "ObjectReadWrite": CreatePreauthenticatedRequestDetailsAccessTypeObjectreadwrite, + "AnyObjectWrite": CreatePreauthenticatedRequestDetailsAccessTypeAnyobjectwrite, + "AnyObjectRead": CreatePreauthenticatedRequestDetailsAccessTypeAnyobjectread, + "AnyObjectReadWrite": CreatePreauthenticatedRequestDetailsAccessTypeAnyobjectreadwrite, +} + +var mappingCreatePreauthenticatedRequestDetailsAccessTypeEnumLowerCase = map[string]CreatePreauthenticatedRequestDetailsAccessTypeEnum{ + "objectread": CreatePreauthenticatedRequestDetailsAccessTypeObjectread, + "objectwrite": CreatePreauthenticatedRequestDetailsAccessTypeObjectwrite, + "objectreadwrite": CreatePreauthenticatedRequestDetailsAccessTypeObjectreadwrite, + "anyobjectwrite": CreatePreauthenticatedRequestDetailsAccessTypeAnyobjectwrite, + "anyobjectread": CreatePreauthenticatedRequestDetailsAccessTypeAnyobjectread, + "anyobjectreadwrite": CreatePreauthenticatedRequestDetailsAccessTypeAnyobjectreadwrite, +} + +// GetCreatePreauthenticatedRequestDetailsAccessTypeEnumValues Enumerates the set of values for CreatePreauthenticatedRequestDetailsAccessTypeEnum +func GetCreatePreauthenticatedRequestDetailsAccessTypeEnumValues() []CreatePreauthenticatedRequestDetailsAccessTypeEnum { + values := make([]CreatePreauthenticatedRequestDetailsAccessTypeEnum, 0) + for _, v := range mappingCreatePreauthenticatedRequestDetailsAccessTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreatePreauthenticatedRequestDetailsAccessTypeEnumStringValues Enumerates the set of values in String for CreatePreauthenticatedRequestDetailsAccessTypeEnum +func GetCreatePreauthenticatedRequestDetailsAccessTypeEnumStringValues() []string { + return []string{ + "ObjectRead", + "ObjectWrite", + "ObjectReadWrite", + "AnyObjectWrite", + "AnyObjectRead", + "AnyObjectReadWrite", + } +} + +// GetMappingCreatePreauthenticatedRequestDetailsAccessTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreatePreauthenticatedRequestDetailsAccessTypeEnum(val string) (CreatePreauthenticatedRequestDetailsAccessTypeEnum, bool) { + enum, ok := mappingCreatePreauthenticatedRequestDetailsAccessTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_preauthenticated_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_preauthenticated_request_request_response.go new file mode 100644 index 000000000..65c07c7ac --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_preauthenticated_request_request_response.go @@ -0,0 +1,125 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreatePreauthenticatedRequestRequest wrapper for the CreatePreauthenticatedRequest operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CreatePreauthenticatedRequest.go.html to see an example of how to use CreatePreauthenticatedRequestRequest. +type CreatePreauthenticatedRequestRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // Information needed to create the pre-authenticated request. + CreatePreauthenticatedRequestDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePreauthenticatedRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePreauthenticatedRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreatePreauthenticatedRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request CreatePreauthenticatedRequestRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePreauthenticatedRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreatePreauthenticatedRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePreauthenticatedRequestResponse wrapper for the CreatePreauthenticatedRequest operation +type CreatePreauthenticatedRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PreauthenticatedRequest instance + PreauthenticatedRequest `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreatePreauthenticatedRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePreauthenticatedRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_private_endpoint_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_private_endpoint_details.go new file mode 100644 index 000000000..aa4dd8813 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_private_endpoint_details.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreatePrivateEndpointDetails Details to create a private endpoint +type CreatePrivateEndpointDetails struct { + + // This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + // underscores, and periods. + // Example: my-new-private-endpoint1 + Name *string `mandatory:"true" json:"name"` + + // The ID of the compartment in which to create the Private Endpoint. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the customer's subnet where the private endpoint VNIC will reside. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // A prefix to use for the private endpoint. The customer VCN's DNS records are + // updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + // Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + Prefix *string `mandatory:"true" json:"prefix"` + + // A list of targets that can be accessed by the private endpoint. + AccessTargets []AccessTargetDetails `mandatory:"true" json:"accessTargets"` + + // A list of additional prefix that you can provide along with any other prefix. These resulting endpointFqdn's are added to the + // customer VCN's DNS record. + AdditionalPrefixes []string `mandatory:"false" json:"additionalPrefixes"` + + // The private IP address to assign to this private endpoint. If you provide a value, + // it must be an available IP address in the customer's subnet. If it's not available, an error + // is returned. + // If you do not provide a value, an available IP address in the subnet is automatically chosen. + PrivateEndpointIp *string `mandatory:"false" json:"privateEndpointIp"` + + // A list of the OCIDs of the network security groups (NSGs) to add the private endpoint's VNIC to. + // For more information about NSGs, see + // NetworkSecurityGroup. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreatePrivateEndpointDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreatePrivateEndpointDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_private_endpoint_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_private_endpoint_request_response.go new file mode 100644 index 000000000..92e7195ba --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_private_endpoint_request_response.go @@ -0,0 +1,112 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreatePrivateEndpointRequest wrapper for the CreatePrivateEndpoint operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CreatePrivateEndpoint.go.html to see an example of how to use CreatePrivateEndpointRequest. +type CreatePrivateEndpointRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // Details to create a private endpoint. + CreatePrivateEndpointDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePrivateEndpointRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePrivateEndpointRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreatePrivateEndpointRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request CreatePrivateEndpointRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePrivateEndpointRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreatePrivateEndpointRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePrivateEndpointResponse wrapper for the CreatePrivateEndpoint operation +type CreatePrivateEndpointResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + // particular request, provide this request ID. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` +} + +func (response CreatePrivateEndpointResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePrivateEndpointResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_replication_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_replication_policy_details.go new file mode 100644 index 000000000..e5f02f359 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_replication_policy_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateReplicationPolicyDetails The details to create a replication policy. +type CreateReplicationPolicyDetails struct { + + // The name of the policy. Avoid entering confidential information. + Name *string `mandatory:"true" json:"name"` + + // The destination region to replicate to, for example "us-ashburn-1". + DestinationRegionName *string `mandatory:"true" json:"destinationRegionName"` + + // The bucket to replicate to in the destination region. Replication policy creation does not automatically + // create a destination bucket. Create the destination bucket before creating the policy. + DestinationBucketName *string `mandatory:"true" json:"destinationBucketName"` +} + +func (m CreateReplicationPolicyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateReplicationPolicyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_replication_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_replication_policy_request_response.go new file mode 100644 index 000000000..777f113f5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_replication_policy_request_response.go @@ -0,0 +1,125 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateReplicationPolicyRequest wrapper for the CreateReplicationPolicy operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CreateReplicationPolicy.go.html to see an example of how to use CreateReplicationPolicyRequest. +type CreateReplicationPolicyRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The replication policy. + CreateReplicationPolicyDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateReplicationPolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateReplicationPolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateReplicationPolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request CreateReplicationPolicyRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateReplicationPolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateReplicationPolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateReplicationPolicyResponse wrapper for the CreateReplicationPolicy operation +type CreateReplicationPolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ReplicationPolicy instance + ReplicationPolicy `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, + // provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` +} + +func (response CreateReplicationPolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateReplicationPolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_retention_rule_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_retention_rule_details.go new file mode 100644 index 000000000..9d44a64ca --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_retention_rule_details.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateRetentionRuleDetails The details to create a retention rule. +type CreateRetentionRuleDetails struct { + + // A user-specified name for the retention rule. Names can be helpful in identifying retention rules. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + Duration *Duration `mandatory:"false" json:"duration"` + + // The date and time as per RFC 3339 (https://tools.ietf.org/html/rfc3339) after which this rule is locked + // and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are + // allowed and no other properties can be changed. This property cannot be updated for rules that are in a + // locked state. Specifying it when a duration is not specified is considered an error. + TimeRuleLocked *common.SDKTime `mandatory:"false" json:"timeRuleLocked"` +} + +func (m CreateRetentionRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateRetentionRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_retention_rule_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_retention_rule_request_response.go new file mode 100644 index 000000000..005ee9c96 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/create_retention_rule_request_response.go @@ -0,0 +1,127 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateRetentionRuleRequest wrapper for the CreateRetentionRule operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CreateRetentionRule.go.html to see an example of how to use CreateRetentionRuleRequest. +type CreateRetentionRuleRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The retention rule to create for the bucket. + CreateRetentionRuleDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateRetentionRuleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateRetentionRuleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateRetentionRuleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request CreateRetentionRuleRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateRetentionRuleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateRetentionRuleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateRetentionRuleResponse wrapper for the CreateRetentionRule operation +type CreateRetentionRuleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RetentionRule instance + RetentionRule `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // The entity tag (ETag) for the retention rule that was created. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateRetentionRuleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateRetentionRuleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_bucket_request_response.go new file mode 100644 index 000000000..9f43700c4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_bucket_request_response.go @@ -0,0 +1,124 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteBucketRequest wrapper for the DeleteBucket operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/DeleteBucket.go.html to see an example of how to use DeleteBucketRequest. +type DeleteBucketRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteBucketRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteBucketRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteBucketRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request DeleteBucketRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteBucketRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteBucketRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteBucketResponse wrapper for the DeleteBucket operation +type DeleteBucketResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteBucketResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteBucketResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_object_lifecycle_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_object_lifecycle_policy_request_response.go new file mode 100644 index 000000000..07dc3691f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_object_lifecycle_policy_request_response.go @@ -0,0 +1,124 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteObjectLifecyclePolicyRequest wrapper for the DeleteObjectLifecyclePolicy operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/DeleteObjectLifecyclePolicy.go.html to see an example of how to use DeleteObjectLifecyclePolicyRequest. +type DeleteObjectLifecyclePolicyRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteObjectLifecyclePolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteObjectLifecyclePolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteObjectLifecyclePolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request DeleteObjectLifecyclePolicyRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteObjectLifecyclePolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteObjectLifecyclePolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteObjectLifecyclePolicyResponse wrapper for the DeleteObjectLifecyclePolicy operation +type DeleteObjectLifecyclePolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, + // provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` +} + +func (response DeleteObjectLifecyclePolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteObjectLifecyclePolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_object_request_response.go new file mode 100644 index 000000000..b14394299 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_object_request_response.go @@ -0,0 +1,151 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteObjectRequest wrapper for the DeleteObject operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/DeleteObject.go.html to see an example of how to use DeleteObjectRequest. +type DeleteObjectRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. Avoid entering confidential information. + // Example: `test/object1.log` + ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // VersionId used to identify a particular version of the object + VersionId *string `mandatory:"false" contributesTo:"query" name:"versionId"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteObjectRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteObjectRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteObjectRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request DeleteObjectRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["objectName"] != nil { + templateParam := mandatoryParamMap["objectName"] + for _, template := range templateParam { + replacementParam := *request.ObjectName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteObjectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteObjectRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteObjectResponse wrapper for the DeleteObject operation +type DeleteObjectResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The time the object was deleted, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` + + // The `versionId` of the delete marker created as a result of the DELETE Object. + // If the request contains a specific `versionId`, then this response header will be the same as the requested `versionId` of the object that was deleted. + VersionId *string `presentIn:"header" name:"version-id"` + + // This is `true` if the deleted object is a delete marker, otherwise `false` + IsDeleteMarker *bool `presentIn:"header" name:"is-delete-marker"` +} + +func (response DeleteObjectResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteObjectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_preauthenticated_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_preauthenticated_request_request_response.go new file mode 100644 index 000000000..3487f926e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_preauthenticated_request_request_response.go @@ -0,0 +1,133 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePreauthenticatedRequestRequest wrapper for the DeletePreauthenticatedRequest operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/DeletePreauthenticatedRequest.go.html to see an example of how to use DeletePreauthenticatedRequestRequest. +type DeletePreauthenticatedRequestRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The unique identifier for the pre-authenticated request. This can be used to manage operations against + // the pre-authenticated request, such as GET or DELETE. + ParId *string `mandatory:"true" contributesTo:"path" name:"parId"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePreauthenticatedRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePreauthenticatedRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeletePreauthenticatedRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request DeletePreauthenticatedRequestRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["parId"] != nil { + templateParam := mandatoryParamMap["parId"] + for _, template := range templateParam { + replacementParam := *request.ParId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePreauthenticatedRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeletePreauthenticatedRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePreauthenticatedRequestResponse wrapper for the DeletePreauthenticatedRequest operation +type DeletePreauthenticatedRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePreauthenticatedRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePreauthenticatedRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_private_endpoint_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_private_endpoint_request_response.go new file mode 100644 index 000000000..7d294fb02 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_private_endpoint_request_response.go @@ -0,0 +1,128 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePrivateEndpointRequest wrapper for the DeletePrivateEndpoint operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/DeletePrivateEndpoint.go.html to see an example of how to use DeletePrivateEndpointRequest. +type DeletePrivateEndpointRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the private endpoint. Avoid entering confidential information. + // Example: `my-new-pe-1` + PeName *string `mandatory:"true" contributesTo:"path" name:"peName"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePrivateEndpointRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePrivateEndpointRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeletePrivateEndpointRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request DeletePrivateEndpointRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["peName"] != nil { + templateParam := mandatoryParamMap["peName"] + for _, template := range templateParam { + replacementParam := *request.PeName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePrivateEndpointRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeletePrivateEndpointRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePrivateEndpointResponse wrapper for the DeletePrivateEndpoint operation +type DeletePrivateEndpointResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + // particular request, provide this request ID. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePrivateEndpointResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePrivateEndpointResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_replication_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_replication_policy_request_response.go new file mode 100644 index 000000000..37e283960 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_replication_policy_request_response.go @@ -0,0 +1,132 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteReplicationPolicyRequest wrapper for the DeleteReplicationPolicy operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/DeleteReplicationPolicy.go.html to see an example of how to use DeleteReplicationPolicyRequest. +type DeleteReplicationPolicyRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The ID of the replication policy. + ReplicationId *string `mandatory:"true" contributesTo:"path" name:"replicationId"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteReplicationPolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteReplicationPolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteReplicationPolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request DeleteReplicationPolicyRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["replicationId"] != nil { + templateParam := mandatoryParamMap["replicationId"] + for _, template := range templateParam { + replacementParam := *request.ReplicationId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteReplicationPolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteReplicationPolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteReplicationPolicyResponse wrapper for the DeleteReplicationPolicy operation +type DeleteReplicationPolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, + // provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` +} + +func (response DeleteReplicationPolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteReplicationPolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_retention_rule_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_retention_rule_request_response.go new file mode 100644 index 000000000..6735e6af3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/delete_retention_rule_request_response.go @@ -0,0 +1,137 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteRetentionRuleRequest wrapper for the DeleteRetentionRule operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/DeleteRetentionRule.go.html to see an example of how to use DeleteRetentionRuleRequest. +type DeleteRetentionRuleRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The ID of the retention rule. + RetentionRuleId *string `mandatory:"true" contributesTo:"path" name:"retentionRuleId"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteRetentionRuleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteRetentionRuleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteRetentionRuleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request DeleteRetentionRuleRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["retentionRuleId"] != nil { + templateParam := mandatoryParamMap["retentionRuleId"] + for _, template := range templateParam { + replacementParam := *request.RetentionRuleId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteRetentionRuleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteRetentionRuleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteRetentionRuleResponse wrapper for the DeleteRetentionRule operation +type DeleteRetentionRuleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteRetentionRuleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteRetentionRuleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/deleted_object_result.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/deleted_object_result.go new file mode 100644 index 000000000..21ff5b9ba --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/deleted_object_result.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DeletedObjectResult Delete object details. +type DeletedObjectResult struct { + + // The name of the deleted object. Avoid entering confidential information. + // Example: test/object1.log + ObjectName *string `mandatory:"true" json:"objectName"` + + // The time the object was deleted, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + TimeLastModified *common.SDKTime `mandatory:"true" json:"timeLastModified"` +} + +func (m DeletedObjectResult) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DeletedObjectResult) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/duration.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/duration.go new file mode 100644 index 000000000..e11f21391 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/duration.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Duration The amount of time that objects in the bucket should be preserved for and which is calculated in relation to +// each object's Last-Modified timestamp. If duration is not present, then there is no time limit and the objects +// in the bucket will be preserved indefinitely. +type Duration struct { + + // The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation + // to each object's Last-Modified timestamp. + TimeAmount *int64 `mandatory:"true" json:"timeAmount"` + + // The unit that should be used to interpret timeAmount. + TimeUnit DurationTimeUnitEnum `mandatory:"true" json:"timeUnit"` +} + +func (m Duration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Duration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDurationTimeUnitEnum(string(m.TimeUnit)); !ok && m.TimeUnit != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TimeUnit: %s. Supported values are: %s.", m.TimeUnit, strings.Join(GetDurationTimeUnitEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DurationTimeUnitEnum Enum with underlying type: string +type DurationTimeUnitEnum string + +// Set of constants representing the allowable values for DurationTimeUnitEnum +const ( + DurationTimeUnitYears DurationTimeUnitEnum = "YEARS" + DurationTimeUnitDays DurationTimeUnitEnum = "DAYS" +) + +var mappingDurationTimeUnitEnum = map[string]DurationTimeUnitEnum{ + "YEARS": DurationTimeUnitYears, + "DAYS": DurationTimeUnitDays, +} + +var mappingDurationTimeUnitEnumLowerCase = map[string]DurationTimeUnitEnum{ + "years": DurationTimeUnitYears, + "days": DurationTimeUnitDays, +} + +// GetDurationTimeUnitEnumValues Enumerates the set of values for DurationTimeUnitEnum +func GetDurationTimeUnitEnumValues() []DurationTimeUnitEnum { + values := make([]DurationTimeUnitEnum, 0) + for _, v := range mappingDurationTimeUnitEnum { + values = append(values, v) + } + return values +} + +// GetDurationTimeUnitEnumStringValues Enumerates the set of values in String for DurationTimeUnitEnum +func GetDurationTimeUnitEnumStringValues() []string { + return []string{ + "YEARS", + "DAYS", + } +} + +// GetMappingDurationTimeUnitEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDurationTimeUnitEnum(val string) (DurationTimeUnitEnum, bool) { + enum, ok := mappingDurationTimeUnitEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/failed_object_result.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/failed_object_result.go new file mode 100644 index 000000000..f3c07330c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/failed_object_result.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FailedObjectResult Failed object details. +type FailedObjectResult struct { + + // The name of the object. + // Example: test/object1.log + ObjectName *string `mandatory:"true" json:"objectName"` + + // HTTP status code for the failure. + // Example: 409 + StatusCode *int `mandatory:"true" json:"statusCode"` + + // Detailed error message on why the delete/update was failed. + ErrorMessage *string `mandatory:"true" json:"errorMessage"` +} + +func (m FailedObjectResult) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FailedObjectResult) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/fqdns.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/fqdns.go new file mode 100644 index 000000000..72665f45e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/fqdns.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Fqdns The object representing FQDN details formed using prefix and additionalPrefixes. +type Fqdns struct { + PrefixFqdns *PrefixFqdns `mandatory:"false" json:"prefixFqdns"` + + // An object containing FQDNs formed using additionalPrefixes. + AdditionalPrefixesFqdns map[string]PrefixFqdns `mandatory:"false" json:"additionalPrefixesFqdns"` +} + +func (m Fqdns) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Fqdns) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_bucket_request_response.go new file mode 100644 index 000000000..299ceedf7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_bucket_request_response.go @@ -0,0 +1,199 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetBucketRequest wrapper for the GetBucket operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetBucket.go.html to see an example of how to use GetBucketRequest. +type GetBucketRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag (ETag) to avoid matching. Wildcards ('*') are not allowed. If the specified ETag does not + // match the ETag of the existing resource, the request returns the expected response. If the ETag matches + // the ETag of the existing resource, the request returns an HTTP 304 status without a response body. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Bucket summary includes the 'namespace', 'name', 'compartmentId', 'createdBy', 'timeCreated', + // and 'etag' fields. This parameter can also include 'approximateCount' (approximate number of objects), 'approximateSize' + // (total approximate size in bytes of all objects) and 'autoTiering' (state of auto tiering on the bucket). + // For example 'approximateCount,approximateSize,autoTiering'. + Fields []GetBucketFieldsEnum `contributesTo:"query" name:"fields" omitEmpty:"true" collectionFormat:"csv"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetBucketRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetBucketRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetBucketRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request GetBucketRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBucketRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetBucketRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.Fields { + if _, ok := GetMappingGetBucketFieldsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Fields: %s. Supported values are: %s.", val, strings.Join(GetGetBucketFieldsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetBucketResponse wrapper for the GetBucket operation +type GetBucketResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Bucket instance + Bucket `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current entity tag (ETag) for the bucket. + ETag *string `presentIn:"header" name:"etag"` + + // Flag to indicate whether or not the object was modified. If this is true, + // the getter for the object itself will return null. Callers should check this + // if they specified one of the request params that might result in a conditional + // response (like 'if-match'/'if-none-match'). + IsNotModified bool +} + +func (response GetBucketResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetBucketResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetBucketFieldsEnum Enum with underlying type: string +type GetBucketFieldsEnum string + +// Set of constants representing the allowable values for GetBucketFieldsEnum +const ( + GetBucketFieldsApproximatecount GetBucketFieldsEnum = "approximateCount" + GetBucketFieldsApproximatesize GetBucketFieldsEnum = "approximateSize" + GetBucketFieldsAutotiering GetBucketFieldsEnum = "autoTiering" +) + +var mappingGetBucketFieldsEnum = map[string]GetBucketFieldsEnum{ + "approximateCount": GetBucketFieldsApproximatecount, + "approximateSize": GetBucketFieldsApproximatesize, + "autoTiering": GetBucketFieldsAutotiering, +} + +var mappingGetBucketFieldsEnumLowerCase = map[string]GetBucketFieldsEnum{ + "approximatecount": GetBucketFieldsApproximatecount, + "approximatesize": GetBucketFieldsApproximatesize, + "autotiering": GetBucketFieldsAutotiering, +} + +// GetGetBucketFieldsEnumValues Enumerates the set of values for GetBucketFieldsEnum +func GetGetBucketFieldsEnumValues() []GetBucketFieldsEnum { + values := make([]GetBucketFieldsEnum, 0) + for _, v := range mappingGetBucketFieldsEnum { + values = append(values, v) + } + return values +} + +// GetGetBucketFieldsEnumStringValues Enumerates the set of values in String for GetBucketFieldsEnum +func GetGetBucketFieldsEnumStringValues() []string { + return []string{ + "approximateCount", + "approximateSize", + "autoTiering", + } +} + +// GetMappingGetBucketFieldsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetBucketFieldsEnum(val string) (GetBucketFieldsEnum, bool) { + enum, ok := mappingGetBucketFieldsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_namespace_metadata_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_namespace_metadata_request_response.go new file mode 100644 index 000000000..2b3758856 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_namespace_metadata_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetNamespaceMetadataRequest wrapper for the GetNamespaceMetadata operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetNamespaceMetadata.go.html to see an example of how to use GetNamespaceMetadataRequest. +type GetNamespaceMetadataRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetNamespaceMetadataRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetNamespaceMetadataRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetNamespaceMetadataRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request GetNamespaceMetadataRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetNamespaceMetadataRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetNamespaceMetadataRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetNamespaceMetadataResponse wrapper for the GetNamespaceMetadata operation +type GetNamespaceMetadataResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NamespaceMetadata instance + NamespaceMetadata `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetNamespaceMetadataResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetNamespaceMetadataResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_namespace_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_namespace_request_response.go new file mode 100644 index 000000000..8d524bac2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_namespace_request_response.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetNamespaceRequest wrapper for the GetNamespace operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetNamespace.go.html to see an example of how to use GetNamespaceRequest. +type GetNamespaceRequest struct { + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // This is an optional field representing either the tenancy OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) or the compartment + // OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) within the tenancy whose Object Storage namespace is to be retrieved. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetNamespaceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetNamespaceRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetNamespaceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request GetNamespaceRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetNamespaceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetNamespaceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetNamespaceResponse wrapper for the GetNamespace operation +type GetNamespaceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The string instance + Value *string `presentIn:"body"` +} + +func (response GetNamespaceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetNamespaceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_object_lifecycle_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_object_lifecycle_policy_request_response.go new file mode 100644 index 000000000..5500af363 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_object_lifecycle_policy_request_response.go @@ -0,0 +1,125 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetObjectLifecyclePolicyRequest wrapper for the GetObjectLifecyclePolicy operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetObjectLifecyclePolicy.go.html to see an example of how to use GetObjectLifecyclePolicyRequest. +type GetObjectLifecyclePolicyRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetObjectLifecyclePolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetObjectLifecyclePolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetObjectLifecyclePolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request GetObjectLifecyclePolicyRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetObjectLifecyclePolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetObjectLifecyclePolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetObjectLifecyclePolicyResponse wrapper for the GetObjectLifecyclePolicy operation +type GetObjectLifecyclePolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ObjectLifecyclePolicy instance + ObjectLifecyclePolicy `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, + // provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // The entity tag (ETag) for the object lifecycle policy. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response GetObjectLifecyclePolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetObjectLifecyclePolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_object_request_response.go new file mode 100644 index 000000000..025599000 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_object_request_response.go @@ -0,0 +1,372 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// GetObjectRequest wrapper for the GetObject operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetObject.go.html to see an example of how to use GetObjectRequest. +type GetObjectRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. Avoid entering confidential information. + // Example: `test/object1.log` + ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` + + // VersionId used to identify a particular version of the object + VersionId *string `mandatory:"false" contributesTo:"query" name:"versionId"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag (ETag) to avoid matching. Wildcards ('*') are not allowed. If the specified ETag does not + // match the ETag of the existing resource, the request returns the expected response. If the ETag matches + // the ETag of the existing resource, the request returns an HTTP 304 status without a response body. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Optional byte range to fetch, as described in RFC 7233 (https://tools.ietf.org/html/rfc7233#section-2.1). + // Note that only a single range of bytes is supported. + Range *string `mandatory:"false" contributesTo:"header" name:"range"` + + // The optional header that specifies "AES256" as the encryption algorithm. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerAlgorithm *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-algorithm"` + + // The optional header that specifies the base64-encoded 256-bit encryption key to use to encrypt or + // decrypt the data. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerKey *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-key"` + + // The optional header that specifies the base64-encoded SHA256 hash of the encryption key. This + // value is used to check the integrity of the encryption key. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerKeySha256 *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-key-sha256"` + + // Specify this query parameter to override the value of the Content-Disposition response header in the GetObject response. + HttpResponseContentDisposition *string `mandatory:"false" contributesTo:"query" name:"httpResponseContentDisposition"` + + // Specify this query parameter to override the Cache-Control response header in the GetObject response. + HttpResponseCacheControl *string `mandatory:"false" contributesTo:"query" name:"httpResponseCacheControl"` + + // Specify this query parameter to override the Content-Type response header in the GetObject response. + HttpResponseContentType *string `mandatory:"false" contributesTo:"query" name:"httpResponseContentType"` + + // Specify this query parameter to override the Content-Language response header in the GetObject response. + HttpResponseContentLanguage *string `mandatory:"false" contributesTo:"query" name:"httpResponseContentLanguage"` + + // Specify this query parameter to override the Content-Encoding response header in the GetObject response. + HttpResponseContentEncoding *string `mandatory:"false" contributesTo:"query" name:"httpResponseContentEncoding"` + + // Specify this query parameter to override the Expires response header in the GetObject response. + HttpResponseExpires *string `mandatory:"false" contributesTo:"query" name:"httpResponseExpires"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetObjectRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetObjectRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetObjectRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request GetObjectRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["objectName"] != nil { + templateParam := mandatoryParamMap["objectName"] + for _, template := range templateParam { + replacementParam := *request.ObjectName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetObjectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetObjectRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetObjectResponse wrapper for the GetObject operation +type GetObjectResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The io.ReadCloser instance + Content io.ReadCloser `presentIn:"body" encoding:"binary"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The entity tag (ETag) for the object. + ETag *string `presentIn:"header" name:"etag"` + + // The user-defined metadata for the object. + OpcMeta map[string]string `presentIn:"header-collection" prefix:"opc-meta-"` + + // The object size in bytes. + ContentLength *int64 `presentIn:"header" name:"content-length"` + + // Content-Range header for range requests, per RFC 7233 (https://tools.ietf.org/html/rfc7233#section-4.2). + ContentRange *string `presentIn:"header" name:"content-range"` + + // Content-MD5 header, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.15). + // Unavailable for objects uploaded using multipart upload. + ContentMd5 *string `presentIn:"header" name:"content-md5"` + + // Only applicable to objects uploaded using multipart upload. + // Base-64 representation of the multipart object hash. + // The multipart object hash is calculated by taking the MD5 hashes of the parts, + // concatenating the binary representation of those hashes in order of their part numbers, + // and then calculating the MD5 hash of the concatenated values. + OpcMultipartMd5 *string `presentIn:"header" name:"opc-multipart-md5"` + + // The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + // Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + // of the complete reconstructed object. + OpcContentCrc32c *string `presentIn:"header" name:"opc-content-crc32c"` + + // Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + // The base64-encoded SHA256 hash of the object as computed during upload. + // Unavailable for objects uploaded using multipart upload. + OpcContentSha256 *string `presentIn:"header" name:"opc-content-sha256"` + + // Only applicable to objects uploaded using multipart upload. + // Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + // Base-64 representation of the multipart object SHA256 hash. + // The multipart object hash is calculated by taking the SHA256 hashes of the parts, + // concatenating the binary representation of those hashes in order of their part numbers, + // and then calculating the SHA256 hash of the concatenated values. + OpcMultipartSha256 *string `presentIn:"header" name:"opc-multipart-sha256"` + + // Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + // The base64-encoded SHA384 hash of the object as computed during upload. + // Unavailable for objects uploaded using multipart upload. + OpcContentSha384 *string `presentIn:"header" name:"opc-content-sha384"` + + // Only applicable to objects uploaded using multipart upload. + // Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + // Base-64 representation of the multipart object SHA384 hash. + // The multipart object hash is calculated by taking the SHA384 hashes of the parts, + // concatenating the binary representation of those hashes in order of their part numbers, + // and then calculating the SHA384 hash of the concatenated values. + OpcMultipartSha384 *string `presentIn:"header" name:"opc-multipart-sha384"` + + // Content-Type header, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.17). + ContentType *string `presentIn:"header" name:"content-type"` + + // Content-Language header, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.12). + ContentLanguage *string `presentIn:"header" name:"content-language"` + + // Content-Encoding header, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.11). + ContentEncoding *string `presentIn:"header" name:"content-encoding"` + + // Cache-Control header, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.9). + CacheControl *string `presentIn:"header" name:"cache-control"` + + // Content-Disposition header, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-19.5.1). + ContentDisposition *string `presentIn:"header" name:"content-disposition"` + + // The object modification time, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` + + // The storage tier that the object is stored in. + StorageTier GetObjectStorageTierEnum `presentIn:"header" name:"storage-tier"` + + // Archival state of an object. This field is set only for objects in Archive tier. + ArchivalState GetObjectArchivalStateEnum `presentIn:"header" name:"archival-state"` + + // Time that the object is returned to the archived state. This field is only present for restored objects. + TimeOfArchival *common.SDKTime `presentIn:"header" name:"time-of-archival"` + + // VersionId of the object + VersionId *string `presentIn:"header" name:"version-id"` + + // The date and time after which the object is no longer cached by a browser, proxy, or other caching entity. See + // RFC 2616 (https://tools.ietf.org/rfc/rfc2616#section-14.21). + Expires *common.SDKTime `presentIn:"header" name:"expires"` + + // Flag to indicate whether or not the object was modified. If this is true, + // the getter for the object itself will return null. Callers should check this + // if they specified one of the request params that might result in a conditional + // response (like 'if-match'/'if-none-match'). + IsNotModified bool +} + +func (response GetObjectResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetObjectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetObjectStorageTierEnum Enum with underlying type: string +type GetObjectStorageTierEnum string + +// Set of constants representing the allowable values for GetObjectStorageTierEnum +const ( + GetObjectStorageTierStandard GetObjectStorageTierEnum = "Standard" + GetObjectStorageTierInfrequentaccess GetObjectStorageTierEnum = "InfrequentAccess" + GetObjectStorageTierArchive GetObjectStorageTierEnum = "Archive" +) + +var mappingGetObjectStorageTierEnum = map[string]GetObjectStorageTierEnum{ + "Standard": GetObjectStorageTierStandard, + "InfrequentAccess": GetObjectStorageTierInfrequentaccess, + "Archive": GetObjectStorageTierArchive, +} + +var mappingGetObjectStorageTierEnumLowerCase = map[string]GetObjectStorageTierEnum{ + "standard": GetObjectStorageTierStandard, + "infrequentaccess": GetObjectStorageTierInfrequentaccess, + "archive": GetObjectStorageTierArchive, +} + +// GetGetObjectStorageTierEnumValues Enumerates the set of values for GetObjectStorageTierEnum +func GetGetObjectStorageTierEnumValues() []GetObjectStorageTierEnum { + values := make([]GetObjectStorageTierEnum, 0) + for _, v := range mappingGetObjectStorageTierEnum { + values = append(values, v) + } + return values +} + +// GetGetObjectStorageTierEnumStringValues Enumerates the set of values in String for GetObjectStorageTierEnum +func GetGetObjectStorageTierEnumStringValues() []string { + return []string{ + "Standard", + "InfrequentAccess", + "Archive", + } +} + +// GetMappingGetObjectStorageTierEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetObjectStorageTierEnum(val string) (GetObjectStorageTierEnum, bool) { + enum, ok := mappingGetObjectStorageTierEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// GetObjectArchivalStateEnum Enum with underlying type: string +type GetObjectArchivalStateEnum string + +// Set of constants representing the allowable values for GetObjectArchivalStateEnum +const ( + GetObjectArchivalStateArchived GetObjectArchivalStateEnum = "Archived" + GetObjectArchivalStateRestoring GetObjectArchivalStateEnum = "Restoring" + GetObjectArchivalStateRestored GetObjectArchivalStateEnum = "Restored" +) + +var mappingGetObjectArchivalStateEnum = map[string]GetObjectArchivalStateEnum{ + "Archived": GetObjectArchivalStateArchived, + "Restoring": GetObjectArchivalStateRestoring, + "Restored": GetObjectArchivalStateRestored, +} + +var mappingGetObjectArchivalStateEnumLowerCase = map[string]GetObjectArchivalStateEnum{ + "archived": GetObjectArchivalStateArchived, + "restoring": GetObjectArchivalStateRestoring, + "restored": GetObjectArchivalStateRestored, +} + +// GetGetObjectArchivalStateEnumValues Enumerates the set of values for GetObjectArchivalStateEnum +func GetGetObjectArchivalStateEnumValues() []GetObjectArchivalStateEnum { + values := make([]GetObjectArchivalStateEnum, 0) + for _, v := range mappingGetObjectArchivalStateEnum { + values = append(values, v) + } + return values +} + +// GetGetObjectArchivalStateEnumStringValues Enumerates the set of values in String for GetObjectArchivalStateEnum +func GetGetObjectArchivalStateEnumStringValues() []string { + return []string{ + "Archived", + "Restoring", + "Restored", + } +} + +// GetMappingGetObjectArchivalStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetObjectArchivalStateEnum(val string) (GetObjectArchivalStateEnum, bool) { + enum, ok := mappingGetObjectArchivalStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_preauthenticated_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_preauthenticated_request_request_response.go new file mode 100644 index 000000000..2b9e98c8d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_preauthenticated_request_request_response.go @@ -0,0 +1,136 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPreauthenticatedRequestRequest wrapper for the GetPreauthenticatedRequest operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetPreauthenticatedRequest.go.html to see an example of how to use GetPreauthenticatedRequestRequest. +type GetPreauthenticatedRequestRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The unique identifier for the pre-authenticated request. This can be used to manage operations against + // the pre-authenticated request, such as GET or DELETE. + ParId *string `mandatory:"true" contributesTo:"path" name:"parId"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPreauthenticatedRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPreauthenticatedRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetPreauthenticatedRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request GetPreauthenticatedRequestRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["parId"] != nil { + templateParam := mandatoryParamMap["parId"] + for _, template := range templateParam { + replacementParam := *request.ParId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPreauthenticatedRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetPreauthenticatedRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPreauthenticatedRequestResponse wrapper for the GetPreauthenticatedRequest operation +type GetPreauthenticatedRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PreauthenticatedRequestSummary instance + PreauthenticatedRequestSummary `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPreauthenticatedRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPreauthenticatedRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_private_endpoint_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_private_endpoint_request_response.go new file mode 100644 index 000000000..3cc5fa195 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_private_endpoint_request_response.go @@ -0,0 +1,141 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPrivateEndpointRequest wrapper for the GetPrivateEndpoint operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetPrivateEndpoint.go.html to see an example of how to use GetPrivateEndpointRequest. +type GetPrivateEndpointRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the private endpoint. Avoid entering confidential information. + // Example: `my-new-pe-1` + PeName *string `mandatory:"true" contributesTo:"path" name:"peName"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag (ETag) to avoid matching. Wildcards ('*') are not allowed. If the specified ETag does not + // match the ETag of the existing resource, the request returns the expected response. If the ETag matches + // the ETag of the existing resource, the request returns an HTTP 304 status without a response body. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPrivateEndpointRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPrivateEndpointRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetPrivateEndpointRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request GetPrivateEndpointRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["peName"] != nil { + templateParam := mandatoryParamMap["peName"] + for _, template := range templateParam { + replacementParam := *request.PeName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPrivateEndpointRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetPrivateEndpointRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPrivateEndpointResponse wrapper for the GetPrivateEndpoint operation +type GetPrivateEndpointResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PrivateEndpoint instance + PrivateEndpoint `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The entity tag (ETag) for the Private Endpoint. + ETag *string `presentIn:"header" name:"etag"` + + // Flag to indicate whether or not the object was modified. If this is true, + // the getter for the object itself will return null. Callers should check this + // if they specified one of the request params that might result in a conditional + // response (like 'if-match'/'if-none-match'). + IsNotModified bool +} + +func (response GetPrivateEndpointResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPrivateEndpointResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_replication_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_replication_policy_request_response.go new file mode 100644 index 000000000..8ca668250 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_replication_policy_request_response.go @@ -0,0 +1,135 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetReplicationPolicyRequest wrapper for the GetReplicationPolicy operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetReplicationPolicy.go.html to see an example of how to use GetReplicationPolicyRequest. +type GetReplicationPolicyRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The ID of the replication policy. + ReplicationId *string `mandatory:"true" contributesTo:"path" name:"replicationId"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetReplicationPolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetReplicationPolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetReplicationPolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request GetReplicationPolicyRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["replicationId"] != nil { + templateParam := mandatoryParamMap["replicationId"] + for _, template := range templateParam { + replacementParam := *request.ReplicationId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetReplicationPolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetReplicationPolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetReplicationPolicyResponse wrapper for the GetReplicationPolicy operation +type GetReplicationPolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ReplicationPolicy instance + ReplicationPolicy `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, + // provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` +} + +func (response GetReplicationPolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetReplicationPolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_retention_rule_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_retention_rule_request_response.go new file mode 100644 index 000000000..f9367b501 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_retention_rule_request_response.go @@ -0,0 +1,141 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetRetentionRuleRequest wrapper for the GetRetentionRule operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetRetentionRule.go.html to see an example of how to use GetRetentionRuleRequest. +type GetRetentionRuleRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The ID of the retention rule. + RetentionRuleId *string `mandatory:"true" contributesTo:"path" name:"retentionRuleId"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetRetentionRuleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetRetentionRuleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetRetentionRuleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request GetRetentionRuleRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["retentionRuleId"] != nil { + templateParam := mandatoryParamMap["retentionRuleId"] + for _, template := range templateParam { + replacementParam := *request.RetentionRuleId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetRetentionRuleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetRetentionRuleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetRetentionRuleResponse wrapper for the GetRetentionRule operation +type GetRetentionRuleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RetentionRule instance + RetentionRule `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The entity tag (ETag) for the retention rule. + Etag *string `presentIn:"header" name:"etag"` + + // The time the retention rule was last modified, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29) + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` +} + +func (response GetRetentionRuleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetRetentionRuleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_work_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_work_request_request_response.go new file mode 100644 index 000000000..6bf07c8a6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/get_work_request_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetWorkRequestRequest wrapper for the GetWorkRequest operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetWorkRequest.go.html to see an example of how to use GetWorkRequestRequest. +type GetWorkRequestRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetWorkRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetWorkRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetWorkRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request GetWorkRequestRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["workRequestId"] != nil { + templateParam := mandatoryParamMap["workRequestId"] + for _, template := range templateParam { + replacementParam := *request.WorkRequestId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetWorkRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetWorkRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetWorkRequestResponse wrapper for the GetWorkRequest operation +type GetWorkRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The WorkRequest instance + WorkRequest `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // A decimal number representing the number of seconds the client should wait before polling this endpoint again. + RetryAfter *float32 `presentIn:"header" name:"retry-after"` +} + +func (response GetWorkRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetWorkRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/head_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/head_bucket_request_response.go new file mode 100644 index 000000000..b8f8ef3bb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/head_bucket_request_response.go @@ -0,0 +1,138 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// HeadBucketRequest wrapper for the HeadBucket operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/HeadBucket.go.html to see an example of how to use HeadBucketRequest. +type HeadBucketRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag (ETag) to avoid matching. Wildcards ('*') are not allowed. If the specified ETag does not + // match the ETag of the existing resource, the request returns the expected response. If the ETag matches + // the ETag of the existing resource, the request returns an HTTP 304 status without a response body. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request HeadBucketRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request HeadBucketRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request HeadBucketRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request HeadBucketRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request HeadBucketRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request HeadBucketRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// HeadBucketResponse wrapper for the HeadBucket operation +type HeadBucketResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current entity tag (ETag) for the bucket. + ETag *string `presentIn:"header" name:"etag"` + + // Flag to indicate whether or not the object was modified. If this is true, + // the getter for the object itself will return null. Callers should check this + // if they specified one of the request params that might result in a conditional + // response (like 'if-match'/'if-none-match'). + IsNotModified bool +} + +func (response HeadBucketResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response HeadBucketResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/head_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/head_object_request_response.go new file mode 100644 index 000000000..881ae1ce7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/head_object_request_response.go @@ -0,0 +1,339 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// HeadObjectRequest wrapper for the HeadObject operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/HeadObject.go.html to see an example of how to use HeadObjectRequest. +type HeadObjectRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. Avoid entering confidential information. + // Example: `test/object1.log` + ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` + + // VersionId used to identify a particular version of the object + VersionId *string `mandatory:"false" contributesTo:"query" name:"versionId"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag (ETag) to avoid matching. Wildcards ('*') are not allowed. If the specified ETag does not + // match the ETag of the existing resource, the request returns the expected response. If the ETag matches + // the ETag of the existing resource, the request returns an HTTP 304 status without a response body. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // The optional header that specifies "AES256" as the encryption algorithm. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerAlgorithm *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-algorithm"` + + // The optional header that specifies the base64-encoded 256-bit encryption key to use to encrypt or + // decrypt the data. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerKey *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-key"` + + // The optional header that specifies the base64-encoded SHA256 hash of the encryption key. This + // value is used to check the integrity of the encryption key. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerKeySha256 *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-key-sha256"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request HeadObjectRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request HeadObjectRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request HeadObjectRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request HeadObjectRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["objectName"] != nil { + templateParam := mandatoryParamMap["objectName"] + for _, template := range templateParam { + replacementParam := *request.ObjectName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request HeadObjectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request HeadObjectRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// HeadObjectResponse wrapper for the HeadObject operation +type HeadObjectResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The entity tag (ETag) for the object. + ETag *string `presentIn:"header" name:"etag"` + + // The user-defined metadata for the object. + OpcMeta map[string]string `presentIn:"header-collection" prefix:"opc-meta-"` + + // The object size in bytes. + ContentLength *int64 `presentIn:"header" name:"content-length"` + + // Content-MD5 header, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.15). + // Unavailable for objects uploaded using multipart upload. + ContentMd5 *string `presentIn:"header" name:"content-md5"` + + // Only applicable to objects uploaded using multipart upload. + // Base-64 representation of the multipart object hash. + // The multipart object hash is calculated by taking the MD5 hashes of the parts, + // concatenating the binary representation of those hashes in order of their part numbers, + // and then calculating the MD5 hash of the concatenated values. + OpcMultipartMd5 *string `presentIn:"header" name:"opc-multipart-md5"` + + // The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the object. + // Even for objects uploaded using multipart upload, this header returns the CRC32C (Castagnoli) checksum + // of the complete reconstructed object. + OpcContentCrc32c *string `presentIn:"header" name:"opc-content-crc32c"` + + // Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + // The base64-encoded SHA256 hash of the object as computed during upload. + // Unavailable for objects uploaded using multipart upload. + OpcContentSha256 *string `presentIn:"header" name:"opc-content-sha256"` + + // Only applicable to objects uploaded using multipart upload. + // Applicable only if SHA256 was specified in the opc-checksum-algorithm request header during upload. + // Base-64 representation of the multipart object SHA256 hash. + // The multipart object hash is calculated by taking the SHA256 hashes of the parts, + // concatenating the binary representation of those hashes in order of their part numbers, + // and then calculating the SHA256 hash of the concatenated values. + OpcMultipartSha256 *string `presentIn:"header" name:"opc-multipart-sha256"` + + // Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + // The base64-encoded SHA384 hash of the object as computed during upload. + // Unavailable for objects uploaded using multipart upload. + OpcContentSha384 *string `presentIn:"header" name:"opc-content-sha384"` + + // Only applicable to objects uploaded using multipart upload. + // Applicable only if SHA384 was specified in the opc-checksum-algorithm request header during upload. + // Base-64 representation of the multipart object SHA384 hash. + // The multipart object hash is calculated by taking the SHA384 hashes of the parts, + // concatenating the binary representation of those hashes in order of their part numbers, + // and then calculating the SHA384 hash of the concatenated values. + OpcMultipartSha384 *string `presentIn:"header" name:"opc-multipart-sha384"` + + // Content-Type header, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.17). + ContentType *string `presentIn:"header" name:"content-type"` + + // Content-Language header, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.12). + ContentLanguage *string `presentIn:"header" name:"content-language"` + + // Content-Encoding header, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.11). + ContentEncoding *string `presentIn:"header" name:"content-encoding"` + + // Cache-Control header, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.9). + CacheControl *string `presentIn:"header" name:"cache-control"` + + // Content-Disposition header, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-19.5.1). + ContentDisposition *string `presentIn:"header" name:"content-disposition"` + + // The object modification time, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` + + // The storage tier that the object is stored in. + StorageTier HeadObjectStorageTierEnum `presentIn:"header" name:"storage-tier"` + + // Archival state of an object. This field is set only for objects in Archive tier. + ArchivalState HeadObjectArchivalStateEnum `presentIn:"header" name:"archival-state"` + + // Time that the object is returned to the archived state. This field is only present for restored objects. + TimeOfArchival *common.SDKTime `presentIn:"header" name:"time-of-archival"` + + // VersionId of the object requested + VersionId *string `presentIn:"header" name:"version-id"` + + // Flag to indicate whether or not the object was modified. If this is true, + // the getter for the object itself will return null. Callers should check this + // if they specified one of the request params that might result in a conditional + // response (like 'if-match'/'if-none-match'). + IsNotModified bool +} + +func (response HeadObjectResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response HeadObjectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// HeadObjectStorageTierEnum Enum with underlying type: string +type HeadObjectStorageTierEnum string + +// Set of constants representing the allowable values for HeadObjectStorageTierEnum +const ( + HeadObjectStorageTierStandard HeadObjectStorageTierEnum = "Standard" + HeadObjectStorageTierInfrequentaccess HeadObjectStorageTierEnum = "InfrequentAccess" + HeadObjectStorageTierArchive HeadObjectStorageTierEnum = "Archive" +) + +var mappingHeadObjectStorageTierEnum = map[string]HeadObjectStorageTierEnum{ + "Standard": HeadObjectStorageTierStandard, + "InfrequentAccess": HeadObjectStorageTierInfrequentaccess, + "Archive": HeadObjectStorageTierArchive, +} + +var mappingHeadObjectStorageTierEnumLowerCase = map[string]HeadObjectStorageTierEnum{ + "standard": HeadObjectStorageTierStandard, + "infrequentaccess": HeadObjectStorageTierInfrequentaccess, + "archive": HeadObjectStorageTierArchive, +} + +// GetHeadObjectStorageTierEnumValues Enumerates the set of values for HeadObjectStorageTierEnum +func GetHeadObjectStorageTierEnumValues() []HeadObjectStorageTierEnum { + values := make([]HeadObjectStorageTierEnum, 0) + for _, v := range mappingHeadObjectStorageTierEnum { + values = append(values, v) + } + return values +} + +// GetHeadObjectStorageTierEnumStringValues Enumerates the set of values in String for HeadObjectStorageTierEnum +func GetHeadObjectStorageTierEnumStringValues() []string { + return []string{ + "Standard", + "InfrequentAccess", + "Archive", + } +} + +// GetMappingHeadObjectStorageTierEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingHeadObjectStorageTierEnum(val string) (HeadObjectStorageTierEnum, bool) { + enum, ok := mappingHeadObjectStorageTierEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// HeadObjectArchivalStateEnum Enum with underlying type: string +type HeadObjectArchivalStateEnum string + +// Set of constants representing the allowable values for HeadObjectArchivalStateEnum +const ( + HeadObjectArchivalStateArchived HeadObjectArchivalStateEnum = "Archived" + HeadObjectArchivalStateRestoring HeadObjectArchivalStateEnum = "Restoring" + HeadObjectArchivalStateRestored HeadObjectArchivalStateEnum = "Restored" +) + +var mappingHeadObjectArchivalStateEnum = map[string]HeadObjectArchivalStateEnum{ + "Archived": HeadObjectArchivalStateArchived, + "Restoring": HeadObjectArchivalStateRestoring, + "Restored": HeadObjectArchivalStateRestored, +} + +var mappingHeadObjectArchivalStateEnumLowerCase = map[string]HeadObjectArchivalStateEnum{ + "archived": HeadObjectArchivalStateArchived, + "restoring": HeadObjectArchivalStateRestoring, + "restored": HeadObjectArchivalStateRestored, +} + +// GetHeadObjectArchivalStateEnumValues Enumerates the set of values for HeadObjectArchivalStateEnum +func GetHeadObjectArchivalStateEnumValues() []HeadObjectArchivalStateEnum { + values := make([]HeadObjectArchivalStateEnum, 0) + for _, v := range mappingHeadObjectArchivalStateEnum { + values = append(values, v) + } + return values +} + +// GetHeadObjectArchivalStateEnumStringValues Enumerates the set of values in String for HeadObjectArchivalStateEnum +func GetHeadObjectArchivalStateEnumStringValues() []string { + return []string{ + "Archived", + "Restoring", + "Restored", + } +} + +// GetMappingHeadObjectArchivalStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingHeadObjectArchivalStateEnum(val string) (HeadObjectArchivalStateEnum, bool) { + enum, ok := mappingHeadObjectArchivalStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_buckets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_buckets_request_response.go new file mode 100644 index 000000000..8349216fe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_buckets_request_response.go @@ -0,0 +1,187 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListBucketsRequest wrapper for the ListBuckets operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListBuckets.go.html to see an example of how to use ListBucketsRequest. +type ListBucketsRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The ID of the compartment in which to list buckets. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. For important + // details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Bucket summary in list of buckets includes the 'namespace', 'name', 'compartmentId', 'createdBy', 'timeCreated', + // and 'etag' fields. This parameter can also include 'tags' (freeformTags and definedTags). The only supported value of this parameter is 'tags' for now. Example 'tags'. + Fields []ListBucketsFieldsEnum `contributesTo:"query" name:"fields" omitEmpty:"true" collectionFormat:"csv"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListBucketsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListBucketsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListBucketsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ListBucketsRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["compartmentId"] != nil { + templateParam := mandatoryParamMap["compartmentId"] + for _, template := range templateParam { + replacementParam := *request.CompartmentId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBucketsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListBucketsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.Fields { + if _, ok := GetMappingListBucketsFieldsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Fields: %s. Supported values are: %s.", val, strings.Join(GetListBucketsFieldsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListBucketsResponse wrapper for the ListBuckets operation +type ListBucketsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []BucketSummary instances + Items []BucketSummary `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For paginating a list of buckets. + // In the GET request, set the limit to the number of buckets items that you want returned in the response. + // If the `opc-next-page` header appears in the response, then this is a partial list and there are additional + // buckets to get. Include the header's value as the `page` parameter in the subsequent GET request to get the + // next batch of buckets. Repeat this process to retrieve the entire list of buckets. + // By default, the page limit is set to 25 buckets per page, but you can specify a value from 1 to 1000. + // For more details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListBucketsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListBucketsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListBucketsFieldsEnum Enum with underlying type: string +type ListBucketsFieldsEnum string + +// Set of constants representing the allowable values for ListBucketsFieldsEnum +const ( + ListBucketsFieldsTags ListBucketsFieldsEnum = "tags" +) + +var mappingListBucketsFieldsEnum = map[string]ListBucketsFieldsEnum{ + "tags": ListBucketsFieldsTags, +} + +var mappingListBucketsFieldsEnumLowerCase = map[string]ListBucketsFieldsEnum{ + "tags": ListBucketsFieldsTags, +} + +// GetListBucketsFieldsEnumValues Enumerates the set of values for ListBucketsFieldsEnum +func GetListBucketsFieldsEnumValues() []ListBucketsFieldsEnum { + values := make([]ListBucketsFieldsEnum, 0) + for _, v := range mappingListBucketsFieldsEnum { + values = append(values, v) + } + return values +} + +// GetListBucketsFieldsEnumStringValues Enumerates the set of values in String for ListBucketsFieldsEnum +func GetListBucketsFieldsEnumStringValues() []string { + return []string{ + "tags", + } +} + +// GetMappingListBucketsFieldsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBucketsFieldsEnum(val string) (ListBucketsFieldsEnum, bool) { + enum, ok := mappingListBucketsFieldsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_multipart_upload_parts_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_multipart_upload_parts_request_response.go new file mode 100644 index 000000000..cd461d975 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_multipart_upload_parts_request_response.go @@ -0,0 +1,167 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListMultipartUploadPartsRequest wrapper for the ListMultipartUploadParts operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListMultipartUploadParts.go.html to see an example of how to use ListMultipartUploadPartsRequest. +type ListMultipartUploadPartsRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. Avoid entering confidential information. + // Example: `test/object1.log` + ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` + + // The upload ID for a multipart upload. + UploadId *string `mandatory:"true" contributesTo:"query" name:"uploadId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. For important + // details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListMultipartUploadPartsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListMultipartUploadPartsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListMultipartUploadPartsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ListMultipartUploadPartsRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["objectName"] != nil { + templateParam := mandatoryParamMap["objectName"] + for _, template := range templateParam { + replacementParam := *request.ObjectName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["uploadId"] != nil { + templateParam := mandatoryParamMap["uploadId"] + for _, template := range templateParam { + replacementParam := *request.UploadId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListMultipartUploadPartsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListMultipartUploadPartsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListMultipartUploadPartsResponse wrapper for the ListMultipartUploadParts operation +type ListMultipartUploadPartsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []MultipartUploadPartSummary instances + Items []MultipartUploadPartSummary `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For paginating a list of multipart upload parts. + // In the GET request, set the limit to the number of multipart upload parts that you want returned in the + // response. If the `opc-next-page` header appears in the response, then this is a partial list and there are + // additional multipart upload parts to get. Include the header's value as the `page` parameter in the subsequent + // GET request to get the next batch of multipart upload parts. Repeat this process to retrieve the entire list + // of multipart upload parts. + // For more details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListMultipartUploadPartsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListMultipartUploadPartsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_multipart_uploads_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_multipart_uploads_request_response.go new file mode 100644 index 000000000..1af550a59 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_multipart_uploads_request_response.go @@ -0,0 +1,140 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListMultipartUploadsRequest wrapper for the ListMultipartUploads operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListMultipartUploads.go.html to see an example of how to use ListMultipartUploadsRequest. +type ListMultipartUploadsRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. For important + // details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListMultipartUploadsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListMultipartUploadsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListMultipartUploadsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ListMultipartUploadsRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListMultipartUploadsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListMultipartUploadsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListMultipartUploadsResponse wrapper for the ListMultipartUploads operation +type ListMultipartUploadsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []MultipartUpload instances + Items []MultipartUpload `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For paginating a list of multipart uploads. + // In the GET request, set the limit to the number of multipart uploads that you want returned in the response. + // If the `opc-next-page` header appears in the response, then this is a partial list and there are + // additional multipart uploads to get. Include the header's value as the `page` parameter in the subsequent + // GET request to get the next batch of objects. Repeat this process to retrieve the entire list of + // multipart uploads. + // For more details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListMultipartUploadsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListMultipartUploadsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_object_versions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_object_versions_request_response.go new file mode 100644 index 000000000..c282b5a65 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_object_versions_request_response.go @@ -0,0 +1,235 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListObjectVersionsRequest wrapper for the ListObjectVersions operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListObjectVersions.go.html to see an example of how to use ListObjectVersionsRequest. +type ListObjectVersionsRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The string to use for matching against the start of object names in a list query. + Prefix *string `mandatory:"false" contributesTo:"query" name:"prefix"` + + // Returns object names which are lexicographically greater than or equal to this parameter. + Start *string `mandatory:"false" contributesTo:"query" name:"start"` + + // Returns object names which are lexicographically strictly less than this parameter. + End *string `mandatory:"false" contributesTo:"query" name:"end"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // When this parameter is set, only objects whose names do not contain the delimiter character + // (after an optionally specified prefix) are returned in the objects key of the response body. + // Scanned objects whose names contain the delimiter have the part of their name up to the first + // occurrence of the delimiter (including the optional prefix) returned as a set of prefixes. + // Note that only '/' is a supported delimiter character at this time. + Delimiter *string `mandatory:"false" contributesTo:"query" name:"delimiter"` + + // Object summary by default includes only the 'name' field. Use this parameter to also + // include 'size' (object size in bytes), 'etag', 'md5', 'timeCreated' (object creation date and time), + // 'timeModified' (object modification date and time), 'storageTier' and 'archivalState' fields. + // Specify the value of this parameter as a comma-separated, case-insensitive list of those field names. + // For example 'name,etag,timeCreated,md5,timeModified,storageTier,archivalState'. + Fields ListObjectVersionsFieldsEnum `mandatory:"false" contributesTo:"query" name:"fields" omitEmpty:"true"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Returns object names which are lexicographically strictly greater than this parameter. + StartAfter *string `mandatory:"false" contributesTo:"query" name:"startAfter"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. For important + // details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListObjectVersionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListObjectVersionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListObjectVersionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ListObjectVersionsRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListObjectVersionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListObjectVersionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListObjectVersionsFieldsEnum(string(request.Fields)); !ok && request.Fields != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Fields: %s. Supported values are: %s.", request.Fields, strings.Join(GetListObjectVersionsFieldsEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListObjectVersionsResponse wrapper for the ListObjectVersions operation +type ListObjectVersionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ObjectVersionCollection instances + ObjectVersionCollection `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For paginating a list of object versions. + // In the GET request, set the limit to the number of object versions that you want returned in the response. + // If the `opc-next-page` header appears in the response, then this is a partial list and there are + // additional object versions to get. Include the header's value as the `page` parameter in the subsequent + // GET request to get the next batch of object versions and prefixes. Repeat this process to retrieve the entire list of + // object versions and prefixes. + // For more details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListObjectVersionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListObjectVersionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListObjectVersionsFieldsEnum Enum with underlying type: string +type ListObjectVersionsFieldsEnum string + +// Set of constants representing the allowable values for ListObjectVersionsFieldsEnum +const ( + ListObjectVersionsFieldsName ListObjectVersionsFieldsEnum = "name" + ListObjectVersionsFieldsSize ListObjectVersionsFieldsEnum = "size" + ListObjectVersionsFieldsEtag ListObjectVersionsFieldsEnum = "etag" + ListObjectVersionsFieldsTimecreated ListObjectVersionsFieldsEnum = "timeCreated" + ListObjectVersionsFieldsMd5 ListObjectVersionsFieldsEnum = "md5" + ListObjectVersionsFieldsTimemodified ListObjectVersionsFieldsEnum = "timeModified" + ListObjectVersionsFieldsStoragetier ListObjectVersionsFieldsEnum = "storageTier" + ListObjectVersionsFieldsArchivalstate ListObjectVersionsFieldsEnum = "archivalState" +) + +var mappingListObjectVersionsFieldsEnum = map[string]ListObjectVersionsFieldsEnum{ + "name": ListObjectVersionsFieldsName, + "size": ListObjectVersionsFieldsSize, + "etag": ListObjectVersionsFieldsEtag, + "timeCreated": ListObjectVersionsFieldsTimecreated, + "md5": ListObjectVersionsFieldsMd5, + "timeModified": ListObjectVersionsFieldsTimemodified, + "storageTier": ListObjectVersionsFieldsStoragetier, + "archivalState": ListObjectVersionsFieldsArchivalstate, +} + +var mappingListObjectVersionsFieldsEnumLowerCase = map[string]ListObjectVersionsFieldsEnum{ + "name": ListObjectVersionsFieldsName, + "size": ListObjectVersionsFieldsSize, + "etag": ListObjectVersionsFieldsEtag, + "timecreated": ListObjectVersionsFieldsTimecreated, + "md5": ListObjectVersionsFieldsMd5, + "timemodified": ListObjectVersionsFieldsTimemodified, + "storagetier": ListObjectVersionsFieldsStoragetier, + "archivalstate": ListObjectVersionsFieldsArchivalstate, +} + +// GetListObjectVersionsFieldsEnumValues Enumerates the set of values for ListObjectVersionsFieldsEnum +func GetListObjectVersionsFieldsEnumValues() []ListObjectVersionsFieldsEnum { + values := make([]ListObjectVersionsFieldsEnum, 0) + for _, v := range mappingListObjectVersionsFieldsEnum { + values = append(values, v) + } + return values +} + +// GetListObjectVersionsFieldsEnumStringValues Enumerates the set of values in String for ListObjectVersionsFieldsEnum +func GetListObjectVersionsFieldsEnumStringValues() []string { + return []string{ + "name", + "size", + "etag", + "timeCreated", + "md5", + "timeModified", + "storageTier", + "archivalState", + } +} + +// GetMappingListObjectVersionsFieldsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListObjectVersionsFieldsEnum(val string) (ListObjectVersionsFieldsEnum, bool) { + enum, ok := mappingListObjectVersionsFieldsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_objects.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_objects.go new file mode 100644 index 000000000..7c3aaae68 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_objects.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ListObjects To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type ListObjects struct { + + // An array of object summaries. + Objects []ObjectSummary `mandatory:"true" json:"objects"` + + // Prefixes that are common to the results returned by the request if the request specified a delimiter. + Prefixes []string `mandatory:"false" json:"prefixes"` + + // The name of the object to use in the `start` parameter to obtain the next page of + // a truncated ListObjects response. Avoid entering confidential information. + // Example: test/object1.log + NextStartWith *string `mandatory:"false" json:"nextStartWith"` +} + +func (m ListObjects) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ListObjects) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_objects_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_objects_request_response.go new file mode 100644 index 000000000..022c4728e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_objects_request_response.go @@ -0,0 +1,153 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListObjectsRequest wrapper for the ListObjects operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListObjects.go.html to see an example of how to use ListObjectsRequest. +type ListObjectsRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The string to use for matching against the start of object names in a list query. + Prefix *string `mandatory:"false" contributesTo:"query" name:"prefix"` + + // Returns object names which are lexicographically greater than or equal to this parameter. + Start *string `mandatory:"false" contributesTo:"query" name:"start"` + + // Returns object names which are lexicographically strictly less than this parameter. + End *string `mandatory:"false" contributesTo:"query" name:"end"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // When this parameter is set, only objects whose names do not contain the delimiter character + // (after an optionally specified prefix) are returned in the objects key of the response body. + // Scanned objects whose names contain the delimiter have the part of their name up to the first + // occurrence of the delimiter (including the optional prefix) returned as a set of prefixes. + // Note that only '/' is a supported delimiter character at this time. + Delimiter *string `mandatory:"false" contributesTo:"query" name:"delimiter"` + + // Object summary by default includes only the 'name' field. Use this parameter to also + // include 'size' (object size in bytes), 'etag', 'md5', 'timeCreated' (object creation date and time), + // 'timeModified' (object modification date and time), 'storageTier' and 'archivalState' fields. + // Specify the value of this parameter as a comma-separated, case-insensitive list of those field names. + // For example 'name,etag,timeCreated,md5,timeModified,storageTier,archivalState'. + Fields *string `mandatory:"false" contributesTo:"query" name:"fields" omitEmpty:"true"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Returns object names which are lexicographically strictly greater than this parameter. + StartAfter *string `mandatory:"false" contributesTo:"query" name:"startAfter"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListObjectsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListObjectsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListObjectsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ListObjectsRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListObjectsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListObjectsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListObjectsResponse wrapper for the ListObjects operation +type ListObjectsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ListObjects instance + ListObjects `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListObjectsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListObjectsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_preauthenticated_requests_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_preauthenticated_requests_request_response.go new file mode 100644 index 000000000..7cb9453e8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_preauthenticated_requests_request_response.go @@ -0,0 +1,143 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPreauthenticatedRequestsRequest wrapper for the ListPreauthenticatedRequests operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListPreauthenticatedRequests.go.html to see an example of how to use ListPreauthenticatedRequestsRequest. +type ListPreauthenticatedRequestsRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // User-specified object name prefixes can be used to query and return a list of pre-authenticated requests. + ObjectNamePrefix *string `mandatory:"false" contributesTo:"query" name:"objectNamePrefix"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. For important + // details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPreauthenticatedRequestsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPreauthenticatedRequestsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPreauthenticatedRequestsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ListPreauthenticatedRequestsRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPreauthenticatedRequestsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPreauthenticatedRequestsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPreauthenticatedRequestsResponse wrapper for the ListPreauthenticatedRequests operation +type ListPreauthenticatedRequestsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []PreauthenticatedRequestSummary instances + Items []PreauthenticatedRequestSummary `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For paginating a list of pre-authenticated requests. + // In the GET request, set the limit to the number of pre-authenticated requests that you want returned in + // the response. If the `opc-next-page` header appears in the response, then this is a partial list and there + // are additional pre-authenticated requests to get. Include the header's value as the `page` parameter in + // the subsequent GET request to get the next batch of pre-authenticated requests. Repeat this process to + // retrieve the entire list of pre-authenticated requests. + // For more details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPreauthenticatedRequestsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPreauthenticatedRequestsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_private_endpoints_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_private_endpoints_request_response.go new file mode 100644 index 000000000..880b2a577 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_private_endpoints_request_response.go @@ -0,0 +1,195 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPrivateEndpointsRequest wrapper for the ListPrivateEndpoints operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListPrivateEndpoints.go.html to see an example of how to use ListPrivateEndpointsRequest. +type ListPrivateEndpointsRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The ID of the compartment in which to list buckets. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. For important + // details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // PrivateEndpoint summary in list of PrivateEndpoints includes the 'namespace', 'name', 'compartmentId', + // 'createdBy', 'timeCreated', 'timeModified' and 'etag' fields. + // This parameter can also include 'tags' (freeformTags and definedTags). + // The only supported value of this parameter is 'tags' for now. Example 'tags'. + Fields []ListPrivateEndpointsFieldsEnum `contributesTo:"query" name:"fields" omitEmpty:"true" collectionFormat:"csv"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // The lifecycle state of the Private Endpoint + LifecycleState PrivateEndpointLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPrivateEndpointsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPrivateEndpointsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPrivateEndpointsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ListPrivateEndpointsRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["compartmentId"] != nil { + templateParam := mandatoryParamMap["compartmentId"] + for _, template := range templateParam { + replacementParam := *request.CompartmentId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPrivateEndpointsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPrivateEndpointsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.Fields { + if _, ok := GetMappingListPrivateEndpointsFieldsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Fields: %s. Supported values are: %s.", val, strings.Join(GetListPrivateEndpointsFieldsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingPrivateEndpointLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetPrivateEndpointLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPrivateEndpointsResponse wrapper for the ListPrivateEndpoints operation +type ListPrivateEndpointsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []PrivateEndpointSummary instances + Items []PrivateEndpointSummary `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For paginating a list of PEs. + // In the GET request, set the limit to the number of Private Endpoint items that you want returned in the response. + // If the `opc-next-page` header appears in the response, then this is a partial list and there are additional + // Private Endpoint's to get. Include the header's value as the `page` parameter in the subsequent GET request to get the + // next batch of PEs. Repeat this process to retrieve the entire list of Private Endpoint's. + // By default, the page limit is set to 25 Private Endpoint's per page, but you can specify a value from 1 to 1000. + // For more details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPrivateEndpointsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPrivateEndpointsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPrivateEndpointsFieldsEnum Enum with underlying type: string +type ListPrivateEndpointsFieldsEnum string + +// Set of constants representing the allowable values for ListPrivateEndpointsFieldsEnum +const ( + ListPrivateEndpointsFieldsTags ListPrivateEndpointsFieldsEnum = "tags" +) + +var mappingListPrivateEndpointsFieldsEnum = map[string]ListPrivateEndpointsFieldsEnum{ + "tags": ListPrivateEndpointsFieldsTags, +} + +var mappingListPrivateEndpointsFieldsEnumLowerCase = map[string]ListPrivateEndpointsFieldsEnum{ + "tags": ListPrivateEndpointsFieldsTags, +} + +// GetListPrivateEndpointsFieldsEnumValues Enumerates the set of values for ListPrivateEndpointsFieldsEnum +func GetListPrivateEndpointsFieldsEnumValues() []ListPrivateEndpointsFieldsEnum { + values := make([]ListPrivateEndpointsFieldsEnum, 0) + for _, v := range mappingListPrivateEndpointsFieldsEnum { + values = append(values, v) + } + return values +} + +// GetListPrivateEndpointsFieldsEnumStringValues Enumerates the set of values in String for ListPrivateEndpointsFieldsEnum +func GetListPrivateEndpointsFieldsEnumStringValues() []string { + return []string{ + "tags", + } +} + +// GetMappingListPrivateEndpointsFieldsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPrivateEndpointsFieldsEnum(val string) (ListPrivateEndpointsFieldsEnum, bool) { + enum, ok := mappingListPrivateEndpointsFieldsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_replication_policies_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_replication_policies_request_response.go new file mode 100644 index 000000000..b6eb07972 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_replication_policies_request_response.go @@ -0,0 +1,139 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListReplicationPoliciesRequest wrapper for the ListReplicationPolicies operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListReplicationPolicies.go.html to see an example of how to use ListReplicationPoliciesRequest. +type ListReplicationPoliciesRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. For important + // details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListReplicationPoliciesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListReplicationPoliciesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListReplicationPoliciesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ListReplicationPoliciesRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListReplicationPoliciesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListReplicationPoliciesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListReplicationPoliciesResponse wrapper for the ListReplicationPolicies operation +type ListReplicationPoliciesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ReplicationPolicySummary instances + Items []ReplicationPolicySummary `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // For paginating a list of replication policies. + // In the GET request, set the limit to the number of buckets items that you want returned in the response. + // If the `opc-next-page` header appears in the response, then this is a partial list and there are additional + // policies to get. Include the header's value as the `page` parameter in the subsequent GET request to get the + // next batch of policies. Repeat this process to retrieve the entire list of policies. + // For more details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListReplicationPoliciesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListReplicationPoliciesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_replication_sources_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_replication_sources_request_response.go new file mode 100644 index 000000000..54ce65887 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_replication_sources_request_response.go @@ -0,0 +1,139 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListReplicationSourcesRequest wrapper for the ListReplicationSources operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListReplicationSources.go.html to see an example of how to use ListReplicationSourcesRequest. +type ListReplicationSourcesRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. For important + // details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListReplicationSourcesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListReplicationSourcesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListReplicationSourcesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ListReplicationSourcesRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListReplicationSourcesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListReplicationSourcesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListReplicationSourcesResponse wrapper for the ListReplicationSources operation +type ListReplicationSourcesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ReplicationSource instances + Items []ReplicationSource `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // For paginating a list of replication sources. + // In the GET request, set the limit to the number of items that you want returned in the response. + // If the `opc-next-page` header appears in the response, then this is a partial list and there are additional + // policies to get. Include the header's value as the `page` parameter in the subsequent GET request to get the + // next batch of policies. Repeat this process to retrieve the entire list of sources. + // For more details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListReplicationSourcesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListReplicationSourcesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_retention_rules_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_retention_rules_request_response.go new file mode 100644 index 000000000..8cba85e84 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_retention_rules_request_response.go @@ -0,0 +1,135 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListRetentionRulesRequest wrapper for the ListRetentionRules operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListRetentionRules.go.html to see an example of how to use ListRetentionRulesRequest. +type ListRetentionRulesRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. For important + // details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListRetentionRulesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListRetentionRulesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListRetentionRulesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ListRetentionRulesRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListRetentionRulesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListRetentionRulesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListRetentionRulesResponse wrapper for the ListRetentionRules operation +type ListRetentionRulesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of RetentionRuleCollection instances + RetentionRuleCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Paginating a list of retention rules. + // If the `opc-next-page` header appears in the response, it indicates that this is a partial list + // of retention rules and there are additional rules to get. Include the value of this header as + // the `page` parameter in a subsequent GET request to get the next set of retention rules. + // Repeat this process to retrieve the entire list of retention rules. + // For more details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListRetentionRulesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListRetentionRulesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_work_request_errors_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_work_request_errors_request_response.go new file mode 100644 index 000000000..c65cac170 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_work_request_errors_request_response.go @@ -0,0 +1,126 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestErrorsRequest wrapper for the ListWorkRequestErrors operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrorsRequest. +type ListWorkRequestErrorsRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. For important + // details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestErrorsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestErrorsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestErrorsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ListWorkRequestErrorsRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["workRequestId"] != nil { + templateParam := mandatoryParamMap["workRequestId"] + for _, template := range templateParam { + replacementParam := *request.WorkRequestId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestErrorsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestErrorsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestErrorsResponse wrapper for the ListWorkRequestErrors operation +type ListWorkRequestErrorsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []WorkRequestError instances + Items []WorkRequestError `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For paginating a list of work request errors. + // In the GET request, set the limit to the number of work request errors that you want returned in the + // response. If the `opc-next-page` header appears in the response, then this is a partial list and there are + // additional work request errors to get. Include the header's value as the `page` parameter in the subsequent + // GET request to get the next batch of work request errors. Repeat this process to retrieve the entire list of work + // request errors. + // For more details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` +} + +func (response ListWorkRequestErrorsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestErrorsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_work_request_logs_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_work_request_logs_request_response.go new file mode 100644 index 000000000..f8f6f2c2f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_work_request_logs_request_response.go @@ -0,0 +1,126 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestLogsRequest wrapper for the ListWorkRequestLogs operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogsRequest. +type ListWorkRequestLogsRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. For important + // details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestLogsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestLogsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestLogsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ListWorkRequestLogsRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["workRequestId"] != nil { + templateParam := mandatoryParamMap["workRequestId"] + for _, template := range templateParam { + replacementParam := *request.WorkRequestId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestLogsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestLogsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestLogsResponse wrapper for the ListWorkRequestLogs operation +type ListWorkRequestLogsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []WorkRequestLogEntry instances + Items []WorkRequestLogEntry `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // For paginating a list of work request logs. + // In the GET request, set the limit to the number of compartment work requests that you want returned in the + // response. If the `opc-next-page` header appears in the response, then this is a partial list and there are + // additional work requests to get. Include the header's value as the `page` parameter in the subsequent + // GET request to get the next batch of work requests. Repeat this process to retrieve the entire list of work + // requests. + // For more details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListWorkRequestLogsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestLogsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_work_requests_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_work_requests_request_response.go new file mode 100644 index 000000000..95fa3bebf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/list_work_requests_request_response.go @@ -0,0 +1,129 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestsRequest wrapper for the ListWorkRequests operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListWorkRequests.go.html to see an example of how to use ListWorkRequestsRequest. +type ListWorkRequestsRequest struct { + + // The ID of the compartment in which to list buckets. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the privateEndpoint for which to list work requests. + PrivateEndpointName *string `mandatory:"false" contributesTo:"query" name:"privateEndpointName"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. For important + // details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ListWorkRequestsRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["compartmentId"] != nil { + templateParam := mandatoryParamMap["compartmentId"] + for _, template := range templateParam { + replacementParam := *request.CompartmentId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestsResponse wrapper for the ListWorkRequests operation +type ListWorkRequestsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []WorkRequestSummary instances + Items []WorkRequestSummary `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For paginating a list of work requests. + // In the GET request, set the limit to the number of compartment work requests that you want returned in the + // response. If the `opc-next-page` header appears in the response, then this is a partial list and there are + // additional work requests to get. Include the header's value as the `page` parameter in the subsequent + // GET request to get the next batch of work requests. Repeat this process to retrieve the entire list of work + // requests. + // For more details about how pagination works, see List Pagination (https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` +} + +func (response ListWorkRequestsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/make_bucket_writable_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/make_bucket_writable_request_response.go new file mode 100644 index 000000000..a88806af1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/make_bucket_writable_request_response.go @@ -0,0 +1,119 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// MakeBucketWritableRequest wrapper for the MakeBucketWritable operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/MakeBucketWritable.go.html to see an example of how to use MakeBucketWritableRequest. +type MakeBucketWritableRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request MakeBucketWritableRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request MakeBucketWritableRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request MakeBucketWritableRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request MakeBucketWritableRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request MakeBucketWritableRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request MakeBucketWritableRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MakeBucketWritableResponse wrapper for the MakeBucketWritable operation +type MakeBucketWritableResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response MakeBucketWritableResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response MakeBucketWritableResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/multipart_upload.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/multipart_upload.go new file mode 100644 index 000000000..ba77364d0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/multipart_upload.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MultipartUpload Multipart uploads provide efficient and resilient uploads, especially for large objects. Multipart uploads also accommodate +// objects that are too large for a single upload operation. With multipart uploads, individual parts of an object can be +// uploaded in parallel to reduce the amount of time you spend uploading. Multipart uploads can also minimize the impact +// of network failures by letting you retry a failed part upload instead of requiring you to retry an entire object upload. +// See Using Multipart Uploads (https://docs.oracle.com/iaas/Content/Object/Tasks/usingmultipartuploads.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type MultipartUpload struct { + + // The Object Storage namespace in which the in-progress multipart upload is stored. + Namespace *string `mandatory:"true" json:"namespace"` + + // The bucket in which the in-progress multipart upload is stored. + Bucket *string `mandatory:"true" json:"bucket"` + + // The object name of the in-progress multipart upload. + Object *string `mandatory:"true" json:"object"` + + // The unique identifier for the in-progress multipart upload. + UploadId *string `mandatory:"true" json:"uploadId"` + + // The date and time the upload was created, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The storage tier that the object is stored in. + StorageTier StorageTierEnum `mandatory:"false" json:"storageTier,omitempty"` +} + +func (m MultipartUpload) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MultipartUpload) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingStorageTierEnum(string(m.StorageTier)); !ok && m.StorageTier != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for StorageTier: %s. Supported values are: %s.", m.StorageTier, strings.Join(GetStorageTierEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/multipart_upload_part_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/multipart_upload_part_summary.go new file mode 100644 index 000000000..929b88f55 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/multipart_upload_part_summary.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MultipartUploadPartSummary Gets summary information about multipart uploads. +// To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, +// see Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type MultipartUploadPartSummary struct { + + // The current entity tag (ETag) for the part. + Etag *string `mandatory:"true" json:"etag"` + + // The MD5 hash of the bytes of the part. + Md5 *string `mandatory:"true" json:"md5"` + + // The size of the part in bytes. + Size *int64 `mandatory:"true" json:"size"` + + // The part number for this part. + PartNumber *int `mandatory:"true" json:"partNumber"` +} + +func (m MultipartUploadPartSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MultipartUploadPartSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/namespace_metadata.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/namespace_metadata.go new file mode 100644 index 000000000..b51aa88b9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/namespace_metadata.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NamespaceMetadata NamespaceMetadata maps a namespace string to defaultS3CompartmentId and defaultSwiftCompartmentId values. +type NamespaceMetadata struct { + + // The Object Storage namespace to which the metadata belongs. + Namespace *string `mandatory:"true" json:"namespace"` + + // If the field is set, specifies the default compartment assignment for the Amazon S3 Compatibility API. + DefaultS3CompartmentId *string `mandatory:"true" json:"defaultS3CompartmentId"` + + // If the field is set, specifies the default compartment assignment for the Swift API. + DefaultSwiftCompartmentId *string `mandatory:"true" json:"defaultSwiftCompartmentId"` +} + +func (m NamespaceMetadata) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NamespaceMetadata) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_lifecycle_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_lifecycle_policy.go new file mode 100644 index 000000000..35e3ed8f8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_lifecycle_policy.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ObjectLifecyclePolicy The collection of lifecycle policy rules that together form the object lifecycle policy of a given bucket. +type ObjectLifecyclePolicy struct { + + // The date and time the object lifecycle policy was created, as described in + // RFC 3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The live lifecycle policy on the bucket. + // For an example of this value, see the + // PutObjectLifecyclePolicy API documentation (https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/ObjectLifecyclePolicy/PutObjectLifecyclePolicy). + Items []ObjectLifecycleRule `mandatory:"false" json:"items"` +} + +func (m ObjectLifecyclePolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ObjectLifecyclePolicy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_lifecycle_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_lifecycle_rule.go new file mode 100644 index 000000000..d4eb44db7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_lifecycle_rule.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ObjectLifecycleRule To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type ObjectLifecycleRule struct { + + // The name of the lifecycle rule to be applied. + Name *string `mandatory:"true" json:"name"` + + // The action of the object lifecycle policy rule. + // Rules using the action 'ARCHIVE' move objects from Standard and InfrequentAccess storage tiers + // into the Archive storage tier (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). + // Rules using the action 'INFREQUENT_ACCESS' move objects from Standard storage tier into the + // Infrequent Access Storage tier. Objects that are already in InfrequentAccess tier or in Archive + // tier are left untouched. + // Rules using the action 'DELETE' permanently delete objects from buckets. + // Rules using 'ABORT' abort the uncommitted multipart-uploads and permanently delete their parts from buckets. + Action *string `mandatory:"true" json:"action"` + + // Specifies the age of objects to apply the rule to. The timeAmount is interpreted in units defined by the + // timeUnit parameter, and is calculated in relation to each object's Last-Modified time. + TimeAmount *int64 `mandatory:"true" json:"timeAmount"` + + // The unit that should be used to interpret timeAmount. Days are defined as starting and ending at midnight UTC. + // Years are defined as 365.2425 days long and likewise round up to the next midnight UTC. + TimeUnit ObjectLifecycleRuleTimeUnitEnum `mandatory:"true" json:"timeUnit"` + + // A Boolean that determines whether this rule is currently enabled. + IsEnabled *bool `mandatory:"true" json:"isEnabled"` + + // The target of the object lifecycle policy rule. The values of target can be either "objects", + // "multipart-uploads" or "previous-object-versions". + // This field when declared as "objects" is used to specify ARCHIVE, INFREQUENT_ACCESS + // or DELETE rule for objects. + // This field when declared as "previous-object-versions" is used to specify ARCHIVE, + // INFREQUENT_ACCESS or DELETE rule for previous versions of existing objects. + // This field when declared as "multipart-uploads" is used to specify the ABORT (only) rule for + // uncommitted multipart-uploads. + Target *string `mandatory:"false" json:"target"` + + ObjectNameFilter *ObjectNameFilter `mandatory:"false" json:"objectNameFilter"` +} + +func (m ObjectLifecycleRule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ObjectLifecycleRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingObjectLifecycleRuleTimeUnitEnum(string(m.TimeUnit)); !ok && m.TimeUnit != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TimeUnit: %s. Supported values are: %s.", m.TimeUnit, strings.Join(GetObjectLifecycleRuleTimeUnitEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ObjectLifecycleRuleTimeUnitEnum Enum with underlying type: string +type ObjectLifecycleRuleTimeUnitEnum string + +// Set of constants representing the allowable values for ObjectLifecycleRuleTimeUnitEnum +const ( + ObjectLifecycleRuleTimeUnitDays ObjectLifecycleRuleTimeUnitEnum = "DAYS" + ObjectLifecycleRuleTimeUnitYears ObjectLifecycleRuleTimeUnitEnum = "YEARS" +) + +var mappingObjectLifecycleRuleTimeUnitEnum = map[string]ObjectLifecycleRuleTimeUnitEnum{ + "DAYS": ObjectLifecycleRuleTimeUnitDays, + "YEARS": ObjectLifecycleRuleTimeUnitYears, +} + +var mappingObjectLifecycleRuleTimeUnitEnumLowerCase = map[string]ObjectLifecycleRuleTimeUnitEnum{ + "days": ObjectLifecycleRuleTimeUnitDays, + "years": ObjectLifecycleRuleTimeUnitYears, +} + +// GetObjectLifecycleRuleTimeUnitEnumValues Enumerates the set of values for ObjectLifecycleRuleTimeUnitEnum +func GetObjectLifecycleRuleTimeUnitEnumValues() []ObjectLifecycleRuleTimeUnitEnum { + values := make([]ObjectLifecycleRuleTimeUnitEnum, 0) + for _, v := range mappingObjectLifecycleRuleTimeUnitEnum { + values = append(values, v) + } + return values +} + +// GetObjectLifecycleRuleTimeUnitEnumStringValues Enumerates the set of values in String for ObjectLifecycleRuleTimeUnitEnum +func GetObjectLifecycleRuleTimeUnitEnumStringValues() []string { + return []string{ + "DAYS", + "YEARS", + } +} + +// GetMappingObjectLifecycleRuleTimeUnitEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingObjectLifecycleRuleTimeUnitEnum(val string) (ObjectLifecycleRuleTimeUnitEnum, bool) { + enum, ok := mappingObjectLifecycleRuleTimeUnitEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_name_filter.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_name_filter.go new file mode 100644 index 000000000..390626bdf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_name_filter.go @@ -0,0 +1,84 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ObjectNameFilter A filter that compares object names to a set of prefixes or patterns to determine if a rule applies to a +// given object. The filter can contain include glob patterns, exclude glob patterns and inclusion prefixes. +// The inclusion prefixes property is kept for backward compatibility. It is recommended to use inclusion patterns +// instead of prefixes. Exclusions take precedence over inclusions. +type ObjectNameFilter struct { + + // An array of glob patterns to match the object names to include. An empty array includes all objects in the + // bucket. Exclusion patterns take precedence over inclusion patterns. + // A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other + // than the special pattern characters described below, matches itself. + // Glob patterns must be between 1 and 1024 characters. + // The special pattern characters have the following meanings: + // \ Escapes the following character + // * Matches any string of characters. + // ? Matches any single character . + // [...] Matches a group of characters. A group of characters can be: + // A set of characters, for example: [Zafg9@]. This matches any character in the brackets. + // A range of characters, for example: [a-z]. This matches any character in the range. + // [a-f] is equivalent to [abcdef]. + // For character ranges only the CHARACTER-CHARACTER pattern is supported. + // [ab-yz] is not valid + // [a-mn-z] is not valid + // Character ranges can not start with ^ or : + // To include a '-' in the range, make it the first or last character. + InclusionPatterns []string `mandatory:"false" json:"inclusionPatterns"` + + // An array of glob patterns to match the object names to exclude. An empty array is ignored. Exclusion + // patterns take precedence over inclusion patterns. + // A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other + // than the special pattern characters described below, matches itself. + // Glob patterns must be between 1 and 1024 characters. + // The special pattern characters have the following meanings: + // \ Escapes the following character + // * Matches any string of characters. + // ? Matches any single character . + // [...] Matches a group of characters. A group of characters can be: + // A set of characters, for example: [Zafg9@]. This matches any character in the brackets. + // A range of characters, for example: [a-z]. This matches any character in the range. + // [a-f] is equivalent to [abcdef]. + // For character ranges only the CHARACTER-CHARACTER pattern is supported. + // [ab-yz] is not valid + // [a-mn-z] is not valid + // Character ranges can not start with ^ or : + // To include a '-' in the range, make it the first or last character. + ExclusionPatterns []string `mandatory:"false" json:"exclusionPatterns"` + + // An array of object name prefixes that the rule will apply to. An empty array means to include all objects. + InclusionPrefixes []string `mandatory:"false" json:"inclusionPrefixes"` +} + +func (m ObjectNameFilter) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ObjectNameFilter) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_summary.go new file mode 100644 index 000000000..ee2d58ff3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_summary.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ObjectSummary To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type ObjectSummary struct { + + // The name of the object. Avoid entering confidential information. + // Example: test/object1.log + Name *string `mandatory:"true" json:"name"` + + // Size of the object in bytes. + Size *int64 `mandatory:"false" json:"size"` + + // Base64-encoded MD5 hash of the object data. + Md5 *string `mandatory:"false" json:"md5"` + + // The date and time the object was created, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The current entity tag (ETag) for the object. + Etag *string `mandatory:"false" json:"etag"` + + // The storage tier that the object is stored in. + StorageTier StorageTierEnum `mandatory:"false" json:"storageTier,omitempty"` + + // Archival state of an object. This field is set only for objects in Archive tier. + ArchivalState ArchivalStateEnum `mandatory:"false" json:"archivalState,omitempty"` + + // The date and time the object was modified, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. + TimeModified *common.SDKTime `mandatory:"false" json:"timeModified"` +} + +func (m ObjectSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ObjectSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingStorageTierEnum(string(m.StorageTier)); !ok && m.StorageTier != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for StorageTier: %s. Supported values are: %s.", m.StorageTier, strings.Join(GetStorageTierEnumStringValues(), ","))) + } + if _, ok := GetMappingArchivalStateEnum(string(m.ArchivalState)); !ok && m.ArchivalState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ArchivalState: %s. Supported values are: %s.", m.ArchivalState, strings.Join(GetArchivalStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_version_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_version_collection.go new file mode 100644 index 000000000..014a47f23 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_version_collection.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ObjectVersionCollection To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type ObjectVersionCollection struct { + + // An array of object version summaries. + Items []ObjectVersionSummary `mandatory:"true" json:"items"` + + // Prefixes that are common to the results returned by the request if the request specified a delimiter. + Prefixes []string `mandatory:"false" json:"prefixes"` +} + +func (m ObjectVersionCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ObjectVersionCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_version_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_version_summary.go new file mode 100644 index 000000000..3d0180f3b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/object_version_summary.go @@ -0,0 +1,77 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ObjectVersionSummary To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type ObjectVersionSummary struct { + + // The name of the object. Avoid entering confidential information. + // Example: test/object1.log + Name *string `mandatory:"true" json:"name"` + + // The date and time the object was modified, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616#section-14.29). + TimeModified *common.SDKTime `mandatory:"true" json:"timeModified"` + + // VersionId of the object. + VersionId *string `mandatory:"true" json:"versionId"` + + // This flag will indicate if the version is deleted or not. + IsDeleteMarker *bool `mandatory:"true" json:"isDeleteMarker"` + + // Size of the object in bytes. + Size *int64 `mandatory:"false" json:"size"` + + // Base64-encoded MD5 hash of the object data. + Md5 *string `mandatory:"false" json:"md5"` + + // The date and time the object was created, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The current entity tag (ETag) for the object. + Etag *string `mandatory:"false" json:"etag"` + + // The storage tier that the object is stored in. + StorageTier StorageTierEnum `mandatory:"false" json:"storageTier,omitempty"` + + // Archival state of an object. This field is set only for objects in Archive tier. + ArchivalState ArchivalStateEnum `mandatory:"false" json:"archivalState,omitempty"` +} + +func (m ObjectVersionSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ObjectVersionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingStorageTierEnum(string(m.StorageTier)); !ok && m.StorageTier != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for StorageTier: %s. Supported values are: %s.", m.StorageTier, strings.Join(GetStorageTierEnumStringValues(), ","))) + } + if _, ok := GetMappingArchivalStateEnum(string(m.ArchivalState)); !ok && m.ArchivalState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ArchivalState: %s. Supported values are: %s.", m.ArchivalState, strings.Join(GetArchivalStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/objectstorage_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/objectstorage_client.go new file mode 100644 index 000000000..2b5e053a5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/objectstorage_client.go @@ -0,0 +1,3889 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" + + "regexp" +) + +// ObjectStorageClient a client for ObjectStorage +type ObjectStorageClient struct { + common.BaseClient + config *common.ConfigurationProvider + requiredParamsInEndpoint map[string][]common.TemplateParamForPerRealmEndpoint +} + +// NewObjectStorageClientWithConfigurationProvider Creates a new default ObjectStorage client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewObjectStorageClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ObjectStorageClient, err error) { + if enabled := common.CheckForEnabledServices("objectstorage"); !enabled { + return client, fmt.Errorf("the Developer Tool configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local developer-tool-configuration.json file configured the service you're targeting or contact the cloud provider on the availability of this service") + } + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newObjectStorageClientFromBaseClient(baseClient, provider) +} + +// NewObjectStorageClientWithOboToken Creates a new default ObjectStorage client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// +// as well as reading the region +func NewObjectStorageClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client ObjectStorageClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newObjectStorageClientFromBaseClient(baseClient, configProvider) +} + +func newObjectStorageClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client ObjectStorageClient, err error) { + // ObjectStorage service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("ObjectStorage")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = ObjectStorageClient{BaseClient: baseClient} + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *ObjectStorageClient) SetRegion(region string) { + client.Host, _ = common.StringToRegion(region).EndpointForTemplateDottedRegion("objectstorage", client.getEndpointTemplatePerRealm(region), "objectstorage") + client.parseEndpointTemplatePerRealm() +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *ObjectStorageClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *ObjectStorageClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// getEndpointTemplatePerRealm returns the endpoint template for the given region, if not found, returns the default endpoint template +func (client *ObjectStorageClient) getEndpointTemplatePerRealm(region string) string { + if client.IsOciRealmSpecificServiceEndpointTemplateEnabled() { + realm, _ := common.StringToRegion(region).RealmID() + templatePerRealmDict := map[string]string{ + "oc1": "https://{namespaceName+Dot}objectstorage.{region}.oci.customer-oci.com", + } + if template, ok := templatePerRealmDict[realm]; ok { + return template + } + } + return "https://objectstorage.{region}.{secondLevelDomain}" +} + +// parseEndpointTemplatePerRealm parses the endpoint template per realm from the service endpoint template +// This function will build a map of template params to their values, this map is used when building the API endpoint +func (client *ObjectStorageClient) parseEndpointTemplatePerRealm() { + client.requiredParamsInEndpoint = make(map[string][]common.TemplateParamForPerRealmEndpoint) + templateRegex := regexp.MustCompile(`{.*?}`) + templateSubRegex := regexp.MustCompile(`{(.+)\+Dot}`) + templates := templateRegex.FindAllString(client.Host, -1) + for _, template := range templates { + templateParam := templateSubRegex.FindStringSubmatch(template) + if len(templateParam) > 1 { + client.requiredParamsInEndpoint[templateParam[1]] = append(client.requiredParamsInEndpoint[templateParam[1]], common.TemplateParamForPerRealmEndpoint{ + Template: templateParam[0], + EndsWithDot: true, + }) + } else { + templateParam := template[1 : len(template)-1] + client.requiredParamsInEndpoint[templateParam] = append(client.requiredParamsInEndpoint[templateParam], common.TemplateParamForPerRealmEndpoint{ + Template: template, + EndsWithDot: false, + }) + } + } +} + +// SetCustomClientConfiguration sets client with retry and other custom configurations +func (client *ObjectStorageClient) SetCustomClientConfiguration(config common.CustomClientConfiguration) { + client.Configuration = config + client.refreshRegion() +} + +// refreshRegion will refresh the region of this client, this function will be called after setting the CustomClientConfiguration +func (client *ObjectStorageClient) refreshRegion() { + configProvider := *client.config + region, _ := configProvider.Region() + client.SetRegion(region) +} + +// AbortMultipartUpload Aborts an in-progress multipart upload and deletes all parts that have been uploaded. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/AbortMultipartUpload.go.html to see an example of how to use AbortMultipartUpload API. +// A default retry strategy applies to this operation AbortMultipartUpload() +func (client ObjectStorageClient) AbortMultipartUpload(ctx context.Context, request AbortMultipartUploadRequest) (response AbortMultipartUploadResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.abortMultipartUpload, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = AbortMultipartUploadResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = AbortMultipartUploadResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(AbortMultipartUploadResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into AbortMultipartUploadResponse") + } + return +} + +// abortMultipartUpload implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) abortMultipartUpload(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/u/{objectName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(AbortMultipartUploadRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response AbortMultipartUploadResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "AbortMultipartUpload") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/MultipartUpload/AbortMultipartUpload" + err = common.PostProcessServiceError(err, "ObjectStorage", "AbortMultipartUpload", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// BatchDeleteObjects Deletes a batch of objects. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/BatchDeleteObjects.go.html to see an example of how to use BatchDeleteObjects API. +// A default retry strategy applies to this operation BatchDeleteObjects() +func (client ObjectStorageClient) BatchDeleteObjects(ctx context.Context, request BatchDeleteObjectsRequest) (response BatchDeleteObjectsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.batchDeleteObjects, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = BatchDeleteObjectsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = BatchDeleteObjectsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(BatchDeleteObjectsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into BatchDeleteObjectsResponse") + } + return +} + +// batchDeleteObjects implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) batchDeleteObjects(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/actions/batchDeleteObjects", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(BatchDeleteObjectsRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response BatchDeleteObjectsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "BatchDeleteObjects") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/BatchDeleteObjects" + err = common.PostProcessServiceError(err, "ObjectStorage", "BatchDeleteObjects", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CancelWorkRequest Cancels a work request. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CancelWorkRequest.go.html to see an example of how to use CancelWorkRequest API. +// A default retry strategy applies to this operation CancelWorkRequest() +func (client ObjectStorageClient) CancelWorkRequest(ctx context.Context, request CancelWorkRequestRequest) (response CancelWorkRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.cancelWorkRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CancelWorkRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CancelWorkRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CancelWorkRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CancelWorkRequestResponse") + } + return +} + +// cancelWorkRequest implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) cancelWorkRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/workRequests/{workRequestId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(CancelWorkRequestRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CancelWorkRequestResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "CancelWorkRequest") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/WorkRequest/CancelWorkRequest" + err = common.PostProcessServiceError(err, "ObjectStorage", "CancelWorkRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CommitMultipartUpload Commits a multipart upload, which involves checking part numbers and entity tags (ETags) of the parts, to create an aggregate object. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CommitMultipartUpload.go.html to see an example of how to use CommitMultipartUpload API. +// A default retry strategy applies to this operation CommitMultipartUpload() +func (client ObjectStorageClient) CommitMultipartUpload(ctx context.Context, request CommitMultipartUploadRequest) (response CommitMultipartUploadResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.commitMultipartUpload, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CommitMultipartUploadResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CommitMultipartUploadResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CommitMultipartUploadResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CommitMultipartUploadResponse") + } + return +} + +// commitMultipartUpload implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) commitMultipartUpload(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/u/{objectName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(CommitMultipartUploadRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CommitMultipartUploadResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "CommitMultipartUpload") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/MultipartUpload/CommitMultipartUpload" + err = common.PostProcessServiceError(err, "ObjectStorage", "CommitMultipartUpload", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CopyObject Creates a request to copy an object within a region or to another region. +// See Object Names (https://docs.oracle.com/iaas/Content/Object/Tasks/managingobjects.htm#namerequirements) +// for object naming requirements. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CopyObject.go.html to see an example of how to use CopyObject API. +// A default retry strategy applies to this operation CopyObject() +func (client ObjectStorageClient) CopyObject(ctx context.Context, request CopyObjectRequest) (response CopyObjectResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.copyObject, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CopyObjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CopyObjectResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CopyObjectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CopyObjectResponse") + } + return +} + +// copyObject implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) copyObject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/actions/copyObject", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(CopyObjectRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CopyObjectResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "CopyObject") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/CopyObject" + err = common.PostProcessServiceError(err, "ObjectStorage", "CopyObject", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateBucket Creates a bucket in the given namespace with a bucket name and optional user-defined metadata. Avoid entering +// confidential information in bucket names. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CreateBucket.go.html to see an example of how to use CreateBucket API. +// A default retry strategy applies to this operation CreateBucket() +func (client ObjectStorageClient) CreateBucket(ctx context.Context, request CreateBucketRequest) (response CreateBucketResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createBucket, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateBucketResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateBucketResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateBucketResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateBucketResponse") + } + return +} + +// createBucket implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) createBucket(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(CreateBucketRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateBucketResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "CreateBucket") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Bucket/CreateBucket" + err = common.PostProcessServiceError(err, "ObjectStorage", "CreateBucket", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMultipartUpload Starts a new multipart upload to a specific object in the given bucket in the given namespace. +// See Object Names (https://docs.oracle.com/iaas/Content/Object/Tasks/managingobjects.htm#namerequirements) +// for object naming requirements. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CreateMultipartUpload.go.html to see an example of how to use CreateMultipartUpload API. +// A default retry strategy applies to this operation CreateMultipartUpload() +func (client ObjectStorageClient) CreateMultipartUpload(ctx context.Context, request CreateMultipartUploadRequest) (response CreateMultipartUploadResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createMultipartUpload, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMultipartUploadResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMultipartUploadResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMultipartUploadResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMultipartUploadResponse") + } + return +} + +// createMultipartUpload implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) createMultipartUpload(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/u", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(CreateMultipartUploadRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateMultipartUploadResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "CreateMultipartUpload") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/MultipartUpload/CreateMultipartUpload" + err = common.PostProcessServiceError(err, "ObjectStorage", "CreateMultipartUpload", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreatePreauthenticatedRequest Creates a pre-authenticated request specific to the bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CreatePreauthenticatedRequest.go.html to see an example of how to use CreatePreauthenticatedRequest API. +// A default retry strategy applies to this operation CreatePreauthenticatedRequest() +func (client ObjectStorageClient) CreatePreauthenticatedRequest(ctx context.Context, request CreatePreauthenticatedRequestRequest) (response CreatePreauthenticatedRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createPreauthenticatedRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreatePreauthenticatedRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreatePreauthenticatedRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreatePreauthenticatedRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePreauthenticatedRequestResponse") + } + return +} + +// createPreauthenticatedRequest implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) createPreauthenticatedRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/p", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(CreatePreauthenticatedRequestRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreatePreauthenticatedRequestResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "CreatePreauthenticatedRequest") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PreauthenticatedRequest/CreatePreauthenticatedRequest" + err = common.PostProcessServiceError(err, "ObjectStorage", "CreatePreauthenticatedRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreatePrivateEndpoint Create a PrivateEndpoint. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CreatePrivateEndpoint.go.html to see an example of how to use CreatePrivateEndpoint API. +// A default retry strategy applies to this operation CreatePrivateEndpoint() +func (client ObjectStorageClient) CreatePrivateEndpoint(ctx context.Context, request CreatePrivateEndpointRequest) (response CreatePrivateEndpointResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createPrivateEndpoint, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreatePrivateEndpointResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreatePrivateEndpointResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreatePrivateEndpointResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePrivateEndpointResponse") + } + return +} + +// createPrivateEndpoint implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) createPrivateEndpoint(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/pe", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(CreatePrivateEndpointRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreatePrivateEndpointResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "CreatePrivateEndpoint") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpoint/CreatePrivateEndpoint" + err = common.PostProcessServiceError(err, "ObjectStorage", "CreatePrivateEndpoint", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateReplicationPolicy Creates a replication policy for the specified bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CreateReplicationPolicy.go.html to see an example of how to use CreateReplicationPolicy API. +// A default retry strategy applies to this operation CreateReplicationPolicy() +func (client ObjectStorageClient) CreateReplicationPolicy(ctx context.Context, request CreateReplicationPolicyRequest) (response CreateReplicationPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createReplicationPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateReplicationPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateReplicationPolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateReplicationPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateReplicationPolicyResponse") + } + return +} + +// createReplicationPolicy implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) createReplicationPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/replicationPolicies", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(CreateReplicationPolicyRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateReplicationPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "CreateReplicationPolicy") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Replication/CreateReplicationPolicy" + err = common.PostProcessServiceError(err, "ObjectStorage", "CreateReplicationPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateRetentionRule Creates a new retention rule in the specified bucket. The new rule will take effect typically within 30 seconds. +// Note that a maximum of 100 rules are supported on a bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/CreateRetentionRule.go.html to see an example of how to use CreateRetentionRule API. +// A default retry strategy applies to this operation CreateRetentionRule() +func (client ObjectStorageClient) CreateRetentionRule(ctx context.Context, request CreateRetentionRuleRequest) (response CreateRetentionRuleResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createRetentionRule, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateRetentionRuleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateRetentionRuleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateRetentionRuleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateRetentionRuleResponse") + } + return +} + +// createRetentionRule implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) createRetentionRule(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/retentionRules", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(CreateRetentionRuleRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response CreateRetentionRuleResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "CreateRetentionRule") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/RetentionRule/CreateRetentionRule" + err = common.PostProcessServiceError(err, "ObjectStorage", "CreateRetentionRule", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteBucket Deletes a bucket if the bucket is already empty. If the bucket is not empty, use +// DeleteObject first. In addition, +// you cannot delete a bucket that has a multipart upload in progress or a pre-authenticated +// request associated with that bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/DeleteBucket.go.html to see an example of how to use DeleteBucket API. +// A default retry strategy applies to this operation DeleteBucket() +func (client ObjectStorageClient) DeleteBucket(ctx context.Context, request DeleteBucketRequest) (response DeleteBucketResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteBucket, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteBucketResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteBucketResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteBucketResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteBucketResponse") + } + return +} + +// deleteBucket implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) deleteBucket(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(DeleteBucketRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteBucketResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "DeleteBucket") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Bucket/DeleteBucket" + err = common.PostProcessServiceError(err, "ObjectStorage", "DeleteBucket", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteObject Deletes an object. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/DeleteObject.go.html to see an example of how to use DeleteObject API. +// A default retry strategy applies to this operation DeleteObject() +func (client ObjectStorageClient) DeleteObject(ctx context.Context, request DeleteObjectRequest) (response DeleteObjectResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteObject, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteObjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteObjectResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteObjectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteObjectResponse") + } + return +} + +// deleteObject implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) deleteObject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/o/{objectName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(DeleteObjectRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteObjectResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "DeleteObject") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/DeleteObject" + err = common.PostProcessServiceError(err, "ObjectStorage", "DeleteObject", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteObjectLifecyclePolicy Deletes the object lifecycle policy for the bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/DeleteObjectLifecyclePolicy.go.html to see an example of how to use DeleteObjectLifecyclePolicy API. +// A default retry strategy applies to this operation DeleteObjectLifecyclePolicy() +func (client ObjectStorageClient) DeleteObjectLifecyclePolicy(ctx context.Context, request DeleteObjectLifecyclePolicyRequest) (response DeleteObjectLifecyclePolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteObjectLifecyclePolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteObjectLifecyclePolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteObjectLifecyclePolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteObjectLifecyclePolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteObjectLifecyclePolicyResponse") + } + return +} + +// deleteObjectLifecyclePolicy implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) deleteObjectLifecyclePolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/l", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(DeleteObjectLifecyclePolicyRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteObjectLifecyclePolicyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "DeleteObjectLifecyclePolicy") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/ObjectLifecyclePolicy/DeleteObjectLifecyclePolicy" + err = common.PostProcessServiceError(err, "ObjectStorage", "DeleteObjectLifecyclePolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeletePreauthenticatedRequest Deletes the pre-authenticated request for the bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/DeletePreauthenticatedRequest.go.html to see an example of how to use DeletePreauthenticatedRequest API. +// A default retry strategy applies to this operation DeletePreauthenticatedRequest() +func (client ObjectStorageClient) DeletePreauthenticatedRequest(ctx context.Context, request DeletePreauthenticatedRequestRequest) (response DeletePreauthenticatedRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deletePreauthenticatedRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePreauthenticatedRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePreauthenticatedRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePreauthenticatedRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePreauthenticatedRequestResponse") + } + return +} + +// deletePreauthenticatedRequest implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) deletePreauthenticatedRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/p/{parId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(DeletePreauthenticatedRequestRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeletePreauthenticatedRequestResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "DeletePreauthenticatedRequest") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PreauthenticatedRequest/DeletePreauthenticatedRequest" + err = common.PostProcessServiceError(err, "ObjectStorage", "DeletePreauthenticatedRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeletePrivateEndpoint Deletes a Private Endpoint if it exists in the given namespace. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/DeletePrivateEndpoint.go.html to see an example of how to use DeletePrivateEndpoint API. +// A default retry strategy applies to this operation DeletePrivateEndpoint() +func (client ObjectStorageClient) DeletePrivateEndpoint(ctx context.Context, request DeletePrivateEndpointRequest) (response DeletePrivateEndpointResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deletePrivateEndpoint, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePrivateEndpointResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePrivateEndpointResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePrivateEndpointResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePrivateEndpointResponse") + } + return +} + +// deletePrivateEndpoint implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) deletePrivateEndpoint(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/pe/{peName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(DeletePrivateEndpointRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeletePrivateEndpointResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "DeletePrivateEndpoint") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpoint/DeletePrivateEndpoint" + err = common.PostProcessServiceError(err, "ObjectStorage", "DeletePrivateEndpoint", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteReplicationPolicy Deletes the replication policy associated with the source bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/DeleteReplicationPolicy.go.html to see an example of how to use DeleteReplicationPolicy API. +// A default retry strategy applies to this operation DeleteReplicationPolicy() +func (client ObjectStorageClient) DeleteReplicationPolicy(ctx context.Context, request DeleteReplicationPolicyRequest) (response DeleteReplicationPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteReplicationPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteReplicationPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteReplicationPolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteReplicationPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteReplicationPolicyResponse") + } + return +} + +// deleteReplicationPolicy implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) deleteReplicationPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/replicationPolicies/{replicationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(DeleteReplicationPolicyRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteReplicationPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "DeleteReplicationPolicy") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Replication/DeleteReplicationPolicy" + err = common.PostProcessServiceError(err, "ObjectStorage", "DeleteReplicationPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteRetentionRule Deletes the specified rule. The deletion takes effect typically within 30 seconds. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/DeleteRetentionRule.go.html to see an example of how to use DeleteRetentionRule API. +// A default retry strategy applies to this operation DeleteRetentionRule() +func (client ObjectStorageClient) DeleteRetentionRule(ctx context.Context, request DeleteRetentionRuleRequest) (response DeleteRetentionRuleResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteRetentionRule, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteRetentionRuleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteRetentionRuleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteRetentionRuleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteRetentionRuleResponse") + } + return +} + +// deleteRetentionRule implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) deleteRetentionRule(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/retentionRules/{retentionRuleId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(DeleteRetentionRuleRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response DeleteRetentionRuleResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "DeleteRetentionRule") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/RetentionRule/DeleteRetentionRule" + err = common.PostProcessServiceError(err, "ObjectStorage", "DeleteRetentionRule", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetBucket Gets the current representation of the given bucket in the given Object Storage namespace. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetBucket.go.html to see an example of how to use GetBucket API. +// A default retry strategy applies to this operation GetBucket() +func (client ObjectStorageClient) GetBucket(ctx context.Context, request GetBucketRequest) (response GetBucketResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getBucket, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetBucketResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetBucketResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetBucketResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBucketResponse") + } + return +} + +// getBucket implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getBucket(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(GetBucketRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetBucketResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "GetBucket") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Bucket/GetBucket" + err = common.PostProcessServiceError(err, "ObjectStorage", "GetBucket", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetNamespace Each Oracle Cloud Infrastructure tenant is assigned one unique and uneditable Object Storage namespace. The namespace +// is a system-generated string assigned during account creation. For some older tenancies, the namespace string may be +// the tenancy name in all lower-case letters. You cannot edit a namespace. +// GetNamespace returns the name of the Object Storage namespace for the user making the request. +// If an optional compartmentId query parameter is provided, GetNamespace returns the namespace name of the corresponding +// tenancy, provided the user has access to it. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetNamespace.go.html to see an example of how to use GetNamespace API. +// A default retry strategy applies to this operation GetNamespace() +func (client ObjectStorageClient) GetNamespace(ctx context.Context, request GetNamespaceRequest) (response GetNamespaceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getNamespace, policy) + if err != nil { + if ociResponse != nil { + response = GetNamespaceResponse{RawResponse: ociResponse.HTTPResponse()} + } + return + } + if convertedResponse, ok := ociResponse.(GetNamespaceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetNamespaceResponse") + } + return +} + +// getNamespace implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getNamespace(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(GetNamespaceRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetNamespaceResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "GetNamespace") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Namespace/GetNamespace" + err = common.PostProcessServiceError(err, "ObjectStorage", "GetNamespace", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetNamespaceMetadata Gets the metadata for the Object Storage namespace, which contains defaultS3CompartmentId and +// defaultSwiftCompartmentId. +// Any user with the OBJECTSTORAGE_NAMESPACE_READ permission will be able to see the current metadata. If you are +// not authorized, talk to an administrator. If you are an administrator who needs to write policies +// to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetNamespaceMetadata.go.html to see an example of how to use GetNamespaceMetadata API. +// A default retry strategy applies to this operation GetNamespaceMetadata() +func (client ObjectStorageClient) GetNamespaceMetadata(ctx context.Context, request GetNamespaceMetadataRequest) (response GetNamespaceMetadataResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getNamespaceMetadata, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetNamespaceMetadataResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetNamespaceMetadataResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetNamespaceMetadataResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetNamespaceMetadataResponse") + } + return +} + +// getNamespaceMetadata implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getNamespaceMetadata(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(GetNamespaceMetadataRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetNamespaceMetadataResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "GetNamespaceMetadata") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Namespace/GetNamespaceMetadata" + err = common.PostProcessServiceError(err, "ObjectStorage", "GetNamespaceMetadata", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetObject Gets the metadata and body of an object. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetObject.go.html to see an example of how to use GetObject API. +// A default retry strategy applies to this operation GetObject() +func (client ObjectStorageClient) GetObject(ctx context.Context, request GetObjectRequest) (response GetObjectResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getObject, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetObjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetObjectResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetObjectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetObjectResponse") + } + return +} + +// getObject implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getObject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/o/{objectName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(GetObjectRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetObjectResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "GetObject") + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/GetObject" + err = common.PostProcessServiceError(err, "ObjectStorage", "GetObject", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetObjectLifecyclePolicy Gets the object lifecycle policy for the bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetObjectLifecyclePolicy.go.html to see an example of how to use GetObjectLifecyclePolicy API. +// A default retry strategy applies to this operation GetObjectLifecyclePolicy() +func (client ObjectStorageClient) GetObjectLifecyclePolicy(ctx context.Context, request GetObjectLifecyclePolicyRequest) (response GetObjectLifecyclePolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getObjectLifecyclePolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetObjectLifecyclePolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetObjectLifecyclePolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetObjectLifecyclePolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetObjectLifecyclePolicyResponse") + } + return +} + +// getObjectLifecyclePolicy implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getObjectLifecyclePolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/l", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(GetObjectLifecyclePolicyRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetObjectLifecyclePolicyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "GetObjectLifecyclePolicy") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/ObjectLifecyclePolicy/GetObjectLifecyclePolicy" + err = common.PostProcessServiceError(err, "ObjectStorage", "GetObjectLifecyclePolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPreauthenticatedRequest Gets the pre-authenticated request for the bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetPreauthenticatedRequest.go.html to see an example of how to use GetPreauthenticatedRequest API. +// A default retry strategy applies to this operation GetPreauthenticatedRequest() +func (client ObjectStorageClient) GetPreauthenticatedRequest(ctx context.Context, request GetPreauthenticatedRequestRequest) (response GetPreauthenticatedRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPreauthenticatedRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPreauthenticatedRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPreauthenticatedRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPreauthenticatedRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPreauthenticatedRequestResponse") + } + return +} + +// getPreauthenticatedRequest implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getPreauthenticatedRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/p/{parId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(GetPreauthenticatedRequestRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetPreauthenticatedRequestResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "GetPreauthenticatedRequest") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PreauthenticatedRequest/GetPreauthenticatedRequest" + err = common.PostProcessServiceError(err, "ObjectStorage", "GetPreauthenticatedRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPrivateEndpoint Gets the current representation of the given Private Endpoint in the given Object Storage namespace. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetPrivateEndpoint.go.html to see an example of how to use GetPrivateEndpoint API. +// A default retry strategy applies to this operation GetPrivateEndpoint() +func (client ObjectStorageClient) GetPrivateEndpoint(ctx context.Context, request GetPrivateEndpointRequest) (response GetPrivateEndpointResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPrivateEndpoint, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPrivateEndpointResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPrivateEndpointResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPrivateEndpointResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPrivateEndpointResponse") + } + return +} + +// getPrivateEndpoint implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getPrivateEndpoint(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/pe/{peName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(GetPrivateEndpointRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetPrivateEndpointResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "GetPrivateEndpoint") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpoint/GetPrivateEndpoint" + err = common.PostProcessServiceError(err, "ObjectStorage", "GetPrivateEndpoint", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetReplicationPolicy Get the replication policy. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetReplicationPolicy.go.html to see an example of how to use GetReplicationPolicy API. +// A default retry strategy applies to this operation GetReplicationPolicy() +func (client ObjectStorageClient) GetReplicationPolicy(ctx context.Context, request GetReplicationPolicyRequest) (response GetReplicationPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getReplicationPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetReplicationPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetReplicationPolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetReplicationPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetReplicationPolicyResponse") + } + return +} + +// getReplicationPolicy implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getReplicationPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/replicationPolicies/{replicationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(GetReplicationPolicyRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetReplicationPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "GetReplicationPolicy") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Replication/GetReplicationPolicy" + err = common.PostProcessServiceError(err, "ObjectStorage", "GetReplicationPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetRetentionRule Get the specified retention rule. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetRetentionRule.go.html to see an example of how to use GetRetentionRule API. +// A default retry strategy applies to this operation GetRetentionRule() +func (client ObjectStorageClient) GetRetentionRule(ctx context.Context, request GetRetentionRuleRequest) (response GetRetentionRuleResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getRetentionRule, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetRetentionRuleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetRetentionRuleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetRetentionRuleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRetentionRuleResponse") + } + return +} + +// getRetentionRule implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getRetentionRule(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/retentionRules/{retentionRuleId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(GetRetentionRuleRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetRetentionRuleResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "GetRetentionRule") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/RetentionRule/GetRetentionRule" + err = common.PostProcessServiceError(err, "ObjectStorage", "GetRetentionRule", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetWorkRequest Gets the status of the work request for the given ID. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. +// A default retry strategy applies to this operation GetWorkRequest() +func (client ObjectStorageClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getWorkRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetWorkRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetWorkRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetWorkRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetWorkRequestResponse") + } + return +} + +// getWorkRequest implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) getWorkRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(GetWorkRequestRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response GetWorkRequestResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "GetWorkRequest") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/WorkRequest/GetWorkRequest" + err = common.PostProcessServiceError(err, "ObjectStorage", "GetWorkRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// HeadBucket Efficiently checks to see if a bucket exists and gets the current entity tag (ETag) for the bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/HeadBucket.go.html to see an example of how to use HeadBucket API. +// A default retry strategy applies to this operation HeadBucket() +func (client ObjectStorageClient) HeadBucket(ctx context.Context, request HeadBucketRequest) (response HeadBucketResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.headBucket, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = HeadBucketResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = HeadBucketResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(HeadBucketResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into HeadBucketResponse") + } + return +} + +// headBucket implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) headBucket(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodHead, "/n/{namespaceName}/b/{bucketName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(HeadBucketRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response HeadBucketResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "HeadBucket") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Bucket/HeadBucket" + err = common.PostProcessServiceError(err, "ObjectStorage", "HeadBucket", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// HeadObject Gets the user-defined metadata and entity tag (ETag) for an object. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/HeadObject.go.html to see an example of how to use HeadObject API. +// A default retry strategy applies to this operation HeadObject() +func (client ObjectStorageClient) HeadObject(ctx context.Context, request HeadObjectRequest) (response HeadObjectResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.headObject, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = HeadObjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = HeadObjectResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(HeadObjectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into HeadObjectResponse") + } + return +} + +// headObject implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) headObject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodHead, "/n/{namespaceName}/b/{bucketName}/o/{objectName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(HeadObjectRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response HeadObjectResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "HeadObject") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/HeadObject" + err = common.PostProcessServiceError(err, "ObjectStorage", "HeadObject", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListBuckets Gets a list of all BucketSummary items in a compartment. A BucketSummary contains only summary fields for the bucket +// and does not contain fields like the user-defined metadata. +// ListBuckets returns a BucketSummary containing at most 1000 buckets. To paginate through more buckets, use the returned +// `opc-next-page` value with the `page` request parameter. +// To use this and other API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListBuckets.go.html to see an example of how to use ListBuckets API. +// A default retry strategy applies to this operation ListBuckets() +func (client ObjectStorageClient) ListBuckets(ctx context.Context, request ListBucketsRequest) (response ListBucketsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listBuckets, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListBucketsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListBucketsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListBucketsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBucketsResponse") + } + return +} + +// listBuckets implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listBuckets(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ListBucketsRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListBucketsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ListBuckets") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Bucket/ListBuckets" + err = common.PostProcessServiceError(err, "ObjectStorage", "ListBuckets", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListMultipartUploadParts Lists the parts of an in-progress multipart upload. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListMultipartUploadParts.go.html to see an example of how to use ListMultipartUploadParts API. +// A default retry strategy applies to this operation ListMultipartUploadParts() +func (client ObjectStorageClient) ListMultipartUploadParts(ctx context.Context, request ListMultipartUploadPartsRequest) (response ListMultipartUploadPartsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listMultipartUploadParts, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListMultipartUploadPartsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListMultipartUploadPartsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListMultipartUploadPartsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListMultipartUploadPartsResponse") + } + return +} + +// listMultipartUploadParts implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listMultipartUploadParts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/u/{objectName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ListMultipartUploadPartsRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListMultipartUploadPartsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ListMultipartUploadParts") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/MultipartUpload/ListMultipartUploadParts" + err = common.PostProcessServiceError(err, "ObjectStorage", "ListMultipartUploadParts", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListMultipartUploads Lists all of the in-progress multipart uploads for the given bucket in the given Object Storage namespace. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListMultipartUploads.go.html to see an example of how to use ListMultipartUploads API. +// A default retry strategy applies to this operation ListMultipartUploads() +func (client ObjectStorageClient) ListMultipartUploads(ctx context.Context, request ListMultipartUploadsRequest) (response ListMultipartUploadsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listMultipartUploads, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListMultipartUploadsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListMultipartUploadsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListMultipartUploadsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListMultipartUploadsResponse") + } + return +} + +// listMultipartUploads implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listMultipartUploads(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/u", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ListMultipartUploadsRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListMultipartUploadsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ListMultipartUploads") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/MultipartUpload/ListMultipartUploads" + err = common.PostProcessServiceError(err, "ObjectStorage", "ListMultipartUploads", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListObjectVersions Lists the object versions in a bucket. +// ListObjectVersions returns an ObjectVersionCollection containing at most 1000 object versions. To paginate through +// more object versions, use the returned `opc-next-page` value with the `page` request parameter. +// To use this and other API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListObjectVersions.go.html to see an example of how to use ListObjectVersions API. +// A default retry strategy applies to this operation ListObjectVersions() +func (client ObjectStorageClient) ListObjectVersions(ctx context.Context, request ListObjectVersionsRequest) (response ListObjectVersionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listObjectVersions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListObjectVersionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListObjectVersionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListObjectVersionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListObjectVersionsResponse") + } + return +} + +// listObjectVersions implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listObjectVersions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/objectversions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ListObjectVersionsRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListObjectVersionsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ListObjectVersions") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/ListObjectVersions" + err = common.PostProcessServiceError(err, "ObjectStorage", "ListObjectVersions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListObjects Lists the objects in a bucket. By default, ListObjects returns object names only. See the `fields` +// parameter for other fields that you can optionally include in ListObjects response. +// ListObjects returns at most 1000 objects. To paginate through more objects, use the returned 'nextStartWith' +// value with the 'start' parameter. To filter which objects ListObjects returns, use the 'start' and 'end' +// parameters. +// To use this and other API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListObjects.go.html to see an example of how to use ListObjects API. +// A default retry strategy applies to this operation ListObjects() +func (client ObjectStorageClient) ListObjects(ctx context.Context, request ListObjectsRequest) (response ListObjectsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listObjects, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListObjectsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListObjectsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListObjectsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListObjectsResponse") + } + return +} + +// listObjects implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listObjects(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/o", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ListObjectsRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListObjectsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ListObjects") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/ListObjects" + err = common.PostProcessServiceError(err, "ObjectStorage", "ListObjects", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListPreauthenticatedRequests Lists pre-authenticated requests for the bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListPreauthenticatedRequests.go.html to see an example of how to use ListPreauthenticatedRequests API. +// A default retry strategy applies to this operation ListPreauthenticatedRequests() +func (client ObjectStorageClient) ListPreauthenticatedRequests(ctx context.Context, request ListPreauthenticatedRequestsRequest) (response ListPreauthenticatedRequestsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listPreauthenticatedRequests, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListPreauthenticatedRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListPreauthenticatedRequestsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListPreauthenticatedRequestsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPreauthenticatedRequestsResponse") + } + return +} + +// listPreauthenticatedRequests implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listPreauthenticatedRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/p", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ListPreauthenticatedRequestsRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListPreauthenticatedRequestsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ListPreauthenticatedRequests") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PreauthenticatedRequest/ListPreauthenticatedRequests" + err = common.PostProcessServiceError(err, "ObjectStorage", "ListPreauthenticatedRequests", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListPrivateEndpoints Gets a list of all PrivateEndpointSummary in a compartment associated with a namespace. +// To use this and other API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListPrivateEndpoints.go.html to see an example of how to use ListPrivateEndpoints API. +// A default retry strategy applies to this operation ListPrivateEndpoints() +func (client ObjectStorageClient) ListPrivateEndpoints(ctx context.Context, request ListPrivateEndpointsRequest) (response ListPrivateEndpointsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listPrivateEndpoints, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListPrivateEndpointsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListPrivateEndpointsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListPrivateEndpointsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPrivateEndpointsResponse") + } + return +} + +// listPrivateEndpoints implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listPrivateEndpoints(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/pe", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ListPrivateEndpointsRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListPrivateEndpointsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ListPrivateEndpoints") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpointSummary/ListPrivateEndpoints" + err = common.PostProcessServiceError(err, "ObjectStorage", "ListPrivateEndpoints", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListReplicationPolicies List the replication policies associated with a bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListReplicationPolicies.go.html to see an example of how to use ListReplicationPolicies API. +// A default retry strategy applies to this operation ListReplicationPolicies() +func (client ObjectStorageClient) ListReplicationPolicies(ctx context.Context, request ListReplicationPoliciesRequest) (response ListReplicationPoliciesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listReplicationPolicies, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListReplicationPoliciesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListReplicationPoliciesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListReplicationPoliciesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListReplicationPoliciesResponse") + } + return +} + +// listReplicationPolicies implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listReplicationPolicies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/replicationPolicies", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ListReplicationPoliciesRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListReplicationPoliciesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ListReplicationPolicies") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Replication/ListReplicationPolicies" + err = common.PostProcessServiceError(err, "ObjectStorage", "ListReplicationPolicies", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListReplicationSources List the replication sources of a destination bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListReplicationSources.go.html to see an example of how to use ListReplicationSources API. +// A default retry strategy applies to this operation ListReplicationSources() +func (client ObjectStorageClient) ListReplicationSources(ctx context.Context, request ListReplicationSourcesRequest) (response ListReplicationSourcesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listReplicationSources, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListReplicationSourcesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListReplicationSourcesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListReplicationSourcesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListReplicationSourcesResponse") + } + return +} + +// listReplicationSources implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listReplicationSources(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/replicationSources", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ListReplicationSourcesRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListReplicationSourcesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ListReplicationSources") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Replication/ListReplicationSources" + err = common.PostProcessServiceError(err, "ObjectStorage", "ListReplicationSources", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListRetentionRules List the retention rules for a bucket. The retention rules are sorted based on creation time, +// with the most recently created retention rule returned first. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListRetentionRules.go.html to see an example of how to use ListRetentionRules API. +// A default retry strategy applies to this operation ListRetentionRules() +func (client ObjectStorageClient) ListRetentionRules(ctx context.Context, request ListRetentionRulesRequest) (response ListRetentionRulesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listRetentionRules, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListRetentionRulesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListRetentionRulesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListRetentionRulesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListRetentionRulesResponse") + } + return +} + +// listRetentionRules implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listRetentionRules(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/retentionRules", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ListRetentionRulesRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListRetentionRulesResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ListRetentionRules") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/RetentionRule/ListRetentionRules" + err = common.PostProcessServiceError(err, "ObjectStorage", "ListRetentionRules", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestErrors Lists the errors of the work request with the given ID. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. +// A default retry strategy applies to this operation ListWorkRequestErrors() +func (client ObjectStorageClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestErrorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestErrorsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") + } + return +} + +// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ListWorkRequestErrorsRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListWorkRequestErrorsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ListWorkRequestErrors") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/WorkRequestError/ListWorkRequestErrors" + err = common.PostProcessServiceError(err, "ObjectStorage", "ListWorkRequestErrors", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestLogs Lists the logs of the work request with the given ID. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. +// A default retry strategy applies to this operation ListWorkRequestLogs() +func (client ObjectStorageClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestLogsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestLogsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") + } + return +} + +// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ListWorkRequestLogsRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListWorkRequestLogsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ListWorkRequestLogs") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/WorkRequestLogEntry/ListWorkRequestLogs" + err = common.PostProcessServiceError(err, "ObjectStorage", "ListWorkRequestLogs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequests Lists the work requests in a compartment. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. +// A default retry strategy applies to this operation ListWorkRequests() +func (client ObjectStorageClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") + } + return +} + +// listWorkRequests implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ListWorkRequestsRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ListWorkRequestsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ListWorkRequests") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/WorkRequest/ListWorkRequests" + err = common.PostProcessServiceError(err, "ObjectStorage", "ListWorkRequests", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// MakeBucketWritable Stops replication to the destination bucket and removes the replication policy. When the replication +// policy was created, this destination bucket became read-only except for new and changed objects replicated +// automatically from the source bucket. MakeBucketWritable removes the replication policy. This bucket is no +// longer the target for replication and is now writable, allowing users to make changes to bucket contents. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/MakeBucketWritable.go.html to see an example of how to use MakeBucketWritable API. +// A default retry strategy applies to this operation MakeBucketWritable() +func (client ObjectStorageClient) MakeBucketWritable(ctx context.Context, request MakeBucketWritableRequest) (response MakeBucketWritableResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.makeBucketWritable, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = MakeBucketWritableResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = MakeBucketWritableResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(MakeBucketWritableResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into MakeBucketWritableResponse") + } + return +} + +// makeBucketWritable implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) makeBucketWritable(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/actions/makeBucketWritable", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(MakeBucketWritableRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response MakeBucketWritableResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "MakeBucketWritable") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Replication/MakeBucketWritable" + err = common.PostProcessServiceError(err, "ObjectStorage", "MakeBucketWritable", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// PutObject Creates a new object or overwrites an existing object with the same name. The maximum object size allowed by +// PutObject is 50 GiB. +// See Object Names (https://docs.oracle.com/iaas/Content/Object/Tasks/managingobjects.htm#namerequirements) +// for object naming requirements. +// See Special Instructions for Object Storage PUT (https://docs.oracle.com/iaas/Content/API/Concepts/signingrequests.htm#ObjectStoragePut) +// for request signature requirements. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/PutObject.go.html to see an example of how to use PutObject API. +// A default retry strategy applies to this operation PutObject() +func (client ObjectStorageClient) PutObject(ctx context.Context, request PutObjectRequest) (response PutObjectResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.putObject, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = PutObjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = PutObjectResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(PutObjectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PutObjectResponse") + } + return +} + +// putObject implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) putObject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + if !common.IsEnvVarFalse(common.UsingExpectHeaderEnvVar) { + extraHeaders["Expect"] = "100-continue" + } + httpRequest, err := request.HTTPRequest(http.MethodPut, "/n/{namespaceName}/b/{bucketName}/o/{objectName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(PutObjectRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response PutObjectResponse + var httpResponse *http.Response + var customSigner common.HTTPRequestSigner + excludeBodySigningPredicate := func(r *http.Request) bool { return false } + customSigner, err = common.NewSignerFromOCIRequestSigner(client.Signer, excludeBodySigningPredicate) + + //if there was an error overriding the signer, then use the signer from the client itself + if err != nil { + customSigner = client.Signer + } + + //Execute the request with a custom signer + httpResponse, err = client.CallWithDetails(ctx, &httpRequest, common.ClientCallDetails{Signer: customSigner, ServiceName: "objectStorage", OperationName: "PutObject"}) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/PutObject" + err = common.PostProcessServiceError(err, "ObjectStorage", "PutObject", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// PutObjectLifecyclePolicy Creates or replaces the object lifecycle policy for the bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/PutObjectLifecyclePolicy.go.html to see an example of how to use PutObjectLifecyclePolicy API. +// A default retry strategy applies to this operation PutObjectLifecyclePolicy() +func (client ObjectStorageClient) PutObjectLifecyclePolicy(ctx context.Context, request PutObjectLifecyclePolicyRequest) (response PutObjectLifecyclePolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.putObjectLifecyclePolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = PutObjectLifecyclePolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = PutObjectLifecyclePolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(PutObjectLifecyclePolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PutObjectLifecyclePolicyResponse") + } + return +} + +// putObjectLifecyclePolicy implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) putObjectLifecyclePolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/n/{namespaceName}/b/{bucketName}/l", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(PutObjectLifecyclePolicyRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response PutObjectLifecyclePolicyResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "PutObjectLifecyclePolicy") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/ObjectLifecyclePolicy/PutObjectLifecyclePolicy" + err = common.PostProcessServiceError(err, "ObjectStorage", "PutObjectLifecyclePolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ReencryptBucket Re-encrypts the unique data encryption key that encrypts each object written to the bucket by using the most recent +// version of the master encryption key assigned to the bucket. (All data encryption keys are encrypted by a master +// encryption key. Master encryption keys are assigned to buckets and managed by Oracle by default, but you can assign +// a key that you created and control through the Oracle Cloud Infrastructure Key Management service.) The kmsKeyId property +// of the bucket determines which master encryption key is assigned to the bucket. If you assigned a different Key Management +// master encryption key to the bucket, you can call this API to re-encrypt all data encryption keys with the newly +// assigned key. Similarly, you might want to re-encrypt all data encryption keys if the assigned key has been rotated to +// a new key version since objects were last added to the bucket. If you call this API and there is no kmsKeyId associated +// with the bucket, the call will fail. +// Calling this API starts a work request task to re-encrypt the data encryption key of all objects in the bucket. Only +// objects created before the time of the API call will be re-encrypted. The call can take a long time, depending on how many +// objects are in the bucket and how big they are. This API returns a work request ID that you can use to retrieve the status +// of the work request task. +// All the versions of objects will be re-encrypted whether versioning is enabled or suspended at the bucket. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ReencryptBucket.go.html to see an example of how to use ReencryptBucket API. +// A default retry strategy applies to this operation ReencryptBucket() +func (client ObjectStorageClient) ReencryptBucket(ctx context.Context, request ReencryptBucketRequest) (response ReencryptBucketResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.reencryptBucket, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ReencryptBucketResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ReencryptBucketResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ReencryptBucketResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ReencryptBucketResponse") + } + return +} + +// reencryptBucket implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) reencryptBucket(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/actions/reencrypt", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ReencryptBucketRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ReencryptBucketResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ReencryptBucket") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Bucket/ReencryptBucket" + err = common.PostProcessServiceError(err, "ObjectStorage", "ReencryptBucket", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ReencryptObject Re-encrypts the data encryption keys that encrypt the object and its chunks. By default, when you create a bucket, the Object Storage +// service manages the master encryption key used to encrypt each object's data encryption keys. The encryption mechanism that you specify for +// the bucket applies to the objects it contains. +// You can alternatively employ one of these encryption strategies for an object: +// - You can assign a key that you created and control through the Oracle Cloud Infrastructure Vault service. +// - You can encrypt an object using your own encryption key. The key you supply is known as a customer-provided encryption key (SSE-C). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ReencryptObject.go.html to see an example of how to use ReencryptObject API. +// A default retry strategy applies to this operation ReencryptObject() +func (client ObjectStorageClient) ReencryptObject(ctx context.Context, request ReencryptObjectRequest) (response ReencryptObjectResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.reencryptObject, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ReencryptObjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ReencryptObjectResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ReencryptObjectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ReencryptObjectResponse") + } + return +} + +// reencryptObject implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) reencryptObject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/actions/reencrypt/{objectName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(ReencryptObjectRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response ReencryptObjectResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "ReencryptObject") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/ReencryptObject" + err = common.PostProcessServiceError(err, "ObjectStorage", "ReencryptObject", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RenameObject Rename an object in the given Object Storage namespace. +// See Object Names (https://docs.oracle.com/iaas/Content/Object/Tasks/managingobjects.htm#namerequirements) +// for object naming requirements. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/RenameObject.go.html to see an example of how to use RenameObject API. +// A default retry strategy applies to this operation RenameObject() +func (client ObjectStorageClient) RenameObject(ctx context.Context, request RenameObjectRequest) (response RenameObjectResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.renameObject, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RenameObjectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RenameObjectResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RenameObjectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RenameObjectResponse") + } + return +} + +// renameObject implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) renameObject(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/actions/renameObject", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(RenameObjectRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response RenameObjectResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "RenameObject") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/RenameObject" + err = common.PostProcessServiceError(err, "ObjectStorage", "RenameObject", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RestoreObjects Restores the object specified by the objectName parameter. +// By default object will be restored for 24 hours. Duration can be configured using the hours parameter. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/RestoreObjects.go.html to see an example of how to use RestoreObjects API. +// A default retry strategy applies to this operation RestoreObjects() +func (client ObjectStorageClient) RestoreObjects(ctx context.Context, request RestoreObjectsRequest) (response RestoreObjectsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.restoreObjects, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RestoreObjectsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RestoreObjectsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RestoreObjectsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RestoreObjectsResponse") + } + return +} + +// restoreObjects implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) restoreObjects(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/actions/restoreObjects", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(RestoreObjectsRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response RestoreObjectsResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "RestoreObjects") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/RestoreObjects" + err = common.PostProcessServiceError(err, "ObjectStorage", "RestoreObjects", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateBucket Performs a partial or full update of a bucket's user-defined metadata. +// Use UpdateBucket to move a bucket from one compartment to another within the same tenancy. Supply the compartmentID +// of the compartment that you want to move the bucket to. For more information about moving resources between compartments, +// see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/UpdateBucket.go.html to see an example of how to use UpdateBucket API. +// A default retry strategy applies to this operation UpdateBucket() +func (client ObjectStorageClient) UpdateBucket(ctx context.Context, request UpdateBucketRequest) (response UpdateBucketResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateBucket, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateBucketResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateBucketResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateBucketResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateBucketResponse") + } + return +} + +// updateBucket implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) updateBucket(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(UpdateBucketRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateBucketResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "UpdateBucket") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Bucket/UpdateBucket" + err = common.PostProcessServiceError(err, "ObjectStorage", "UpdateBucket", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateNamespaceMetadata By default, buckets created using the Amazon S3 Compatibility API or the Swift API are created in the root +// compartment of the Oracle Cloud Infrastructure tenancy. +// You can change the default Swift/Amazon S3 compartmentId designation to a different compartmentId. All +// subsequent bucket creations will use the new default compartment, but no previously created +// buckets will be modified. A user must have OBJECTSTORAGE_NAMESPACE_UPDATE permission to make changes to the default +// compartments for Amazon S3 and Swift. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/UpdateNamespaceMetadata.go.html to see an example of how to use UpdateNamespaceMetadata API. +// A default retry strategy applies to this operation UpdateNamespaceMetadata() +func (client ObjectStorageClient) UpdateNamespaceMetadata(ctx context.Context, request UpdateNamespaceMetadataRequest) (response UpdateNamespaceMetadataResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateNamespaceMetadata, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateNamespaceMetadataResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateNamespaceMetadataResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateNamespaceMetadataResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateNamespaceMetadataResponse") + } + return +} + +// updateNamespaceMetadata implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) updateNamespaceMetadata(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/n/{namespaceName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(UpdateNamespaceMetadataRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateNamespaceMetadataResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "UpdateNamespaceMetadata") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Namespace/UpdateNamespaceMetadata" + err = common.PostProcessServiceError(err, "ObjectStorage", "UpdateNamespaceMetadata", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateObjectStorageTier Changes the storage tier of the object specified by the objectName parameter. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/UpdateObjectStorageTier.go.html to see an example of how to use UpdateObjectStorageTier API. +// A default retry strategy applies to this operation UpdateObjectStorageTier() +func (client ObjectStorageClient) UpdateObjectStorageTier(ctx context.Context, request UpdateObjectStorageTierRequest) (response UpdateObjectStorageTierResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateObjectStorageTier, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateObjectStorageTierResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateObjectStorageTierResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateObjectStorageTierResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateObjectStorageTierResponse") + } + return +} + +// updateObjectStorageTier implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) updateObjectStorageTier(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/actions/updateObjectStorageTier", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(UpdateObjectStorageTierRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateObjectStorageTierResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "UpdateObjectStorageTier") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/Object/UpdateObjectStorageTier" + err = common.PostProcessServiceError(err, "ObjectStorage", "UpdateObjectStorageTier", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdatePrivateEndpoint Performs a partial or full update of a user-defined data associated with the Private Endpoint. +// Use UpdatePrivateEndpoint to move a Private Endpoint from one compartment to another within the same tenancy. Supply the compartmentID +// of the compartment that you want to move the Private Endpoint to. Or use it to update the name, subnetId, endpointFqdn or privateEndpointIp or accessTargets of the Private Endpoint. +// For more information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// This API follows replace semantics (rather than merge semantics). That means if the body provides values for +// parameters and the resource has exisiting ones, this operation will replace those existing values. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/UpdatePrivateEndpoint.go.html to see an example of how to use UpdatePrivateEndpoint API. +// A default retry strategy applies to this operation UpdatePrivateEndpoint() +func (client ObjectStorageClient) UpdatePrivateEndpoint(ctx context.Context, request UpdatePrivateEndpointRequest) (response UpdatePrivateEndpointResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updatePrivateEndpoint, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdatePrivateEndpointResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdatePrivateEndpointResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdatePrivateEndpointResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdatePrivateEndpointResponse") + } + return +} + +// updatePrivateEndpoint implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) updatePrivateEndpoint(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/n/{namespaceName}/pe/{peName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(UpdatePrivateEndpointRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdatePrivateEndpointResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "UpdatePrivateEndpoint") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/PrivateEndpoint/UpdatePrivateEndpoint" + err = common.PostProcessServiceError(err, "ObjectStorage", "UpdatePrivateEndpoint", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateRetentionRule Updates the specified retention rule. Rule changes take effect typically within 30 seconds. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/UpdateRetentionRule.go.html to see an example of how to use UpdateRetentionRule API. +// A default retry strategy applies to this operation UpdateRetentionRule() +func (client ObjectStorageClient) UpdateRetentionRule(ctx context.Context, request UpdateRetentionRuleRequest) (response UpdateRetentionRuleResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateRetentionRule, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateRetentionRuleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateRetentionRuleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateRetentionRuleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateRetentionRuleResponse") + } + return +} + +// updateRetentionRule implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) updateRetentionRule(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/n/{namespaceName}/b/{bucketName}/retentionRules/{retentionRuleId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(UpdateRetentionRuleRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UpdateRetentionRuleResponse + var httpResponse *http.Response + httpResponse, err = client.CallWithServiceAndOperationName(ctx, &httpRequest, "objectStorage", "UpdateRetentionRule") + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/RetentionRule/UpdateRetentionRule" + err = common.PostProcessServiceError(err, "ObjectStorage", "UpdateRetentionRule", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UploadPart Uploads a single part of a multipart upload. +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/UploadPart.go.html to see an example of how to use UploadPart API. +// A default retry strategy applies to this operation UploadPart() +func (client ObjectStorageClient) UploadPart(ctx context.Context, request UploadPartRequest) (response UploadPartResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.uploadPart, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UploadPartResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UploadPartResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UploadPartResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UploadPartResponse") + } + return +} + +// uploadPart implements the OCIOperation interface (enables retrying operations) +func (client ObjectStorageClient) uploadPart(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + if !common.IsEnvVarFalse(common.UsingExpectHeaderEnvVar) { + extraHeaders["Expect"] = "100-continue" + } + httpRequest, err := request.HTTPRequest(http.MethodPut, "/n/{namespaceName}/b/{bucketName}/u/{objectName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + host := client.Host + request.(UploadPartRequest).ReplaceMandatoryParamInPath(&client.BaseClient, client.requiredParamsInEndpoint) + common.SetMissingTemplateParams(&client.BaseClient) + defer func() { + client.Host = host + }() + + var response UploadPartResponse + var httpResponse *http.Response + var customSigner common.HTTPRequestSigner + excludeBodySigningPredicate := func(r *http.Request) bool { return false } + customSigner, err = common.NewSignerFromOCIRequestSigner(client.Signer, excludeBodySigningPredicate) + + //if there was an error overriding the signer, then use the signer from the client itself + if err != nil { + customSigner = client.Signer + } + + //Execute the request with a custom signer + httpResponse, err = client.CallWithDetails(ctx, &httpRequest, common.ClientCallDetails{Signer: customSigner, ServiceName: "objectStorage", OperationName: "UploadPart"}) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/objectstorage/20160918/MultipartUpload/UploadPart" + err = common.PostProcessServiceError(err, "ObjectStorage", "UploadPart", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/pattern_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/pattern_details.go new file mode 100644 index 000000000..4e2835eef --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/pattern_details.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatternDetails Specifying inclusion and exclusion patterns. +type PatternDetails struct { + + // An array of glob patterns to match the object names to include. An empty array includes all objects in the + // bucket. Exclusion patterns take precedence over inclusion patterns. + // A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other + // than the special pattern characters described below, matches itself. + // Glob patterns must be between 1 and 1024 characters. + // The special pattern characters have the following meanings: + // \ Escapes the following character + // * Matches any string of characters. + // ? Matches any single character . + // [...] Matches a group of characters. A group of characters can be: + // A set of characters, for example: [Zafg9@]. This matches any character in the brackets. + // A range of characters, for example: [a-z]. This matches any character in the range. + // [a-f] is equivalent to [abcdef]. + // For character ranges only the CHARACTER-CHARACTER pattern is supported. + // [ab-yz] is not valid + // [a-mn-z] is not valid + // Character ranges can not start with ^ or : + // To include a '-' in the range, make it the first or last character. + InclusionPatterns []string `mandatory:"false" json:"inclusionPatterns"` + + // An array of glob patterns to match the object names to exclude. An empty array is ignored. Exclusion + // patterns take precedence over inclusion patterns. + // A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other + // than the special pattern characters described below, matches itself. + // Glob patterns must be between 1 and 1024 characters. + // The special pattern characters have the following meanings: + // \ Escapes the following character + // * Matches any string of characters. + // ? Matches any single character . + // [...] Matches a group of characters. A group of characters can be: + // A set of characters, for example: [Zafg9@]. This matches any character in the brackets. + // A range of characters, for example: [a-z]. This matches any character in the range. + // [a-f] is equivalent to [abcdef]. + // For character ranges only the CHARACTER-CHARACTER pattern is supported. + // [ab-yz] is not valid + // [a-mn-z] is not valid + // Character ranges can not start with ^ or : + // To include a '-' in the range, make it the first or last character. + ExclusionPatterns []string `mandatory:"false" json:"exclusionPatterns"` +} + +func (m PatternDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatternDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/preauthenticated_request.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/preauthenticated_request.go new file mode 100644 index 000000000..2973276f7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/preauthenticated_request.go @@ -0,0 +1,183 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PreauthenticatedRequest Pre-authenticated requests provide a way to let users access a bucket or an object without having their own credentials. +// When you create a pre-authenticated request, a unique URL is generated. Users in your organization, partners, or third +// parties can use this URL to access the targets identified in the pre-authenticated request. +// See Using Pre-Authenticated Requests (https://docs.oracle.com/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm). +// To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, talk to an +// administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type PreauthenticatedRequest struct { + + // The unique identifier to use when directly addressing the pre-authenticated request. + Id *string `mandatory:"true" json:"id"` + + // The user-provided name of the pre-authenticated request. + Name *string `mandatory:"true" json:"name"` + + // The URI to embed in the URL when using the pre-authenticated request. + AccessUri *string `mandatory:"true" json:"accessUri"` + + // The operation that can be performed on this resource. + AccessType PreauthenticatedRequestAccessTypeEnum `mandatory:"true" json:"accessType"` + + // The expiration date for the pre-authenticated request as per RFC 3339 (https://tools.ietf.org/html/rfc3339). After + // this date the pre-authenticated request will no longer be valid. + TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` + + // The date when the pre-authenticated request was created as per specification + // RFC 3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The name of the object that is being granted access to by the pre-authenticated request. Avoid entering confidential + // information. The object name can be null and if so, the pre-authenticated request grants access to the entire bucket. + // Example: test/object1.log + ObjectName *string `mandatory:"false" json:"objectName"` + + // Specifies whether a list operation is allowed on a PAR with accessType "AnyObjectRead" or "AnyObjectReadWrite". + // Deny: Prevents the user from performing a list operation. + // ListObjects: Authorizes the user to perform a list operation. + BucketListingAction PreauthenticatedRequestBucketListingActionEnum `mandatory:"false" json:"bucketListingAction,omitempty"` + + // The full Path for the object. + FullPath *string `mandatory:"false" json:"fullPath"` +} + +func (m PreauthenticatedRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PreauthenticatedRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPreauthenticatedRequestAccessTypeEnum(string(m.AccessType)); !ok && m.AccessType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccessType: %s. Supported values are: %s.", m.AccessType, strings.Join(GetPreauthenticatedRequestAccessTypeEnumStringValues(), ","))) + } + + if _, ok := GetMappingPreauthenticatedRequestBucketListingActionEnum(string(m.BucketListingAction)); !ok && m.BucketListingAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BucketListingAction: %s. Supported values are: %s.", m.BucketListingAction, strings.Join(GetPreauthenticatedRequestBucketListingActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PreauthenticatedRequestBucketListingActionEnum Enum with underlying type: string +type PreauthenticatedRequestBucketListingActionEnum string + +// Set of constants representing the allowable values for PreauthenticatedRequestBucketListingActionEnum +const ( + PreauthenticatedRequestBucketListingActionDeny PreauthenticatedRequestBucketListingActionEnum = "Deny" + PreauthenticatedRequestBucketListingActionListobjects PreauthenticatedRequestBucketListingActionEnum = "ListObjects" +) + +var mappingPreauthenticatedRequestBucketListingActionEnum = map[string]PreauthenticatedRequestBucketListingActionEnum{ + "Deny": PreauthenticatedRequestBucketListingActionDeny, + "ListObjects": PreauthenticatedRequestBucketListingActionListobjects, +} + +var mappingPreauthenticatedRequestBucketListingActionEnumLowerCase = map[string]PreauthenticatedRequestBucketListingActionEnum{ + "deny": PreauthenticatedRequestBucketListingActionDeny, + "listobjects": PreauthenticatedRequestBucketListingActionListobjects, +} + +// GetPreauthenticatedRequestBucketListingActionEnumValues Enumerates the set of values for PreauthenticatedRequestBucketListingActionEnum +func GetPreauthenticatedRequestBucketListingActionEnumValues() []PreauthenticatedRequestBucketListingActionEnum { + values := make([]PreauthenticatedRequestBucketListingActionEnum, 0) + for _, v := range mappingPreauthenticatedRequestBucketListingActionEnum { + values = append(values, v) + } + return values +} + +// GetPreauthenticatedRequestBucketListingActionEnumStringValues Enumerates the set of values in String for PreauthenticatedRequestBucketListingActionEnum +func GetPreauthenticatedRequestBucketListingActionEnumStringValues() []string { + return []string{ + "Deny", + "ListObjects", + } +} + +// GetMappingPreauthenticatedRequestBucketListingActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPreauthenticatedRequestBucketListingActionEnum(val string) (PreauthenticatedRequestBucketListingActionEnum, bool) { + enum, ok := mappingPreauthenticatedRequestBucketListingActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PreauthenticatedRequestAccessTypeEnum Enum with underlying type: string +type PreauthenticatedRequestAccessTypeEnum string + +// Set of constants representing the allowable values for PreauthenticatedRequestAccessTypeEnum +const ( + PreauthenticatedRequestAccessTypeObjectread PreauthenticatedRequestAccessTypeEnum = "ObjectRead" + PreauthenticatedRequestAccessTypeObjectwrite PreauthenticatedRequestAccessTypeEnum = "ObjectWrite" + PreauthenticatedRequestAccessTypeObjectreadwrite PreauthenticatedRequestAccessTypeEnum = "ObjectReadWrite" + PreauthenticatedRequestAccessTypeAnyobjectwrite PreauthenticatedRequestAccessTypeEnum = "AnyObjectWrite" + PreauthenticatedRequestAccessTypeAnyobjectread PreauthenticatedRequestAccessTypeEnum = "AnyObjectRead" + PreauthenticatedRequestAccessTypeAnyobjectreadwrite PreauthenticatedRequestAccessTypeEnum = "AnyObjectReadWrite" +) + +var mappingPreauthenticatedRequestAccessTypeEnum = map[string]PreauthenticatedRequestAccessTypeEnum{ + "ObjectRead": PreauthenticatedRequestAccessTypeObjectread, + "ObjectWrite": PreauthenticatedRequestAccessTypeObjectwrite, + "ObjectReadWrite": PreauthenticatedRequestAccessTypeObjectreadwrite, + "AnyObjectWrite": PreauthenticatedRequestAccessTypeAnyobjectwrite, + "AnyObjectRead": PreauthenticatedRequestAccessTypeAnyobjectread, + "AnyObjectReadWrite": PreauthenticatedRequestAccessTypeAnyobjectreadwrite, +} + +var mappingPreauthenticatedRequestAccessTypeEnumLowerCase = map[string]PreauthenticatedRequestAccessTypeEnum{ + "objectread": PreauthenticatedRequestAccessTypeObjectread, + "objectwrite": PreauthenticatedRequestAccessTypeObjectwrite, + "objectreadwrite": PreauthenticatedRequestAccessTypeObjectreadwrite, + "anyobjectwrite": PreauthenticatedRequestAccessTypeAnyobjectwrite, + "anyobjectread": PreauthenticatedRequestAccessTypeAnyobjectread, + "anyobjectreadwrite": PreauthenticatedRequestAccessTypeAnyobjectreadwrite, +} + +// GetPreauthenticatedRequestAccessTypeEnumValues Enumerates the set of values for PreauthenticatedRequestAccessTypeEnum +func GetPreauthenticatedRequestAccessTypeEnumValues() []PreauthenticatedRequestAccessTypeEnum { + values := make([]PreauthenticatedRequestAccessTypeEnum, 0) + for _, v := range mappingPreauthenticatedRequestAccessTypeEnum { + values = append(values, v) + } + return values +} + +// GetPreauthenticatedRequestAccessTypeEnumStringValues Enumerates the set of values in String for PreauthenticatedRequestAccessTypeEnum +func GetPreauthenticatedRequestAccessTypeEnumStringValues() []string { + return []string{ + "ObjectRead", + "ObjectWrite", + "ObjectReadWrite", + "AnyObjectWrite", + "AnyObjectRead", + "AnyObjectReadWrite", + } +} + +// GetMappingPreauthenticatedRequestAccessTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPreauthenticatedRequestAccessTypeEnum(val string) (PreauthenticatedRequestAccessTypeEnum, bool) { + enum, ok := mappingPreauthenticatedRequestAccessTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/preauthenticated_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/preauthenticated_request_summary.go new file mode 100644 index 000000000..80022aada --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/preauthenticated_request_summary.go @@ -0,0 +1,126 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PreauthenticatedRequestSummary Get summary information about pre-authenticated requests. +type PreauthenticatedRequestSummary struct { + + // The unique identifier to use when directly addressing the pre-authenticated request. + Id *string `mandatory:"true" json:"id"` + + // The user-provided name of the pre-authenticated request. + Name *string `mandatory:"true" json:"name"` + + // The operation that can be performed on this resource. + AccessType PreauthenticatedRequestSummaryAccessTypeEnum `mandatory:"true" json:"accessType"` + + // The expiration date for the pre-authenticated request as per RFC 3339 (https://tools.ietf.org/html/rfc3339). After this date the pre-authenticated request will no longer be valid. + TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` + + // The date when the pre-authenticated request was created as per RFC 3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The name of object that is being granted access to by the pre-authenticated request. This can be null and if it is, + // the pre-authenticated request grants access to the entire bucket. + ObjectName *string `mandatory:"false" json:"objectName"` + + // Specifies whether a list operation is allowed on a PAR with accessType "AnyObjectRead" or "AnyObjectReadWrite". + // Deny: Prevents the user from performing a list operation. + // ListObjects: Authorizes the user to perform a list operation. + BucketListingAction PreauthenticatedRequestBucketListingActionEnum `mandatory:"false" json:"bucketListingAction,omitempty"` +} + +func (m PreauthenticatedRequestSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PreauthenticatedRequestSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPreauthenticatedRequestSummaryAccessTypeEnum(string(m.AccessType)); !ok && m.AccessType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccessType: %s. Supported values are: %s.", m.AccessType, strings.Join(GetPreauthenticatedRequestSummaryAccessTypeEnumStringValues(), ","))) + } + + if _, ok := GetMappingPreauthenticatedRequestBucketListingActionEnum(string(m.BucketListingAction)); !ok && m.BucketListingAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BucketListingAction: %s. Supported values are: %s.", m.BucketListingAction, strings.Join(GetPreauthenticatedRequestBucketListingActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PreauthenticatedRequestSummaryAccessTypeEnum Enum with underlying type: string +type PreauthenticatedRequestSummaryAccessTypeEnum string + +// Set of constants representing the allowable values for PreauthenticatedRequestSummaryAccessTypeEnum +const ( + PreauthenticatedRequestSummaryAccessTypeObjectread PreauthenticatedRequestSummaryAccessTypeEnum = "ObjectRead" + PreauthenticatedRequestSummaryAccessTypeObjectwrite PreauthenticatedRequestSummaryAccessTypeEnum = "ObjectWrite" + PreauthenticatedRequestSummaryAccessTypeObjectreadwrite PreauthenticatedRequestSummaryAccessTypeEnum = "ObjectReadWrite" + PreauthenticatedRequestSummaryAccessTypeAnyobjectwrite PreauthenticatedRequestSummaryAccessTypeEnum = "AnyObjectWrite" + PreauthenticatedRequestSummaryAccessTypeAnyobjectread PreauthenticatedRequestSummaryAccessTypeEnum = "AnyObjectRead" + PreauthenticatedRequestSummaryAccessTypeAnyobjectreadwrite PreauthenticatedRequestSummaryAccessTypeEnum = "AnyObjectReadWrite" +) + +var mappingPreauthenticatedRequestSummaryAccessTypeEnum = map[string]PreauthenticatedRequestSummaryAccessTypeEnum{ + "ObjectRead": PreauthenticatedRequestSummaryAccessTypeObjectread, + "ObjectWrite": PreauthenticatedRequestSummaryAccessTypeObjectwrite, + "ObjectReadWrite": PreauthenticatedRequestSummaryAccessTypeObjectreadwrite, + "AnyObjectWrite": PreauthenticatedRequestSummaryAccessTypeAnyobjectwrite, + "AnyObjectRead": PreauthenticatedRequestSummaryAccessTypeAnyobjectread, + "AnyObjectReadWrite": PreauthenticatedRequestSummaryAccessTypeAnyobjectreadwrite, +} + +var mappingPreauthenticatedRequestSummaryAccessTypeEnumLowerCase = map[string]PreauthenticatedRequestSummaryAccessTypeEnum{ + "objectread": PreauthenticatedRequestSummaryAccessTypeObjectread, + "objectwrite": PreauthenticatedRequestSummaryAccessTypeObjectwrite, + "objectreadwrite": PreauthenticatedRequestSummaryAccessTypeObjectreadwrite, + "anyobjectwrite": PreauthenticatedRequestSummaryAccessTypeAnyobjectwrite, + "anyobjectread": PreauthenticatedRequestSummaryAccessTypeAnyobjectread, + "anyobjectreadwrite": PreauthenticatedRequestSummaryAccessTypeAnyobjectreadwrite, +} + +// GetPreauthenticatedRequestSummaryAccessTypeEnumValues Enumerates the set of values for PreauthenticatedRequestSummaryAccessTypeEnum +func GetPreauthenticatedRequestSummaryAccessTypeEnumValues() []PreauthenticatedRequestSummaryAccessTypeEnum { + values := make([]PreauthenticatedRequestSummaryAccessTypeEnum, 0) + for _, v := range mappingPreauthenticatedRequestSummaryAccessTypeEnum { + values = append(values, v) + } + return values +} + +// GetPreauthenticatedRequestSummaryAccessTypeEnumStringValues Enumerates the set of values in String for PreauthenticatedRequestSummaryAccessTypeEnum +func GetPreauthenticatedRequestSummaryAccessTypeEnumStringValues() []string { + return []string{ + "ObjectRead", + "ObjectWrite", + "ObjectReadWrite", + "AnyObjectWrite", + "AnyObjectRead", + "AnyObjectReadWrite", + } +} + +// GetMappingPreauthenticatedRequestSummaryAccessTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPreauthenticatedRequestSummaryAccessTypeEnum(val string) (PreauthenticatedRequestSummaryAccessTypeEnum, bool) { + enum, ok := mappingPreauthenticatedRequestSummaryAccessTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/prefix_fqdns.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/prefix_fqdns.go new file mode 100644 index 000000000..ff1cf1d35 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/prefix_fqdns.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrefixFqdns An object containing FQDNs +type PrefixFqdns struct { + + // ObjectStorage API FQDN + ObjectStorageApiFqdn *string `mandatory:"false" json:"objectStorageApiFqdn"` + + // S3 Compatibility API FQDN + S3CompatibilityApiFqdn *string `mandatory:"false" json:"s3CompatibilityApiFqdn"` + + // Swift API FQDN + SwiftApiFqdn *string `mandatory:"false" json:"swiftApiFqdn"` +} + +func (m PrefixFqdns) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PrefixFqdns) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/private_endpoint.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/private_endpoint.go new file mode 100644 index 000000000..0a4db1e5b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/private_endpoint.go @@ -0,0 +1,170 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrivateEndpoint A private endpoint makes your service accessible through a private IP in the customer's private network. A private endpoint has a name and is associated with a namespace and a single compartment. +type PrivateEndpoint struct { + + // This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + // underscores, and periods. + // Example: my-new-private-endpoint1 + Name *string `mandatory:"true" json:"name"` + + // The Object Storage namespace associated with the private enpoint. + Namespace *string `mandatory:"true" json:"namespace"` + + // The compartment which is associated with the Private Endpoint. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the Private Endpoint. + CreatedBy *string `mandatory:"true" json:"createdBy"` + + // The date and time the Private Endpoint was created, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time the Private Endpoint was updated, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + TimeModified *common.SDKTime `mandatory:"true" json:"timeModified"` + + // The OCID of the customer's subnet where the private endpoint VNIC will reside. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // The private IP address to assign to this private endpoint. If you provide a value, + // it must be an available IP address in the customer's subnet. If it's not available, an error + // is returned. + // If you do not provide a value, an available IP address in the subnet is automatically chosen. + PrivateEndpointIp *string `mandatory:"true" json:"privateEndpointIp"` + + // A prefix to use for the private endpoint. The customer VCN's DNS records are + // updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + // Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + Prefix *string `mandatory:"true" json:"prefix"` + + Fqdns *Fqdns `mandatory:"true" json:"fqdns"` + + // The entity tag (ETag) for the Private Endpoint. + Etag *string `mandatory:"true" json:"etag"` + + // A list of targets that can be accessed by the private endpoint. At least one or more access targets is required for a private endpoint. + AccessTargets []AccessTargetDetails `mandatory:"true" json:"accessTargets"` + + // A list of additional prefix that you can provide along with any other prefix. These resulting endpointFqdn's are added to the + // customer VCN's DNS record. + AdditionalPrefixes []string `mandatory:"false" json:"additionalPrefixes"` + + // A list of the OCIDs of the network security groups (NSGs) to add the private endpoint's VNIC to. + // For more information about NSGs, see + // NetworkSecurityGroup. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The Private Endpoint's lifecycle state. + LifecycleState PrivateEndpointLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the PrivateEndpoint. + Id *string `mandatory:"false" json:"id"` +} + +func (m PrivateEndpoint) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PrivateEndpoint) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPrivateEndpointLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPrivateEndpointLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PrivateEndpointLifecycleStateEnum Enum with underlying type: string +type PrivateEndpointLifecycleStateEnum string + +// Set of constants representing the allowable values for PrivateEndpointLifecycleStateEnum +const ( + PrivateEndpointLifecycleStateCreating PrivateEndpointLifecycleStateEnum = "CREATING" + PrivateEndpointLifecycleStateActive PrivateEndpointLifecycleStateEnum = "ACTIVE" + PrivateEndpointLifecycleStateInactive PrivateEndpointLifecycleStateEnum = "INACTIVE" + PrivateEndpointLifecycleStateUpdating PrivateEndpointLifecycleStateEnum = "UPDATING" + PrivateEndpointLifecycleStateDeleting PrivateEndpointLifecycleStateEnum = "DELETING" + PrivateEndpointLifecycleStateDeleted PrivateEndpointLifecycleStateEnum = "DELETED" + PrivateEndpointLifecycleStateFailed PrivateEndpointLifecycleStateEnum = "FAILED" +) + +var mappingPrivateEndpointLifecycleStateEnum = map[string]PrivateEndpointLifecycleStateEnum{ + "CREATING": PrivateEndpointLifecycleStateCreating, + "ACTIVE": PrivateEndpointLifecycleStateActive, + "INACTIVE": PrivateEndpointLifecycleStateInactive, + "UPDATING": PrivateEndpointLifecycleStateUpdating, + "DELETING": PrivateEndpointLifecycleStateDeleting, + "DELETED": PrivateEndpointLifecycleStateDeleted, + "FAILED": PrivateEndpointLifecycleStateFailed, +} + +var mappingPrivateEndpointLifecycleStateEnumLowerCase = map[string]PrivateEndpointLifecycleStateEnum{ + "creating": PrivateEndpointLifecycleStateCreating, + "active": PrivateEndpointLifecycleStateActive, + "inactive": PrivateEndpointLifecycleStateInactive, + "updating": PrivateEndpointLifecycleStateUpdating, + "deleting": PrivateEndpointLifecycleStateDeleting, + "deleted": PrivateEndpointLifecycleStateDeleted, + "failed": PrivateEndpointLifecycleStateFailed, +} + +// GetPrivateEndpointLifecycleStateEnumValues Enumerates the set of values for PrivateEndpointLifecycleStateEnum +func GetPrivateEndpointLifecycleStateEnumValues() []PrivateEndpointLifecycleStateEnum { + values := make([]PrivateEndpointLifecycleStateEnum, 0) + for _, v := range mappingPrivateEndpointLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetPrivateEndpointLifecycleStateEnumStringValues Enumerates the set of values in String for PrivateEndpointLifecycleStateEnum +func GetPrivateEndpointLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "INACTIVE", + "UPDATING", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingPrivateEndpointLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPrivateEndpointLifecycleStateEnum(val string) (PrivateEndpointLifecycleStateEnum, bool) { + enum, ok := mappingPrivateEndpointLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/private_endpoint_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/private_endpoint_summary.go new file mode 100644 index 000000000..5509dbace --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/private_endpoint_summary.go @@ -0,0 +1,75 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrivateEndpointSummary To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type PrivateEndpointSummary struct { + + // The name given to the Private Endpoint. Avoid entering confidential information. + // Example: my-new-pe1 + Name *string `mandatory:"true" json:"name"` + + // The Object Storage namespace with which the Private Endpoint is associated. + Namespace *string `mandatory:"true" json:"namespace"` + + // The compartment ID in which the Private Endpoint is authorized. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the Private Endpoint. + CreatedBy *string `mandatory:"true" json:"createdBy"` + + // The date and time the Private Endpoint was created, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time the Private Endpoint was updated, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + TimeModified *common.SDKTime `mandatory:"true" json:"timeModified"` + + // A prefix to use for the private endpoint. The customer VCN's DNS records are + // updated with this prefix. The prefix input from the customer will be the first sub-domain in the endpointFqdn. + // Example: If the prefix chosen is "abc", then the endpointFqdn will be 'abc.private.objectstorage..oraclecloud.com' + Prefix *string `mandatory:"true" json:"prefix"` + + Fqdns *Fqdns `mandatory:"true" json:"fqdns"` + + // The entity tag for the Private Endpoint. + Etag *string `mandatory:"true" json:"etag"` + + // The summaries of Private Endpoints' lifecycle state. + LifecycleState PrivateEndpointLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +func (m PrivateEndpointSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PrivateEndpointSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPrivateEndpointLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPrivateEndpointLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/put_object_lifecycle_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/put_object_lifecycle_policy_details.go new file mode 100644 index 000000000..0a4fe6ad2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/put_object_lifecycle_policy_details.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PutObjectLifecyclePolicyDetails Creates a new object lifecycle policy for a bucket. +type PutObjectLifecyclePolicyDetails struct { + + // The bucket's set of lifecycle policy rules. + Items []ObjectLifecycleRule `mandatory:"false" json:"items"` +} + +func (m PutObjectLifecyclePolicyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PutObjectLifecyclePolicyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/put_object_lifecycle_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/put_object_lifecycle_policy_request_response.go new file mode 100644 index 000000000..9a273d8d4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/put_object_lifecycle_policy_request_response.go @@ -0,0 +1,137 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PutObjectLifecyclePolicyRequest wrapper for the PutObjectLifecyclePolicy operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/PutObjectLifecyclePolicy.go.html to see an example of how to use PutObjectLifecyclePolicyRequest. +type PutObjectLifecyclePolicyRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The lifecycle policy to apply to the bucket. + PutObjectLifecyclePolicyDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should + // fail if the resource already exists. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutObjectLifecyclePolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutObjectLifecyclePolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutObjectLifecyclePolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request PutObjectLifecyclePolicyRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutObjectLifecyclePolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutObjectLifecyclePolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutObjectLifecyclePolicyResponse wrapper for the PutObjectLifecyclePolicy operation +type PutObjectLifecyclePolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ObjectLifecyclePolicy instance + ObjectLifecyclePolicy `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, + // provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // The entity tag (ETag) for the object lifecycle policy. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response PutObjectLifecyclePolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutObjectLifecyclePolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/put_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/put_object_request_response.go new file mode 100644 index 000000000..4f997e362 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/put_object_request_response.go @@ -0,0 +1,366 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// PutObjectRequest wrapper for the PutObject operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/PutObject.go.html to see an example of how to use PutObjectRequest. +type PutObjectRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. Avoid entering confidential information. + // Example: `test/object1.log` + ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` + + // The content length of the body. + ContentLength *int64 `mandatory:"false" contributesTo:"header" name:"Content-Length"` + + // The object to upload to the object store. + PutObjectBody io.ReadCloser `mandatory:"true" contributesTo:"body" encoding:"binary"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should + // fail if the resource already exists. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // A value of `100-continue` requests preliminary verification of the request method, path, and headers before the request body is sent. + // If no error results from such verification, the server will send a 100 (Continue) interim response to indicate readiness for the request body. + // The only allowed value for this parameter is "100-Continue" (case-insensitive). + Expect *string `mandatory:"false" contributesTo:"header" name:"Expect"` + + // The optional header that defines the base64-encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object + // Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the + // MD5 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error + // is returned with the message: + // "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + ContentMD5 *string `mandatory:"false" contributesTo:"header" name:"Content-MD5"` + + // The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + // in addition to the default MD5 checksum. + OpcChecksumAlgorithm PutObjectOpcChecksumAlgorithmEnum `mandatory:"false" contributesTo:"header" name:"opc-checksum-algorithm"` + + // Applicable only if CRC32C is specified in the opc-checksum-algorithm request header. + // The optional header that defines the base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the body. If the optional opc-content-crc32c header + // is present, Object Storage performs an integrity check on the body of the HTTP request by computing the CRC32C checksum for the body and comparing + // it to the CRC32C checksum supplied in the header. If the two checksums do not match, the object is rejected and an HTTP-400 Unmatched Content CRC32C error + // is returned with the message: + // "The computed CRC32C of the request body (ACTUAL_CRC32C) does not match the opc-content-crc32c header (HEADER_CRC32C)" + OpcContentCrc32c *string `mandatory:"false" contributesTo:"header" name:"opc-content-crc32c"` + + // Applicable only if SHA256 is specified in the opc-checksum-algorithm request header. + // The optional header that defines the base64-encoded SHA256 hash of the body. If the optional opc-content-sha256 header is present, Object + // Storage performs an integrity check on the body of the HTTP request by computing the SHA256 hash for the body and comparing it to the + // SHA256 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA256 error + // is returned with the message: + // "The computed SHA256 of the request body (ACTUAL_SHA256) does not match the opc-content-sha256 header (HEADER_SHA256)" + OpcContentSha256 *string `mandatory:"false" contributesTo:"header" name:"opc-content-sha256"` + + // Applicable only if SHA384 is specified in the opc-checksum-algorithm request header. + // The optional header that defines the base64-encoded SHA384 hash of the body. If the optional opc-content-sha384 header is present, Object + // Storage performs an integrity check on the body of the HTTP request by computing the SHA384 hash for the body and comparing it to the + // SHA384 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA384 error + // is returned with the message: + // "The computed SHA384 of the request body (ACTUAL_SHA384) does not match the opc-content-sha384 header (HEADER_SHA384)" + OpcContentSha384 *string `mandatory:"false" contributesTo:"header" name:"opc-content-sha384"` + + // The optional Content-Type header that defines the standard MIME type format of the object. Content type defaults to + // 'application/octet-stream' if not specified in the PutObject call. Specifying values for this header has no effect + // on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, + // you could use this header to identify and perform special operations on text only objects. + ContentType *string `mandatory:"false" contributesTo:"header" name:"Content-Type"` + + // The optional Content-Language header that defines the content language of the object to upload. Specifying + // values for this header has no effect on Object Storage behavior. Programs that read the object determine what + // to do based on the value provided. For example, you could use this header to identify and differentiate objects + // based on a particular language. + ContentLanguage *string `mandatory:"false" contributesTo:"header" name:"Content-Language"` + + // The optional Content-Encoding header that defines the content encodings that were applied to the object to + // upload. Specifying values for this header has no effect on Object Storage behavior. Programs that read the + // object determine what to do based on the value provided. For example, you could use this header to determine + // what decoding mechanisms need to be applied to obtain the media-type specified by the Content-Type header of + // the object. + ContentEncoding *string `mandatory:"false" contributesTo:"header" name:"Content-Encoding"` + + // The optional Content-Disposition header that defines presentational information for the object to be + // returned in GetObject and HeadObject responses. Specifying values for this header has no effect on Object + // Storage behavior. Programs that read the object determine what to do based on the value provided. + // For example, you could use this header to let users download objects with custom filenames in a browser. + ContentDisposition *string `mandatory:"false" contributesTo:"header" name:"Content-Disposition"` + + // The optional Cache-Control header that defines the caching behavior value to be returned in GetObject and + // HeadObject responses. Specifying values for this header has no effect on Object Storage behavior. Programs + // that read the object determine what to do based on the value provided. + // For example, you could use this header to identify objects that require caching restrictions. + CacheControl *string `mandatory:"false" contributesTo:"header" name:"Cache-Control"` + + // The optional header that specifies "AES256" as the encryption algorithm. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerAlgorithm *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-algorithm"` + + // The optional header that specifies the base64-encoded 256-bit encryption key to use to encrypt or + // decrypt the data. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerKey *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-key"` + + // The optional header that specifies the base64-encoded SHA256 hash of the encryption key. This + // value is used to check the integrity of the encryption key. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerKeySha256 *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-key-sha256"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a master encryption key used to call the Key + // Management service to generate a data encryption key or to encrypt or decrypt a data encryption key. + OpcSseKmsKeyId *string `mandatory:"false" contributesTo:"header" name:"opc-sse-kms-key-id"` + + // The storage tier that the object should be stored in. If not specified, the object will be stored in + // the same storage tier as the bucket. + StorageTier PutObjectStorageTierEnum `mandatory:"false" contributesTo:"header" name:"storage-tier"` + + // Optional user-defined metadata key and value. + OpcMeta map[string]string `mandatory:"false" contributesTo:"header-collection" prefix:"opc-meta-"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutObjectRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutObjectRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) + if err == nil && binaryRequestBody.Seekable() { + common.UpdateRequestBinaryBody(&httpRequest, binaryRequestBody) + } + return httpRequest, err +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutObjectRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + rsc := common.NewOCIReadSeekCloser(request.PutObjectBody) + if rsc.Seekable() { + return rsc, true + } + return nil, true + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request PutObjectRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["objectName"] != nil { + templateParam := mandatoryParamMap["objectName"] + for _, template := range templateParam { + replacementParam := *request.ObjectName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutObjectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutObjectRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPutObjectOpcChecksumAlgorithmEnum(string(request.OpcChecksumAlgorithm)); !ok && request.OpcChecksumAlgorithm != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OpcChecksumAlgorithm: %s. Supported values are: %s.", request.OpcChecksumAlgorithm, strings.Join(GetPutObjectOpcChecksumAlgorithmEnumStringValues(), ","))) + } + if _, ok := GetMappingPutObjectStorageTierEnum(string(request.StorageTier)); !ok && request.StorageTier != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for StorageTier: %s. Supported values are: %s.", request.StorageTier, strings.Join(GetPutObjectStorageTierEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutObjectResponse wrapper for the PutObject operation +type PutObjectResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The base64-encoded MD5 hash of the request body as computed by the server. + OpcContentMd5 *string `presentIn:"header" name:"opc-content-md5"` + + // The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the request body as computed by the server. Applicable only if CRC32C was specified in opc-checksum-algorithm request header during upload. + OpcContentCrc32c *string `presentIn:"header" name:"opc-content-crc32c"` + + // The base64-encoded SHA256 hash of the request body as computed by the server. Applicable only if SHA256 was specified in opc-checksum-algorithm request header during upload. + OpcContentSha256 *string `presentIn:"header" name:"opc-content-sha256"` + + // The base64-encoded SHA384 hash of the request body as computed by the server. Applicable only if SHA384 was specified in opc-checksum-algorithm request header during upload. + OpcContentSha384 *string `presentIn:"header" name:"opc-content-sha384"` + + // The entity tag (ETag) for the object. + ETag *string `presentIn:"header" name:"etag"` + + // The time the object was modified, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` + + // VersionId of the newly created object + VersionId *string `presentIn:"header" name:"version-id"` +} + +func (response PutObjectResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutObjectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// PutObjectOpcChecksumAlgorithmEnum Enum with underlying type: string +type PutObjectOpcChecksumAlgorithmEnum string + +// Set of constants representing the allowable values for PutObjectOpcChecksumAlgorithmEnum +const ( + PutObjectOpcChecksumAlgorithmCrc32c PutObjectOpcChecksumAlgorithmEnum = "CRC32C" + PutObjectOpcChecksumAlgorithmSha256 PutObjectOpcChecksumAlgorithmEnum = "SHA256" + PutObjectOpcChecksumAlgorithmSha384 PutObjectOpcChecksumAlgorithmEnum = "SHA384" +) + +var mappingPutObjectOpcChecksumAlgorithmEnum = map[string]PutObjectOpcChecksumAlgorithmEnum{ + "CRC32C": PutObjectOpcChecksumAlgorithmCrc32c, + "SHA256": PutObjectOpcChecksumAlgorithmSha256, + "SHA384": PutObjectOpcChecksumAlgorithmSha384, +} + +var mappingPutObjectOpcChecksumAlgorithmEnumLowerCase = map[string]PutObjectOpcChecksumAlgorithmEnum{ + "crc32c": PutObjectOpcChecksumAlgorithmCrc32c, + "sha256": PutObjectOpcChecksumAlgorithmSha256, + "sha384": PutObjectOpcChecksumAlgorithmSha384, +} + +// GetPutObjectOpcChecksumAlgorithmEnumValues Enumerates the set of values for PutObjectOpcChecksumAlgorithmEnum +func GetPutObjectOpcChecksumAlgorithmEnumValues() []PutObjectOpcChecksumAlgorithmEnum { + values := make([]PutObjectOpcChecksumAlgorithmEnum, 0) + for _, v := range mappingPutObjectOpcChecksumAlgorithmEnum { + values = append(values, v) + } + return values +} + +// GetPutObjectOpcChecksumAlgorithmEnumStringValues Enumerates the set of values in String for PutObjectOpcChecksumAlgorithmEnum +func GetPutObjectOpcChecksumAlgorithmEnumStringValues() []string { + return []string{ + "CRC32C", + "SHA256", + "SHA384", + } +} + +// GetMappingPutObjectOpcChecksumAlgorithmEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPutObjectOpcChecksumAlgorithmEnum(val string) (PutObjectOpcChecksumAlgorithmEnum, bool) { + enum, ok := mappingPutObjectOpcChecksumAlgorithmEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PutObjectStorageTierEnum Enum with underlying type: string +type PutObjectStorageTierEnum string + +// Set of constants representing the allowable values for PutObjectStorageTierEnum +const ( + PutObjectStorageTierStandard PutObjectStorageTierEnum = "Standard" + PutObjectStorageTierInfrequentaccess PutObjectStorageTierEnum = "InfrequentAccess" + PutObjectStorageTierArchive PutObjectStorageTierEnum = "Archive" +) + +var mappingPutObjectStorageTierEnum = map[string]PutObjectStorageTierEnum{ + "Standard": PutObjectStorageTierStandard, + "InfrequentAccess": PutObjectStorageTierInfrequentaccess, + "Archive": PutObjectStorageTierArchive, +} + +var mappingPutObjectStorageTierEnumLowerCase = map[string]PutObjectStorageTierEnum{ + "standard": PutObjectStorageTierStandard, + "infrequentaccess": PutObjectStorageTierInfrequentaccess, + "archive": PutObjectStorageTierArchive, +} + +// GetPutObjectStorageTierEnumValues Enumerates the set of values for PutObjectStorageTierEnum +func GetPutObjectStorageTierEnumValues() []PutObjectStorageTierEnum { + values := make([]PutObjectStorageTierEnum, 0) + for _, v := range mappingPutObjectStorageTierEnum { + values = append(values, v) + } + return values +} + +// GetPutObjectStorageTierEnumStringValues Enumerates the set of values in String for PutObjectStorageTierEnum +func GetPutObjectStorageTierEnumStringValues() []string { + return []string{ + "Standard", + "InfrequentAccess", + "Archive", + } +} + +// GetMappingPutObjectStorageTierEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPutObjectStorageTierEnum(val string) (PutObjectStorageTierEnum, bool) { + enum, ok := mappingPutObjectStorageTierEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/reencrypt_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/reencrypt_bucket_request_response.go new file mode 100644 index 000000000..a7a5cff1d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/reencrypt_bucket_request_response.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ReencryptBucketRequest wrapper for the ReencryptBucket operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ReencryptBucket.go.html to see an example of how to use ReencryptBucketRequest. +type ReencryptBucketRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ReencryptBucketRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ReencryptBucketRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ReencryptBucketRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ReencryptBucketRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ReencryptBucketRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ReencryptBucketRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ReencryptBucketResponse wrapper for the ReencryptBucket operation +type ReencryptBucketResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + // particular request, provide this request ID. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ReencryptBucketResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ReencryptBucketResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/reencrypt_object_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/reencrypt_object_details.go new file mode 100644 index 000000000..141f04bdd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/reencrypt_object_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ReencryptObjectDetails The details used to re-encrypt the data encryption keys associated with an object. +// You can only specify either a kmsKeyId or an sseCustomerKey in the request payload, not both. +// If the request payload is empty, the object is encrypted using the encryption key assigned to the +// bucket. The bucket encryption mechanism can either be a master encryption key managed by Oracle or the Vault service. +// - The sseCustomerKey field specifies the customer-provided encryption key (SSE-C) that will be used to re-encrypt the data encryption keys of the +// object and its chunks. +// - The sourceSSECustomerKey field specifies information about the customer-provided encryption key that is currently +// associated with the object source. Specify a value for the sourceSSECustomerKey only if the object +// is encrypted with a customer-provided encryption key. +type ReencryptObjectDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the master encryption key used to call the Vault + // service to re-encrypt the data encryption keys associated with the object and its chunks. If the kmsKeyId value is + // empty, whether null or an empty string, the API will perform re-encryption by using the kmsKeyId associated with the + // bucket or the master encryption key managed by Oracle, depending on the bucket encryption mechanism. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + SseCustomerKey *SseCustomerKeyDetails `mandatory:"false" json:"sseCustomerKey"` + + SourceSseCustomerKey *SseCustomerKeyDetails `mandatory:"false" json:"sourceSseCustomerKey"` +} + +func (m ReencryptObjectDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ReencryptObjectDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/reencrypt_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/reencrypt_object_request_response.go new file mode 100644 index 000000000..bc6220121 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/reencrypt_object_request_response.go @@ -0,0 +1,139 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ReencryptObjectRequest wrapper for the ReencryptObject operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/ReencryptObject.go.html to see an example of how to use ReencryptObjectRequest. +type ReencryptObjectRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. Avoid entering confidential information. + // Example: `test/object1.log` + ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` + + // Request object for re-encrypting the data encryption key associated with an object. + ReencryptObjectDetails `contributesTo:"body"` + + // VersionId used to identify a particular version of the object + VersionId *string `mandatory:"false" contributesTo:"query" name:"versionId"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ReencryptObjectRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ReencryptObjectRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ReencryptObjectRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request ReencryptObjectRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["objectName"] != nil { + templateParam := mandatoryParamMap["objectName"] + for _, template := range templateParam { + replacementParam := *request.ObjectName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ReencryptObjectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ReencryptObjectRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ReencryptObjectResponse wrapper for the ReencryptObject operation +type ReencryptObjectResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ReencryptObjectResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ReencryptObjectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/rename_object_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/rename_object_details.go new file mode 100644 index 000000000..04077ecb7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/rename_object_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RenameObjectDetails To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type RenameObjectDetails struct { + + // The name of the source object to be renamed. + SourceName *string `mandatory:"true" json:"sourceName"` + + // The new name of the source object. Avoid entering confidential information. + NewName *string `mandatory:"true" json:"newName"` + + // The if-match entity tag (ETag) of the source object. + SrcObjIfMatchETag *string `mandatory:"false" json:"srcObjIfMatchETag"` + + // The if-match entity tag (ETag) of the new object. + NewObjIfMatchETag *string `mandatory:"false" json:"newObjIfMatchETag"` + + // The if-none-match entity tag (ETag) of the new object. The only valid value is '*', which indicates + // request should fail if the new object already exists. + NewObjIfNoneMatchETag *string `mandatory:"false" json:"newObjIfNoneMatchETag"` +} + +func (m RenameObjectDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RenameObjectDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/rename_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/rename_object_request_response.go new file mode 100644 index 000000000..55499f6cb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/rename_object_request_response.go @@ -0,0 +1,131 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RenameObjectRequest wrapper for the RenameObject operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/RenameObject.go.html to see an example of how to use RenameObjectRequest. +type RenameObjectRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The sourceName and newName of rename operation. Avoid entering confidential information. + RenameObjectDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RenameObjectRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RenameObjectRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RenameObjectRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request RenameObjectRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RenameObjectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RenameObjectRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RenameObjectResponse wrapper for the RenameObject operation +type RenameObjectResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The entity tag (ETag) for the object. + ETag *string `presentIn:"header" name:"etag"` + + // The time the object was modified, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29). + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` + + // VersionId of the renamed object + VersionId *string `presentIn:"header" name:"version-id"` +} + +func (response RenameObjectResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RenameObjectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/replication_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/replication_policy.go new file mode 100644 index 000000000..7540d7122 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/replication_policy.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ReplicationPolicy The details of a replication policy. +type ReplicationPolicy struct { + + // The id of the replication policy. + Id *string `mandatory:"true" json:"id"` + + // The name of the policy. + Name *string `mandatory:"true" json:"name"` + + // The destination region to replicate to, for example "us-ashburn-1". + DestinationRegionName *string `mandatory:"true" json:"destinationRegionName"` + + // The bucket to replicate to in the destination region. Replication policy creation does not automatically + // create a destination bucket. Create the destination bucket before creating the policy. + DestinationBucketName *string `mandatory:"true" json:"destinationBucketName"` + + // The date when the replication policy was created as per RFC 3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Changes made to the source bucket before this time has been replicated. + TimeLastSync *common.SDKTime `mandatory:"true" json:"timeLastSync"` + + // The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue + // described in the status message, the status will become ACTIVE. + Status ReplicationPolicyStatusEnum `mandatory:"true" json:"status"` + + // A human-readable description of the status. + StatusMessage *string `mandatory:"true" json:"statusMessage"` +} + +func (m ReplicationPolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ReplicationPolicy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingReplicationPolicyStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetReplicationPolicyStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ReplicationPolicyStatusEnum Enum with underlying type: string +type ReplicationPolicyStatusEnum string + +// Set of constants representing the allowable values for ReplicationPolicyStatusEnum +const ( + ReplicationPolicyStatusActive ReplicationPolicyStatusEnum = "ACTIVE" + ReplicationPolicyStatusClientError ReplicationPolicyStatusEnum = "CLIENT_ERROR" +) + +var mappingReplicationPolicyStatusEnum = map[string]ReplicationPolicyStatusEnum{ + "ACTIVE": ReplicationPolicyStatusActive, + "CLIENT_ERROR": ReplicationPolicyStatusClientError, +} + +var mappingReplicationPolicyStatusEnumLowerCase = map[string]ReplicationPolicyStatusEnum{ + "active": ReplicationPolicyStatusActive, + "client_error": ReplicationPolicyStatusClientError, +} + +// GetReplicationPolicyStatusEnumValues Enumerates the set of values for ReplicationPolicyStatusEnum +func GetReplicationPolicyStatusEnumValues() []ReplicationPolicyStatusEnum { + values := make([]ReplicationPolicyStatusEnum, 0) + for _, v := range mappingReplicationPolicyStatusEnum { + values = append(values, v) + } + return values +} + +// GetReplicationPolicyStatusEnumStringValues Enumerates the set of values in String for ReplicationPolicyStatusEnum +func GetReplicationPolicyStatusEnumStringValues() []string { + return []string{ + "ACTIVE", + "CLIENT_ERROR", + } +} + +// GetMappingReplicationPolicyStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingReplicationPolicyStatusEnum(val string) (ReplicationPolicyStatusEnum, bool) { + enum, ok := mappingReplicationPolicyStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/replication_policy_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/replication_policy_summary.go new file mode 100644 index 000000000..82f0b1059 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/replication_policy_summary.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ReplicationPolicySummary The summary of a replication policy. +type ReplicationPolicySummary struct { + + // The id of the replication policy. + Id *string `mandatory:"true" json:"id"` + + // The name of the policy. + Name *string `mandatory:"true" json:"name"` + + // The destination region to replicate to, for example "us-ashburn-1". + DestinationRegionName *string `mandatory:"true" json:"destinationRegionName"` + + // The bucket to replicate to in the destination region. Replication policy creation does not automatically + // create a destination bucket. Create the destination bucket before creating the policy. + DestinationBucketName *string `mandatory:"true" json:"destinationBucketName"` + + // The date when the replication policy was created as per RFC 3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Changes made to the source bucket before this time has been replicated. + TimeLastSync *common.SDKTime `mandatory:"true" json:"timeLastSync"` + + // The replication status of the policy. If the status is CLIENT_ERROR, once the user fixes the issue + // described in the status message, the status will become ACTIVE. + Status ReplicationPolicySummaryStatusEnum `mandatory:"true" json:"status"` + + // A human-readable description of the status. + StatusMessage *string `mandatory:"true" json:"statusMessage"` +} + +func (m ReplicationPolicySummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ReplicationPolicySummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingReplicationPolicySummaryStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetReplicationPolicySummaryStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ReplicationPolicySummaryStatusEnum Enum with underlying type: string +type ReplicationPolicySummaryStatusEnum string + +// Set of constants representing the allowable values for ReplicationPolicySummaryStatusEnum +const ( + ReplicationPolicySummaryStatusActive ReplicationPolicySummaryStatusEnum = "ACTIVE" + ReplicationPolicySummaryStatusClientError ReplicationPolicySummaryStatusEnum = "CLIENT_ERROR" +) + +var mappingReplicationPolicySummaryStatusEnum = map[string]ReplicationPolicySummaryStatusEnum{ + "ACTIVE": ReplicationPolicySummaryStatusActive, + "CLIENT_ERROR": ReplicationPolicySummaryStatusClientError, +} + +var mappingReplicationPolicySummaryStatusEnumLowerCase = map[string]ReplicationPolicySummaryStatusEnum{ + "active": ReplicationPolicySummaryStatusActive, + "client_error": ReplicationPolicySummaryStatusClientError, +} + +// GetReplicationPolicySummaryStatusEnumValues Enumerates the set of values for ReplicationPolicySummaryStatusEnum +func GetReplicationPolicySummaryStatusEnumValues() []ReplicationPolicySummaryStatusEnum { + values := make([]ReplicationPolicySummaryStatusEnum, 0) + for _, v := range mappingReplicationPolicySummaryStatusEnum { + values = append(values, v) + } + return values +} + +// GetReplicationPolicySummaryStatusEnumStringValues Enumerates the set of values in String for ReplicationPolicySummaryStatusEnum +func GetReplicationPolicySummaryStatusEnumStringValues() []string { + return []string{ + "ACTIVE", + "CLIENT_ERROR", + } +} + +// GetMappingReplicationPolicySummaryStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingReplicationPolicySummaryStatusEnum(val string) (ReplicationPolicySummaryStatusEnum, bool) { + enum, ok := mappingReplicationPolicySummaryStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/replication_source.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/replication_source.go new file mode 100644 index 000000000..125eef6c5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/replication_source.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ReplicationSource The details of a replication source bucket that replicates to a target destination bucket. +type ReplicationSource struct { + + // The name of the policy. + PolicyName *string `mandatory:"true" json:"policyName"` + + // The source region replicating data from, for example "us-ashburn-1". + SourceRegionName *string `mandatory:"true" json:"sourceRegionName"` + + // The source bucket replicating data from. + SourceBucketName *string `mandatory:"true" json:"sourceBucketName"` +} + +func (m ReplicationSource) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ReplicationSource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/restore_objects_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/restore_objects_details.go new file mode 100644 index 000000000..859b2d590 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/restore_objects_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RestoreObjectsDetails The representation of RestoreObjectsDetails +type RestoreObjectsDetails struct { + + // An object that is in an archive storage tier and needs to be restored. + ObjectName *string `mandatory:"true" json:"objectName"` + + // The number of hours for which this object will be restored. + // By default objects will be restored for 24 hours. You can instead configure the duration using the hours parameter. + Hours *int `mandatory:"false" json:"hours"` + + // The versionId of the object to restore. Current object version is used by default. + VersionId *string `mandatory:"false" json:"versionId"` +} + +func (m RestoreObjectsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RestoreObjectsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/restore_objects_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/restore_objects_request_response.go new file mode 100644 index 000000000..b1a0c06a4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/restore_objects_request_response.go @@ -0,0 +1,122 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RestoreObjectsRequest wrapper for the RestoreObjects operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/RestoreObjects.go.html to see an example of how to use RestoreObjectsRequest. +type RestoreObjectsRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // Request to restore object. + RestoreObjectsDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RestoreObjectsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RestoreObjectsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RestoreObjectsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request RestoreObjectsRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RestoreObjectsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RestoreObjectsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RestoreObjectsResponse wrapper for the RestoreObjects operation +type RestoreObjectsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RestoreObjectsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RestoreObjectsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/retention_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/retention_rule.go new file mode 100644 index 000000000..3f75f9447 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/retention_rule.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RetentionRule The details of a retention rule. +type RetentionRule struct { + + // Unique identifier for the retention rule. + Id *string `mandatory:"true" json:"id"` + + // User specified name for the retention rule. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The entity tag (ETag) for the retention rule. + Etag *string `mandatory:"true" json:"etag"` + + // The date and time that the retention rule was created as per RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the retention rule was modified as per RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeModified *common.SDKTime `mandatory:"true" json:"timeModified"` + + Duration *Duration `mandatory:"false" json:"duration"` + + // The date and time as per RFC 3339 (https://tools.ietf.org/html/rfc3339) after which this rule becomes locked. + // and can only be deleted by deleting the bucket. + TimeRuleLocked *common.SDKTime `mandatory:"false" json:"timeRuleLocked"` +} + +func (m RetentionRule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RetentionRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/retention_rule_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/retention_rule_collection.go new file mode 100644 index 000000000..da12ea335 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/retention_rule_collection.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RetentionRuleCollection Retention rule collection. +type RetentionRuleCollection struct { + + // An array of retention rule summaries. + Items []RetentionRuleSummary `mandatory:"true" json:"items"` +} + +func (m RetentionRuleCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RetentionRuleCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/retention_rule_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/retention_rule_details.go new file mode 100644 index 000000000..f028272bc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/retention_rule_details.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RetentionRuleDetails The details to create or update a retention rule. +type RetentionRuleDetails struct { + + // A user-specified name for the retention rule. Names can be helpful in identifying retention rules. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + Duration *Duration `mandatory:"false" json:"duration"` + + // The date and time as per RFC 3339 (https://tools.ietf.org/html/rfc3339) after which this rule is locked + // and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are + // allowed and no other properties can be changed. This property cannot be updated for rules that are in a + // locked state. Specifying it when a duration is not specified is considered an error. + TimeRuleLocked *common.SDKTime `mandatory:"false" json:"timeRuleLocked"` +} + +func (m RetentionRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RetentionRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/retention_rule_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/retention_rule_summary.go new file mode 100644 index 000000000..625349dbc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/retention_rule_summary.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RetentionRuleSummary The summary of a retention rule. +type RetentionRuleSummary struct { + + // Unique identifier for the retention rule. + Id *string `mandatory:"true" json:"id"` + + // User specified name for the retention rule. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The entity tag (ETag) for the retention rule. + Etag *string `mandatory:"true" json:"etag"` + + // The date and time that the retention rule was created as per RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the retention rule was modified as per RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeModified *common.SDKTime `mandatory:"true" json:"timeModified"` + + Duration *Duration `mandatory:"false" json:"duration"` + + // The date and time as per RFC 3339 (https://tools.ietf.org/html/rfc3339) after which this rule becomes locked. + // and can only be deleted by deleting the bucket. + TimeRuleLocked *common.SDKTime `mandatory:"false" json:"timeRuleLocked"` +} + +func (m RetentionRuleSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RetentionRuleSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/sse_customer_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/sse_customer_key_details.go new file mode 100644 index 000000000..9dbd680b5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/sse_customer_key_details.go @@ -0,0 +1,89 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SseCustomerKeyDetails Specifies the details of the customer-provided encryption key (SSE-C) associated with an object. +type SseCustomerKeyDetails struct { + + // Specifies the encryption algorithm. The only supported value is "AES256". + Algorithm SseCustomerKeyDetailsAlgorithmEnum `mandatory:"true" json:"algorithm"` + + // Specifies the base64-encoded 256-bit encryption key to use to encrypt or decrypt the object data. + Key *string `mandatory:"true" json:"key"` + + // Specifies the base64-encoded SHA256 hash of the encryption key. This value is used to check the integrity + // of the encryption key. + KeySha256 *string `mandatory:"true" json:"keySha256"` +} + +func (m SseCustomerKeyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SseCustomerKeyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSseCustomerKeyDetailsAlgorithmEnum(string(m.Algorithm)); !ok && m.Algorithm != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Algorithm: %s. Supported values are: %s.", m.Algorithm, strings.Join(GetSseCustomerKeyDetailsAlgorithmEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SseCustomerKeyDetailsAlgorithmEnum Enum with underlying type: string +type SseCustomerKeyDetailsAlgorithmEnum string + +// Set of constants representing the allowable values for SseCustomerKeyDetailsAlgorithmEnum +const ( + SseCustomerKeyDetailsAlgorithmAes256 SseCustomerKeyDetailsAlgorithmEnum = "AES256" +) + +var mappingSseCustomerKeyDetailsAlgorithmEnum = map[string]SseCustomerKeyDetailsAlgorithmEnum{ + "AES256": SseCustomerKeyDetailsAlgorithmAes256, +} + +var mappingSseCustomerKeyDetailsAlgorithmEnumLowerCase = map[string]SseCustomerKeyDetailsAlgorithmEnum{ + "aes256": SseCustomerKeyDetailsAlgorithmAes256, +} + +// GetSseCustomerKeyDetailsAlgorithmEnumValues Enumerates the set of values for SseCustomerKeyDetailsAlgorithmEnum +func GetSseCustomerKeyDetailsAlgorithmEnumValues() []SseCustomerKeyDetailsAlgorithmEnum { + values := make([]SseCustomerKeyDetailsAlgorithmEnum, 0) + for _, v := range mappingSseCustomerKeyDetailsAlgorithmEnum { + values = append(values, v) + } + return values +} + +// GetSseCustomerKeyDetailsAlgorithmEnumStringValues Enumerates the set of values in String for SseCustomerKeyDetailsAlgorithmEnum +func GetSseCustomerKeyDetailsAlgorithmEnumStringValues() []string { + return []string{ + "AES256", + } +} + +// GetMappingSseCustomerKeyDetailsAlgorithmEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSseCustomerKeyDetailsAlgorithmEnum(val string) (SseCustomerKeyDetailsAlgorithmEnum, bool) { + enum, ok := mappingSseCustomerKeyDetailsAlgorithmEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/storage_tier.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/storage_tier.go new file mode 100644 index 000000000..8be6f78ac --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/storage_tier.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "strings" +) + +// StorageTierEnum Enum with underlying type: string +type StorageTierEnum string + +// Set of constants representing the allowable values for StorageTierEnum +const ( + StorageTierStandard StorageTierEnum = "Standard" + StorageTierInfrequentAccess StorageTierEnum = "InfrequentAccess" + StorageTierArchive StorageTierEnum = "Archive" +) + +var mappingStorageTierEnum = map[string]StorageTierEnum{ + "Standard": StorageTierStandard, + "InfrequentAccess": StorageTierInfrequentAccess, + "Archive": StorageTierArchive, +} + +var mappingStorageTierEnumLowerCase = map[string]StorageTierEnum{ + "standard": StorageTierStandard, + "infrequentaccess": StorageTierInfrequentAccess, + "archive": StorageTierArchive, +} + +// GetStorageTierEnumValues Enumerates the set of values for StorageTierEnum +func GetStorageTierEnumValues() []StorageTierEnum { + values := make([]StorageTierEnum, 0) + for _, v := range mappingStorageTierEnum { + values = append(values, v) + } + return values +} + +// GetStorageTierEnumStringValues Enumerates the set of values in String for StorageTierEnum +func GetStorageTierEnumStringValues() []string { + return []string{ + "Standard", + "InfrequentAccess", + "Archive", + } +} + +// GetMappingStorageTierEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingStorageTierEnum(val string) (StorageTierEnum, bool) { + enum, ok := mappingStorageTierEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_bucket_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_bucket_details.go new file mode 100644 index 000000000..eaf484308 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_bucket_details.go @@ -0,0 +1,201 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateBucketDetails To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, +// talk to an administrator. If you are an administrator who needs to write policies to give users access, see +// Getting Started with Policies (https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm). +type UpdateBucketDetails struct { + + // The Object Storage namespace in which the bucket lives. + Namespace *string `mandatory:"false" json:"namespace"` + + // The compartmentId for the compartment to move the bucket to. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. + // Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. + // Example: my-new-bucket1 + Name *string `mandatory:"false" json:"name"` + + // Arbitrary string, up to 4KB, of keys and values for user-defined metadata. + Metadata map[string]string `mandatory:"false" json:"metadata"` + + // The type of public access enabled on this bucket. A bucket is set to `NoPublicAccess` by default, which only allows an + // authenticated caller to access the bucket and its contents. When `ObjectRead` is enabled on the bucket, public access + // is allowed for the `GetObject`, `HeadObject`, and `ListObjects` operations. When `ObjectReadWithoutList` is enabled + // on the bucket, public access is allowed for the `GetObject` and `HeadObject` operations. + PublicAccessType UpdateBucketDetailsPublicAccessTypeEnum `mandatory:"false" json:"publicAccessType,omitempty"` + + // Whether or not events are emitted for object state changes in this bucket. By default, `objectEventsEnabled` is + // set to `false`. Set `objectEventsEnabled` to `true` to emit events for object state changes. For more information + // about events, see Overview of Events (https://docs.oracle.com/iaas/Content/Events/Concepts/eventsoverview.htm). + ObjectEventsEnabled *bool `mandatory:"false" json:"objectEventsEnabled"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}} + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Key Management master encryption key to associate + // with the specified bucket. If this value is empty, the Update operation will remove the associated key, if + // there is one, from the bucket. (The bucket will continue to be encrypted, but with an encryption key managed + // by Oracle.) + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // The versioning status on the bucket. If in state `Enabled`, multiple versions of the same object can be kept in the bucket. + // When the object is overwritten or deleted, previous versions will still be available. When versioning is `Suspended`, the previous versions will still remain but new versions will no longer be created when overwitten or deleted. + // Versioning cannot be disabled on a bucket once enabled. + Versioning UpdateBucketDetailsVersioningEnum `mandatory:"false" json:"versioning,omitempty"` + + // The auto tiering status on the bucket. If in state `InfrequentAccess`, objects are transitioned + // automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects. + // When auto tiering is `Disabled`, there will be no automatic transitions between storage tiers. + AutoTiering BucketAutoTieringEnum `mandatory:"false" json:"autoTiering,omitempty"` + + // Scope in which the bucket is unique. Default value is NAMESPACE. + // Bucket scope as NAMESPACE means that the bucket is unique only in the owning namespace/tenancy. Other + // tenancies can have a bucket with same name in their namespace. + // Bucket scope as REGION means that the bucket is regionally unique. No other tenancy can have a bucket with + // same name and scope REGION. + // BucketScope can only be updated from NAMESPACE to REGION, it cannot be updated from REGION to NAMESPACE. + // Updating bucket scope is possible only if the bucket name is valid and there is no existing regionally unique + // bucket with the same name. + BucketScope BucketBucketScopeEnum `mandatory:"false" json:"bucketScope,omitempty"` +} + +func (m UpdateBucketDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateBucketDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateBucketDetailsPublicAccessTypeEnum(string(m.PublicAccessType)); !ok && m.PublicAccessType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PublicAccessType: %s. Supported values are: %s.", m.PublicAccessType, strings.Join(GetUpdateBucketDetailsPublicAccessTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingUpdateBucketDetailsVersioningEnum(string(m.Versioning)); !ok && m.Versioning != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Versioning: %s. Supported values are: %s.", m.Versioning, strings.Join(GetUpdateBucketDetailsVersioningEnumStringValues(), ","))) + } + if _, ok := GetMappingBucketAutoTieringEnum(string(m.AutoTiering)); !ok && m.AutoTiering != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AutoTiering: %s. Supported values are: %s.", m.AutoTiering, strings.Join(GetBucketAutoTieringEnumStringValues(), ","))) + } + if _, ok := GetMappingBucketBucketScopeEnum(string(m.BucketScope)); !ok && m.BucketScope != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BucketScope: %s. Supported values are: %s.", m.BucketScope, strings.Join(GetBucketBucketScopeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateBucketDetailsPublicAccessTypeEnum Enum with underlying type: string +type UpdateBucketDetailsPublicAccessTypeEnum string + +// Set of constants representing the allowable values for UpdateBucketDetailsPublicAccessTypeEnum +const ( + UpdateBucketDetailsPublicAccessTypeNopublicaccess UpdateBucketDetailsPublicAccessTypeEnum = "NoPublicAccess" + UpdateBucketDetailsPublicAccessTypeObjectread UpdateBucketDetailsPublicAccessTypeEnum = "ObjectRead" + UpdateBucketDetailsPublicAccessTypeObjectreadwithoutlist UpdateBucketDetailsPublicAccessTypeEnum = "ObjectReadWithoutList" +) + +var mappingUpdateBucketDetailsPublicAccessTypeEnum = map[string]UpdateBucketDetailsPublicAccessTypeEnum{ + "NoPublicAccess": UpdateBucketDetailsPublicAccessTypeNopublicaccess, + "ObjectRead": UpdateBucketDetailsPublicAccessTypeObjectread, + "ObjectReadWithoutList": UpdateBucketDetailsPublicAccessTypeObjectreadwithoutlist, +} + +var mappingUpdateBucketDetailsPublicAccessTypeEnumLowerCase = map[string]UpdateBucketDetailsPublicAccessTypeEnum{ + "nopublicaccess": UpdateBucketDetailsPublicAccessTypeNopublicaccess, + "objectread": UpdateBucketDetailsPublicAccessTypeObjectread, + "objectreadwithoutlist": UpdateBucketDetailsPublicAccessTypeObjectreadwithoutlist, +} + +// GetUpdateBucketDetailsPublicAccessTypeEnumValues Enumerates the set of values for UpdateBucketDetailsPublicAccessTypeEnum +func GetUpdateBucketDetailsPublicAccessTypeEnumValues() []UpdateBucketDetailsPublicAccessTypeEnum { + values := make([]UpdateBucketDetailsPublicAccessTypeEnum, 0) + for _, v := range mappingUpdateBucketDetailsPublicAccessTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateBucketDetailsPublicAccessTypeEnumStringValues Enumerates the set of values in String for UpdateBucketDetailsPublicAccessTypeEnum +func GetUpdateBucketDetailsPublicAccessTypeEnumStringValues() []string { + return []string{ + "NoPublicAccess", + "ObjectRead", + "ObjectReadWithoutList", + } +} + +// GetMappingUpdateBucketDetailsPublicAccessTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateBucketDetailsPublicAccessTypeEnum(val string) (UpdateBucketDetailsPublicAccessTypeEnum, bool) { + enum, ok := mappingUpdateBucketDetailsPublicAccessTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UpdateBucketDetailsVersioningEnum Enum with underlying type: string +type UpdateBucketDetailsVersioningEnum string + +// Set of constants representing the allowable values for UpdateBucketDetailsVersioningEnum +const ( + UpdateBucketDetailsVersioningEnabled UpdateBucketDetailsVersioningEnum = "Enabled" + UpdateBucketDetailsVersioningSuspended UpdateBucketDetailsVersioningEnum = "Suspended" +) + +var mappingUpdateBucketDetailsVersioningEnum = map[string]UpdateBucketDetailsVersioningEnum{ + "Enabled": UpdateBucketDetailsVersioningEnabled, + "Suspended": UpdateBucketDetailsVersioningSuspended, +} + +var mappingUpdateBucketDetailsVersioningEnumLowerCase = map[string]UpdateBucketDetailsVersioningEnum{ + "enabled": UpdateBucketDetailsVersioningEnabled, + "suspended": UpdateBucketDetailsVersioningSuspended, +} + +// GetUpdateBucketDetailsVersioningEnumValues Enumerates the set of values for UpdateBucketDetailsVersioningEnum +func GetUpdateBucketDetailsVersioningEnumValues() []UpdateBucketDetailsVersioningEnum { + values := make([]UpdateBucketDetailsVersioningEnum, 0) + for _, v := range mappingUpdateBucketDetailsVersioningEnum { + values = append(values, v) + } + return values +} + +// GetUpdateBucketDetailsVersioningEnumStringValues Enumerates the set of values in String for UpdateBucketDetailsVersioningEnum +func GetUpdateBucketDetailsVersioningEnumStringValues() []string { + return []string{ + "Enabled", + "Suspended", + } +} + +// GetMappingUpdateBucketDetailsVersioningEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateBucketDetailsVersioningEnum(val string) (UpdateBucketDetailsVersioningEnum, bool) { + enum, ok := mappingUpdateBucketDetailsVersioningEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_bucket_request_response.go new file mode 100644 index 000000000..4ab6546d2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_bucket_request_response.go @@ -0,0 +1,133 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateBucketRequest wrapper for the UpdateBucket operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/UpdateBucket.go.html to see an example of how to use UpdateBucketRequest. +type UpdateBucketRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // Request object for updating a bucket. + UpdateBucketDetails `contributesTo:"body"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateBucketRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateBucketRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateBucketRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request UpdateBucketRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateBucketRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateBucketRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateBucketResponse wrapper for the UpdateBucket operation +type UpdateBucketResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Bucket instance + Bucket `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The entity tag (ETag) for the updated bucket. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateBucketResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateBucketResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_namespace_metadata_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_namespace_metadata_details.go new file mode 100644 index 000000000..c91acd834 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_namespace_metadata_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateNamespaceMetadataDetails UpdateNamespaceMetadataDetails is used to update the NamespaceMetadata. To update NamespaceMetadata, a user +// must have OBJECTSTORAGE_NAMESPACE_UPDATE permission. +type UpdateNamespaceMetadataDetails struct { + + // The updated compartment id for use by an S3 client, if this field is set. + DefaultS3CompartmentId *string `mandatory:"false" json:"defaultS3CompartmentId"` + + // The updated compartment id for use by a Swift client, if this field is set. + DefaultSwiftCompartmentId *string `mandatory:"false" json:"defaultSwiftCompartmentId"` +} + +func (m UpdateNamespaceMetadataDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateNamespaceMetadataDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_namespace_metadata_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_namespace_metadata_request_response.go new file mode 100644 index 000000000..eb5392221 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_namespace_metadata_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateNamespaceMetadataRequest wrapper for the UpdateNamespaceMetadata operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/UpdateNamespaceMetadata.go.html to see an example of how to use UpdateNamespaceMetadataRequest. +type UpdateNamespaceMetadataRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // Request object for update NamespaceMetadata. + UpdateNamespaceMetadataDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateNamespaceMetadataRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateNamespaceMetadataRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateNamespaceMetadataRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request UpdateNamespaceMetadataRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateNamespaceMetadataRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateNamespaceMetadataRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateNamespaceMetadataResponse wrapper for the UpdateNamespaceMetadata operation +type UpdateNamespaceMetadataResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NamespaceMetadata instance + NamespaceMetadata `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateNamespaceMetadataResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateNamespaceMetadataResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_object_storage_tier_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_object_storage_tier_details.go new file mode 100644 index 000000000..8a7d04fb8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_object_storage_tier_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateObjectStorageTierDetails To change the storage tier of an object, we specify the object name and the desired +// storage tier in the body. Objects can be moved between Standard and InfrequentAccess +// tiers and from Standard or InfrequentAccess tier to Archive tier. If a version id is +// specified, only the specified version of the object is moved to a different storage +// tier, else the current version is used. +type UpdateObjectStorageTierDetails struct { + + // An object for which the storage tier needs to be changed. + ObjectName *string `mandatory:"true" json:"objectName"` + + // The storage tier that the object should be moved to. + StorageTier StorageTierEnum `mandatory:"true" json:"storageTier"` + + // The versionId of the object. Current object version is used by default. + VersionId *string `mandatory:"false" json:"versionId"` +} + +func (m UpdateObjectStorageTierDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateObjectStorageTierDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingStorageTierEnum(string(m.StorageTier)); !ok && m.StorageTier != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for StorageTier: %s. Supported values are: %s.", m.StorageTier, strings.Join(GetStorageTierEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_object_storage_tier_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_object_storage_tier_request_response.go new file mode 100644 index 000000000..7ded2dcf9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_object_storage_tier_request_response.go @@ -0,0 +1,122 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateObjectStorageTierRequest wrapper for the UpdateObjectStorageTier operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/UpdateObjectStorageTier.go.html to see an example of how to use UpdateObjectStorageTierRequest. +type UpdateObjectStorageTierRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The object name and the desired storage tier. + UpdateObjectStorageTierDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateObjectStorageTierRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateObjectStorageTierRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateObjectStorageTierRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request UpdateObjectStorageTierRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateObjectStorageTierRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateObjectStorageTierRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateObjectStorageTierResponse wrapper for the UpdateObjectStorageTier operation +type UpdateObjectStorageTierResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateObjectStorageTierResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateObjectStorageTierResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_private_endpoint_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_private_endpoint_details.go new file mode 100644 index 000000000..d1602d695 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_private_endpoint_details.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePrivateEndpointDetails Information that can be updated for a private endpoint. +type UpdatePrivateEndpointDetails struct { + + // This name associated with the endpoint. Valid characters are uppercase or lowercase letters, numbers, hyphens, + // underscores, and periods. + // Example: my-new-private-endpoint1 + Name *string `mandatory:"false" json:"name"` + + // The Object Storage namespace which will associated with the private endpoint. + Namespace *string `mandatory:"false" json:"namespace"` + + // A list of targets that can be accessed by the private endpoint. + AccessTargets []AccessTargetDetails `mandatory:"false" json:"accessTargets"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdatePrivateEndpointDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdatePrivateEndpointDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_private_endpoint_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_private_endpoint_request_response.go new file mode 100644 index 000000000..730196028 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_private_endpoint_request_response.go @@ -0,0 +1,131 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdatePrivateEndpointRequest wrapper for the UpdatePrivateEndpoint operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/UpdatePrivateEndpoint.go.html to see an example of how to use UpdatePrivateEndpointRequest. +type UpdatePrivateEndpointRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the private endpoint. Avoid entering confidential information. + // Example: `my-new-pe-1` + PeName *string `mandatory:"true" contributesTo:"path" name:"peName"` + + // Request object for updating the Private Endpoint. + UpdatePrivateEndpointDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdatePrivateEndpointRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePrivateEndpointRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdatePrivateEndpointRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request UpdatePrivateEndpointRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["peName"] != nil { + templateParam := mandatoryParamMap["peName"] + for _, template := range templateParam { + replacementParam := *request.PeName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePrivateEndpointRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdatePrivateEndpointRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdatePrivateEndpointResponse wrapper for the UpdatePrivateEndpoint operation +type UpdatePrivateEndpointResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. If you need to contact Oracle about a + // particular request, provide this request ID. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdatePrivateEndpointResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePrivateEndpointResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_retention_rule_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_retention_rule_details.go new file mode 100644 index 000000000..5b10743c0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_retention_rule_details.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateRetentionRuleDetails The details to update a retention rule. +type UpdateRetentionRuleDetails struct { + + // A user-specified name for the retention rule. Names can be helpful in identifying retention rules. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + Duration *Duration `mandatory:"false" json:"duration"` + + // The date and time as per RFC 3339 (https://tools.ietf.org/html/rfc3339) after which this rule is locked + // and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are + // allowed and no other properties can be changed. This property cannot be updated for rules that are in a + // locked state. Specifying it when a duration is not specified is considered an error. + TimeRuleLocked *common.SDKTime `mandatory:"false" json:"timeRuleLocked"` +} + +func (m UpdateRetentionRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateRetentionRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_retention_rule_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_retention_rule_request_response.go new file mode 100644 index 000000000..27ab4b983 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/update_retention_rule_request_response.go @@ -0,0 +1,146 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateRetentionRuleRequest wrapper for the UpdateRetentionRule operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/UpdateRetentionRule.go.html to see an example of how to use UpdateRetentionRuleRequest. +type UpdateRetentionRuleRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The ID of the retention rule. + RetentionRuleId *string `mandatory:"true" contributesTo:"path" name:"retentionRuleId"` + + // Request object for updating the retention rule. + UpdateRetentionRuleDetails `contributesTo:"body"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateRetentionRuleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateRetentionRuleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateRetentionRuleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request UpdateRetentionRuleRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["retentionRuleId"] != nil { + templateParam := mandatoryParamMap["retentionRuleId"] + for _, template := range templateParam { + replacementParam := *request.RetentionRuleId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateRetentionRuleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateRetentionRuleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateRetentionRuleResponse wrapper for the UpdateRetentionRule operation +type UpdateRetentionRuleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RetentionRule instance + RetentionRule `presentIn:"body"` + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The entity tag (ETag) for the retention rule that was updated. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateRetentionRuleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateRetentionRuleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/upload_part_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/upload_part_request_response.go new file mode 100644 index 000000000..5d3ecb6ee --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/upload_part_request_response.go @@ -0,0 +1,289 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// UploadPartRequest wrapper for the UploadPart operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/objectstorage/UploadPart.go.html to see an example of how to use UploadPartRequest. +type UploadPartRequest struct { + + // The Object Storage namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. Avoid entering confidential information. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. Avoid entering confidential information. + // Example: `test/object1.log` + ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` + + // The upload ID for a multipart upload. + UploadId *string `mandatory:"true" contributesTo:"query" name:"uploadId"` + + // The part number that identifies the object part currently being uploaded. + UploadPartNum *int `mandatory:"true" contributesTo:"query" name:"uploadPartNum"` + + // The content length of the body. + ContentLength *int64 `mandatory:"false" contributesTo:"header" name:"Content-Length"` + + // The part being uploaded to the Object Storage service. + UploadPartBody io.ReadCloser `mandatory:"true" contributesTo:"body" encoding:"binary"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` + + // The entity tag (ETag) to match with the ETag of an existing resource. If the specified ETag matches the ETag of + // the existing resource, GET and HEAD requests will return the resource and PUT and POST requests will upload + // the resource. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should + // fail if the resource already exists. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // A value of `100-continue` requests preliminary verification of the request method, path, and headers before the request body is sent. + // If no error results from such verification, the server will send a 100 (Continue) interim response to indicate readiness for the request body. + // The only allowed value for this parameter is "100-Continue" (case-insensitive). + Expect *string `mandatory:"false" contributesTo:"header" name:"Expect"` + + // The optional header that defines the base64-encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object + // Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the + // MD5 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error + // is returned with the message: + // "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)" + ContentMD5 *string `mandatory:"false" contributesTo:"header" name:"Content-MD5"` + + // The optional checksum algorithm to use to compute and store the checksum of the body of the HTTP request (or the parts in case of multipart uploads), + // in addition to the default MD5 checksum. + OpcChecksumAlgorithm UploadPartOpcChecksumAlgorithmEnum `mandatory:"false" contributesTo:"header" name:"opc-checksum-algorithm"` + + // Applicable only if CRC32C is specified in the opc-checksum-algorithm request header. + // The optional header that defines the base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the body. If the optional opc-content-crc32c header + // is present, Object Storage performs an integrity check on the body of the HTTP request by computing the CRC32C checksum for the body and comparing + // it to the CRC32C checksum supplied in the header. If the two checksums do not match, the object is rejected and an HTTP-400 Unmatched Content CRC32C error + // is returned with the message: + // "The computed CRC32C of the request body (ACTUAL_CRC32C) does not match the opc-content-crc32c header (HEADER_CRC32C)" + OpcContentCrc32c *string `mandatory:"false" contributesTo:"header" name:"opc-content-crc32c"` + + // Applicable only if SHA256 is specified in the opc-checksum-algorithm request header. + // The optional header that defines the base64-encoded SHA256 hash of the body. If the optional opc-content-sha256 header is present, Object + // Storage performs an integrity check on the body of the HTTP request by computing the SHA256 hash for the body and comparing it to the + // SHA256 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA256 error + // is returned with the message: + // "The computed SHA256 of the request body (ACTUAL_SHA256) does not match the opc-content-sha256 header (HEADER_SHA256)" + OpcContentSha256 *string `mandatory:"false" contributesTo:"header" name:"opc-content-sha256"` + + // Applicable only if SHA384 is specified in the opc-checksum-algorithm request header. + // The optional header that defines the base64-encoded SHA384 hash of the body. If the optional opc-content-sha384 header is present, Object + // Storage performs an integrity check on the body of the HTTP request by computing the SHA384 hash for the body and comparing it to the + // SHA384 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content SHA384 error + // is returned with the message: + // "The computed SHA384 of the request body (ACTUAL_SHA384) does not match the opc-content-sha384 header (HEADER_SHA384)" + OpcContentSha384 *string `mandatory:"false" contributesTo:"header" name:"opc-content-sha384"` + + // The optional header that specifies "AES256" as the encryption algorithm. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerAlgorithm *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-algorithm"` + + // The optional header that specifies the base64-encoded 256-bit encryption key to use to encrypt or + // decrypt the data. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerKey *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-key"` + + // The optional header that specifies the base64-encoded SHA256 hash of the encryption key. This + // value is used to check the integrity of the encryption key. For more information, see + // Using Your Own Keys for Server-Side Encryption (https://docs.oracle.com/iaas/Content/Object/Tasks/usingyourencryptionkeys.htm). + OpcSseCustomerKeySha256 *string `mandatory:"false" contributesTo:"header" name:"opc-sse-customer-key-sha256"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of a master encryption key used to call the Key + // Management service to generate a data encryption key or to encrypt or decrypt a data encryption key. + OpcSseKmsKeyId *string `mandatory:"false" contributesTo:"header" name:"opc-sse-kms-key-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UploadPartRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UploadPartRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) + if err == nil && binaryRequestBody.Seekable() { + common.UpdateRequestBinaryBody(&httpRequest, binaryRequestBody) + } + return httpRequest, err +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UploadPartRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + rsc := common.NewOCIReadSeekCloser(request.UploadPartBody) + if rsc.Seekable() { + return rsc, true + } + return nil, true + +} + +// ReplaceMandatoryParamInPath replaces the mandatory parameter in the path with the value provided. +// Not all services are supporting this feature and this method will be a no-op for those services. +func (request UploadPartRequest) ReplaceMandatoryParamInPath(client *common.BaseClient, mandatoryParamMap map[string][]common.TemplateParamForPerRealmEndpoint) { + if mandatoryParamMap["namespaceName"] != nil { + templateParam := mandatoryParamMap["namespaceName"] + for _, template := range templateParam { + replacementParam := *request.NamespaceName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["bucketName"] != nil { + templateParam := mandatoryParamMap["bucketName"] + for _, template := range templateParam { + replacementParam := *request.BucketName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["objectName"] != nil { + templateParam := mandatoryParamMap["objectName"] + for _, template := range templateParam { + replacementParam := *request.ObjectName + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } + if mandatoryParamMap["uploadId"] != nil { + templateParam := mandatoryParamMap["uploadId"] + for _, template := range templateParam { + replacementParam := *request.UploadId + if template.EndsWithDot { + replacementParam = replacementParam + "." + } + client.Host = strings.Replace(client.Host, template.Template, replacementParam, -1) + } + } +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UploadPartRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UploadPartRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingUploadPartOpcChecksumAlgorithmEnum(string(request.OpcChecksumAlgorithm)); !ok && request.OpcChecksumAlgorithm != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OpcChecksumAlgorithm: %s. Supported values are: %s.", request.OpcChecksumAlgorithm, strings.Join(GetUploadPartOpcChecksumAlgorithmEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UploadPartResponse wrapper for the UploadPart operation +type UploadPartResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. + OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular + // request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The base64-encoded MD5 hash of the request body, as computed by the server. + OpcContentMd5 *string `presentIn:"header" name:"opc-content-md5"` + + // The base64-encoded, 32-bit CRC32C (Castagnoli) checksum of the request body as computed by the server. Applicable only if CRC32C was specified in opc-checksum-algorithm request header during upload. + OpcContentCrc32c *string `presentIn:"header" name:"opc-content-crc32c"` + + // The base64-encoded SHA256 hash of the request body as computed by the server. Applicable only if SHA256 was specified in opc-checksum-algorithm request header during upload. + OpcContentSha256 *string `presentIn:"header" name:"opc-content-sha256"` + + // The base64-encoded SHA384 hash of the request body as computed by the server. Applicable only if SHA384 was specified in opc-checksum-algorithm request header during upload. + OpcContentSha384 *string `presentIn:"header" name:"opc-content-sha384"` + + // The entity tag (ETag) for the object. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response UploadPartResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UploadPartResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// UploadPartOpcChecksumAlgorithmEnum Enum with underlying type: string +type UploadPartOpcChecksumAlgorithmEnum string + +// Set of constants representing the allowable values for UploadPartOpcChecksumAlgorithmEnum +const ( + UploadPartOpcChecksumAlgorithmCrc32c UploadPartOpcChecksumAlgorithmEnum = "CRC32C" + UploadPartOpcChecksumAlgorithmSha256 UploadPartOpcChecksumAlgorithmEnum = "SHA256" + UploadPartOpcChecksumAlgorithmSha384 UploadPartOpcChecksumAlgorithmEnum = "SHA384" +) + +var mappingUploadPartOpcChecksumAlgorithmEnum = map[string]UploadPartOpcChecksumAlgorithmEnum{ + "CRC32C": UploadPartOpcChecksumAlgorithmCrc32c, + "SHA256": UploadPartOpcChecksumAlgorithmSha256, + "SHA384": UploadPartOpcChecksumAlgorithmSha384, +} + +var mappingUploadPartOpcChecksumAlgorithmEnumLowerCase = map[string]UploadPartOpcChecksumAlgorithmEnum{ + "crc32c": UploadPartOpcChecksumAlgorithmCrc32c, + "sha256": UploadPartOpcChecksumAlgorithmSha256, + "sha384": UploadPartOpcChecksumAlgorithmSha384, +} + +// GetUploadPartOpcChecksumAlgorithmEnumValues Enumerates the set of values for UploadPartOpcChecksumAlgorithmEnum +func GetUploadPartOpcChecksumAlgorithmEnumValues() []UploadPartOpcChecksumAlgorithmEnum { + values := make([]UploadPartOpcChecksumAlgorithmEnum, 0) + for _, v := range mappingUploadPartOpcChecksumAlgorithmEnum { + values = append(values, v) + } + return values +} + +// GetUploadPartOpcChecksumAlgorithmEnumStringValues Enumerates the set of values in String for UploadPartOpcChecksumAlgorithmEnum +func GetUploadPartOpcChecksumAlgorithmEnumStringValues() []string { + return []string{ + "CRC32C", + "SHA256", + "SHA384", + } +} + +// GetMappingUploadPartOpcChecksumAlgorithmEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUploadPartOpcChecksumAlgorithmEnum(val string) (UploadPartOpcChecksumAlgorithmEnum, bool) { + enum, ok := mappingUploadPartOpcChecksumAlgorithmEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request.go new file mode 100644 index 000000000..c9202eaa4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request.go @@ -0,0 +1,189 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequest A description of workRequest status. +type WorkRequest struct { + + // The type of work request. + OperationType WorkRequestOperationTypeEnum `mandatory:"false" json:"operationType,omitempty"` + + // The status of the specified work request. + Status WorkRequestStatusEnum `mandatory:"false" json:"status,omitempty"` + + // The id of the work request. + Id *string `mandatory:"false" json:"id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. Work + // requests are scoped to the same compartment as the resource the work request affects. + // If the work request affects multiple resources and those resources are not in the same compartment, the OCID of + // the primary resource is used. For example, you can copy an object in a bucket in one compartment to a bucket in + // another compartment. In this case, the OCID of the source compartment is used. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + Resources []WorkRequestResource `mandatory:"false" json:"resources"` + + // Percentage of the work request completed. + PercentComplete *float32 `mandatory:"false" json:"percentComplete"` + + // The date and time the work request was created, as described in + // RFC 3339 (https://tools.ietf.org/html/rfc3339). + TimeAccepted *common.SDKTime `mandatory:"false" json:"timeAccepted"` + + // The date and time the work request was started, as described in + // RFC 3339 (https://tools.ietf.org/html/rfc3339). + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The date and time the work request was finished, as described in + // RFC 3339 (https://tools.ietf.org/html/rfc3339). + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +func (m WorkRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingWorkRequestOperationTypeEnum(string(m.OperationType)); !ok && m.OperationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationType: %s. Supported values are: %s.", m.OperationType, strings.Join(GetWorkRequestOperationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingWorkRequestStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetWorkRequestStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// WorkRequestOperationTypeEnum Enum with underlying type: string +type WorkRequestOperationTypeEnum string + +// Set of constants representing the allowable values for WorkRequestOperationTypeEnum +const ( + WorkRequestOperationTypeCopyObject WorkRequestOperationTypeEnum = "COPY_OBJECT" + WorkRequestOperationTypeReencrypt WorkRequestOperationTypeEnum = "REENCRYPT" + WorkRequestOperationTypePrivateEndpointCreate WorkRequestOperationTypeEnum = "PRIVATE_ENDPOINT_CREATE" + WorkRequestOperationTypePrivateEndpointUpdate WorkRequestOperationTypeEnum = "PRIVATE_ENDPOINT_UPDATE" + WorkRequestOperationTypePrivateEndpointDelete WorkRequestOperationTypeEnum = "PRIVATE_ENDPOINT_DELETE" +) + +var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnum{ + "COPY_OBJECT": WorkRequestOperationTypeCopyObject, + "REENCRYPT": WorkRequestOperationTypeReencrypt, + "PRIVATE_ENDPOINT_CREATE": WorkRequestOperationTypePrivateEndpointCreate, + "PRIVATE_ENDPOINT_UPDATE": WorkRequestOperationTypePrivateEndpointUpdate, + "PRIVATE_ENDPOINT_DELETE": WorkRequestOperationTypePrivateEndpointDelete, +} + +var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperationTypeEnum{ + "copy_object": WorkRequestOperationTypeCopyObject, + "reencrypt": WorkRequestOperationTypeReencrypt, + "private_endpoint_create": WorkRequestOperationTypePrivateEndpointCreate, + "private_endpoint_update": WorkRequestOperationTypePrivateEndpointUpdate, + "private_endpoint_delete": WorkRequestOperationTypePrivateEndpointDelete, +} + +// GetWorkRequestOperationTypeEnumValues Enumerates the set of values for WorkRequestOperationTypeEnum +func GetWorkRequestOperationTypeEnumValues() []WorkRequestOperationTypeEnum { + values := make([]WorkRequestOperationTypeEnum, 0) + for _, v := range mappingWorkRequestOperationTypeEnum { + values = append(values, v) + } + return values +} + +// GetWorkRequestOperationTypeEnumStringValues Enumerates the set of values in String for WorkRequestOperationTypeEnum +func GetWorkRequestOperationTypeEnumStringValues() []string { + return []string{ + "COPY_OBJECT", + "REENCRYPT", + "PRIVATE_ENDPOINT_CREATE", + "PRIVATE_ENDPOINT_UPDATE", + "PRIVATE_ENDPOINT_DELETE", + } +} + +// GetMappingWorkRequestOperationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkRequestOperationTypeEnum(val string) (WorkRequestOperationTypeEnum, bool) { + enum, ok := mappingWorkRequestOperationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// WorkRequestStatusEnum Enum with underlying type: string +type WorkRequestStatusEnum string + +// Set of constants representing the allowable values for WorkRequestStatusEnum +const ( + WorkRequestStatusAccepted WorkRequestStatusEnum = "ACCEPTED" + WorkRequestStatusInProgress WorkRequestStatusEnum = "IN_PROGRESS" + WorkRequestStatusFailed WorkRequestStatusEnum = "FAILED" + WorkRequestStatusCompleted WorkRequestStatusEnum = "COMPLETED" + WorkRequestStatusCanceling WorkRequestStatusEnum = "CANCELING" + WorkRequestStatusCanceled WorkRequestStatusEnum = "CANCELED" +) + +var mappingWorkRequestStatusEnum = map[string]WorkRequestStatusEnum{ + "ACCEPTED": WorkRequestStatusAccepted, + "IN_PROGRESS": WorkRequestStatusInProgress, + "FAILED": WorkRequestStatusFailed, + "COMPLETED": WorkRequestStatusCompleted, + "CANCELING": WorkRequestStatusCanceling, + "CANCELED": WorkRequestStatusCanceled, +} + +var mappingWorkRequestStatusEnumLowerCase = map[string]WorkRequestStatusEnum{ + "accepted": WorkRequestStatusAccepted, + "in_progress": WorkRequestStatusInProgress, + "failed": WorkRequestStatusFailed, + "completed": WorkRequestStatusCompleted, + "canceling": WorkRequestStatusCanceling, + "canceled": WorkRequestStatusCanceled, +} + +// GetWorkRequestStatusEnumValues Enumerates the set of values for WorkRequestStatusEnum +func GetWorkRequestStatusEnumValues() []WorkRequestStatusEnum { + values := make([]WorkRequestStatusEnum, 0) + for _, v := range mappingWorkRequestStatusEnum { + values = append(values, v) + } + return values +} + +// GetWorkRequestStatusEnumStringValues Enumerates the set of values in String for WorkRequestStatusEnum +func GetWorkRequestStatusEnumStringValues() []string { + return []string{ + "ACCEPTED", + "IN_PROGRESS", + "FAILED", + "COMPLETED", + "CANCELING", + "CANCELED", + } +} + +// GetMappingWorkRequestStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkRequestStatusEnum(val string) (WorkRequestStatusEnum, bool) { + enum, ok := mappingWorkRequestStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_error.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_error.go new file mode 100644 index 000000000..46d7c88e7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_error.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestError The representation of WorkRequestError +type WorkRequestError struct { + + // A machine-usable code for the error that occurred. For the list of error codes, + // see API Errors (https://docs.oracle.com/iaas/Content/API/References/apierrors.htm). + Code *string `mandatory:"false" json:"code"` + + // A human-readable description of the issue that produced the error. + Message *string `mandatory:"false" json:"message"` + + // The time the error occurred. + Timestamp *common.SDKTime `mandatory:"false" json:"timestamp"` +} + +func (m WorkRequestError) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestError) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_log_entry.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_log_entry.go new file mode 100644 index 000000000..f7c3c348e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_log_entry.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestLogEntry The representation of WorkRequestLogEntry +type WorkRequestLogEntry struct { + + // Human-readable log message. + Message *string `mandatory:"false" json:"message"` + + // The date and time the log message was written, as described in + // RFC 3339 (https://tools.ietf.org/html/rfc3339). + Timestamp *common.SDKTime `mandatory:"false" json:"timestamp"` +} + +func (m WorkRequestLogEntry) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestLogEntry) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_resource.go new file mode 100644 index 000000000..c16dd8d40 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_resource.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestResource The representation of WorkRequestResource +type WorkRequestResource struct { + + // The status of the work request. + ActionType WorkRequestResourceActionTypeEnum `mandatory:"false" json:"actionType,omitempty"` + + // The resource type the work request affects. + EntityType *string `mandatory:"false" json:"entityType"` + + // The resource type identifier. + Identifier *string `mandatory:"false" json:"identifier"` + + // The URI path that you can use for a GET request to access the resource metadata. + EntityUri *string `mandatory:"false" json:"entityUri"` + + // The metadata of the resource. + Metadata map[string]string `mandatory:"false" json:"metadata"` +} + +func (m WorkRequestResource) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestResource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingWorkRequestResourceActionTypeEnum(string(m.ActionType)); !ok && m.ActionType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionType: %s. Supported values are: %s.", m.ActionType, strings.Join(GetWorkRequestResourceActionTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// WorkRequestResourceActionTypeEnum Enum with underlying type: string +type WorkRequestResourceActionTypeEnum string + +// Set of constants representing the allowable values for WorkRequestResourceActionTypeEnum +const ( + WorkRequestResourceActionTypeCreated WorkRequestResourceActionTypeEnum = "CREATED" + WorkRequestResourceActionTypeUpdated WorkRequestResourceActionTypeEnum = "UPDATED" + WorkRequestResourceActionTypeDeleted WorkRequestResourceActionTypeEnum = "DELETED" + WorkRequestResourceActionTypeRelated WorkRequestResourceActionTypeEnum = "RELATED" + WorkRequestResourceActionTypeInProgress WorkRequestResourceActionTypeEnum = "IN_PROGRESS" + WorkRequestResourceActionTypeRead WorkRequestResourceActionTypeEnum = "READ" + WorkRequestResourceActionTypeWritten WorkRequestResourceActionTypeEnum = "WRITTEN" +) + +var mappingWorkRequestResourceActionTypeEnum = map[string]WorkRequestResourceActionTypeEnum{ + "CREATED": WorkRequestResourceActionTypeCreated, + "UPDATED": WorkRequestResourceActionTypeUpdated, + "DELETED": WorkRequestResourceActionTypeDeleted, + "RELATED": WorkRequestResourceActionTypeRelated, + "IN_PROGRESS": WorkRequestResourceActionTypeInProgress, + "READ": WorkRequestResourceActionTypeRead, + "WRITTEN": WorkRequestResourceActionTypeWritten, +} + +var mappingWorkRequestResourceActionTypeEnumLowerCase = map[string]WorkRequestResourceActionTypeEnum{ + "created": WorkRequestResourceActionTypeCreated, + "updated": WorkRequestResourceActionTypeUpdated, + "deleted": WorkRequestResourceActionTypeDeleted, + "related": WorkRequestResourceActionTypeRelated, + "in_progress": WorkRequestResourceActionTypeInProgress, + "read": WorkRequestResourceActionTypeRead, + "written": WorkRequestResourceActionTypeWritten, +} + +// GetWorkRequestResourceActionTypeEnumValues Enumerates the set of values for WorkRequestResourceActionTypeEnum +func GetWorkRequestResourceActionTypeEnumValues() []WorkRequestResourceActionTypeEnum { + values := make([]WorkRequestResourceActionTypeEnum, 0) + for _, v := range mappingWorkRequestResourceActionTypeEnum { + values = append(values, v) + } + return values +} + +// GetWorkRequestResourceActionTypeEnumStringValues Enumerates the set of values in String for WorkRequestResourceActionTypeEnum +func GetWorkRequestResourceActionTypeEnumStringValues() []string { + return []string{ + "CREATED", + "UPDATED", + "DELETED", + "RELATED", + "IN_PROGRESS", + "READ", + "WRITTEN", + } +} + +// GetMappingWorkRequestResourceActionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkRequestResourceActionTypeEnum(val string) (WorkRequestResourceActionTypeEnum, bool) { + enum, ok := mappingWorkRequestResourceActionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_resource_metadata_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_resource_metadata_key.go new file mode 100644 index 000000000..4a2db5db5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_resource_metadata_key.go @@ -0,0 +1,70 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "strings" +) + +// WorkRequestResourceMetadataKeyEnum Enum with underlying type: string +type WorkRequestResourceMetadataKeyEnum string + +// Set of constants representing the allowable values for WorkRequestResourceMetadataKeyEnum +const ( + WorkRequestResourceMetadataKeyRegion WorkRequestResourceMetadataKeyEnum = "REGION" + WorkRequestResourceMetadataKeyNamespace WorkRequestResourceMetadataKeyEnum = "NAMESPACE" + WorkRequestResourceMetadataKeyBucket WorkRequestResourceMetadataKeyEnum = "BUCKET" + WorkRequestResourceMetadataKeyObject WorkRequestResourceMetadataKeyEnum = "OBJECT" + WorkRequestResourceMetadataKeyPrivateEndpointName WorkRequestResourceMetadataKeyEnum = "PRIVATE_ENDPOINT_NAME" +) + +var mappingWorkRequestResourceMetadataKeyEnum = map[string]WorkRequestResourceMetadataKeyEnum{ + "REGION": WorkRequestResourceMetadataKeyRegion, + "NAMESPACE": WorkRequestResourceMetadataKeyNamespace, + "BUCKET": WorkRequestResourceMetadataKeyBucket, + "OBJECT": WorkRequestResourceMetadataKeyObject, + "PRIVATE_ENDPOINT_NAME": WorkRequestResourceMetadataKeyPrivateEndpointName, +} + +var mappingWorkRequestResourceMetadataKeyEnumLowerCase = map[string]WorkRequestResourceMetadataKeyEnum{ + "region": WorkRequestResourceMetadataKeyRegion, + "namespace": WorkRequestResourceMetadataKeyNamespace, + "bucket": WorkRequestResourceMetadataKeyBucket, + "object": WorkRequestResourceMetadataKeyObject, + "private_endpoint_name": WorkRequestResourceMetadataKeyPrivateEndpointName, +} + +// GetWorkRequestResourceMetadataKeyEnumValues Enumerates the set of values for WorkRequestResourceMetadataKeyEnum +func GetWorkRequestResourceMetadataKeyEnumValues() []WorkRequestResourceMetadataKeyEnum { + values := make([]WorkRequestResourceMetadataKeyEnum, 0) + for _, v := range mappingWorkRequestResourceMetadataKeyEnum { + values = append(values, v) + } + return values +} + +// GetWorkRequestResourceMetadataKeyEnumStringValues Enumerates the set of values in String for WorkRequestResourceMetadataKeyEnum +func GetWorkRequestResourceMetadataKeyEnumStringValues() []string { + return []string{ + "REGION", + "NAMESPACE", + "BUCKET", + "OBJECT", + "PRIVATE_ENDPOINT_NAME", + } +} + +// GetMappingWorkRequestResourceMetadataKeyEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkRequestResourceMetadataKeyEnum(val string) (WorkRequestResourceMetadataKeyEnum, bool) { + enum, ok := mappingWorkRequestResourceMetadataKeyEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_summary.go new file mode 100644 index 000000000..cb329d2c7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/objectstorage/work_request_summary.go @@ -0,0 +1,189 @@ +// Copyright (c) 2016, 2018, 2026, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// Use Object Storage and Archive Storage APIs to manage buckets, objects, and related resources. +// For more information, see Overview of Object Storage (https://docs.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm) and +// Overview of Archive Storage (https://docs.oracle.com/iaas/Content/Archive/Concepts/archivestorageoverview.htm). +// + +package objectstorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestSummary A summary of the status of a work request. +type WorkRequestSummary struct { + + // The type of work request. + OperationType WorkRequestSummaryOperationTypeEnum `mandatory:"false" json:"operationType,omitempty"` + + // The status of a specified work request. + Status WorkRequestSummaryStatusEnum `mandatory:"false" json:"status,omitempty"` + + // The id of the work request. + Id *string `mandatory:"false" json:"id"` + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. Work + // requests are scoped to the same compartment as the resource the work request affects. + // If the work request affects multiple resources and those resources are not in the same compartment, the OCID of + // the primary resource is used. For example, you can copy an object in a bucket in one compartment to a bucket in + // another compartment. In this case, the OCID of the source compartment is used. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + Resources []WorkRequestResource `mandatory:"false" json:"resources"` + + // Percentage of the work request completed. + PercentComplete *float32 `mandatory:"false" json:"percentComplete"` + + // The date and time the work request was created, as described in + // RFC 3339 (https://tools.ietf.org/html/rfc3339). + TimeAccepted *common.SDKTime `mandatory:"false" json:"timeAccepted"` + + // The date and time the work request was started, as described in + // RFC 3339 (https://tools.ietf.org/html/rfc3339). + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The date and time the work request was finished, as described in + // RFC 3339 (https://tools.ietf.org/html/rfc3339). + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +func (m WorkRequestSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingWorkRequestSummaryOperationTypeEnum(string(m.OperationType)); !ok && m.OperationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationType: %s. Supported values are: %s.", m.OperationType, strings.Join(GetWorkRequestSummaryOperationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingWorkRequestSummaryStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetWorkRequestSummaryStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf("%s", strings.Join(errMessage, "\n")) + } + return false, nil +} + +// WorkRequestSummaryOperationTypeEnum Enum with underlying type: string +type WorkRequestSummaryOperationTypeEnum string + +// Set of constants representing the allowable values for WorkRequestSummaryOperationTypeEnum +const ( + WorkRequestSummaryOperationTypeCopyObject WorkRequestSummaryOperationTypeEnum = "COPY_OBJECT" + WorkRequestSummaryOperationTypeReencrypt WorkRequestSummaryOperationTypeEnum = "REENCRYPT" + WorkRequestSummaryOperationTypePrivateEndpointCreate WorkRequestSummaryOperationTypeEnum = "PRIVATE_ENDPOINT_CREATE" + WorkRequestSummaryOperationTypePrivateEndpointUpdate WorkRequestSummaryOperationTypeEnum = "PRIVATE_ENDPOINT_UPDATE" + WorkRequestSummaryOperationTypePrivateEndpointDelete WorkRequestSummaryOperationTypeEnum = "PRIVATE_ENDPOINT_DELETE" +) + +var mappingWorkRequestSummaryOperationTypeEnum = map[string]WorkRequestSummaryOperationTypeEnum{ + "COPY_OBJECT": WorkRequestSummaryOperationTypeCopyObject, + "REENCRYPT": WorkRequestSummaryOperationTypeReencrypt, + "PRIVATE_ENDPOINT_CREATE": WorkRequestSummaryOperationTypePrivateEndpointCreate, + "PRIVATE_ENDPOINT_UPDATE": WorkRequestSummaryOperationTypePrivateEndpointUpdate, + "PRIVATE_ENDPOINT_DELETE": WorkRequestSummaryOperationTypePrivateEndpointDelete, +} + +var mappingWorkRequestSummaryOperationTypeEnumLowerCase = map[string]WorkRequestSummaryOperationTypeEnum{ + "copy_object": WorkRequestSummaryOperationTypeCopyObject, + "reencrypt": WorkRequestSummaryOperationTypeReencrypt, + "private_endpoint_create": WorkRequestSummaryOperationTypePrivateEndpointCreate, + "private_endpoint_update": WorkRequestSummaryOperationTypePrivateEndpointUpdate, + "private_endpoint_delete": WorkRequestSummaryOperationTypePrivateEndpointDelete, +} + +// GetWorkRequestSummaryOperationTypeEnumValues Enumerates the set of values for WorkRequestSummaryOperationTypeEnum +func GetWorkRequestSummaryOperationTypeEnumValues() []WorkRequestSummaryOperationTypeEnum { + values := make([]WorkRequestSummaryOperationTypeEnum, 0) + for _, v := range mappingWorkRequestSummaryOperationTypeEnum { + values = append(values, v) + } + return values +} + +// GetWorkRequestSummaryOperationTypeEnumStringValues Enumerates the set of values in String for WorkRequestSummaryOperationTypeEnum +func GetWorkRequestSummaryOperationTypeEnumStringValues() []string { + return []string{ + "COPY_OBJECT", + "REENCRYPT", + "PRIVATE_ENDPOINT_CREATE", + "PRIVATE_ENDPOINT_UPDATE", + "PRIVATE_ENDPOINT_DELETE", + } +} + +// GetMappingWorkRequestSummaryOperationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkRequestSummaryOperationTypeEnum(val string) (WorkRequestSummaryOperationTypeEnum, bool) { + enum, ok := mappingWorkRequestSummaryOperationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// WorkRequestSummaryStatusEnum Enum with underlying type: string +type WorkRequestSummaryStatusEnum string + +// Set of constants representing the allowable values for WorkRequestSummaryStatusEnum +const ( + WorkRequestSummaryStatusAccepted WorkRequestSummaryStatusEnum = "ACCEPTED" + WorkRequestSummaryStatusInProgress WorkRequestSummaryStatusEnum = "IN_PROGRESS" + WorkRequestSummaryStatusFailed WorkRequestSummaryStatusEnum = "FAILED" + WorkRequestSummaryStatusCompleted WorkRequestSummaryStatusEnum = "COMPLETED" + WorkRequestSummaryStatusCanceling WorkRequestSummaryStatusEnum = "CANCELING" + WorkRequestSummaryStatusCanceled WorkRequestSummaryStatusEnum = "CANCELED" +) + +var mappingWorkRequestSummaryStatusEnum = map[string]WorkRequestSummaryStatusEnum{ + "ACCEPTED": WorkRequestSummaryStatusAccepted, + "IN_PROGRESS": WorkRequestSummaryStatusInProgress, + "FAILED": WorkRequestSummaryStatusFailed, + "COMPLETED": WorkRequestSummaryStatusCompleted, + "CANCELING": WorkRequestSummaryStatusCanceling, + "CANCELED": WorkRequestSummaryStatusCanceled, +} + +var mappingWorkRequestSummaryStatusEnumLowerCase = map[string]WorkRequestSummaryStatusEnum{ + "accepted": WorkRequestSummaryStatusAccepted, + "in_progress": WorkRequestSummaryStatusInProgress, + "failed": WorkRequestSummaryStatusFailed, + "completed": WorkRequestSummaryStatusCompleted, + "canceling": WorkRequestSummaryStatusCanceling, + "canceled": WorkRequestSummaryStatusCanceled, +} + +// GetWorkRequestSummaryStatusEnumValues Enumerates the set of values for WorkRequestSummaryStatusEnum +func GetWorkRequestSummaryStatusEnumValues() []WorkRequestSummaryStatusEnum { + values := make([]WorkRequestSummaryStatusEnum, 0) + for _, v := range mappingWorkRequestSummaryStatusEnum { + values = append(values, v) + } + return values +} + +// GetWorkRequestSummaryStatusEnumStringValues Enumerates the set of values in String for WorkRequestSummaryStatusEnum +func GetWorkRequestSummaryStatusEnumStringValues() []string { + return []string{ + "ACCEPTED", + "IN_PROGRESS", + "FAILED", + "COMPLETED", + "CANCELING", + "CANCELED", + } +} + +// GetMappingWorkRequestSummaryStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkRequestSummaryStatusEnum(val string) (WorkRequestSummaryStatusEnum, bool) { + enum, ok := mappingWorkRequestSummaryStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/sony/gobreaker/v2/LICENSE b/vendor/github.com/sony/gobreaker/v2/LICENSE new file mode 100644 index 000000000..81795bf64 --- /dev/null +++ b/vendor/github.com/sony/gobreaker/v2/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright 2015 Sony Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/sony/gobreaker/v2/counter.go b/vendor/github.com/sony/gobreaker/v2/counter.go new file mode 100644 index 000000000..e3bd15571 --- /dev/null +++ b/vendor/github.com/sony/gobreaker/v2/counter.go @@ -0,0 +1,227 @@ +package gobreaker + +// Counts holds the numbers of requests and their successes/failures/exclusions. +// CircuitBreaker clears the internal Counts either +// on the change of the state or at the closed-state intervals. +// Counts ignores the results of the requests sent before clearing. +type Counts struct { + Requests uint32 + TotalSuccesses uint32 + TotalFailures uint32 + TotalExclusions uint32 + ConsecutiveSuccesses uint32 + ConsecutiveFailures uint32 +} + +func (c *Counts) onRequest() { + c.Requests++ +} + +func (c *Counts) onSuccess() { + c.TotalSuccesses++ + c.ConsecutiveSuccesses++ + c.ConsecutiveFailures = 0 +} + +func (c *Counts) onFailure() { + c.TotalFailures++ + c.ConsecutiveFailures++ + c.ConsecutiveSuccesses = 0 +} + +func (c *Counts) onExclusion() { + c.TotalExclusions++ +} + +func (c *Counts) validRequests() uint32 { + if c.Requests < c.TotalExclusions { + return 0 + } + return c.Requests - c.TotalExclusions +} + +func (c *Counts) clear() { + c.Requests = 0 + c.TotalSuccesses = 0 + c.TotalFailures = 0 + c.TotalExclusions = 0 + c.ConsecutiveSuccesses = 0 + c.ConsecutiveFailures = 0 +} + +type rollingCounts struct { + Counts + + age uint64 + buckets []Counts +} + +func newRollingCounts(numBuckets int64) *rollingCounts { + if numBuckets < 0 { + numBuckets = 0 + } + return &rollingCounts{ + buckets: make([]Counts, numBuckets), + } +} + +func (rc *rollingCounts) index(age uint64) uint64 { + if len(rc.buckets) == 0 { + return 0 + } + return age % uint64(len(rc.buckets)) +} + +func (rc *rollingCounts) current() uint64 { + return rc.index(rc.age) +} + +func (rc *rollingCounts) onRequest() { + rc.Counts.onRequest() + rc.buckets[rc.current()].onRequest() +} + +func (rc *rollingCounts) onSuccess(age uint64) { + if age > rc.age { + return + } + + if rc.age-age < uint64(len(rc.buckets)) { + rc.Counts.onSuccess() + rc.buckets[rc.index(age)].onSuccess() + } +} + +func (rc *rollingCounts) onFailure(age uint64) { + if age > rc.age { + return + } + + if rc.age-age < uint64(len(rc.buckets)) { + rc.Counts.onFailure() + rc.buckets[rc.index(age)].onFailure() + } +} + +func (rc *rollingCounts) onExclusion(age uint64) { + if age > rc.age { + return + } + + if rc.age-age < uint64(len(rc.buckets)) { + rc.Counts.onExclusion() + rc.buckets[rc.index(age)].onExclusion() + } +} + +func (rc *rollingCounts) clear() { + rc.Counts.clear() + + rc.age = 0 + + for i := range rc.buckets { + rc.buckets[i].clear() + } +} + +func (rc *rollingCounts) roll() { + rc.age++ + if len(rc.buckets) == 0 { + return + } + + current := rc.current() + rc.subtract(current) + rc.buckets[current].clear() +} + +func (rc *rollingCounts) subtract(oldest uint64) { + length := uint64(len(rc.buckets)) + if length == 0 { + return + } + + oldest = oldest % length + bucket := rc.buckets[oldest] + + totalSuccesses := bucket.ConsecutiveSuccesses + for i := uint64(1); i < length; i++ { + idx := (oldest + i) % length + totalSuccesses += rc.buckets[idx].TotalSuccesses + } + if rc.ConsecutiveSuccesses == totalSuccesses { + if rc.ConsecutiveSuccesses > bucket.ConsecutiveSuccesses { + rc.ConsecutiveSuccesses -= bucket.ConsecutiveSuccesses + } else { + rc.ConsecutiveSuccesses = 0 + } + } + + totalFailures := bucket.ConsecutiveFailures + for i := uint64(1); i < length; i++ { + idx := (oldest + i) % length + totalFailures += rc.buckets[idx].TotalFailures + } + if rc.ConsecutiveFailures == totalFailures { + if rc.ConsecutiveFailures > bucket.ConsecutiveFailures { + rc.ConsecutiveFailures -= bucket.ConsecutiveFailures + } else { + rc.ConsecutiveFailures = 0 + } + } + + if rc.Requests > bucket.Requests { + rc.Requests -= bucket.Requests + } else { + rc.Requests = 0 + } + + if rc.TotalSuccesses > bucket.TotalSuccesses { + rc.TotalSuccesses -= bucket.TotalSuccesses + } else { + rc.TotalSuccesses = 0 + } + + if rc.TotalFailures > bucket.TotalFailures { + rc.TotalFailures -= bucket.TotalFailures + } else { + rc.TotalFailures = 0 + } + + if rc.TotalExclusions > bucket.TotalExclusions { + rc.TotalExclusions -= bucket.TotalExclusions + } else { + rc.TotalExclusions = 0 + } +} + +func (rc *rollingCounts) grow(age uint64) { + if age <= rc.age { + return + } + + diff := age - rc.age + if diff >= uint64(len(rc.buckets)) { + rc.clear() + rc.age = age + } else { + for range diff { + rc.roll() + } + } +} + +func (rc *rollingCounts) bucketAt(index int) Counts { + bucketLen := len(rc.buckets) + if bucketLen == 0 { + return Counts{} + } + + idx := (index%bucketLen + bucketLen) % bucketLen + if idx < 0 { + return Counts{} + } + + bucketIndex := (rc.current() + uint64(idx)) % uint64(bucketLen) + return rc.buckets[bucketIndex] +} diff --git a/vendor/github.com/sony/gobreaker/v2/distributed_gobreaker.go b/vendor/github.com/sony/gobreaker/v2/distributed_gobreaker.go new file mode 100644 index 000000000..23f2c17d5 --- /dev/null +++ b/vendor/github.com/sony/gobreaker/v2/distributed_gobreaker.go @@ -0,0 +1,237 @@ +package gobreaker + +import ( + "encoding/json" + "errors" + "time" +) + +var ( + // ErrNoSharedStore is returned when there is no shared store. + ErrNoSharedStore = errors.New("no shared store") + // ErrNoSharedState is returned when there is no shared state. + ErrNoSharedState = errors.New("no shared state") +) + +// SharedState represents the shared state of DistributedCircuitBreaker. +type SharedState struct { + State State `json:"state"` + Generation uint64 `json:"generation"` + Age uint64 `json:"age"` + Counts Counts `json:"counts"` + Buckets []Counts `json:"buckets"` + Start time.Time `json:"start"` + Expiry time.Time `json:"expiry"` +} + +// SharedDataStore stores the shared state of DistributedCircuitBreaker. +type SharedDataStore interface { + Lock(name string) error + Unlock(name string) error + GetData(name string) ([]byte, error) + SetData(name string, data []byte) error +} + +// DistributedCircuitBreaker extends CircuitBreaker with SharedDataStore. +type DistributedCircuitBreaker[T any] struct { + *CircuitBreaker[T] + store SharedDataStore +} + +// NewDistributedCircuitBreaker returns a new DistributedCircuitBreaker. +func NewDistributedCircuitBreaker[T any](store SharedDataStore, settings Settings) (dcb *DistributedCircuitBreaker[T], err error) { + if store == nil { + return nil, ErrNoSharedStore + } + + dcb = &DistributedCircuitBreaker[T]{ + CircuitBreaker: NewCircuitBreaker[T](settings), + store: store, + } + + err = dcb.lock() + if err != nil { + return nil, err + } + defer func() { + e := dcb.unlock() + if err == nil { + err = e + } + }() + + _, err = dcb.getSharedState() + if err == ErrNoSharedState { + err = dcb.setSharedState(dcb.extract()) + } + if err != nil { + return nil, err + } + + return dcb, nil +} + +const ( + mutexTimeout = 5 * time.Second + mutexWaitTime = 500 * time.Millisecond +) + +func (dcb *DistributedCircuitBreaker[T]) mutexKey() string { + return "gobreaker:mutex:" + dcb.name +} + +func (dcb *DistributedCircuitBreaker[T]) lock() error { + if dcb.store == nil { + return ErrNoSharedStore + } + + var err error + expiry := time.Now().Add(mutexTimeout) + for time.Now().Before(expiry) { + err = dcb.store.Lock(dcb.mutexKey()) + if err == nil { + return nil + } + + time.Sleep(mutexWaitTime) + } + return err +} + +func (dcb *DistributedCircuitBreaker[T]) unlock() error { + if dcb.store == nil { + return ErrNoSharedStore + } + + return dcb.store.Unlock(dcb.mutexKey()) +} + +func (dcb *DistributedCircuitBreaker[T]) sharedStateKey() string { + return "gobreaker:state:" + dcb.name +} + +func (dcb *DistributedCircuitBreaker[T]) getSharedState() (SharedState, error) { + var state SharedState + if dcb.store == nil { + return state, ErrNoSharedStore + } + + data, err := dcb.store.GetData(dcb.sharedStateKey()) + if len(data) == 0 { + return state, ErrNoSharedState + } else if err != nil { + return state, err + } + + err = json.Unmarshal(data, &state) + return state, err +} + +func (dcb *DistributedCircuitBreaker[T]) setSharedState(state SharedState) error { + if dcb.store == nil { + return ErrNoSharedStore + } + + data, err := json.Marshal(state) + if err != nil { + return err + } + + return dcb.store.SetData(dcb.sharedStateKey(), data) +} + +func (dcb *DistributedCircuitBreaker[T]) inject(shared SharedState) { + dcb.mutex.Lock() + defer dcb.mutex.Unlock() + + dcb.state = shared.State + dcb.generation = shared.Generation + dcb.counts.Counts = shared.Counts + dcb.counts.age = shared.Age + dcb.counts.buckets = copyBuckets(shared.Buckets) + dcb.start = shared.Start + dcb.expiry = shared.Expiry +} + +func copyBuckets(buckets []Counts) []Counts { + if buckets == nil { + return []Counts{} + } + + counts := make([]Counts, len(buckets)) + copy(counts, buckets) + return counts +} + +func (dcb *DistributedCircuitBreaker[T]) extract() SharedState { + dcb.mutex.Lock() + defer dcb.mutex.Unlock() + + state := SharedState{ + State: dcb.state, + Generation: dcb.generation, + Age: dcb.counts.age, + Counts: dcb.counts.Counts, + Buckets: copyBuckets(dcb.counts.buckets), + Start: dcb.start, + Expiry: dcb.expiry, + } + + return state +} + +// State returns the State of DistributedCircuitBreaker. +func (dcb *DistributedCircuitBreaker[T]) State() (state State, err error) { + shared, err := dcb.getSharedState() + if err != nil { + return shared.State, err + } + + err = dcb.lock() + if err != nil { + return state, err + } + defer func() { + e := dcb.unlock() + if err == nil { + err = e + } + }() + + dcb.inject(shared) + state = dcb.CircuitBreaker.State() + shared = dcb.extract() + + err = dcb.setSharedState(shared) + return state, err +} + +// Execute runs the given request if the DistributedCircuitBreaker accepts it. +func (dcb *DistributedCircuitBreaker[T]) Execute(req func() (T, error)) (t T, err error) { + shared, err := dcb.getSharedState() + if err != nil { + return t, err + } + + err = dcb.lock() + if err != nil { + return t, err + } + defer func() { + e := dcb.unlock() + if err == nil { + err = e + } + }() + + dcb.inject(shared) + t, err = dcb.CircuitBreaker.Execute(req) + shared = dcb.extract() + + e := dcb.setSharedState(shared) + if e != nil { + return t, e + } + + return t, err +} diff --git a/vendor/github.com/sony/gobreaker/v2/gobreaker.go b/vendor/github.com/sony/gobreaker/v2/gobreaker.go new file mode 100644 index 000000000..9563067f1 --- /dev/null +++ b/vendor/github.com/sony/gobreaker/v2/gobreaker.go @@ -0,0 +1,366 @@ +// Package gobreaker implements the Circuit Breaker pattern. +// See https://msdn.microsoft.com/en-us/library/dn589784.aspx. +package gobreaker + +import ( + "errors" + "fmt" + "sync" + "time" +) + +// State is a type that represents a state of CircuitBreaker. +type State int + +// These constants are states of CircuitBreaker. +const ( + StateClosed State = iota + StateHalfOpen + StateOpen +) + +var ( + // ErrTooManyRequests is returned when the CB state is half open and the requests count is over the cb maxRequests + ErrTooManyRequests = errors.New("too many requests") + // ErrOpenState is returned when the CB state is open + ErrOpenState = errors.New("circuit breaker is open") +) + +// String implements stringer interface. +func (s State) String() string { + switch s { + case StateClosed: + return "closed" + case StateHalfOpen: + return "half-open" + case StateOpen: + return "open" + default: + return fmt.Sprintf("unknown state: %d", s) + } +} + +// Settings configures CircuitBreaker: +// +// Name is the name of the CircuitBreaker. +// +// MaxRequests is the maximum number of requests allowed to pass through +// when the CircuitBreaker is half-open. +// If MaxRequests is 0, the CircuitBreaker allows only 1 request. +// +// Interval is the cyclic period of the closed state +// for the CircuitBreaker to clear the internal Counts. +// If Interval is less than or equal to 0, the CircuitBreaker does not clear internal Counts during the closed state. +// +// BucketPeriod defines the time duration for each bucket in the rolling window strategy. +// The internal Counts will be updated and reset gradually for each bucket. +// Interval will be automatically adjusted to be a multiple of BucketPeriod. +// If BucketPeriod is less than or equal to 0, the CircuitBreaker will use a fixed window strategy instead. +// +// Timeout is the period of the open state, +// after which the state of the CircuitBreaker becomes half-open. +// If Timeout is less than or equal to 0, the timeout value of the CircuitBreaker is set to 60 seconds. +// +// ReadyToTrip is called with a copy of Counts whenever a request fails in the closed state. +// If ReadyToTrip returns true, the CircuitBreaker will be placed into the open state. +// If ReadyToTrip is nil, default ReadyToTrip is used. +// Default ReadyToTrip returns true when the number of consecutive failures is more than 5. +// +// OnStateChange is called whenever the state of the CircuitBreaker changes. +// +// IsSuccessful is called with the error returned from a request. +// If IsSuccessful returns true, the error is counted as a success. +// Otherwise the error is counted as a failure. +// If IsSuccessful is nil, default IsSuccessful is used, which returns false for all non-nil errors. +// +// IsExcluded determines whether a request error should be ignored +// for the purposes of updating the circuit breaker metrics. +// If IsExcluded returns true for a given error, +// the request is neither counted as a success nor as a failure. +// This can be used, for example, to ignore context cancellations or +// other errors that should not affect the circuit breaker state. +// If IsExcluded is nil, no requests are excluded. +type Settings struct { + Name string + MaxRequests uint32 + Interval time.Duration + BucketPeriod time.Duration + Timeout time.Duration + ReadyToTrip func(counts Counts) bool + OnStateChange func(name string, from State, to State) + IsSuccessful func(err error) bool + IsExcluded func(err error) bool +} + +// CircuitBreaker is a state machine to prevent sending requests that are likely to fail. +type CircuitBreaker[T any] struct { + name string + maxRequests uint32 + interval time.Duration + bucketPeriod time.Duration + timeout time.Duration + readyToTrip func(counts Counts) bool + isSuccessful func(err error) bool + isExcluded func(err error) bool + onStateChange func(name string, from State, to State) + + mutex sync.Mutex + state State + generation uint64 + counts *rollingCounts + start time.Time + expiry time.Time +} + +// NewCircuitBreaker returns a new CircuitBreaker configured with the given Settings. +func NewCircuitBreaker[T any](st Settings) *CircuitBreaker[T] { + cb := new(CircuitBreaker[T]) + + cb.name = st.Name + cb.onStateChange = st.OnStateChange + + if st.MaxRequests == 0 { + cb.maxRequests = 1 + } else { + cb.maxRequests = st.MaxRequests + } + + var numBuckets int64 + if st.Interval <= 0 { + cb.interval = defaultInterval + cb.bucketPeriod = cb.interval + numBuckets = 1 + } else if st.BucketPeriod <= 0 { + cb.interval = st.Interval + cb.bucketPeriod = cb.interval + numBuckets = 1 + } else { + cb.interval = (st.Interval + st.BucketPeriod - 1) / st.BucketPeriod * st.BucketPeriod + cb.bucketPeriod = st.BucketPeriod + numBuckets = int64(cb.interval / cb.bucketPeriod) + } + + cb.counts = newRollingCounts(numBuckets) + + if st.Timeout <= 0 { + cb.timeout = defaultTimeout + } else { + cb.timeout = st.Timeout + } + + if st.ReadyToTrip == nil { + cb.readyToTrip = defaultReadyToTrip + } else { + cb.readyToTrip = st.ReadyToTrip + } + + if st.IsSuccessful == nil { + cb.isSuccessful = defaultIsSuccessful + } else { + cb.isSuccessful = st.IsSuccessful + } + + if st.IsExcluded == nil { + cb.isExcluded = defaultIsExcluded + } else { + cb.isExcluded = st.IsExcluded + } + + cb.toNewGeneration(time.Now()) + + return cb +} + +const defaultInterval = time.Duration(0) * time.Second +const defaultTimeout = time.Duration(60) * time.Second + +func defaultReadyToTrip(counts Counts) bool { + return counts.ConsecutiveFailures > 5 +} + +func defaultIsSuccessful(err error) bool { + return err == nil +} + +func defaultIsExcluded(_ error) bool { + return false +} + +// Name returns the name of the CircuitBreaker. +func (cb *CircuitBreaker[T]) Name() string { + return cb.name +} + +// State returns the current state of the CircuitBreaker. +func (cb *CircuitBreaker[T]) State() State { + cb.mutex.Lock() + defer cb.mutex.Unlock() + + now := time.Now() + state, _, _ := cb.currentState(now) + return state +} + +// Counts returns internal counters +func (cb *CircuitBreaker[T]) Counts() Counts { + cb.mutex.Lock() + defer cb.mutex.Unlock() + + return cb.counts.Counts +} + +// Execute runs the given request if the CircuitBreaker accepts it. +// Execute returns an error instantly if the CircuitBreaker rejects the request. +// Otherwise, Execute returns the result of the request. +// If a panic occurs in the request, the CircuitBreaker handles it as an error +// and causes the same panic again. +func (cb *CircuitBreaker[T]) Execute(req func() (T, error)) (T, error) { + generation, age, err := cb.beforeRequest() + if err != nil { + var defaultValue T + return defaultValue, err + } + + defer func() { + e := recover() + if e != nil { + cb.afterRequest(generation, age, fmt.Errorf("%v", e)) + panic(e) + } + }() + + result, err := req() + cb.afterRequest(generation, age, err) + return result, err +} + +func (cb *CircuitBreaker[T]) beforeRequest() (uint64, uint64, error) { + cb.mutex.Lock() + defer cb.mutex.Unlock() + + now := time.Now() + state, generation, age := cb.currentState(now) + + if state == StateOpen { + return generation, age, ErrOpenState + } else if state == StateHalfOpen && cb.counts.validRequests() >= cb.maxRequests { + return generation, age, ErrTooManyRequests + } + + cb.counts.onRequest() + return generation, age, nil +} + +func (cb *CircuitBreaker[T]) afterRequest(previous uint64, age uint64, err error) { + cb.mutex.Lock() + defer cb.mutex.Unlock() + + now := time.Now() + state, generation, _ := cb.currentState(now) + if generation != previous { + return + } + + if cb.isExcluded(err) { + cb.onExclusion(age) + return + } + + if cb.isSuccessful(err) { + cb.onSuccess(state, age, now) + } else { + cb.onFailure(state, age, now) + } +} + +func (cb *CircuitBreaker[T]) onSuccess(state State, age uint64, now time.Time) { + switch state { + case StateClosed: + cb.counts.onSuccess(age) + case StateHalfOpen: + cb.counts.onSuccess(age) + if cb.counts.ConsecutiveSuccesses >= cb.maxRequests { + cb.setState(StateClosed, now) + } + } +} + +func (cb *CircuitBreaker[T]) onFailure(state State, age uint64, now time.Time) { + switch state { + case StateClosed: + cb.counts.onFailure(age) + if cb.readyToTrip(cb.counts.Counts) { + cb.setState(StateOpen, now) + } + case StateHalfOpen: + cb.setState(StateOpen, now) + } +} + +func (cb *CircuitBreaker[T]) onExclusion(age uint64) { + cb.counts.onExclusion(age) +} + +func (cb *CircuitBreaker[T]) currentState(now time.Time) (State, uint64, uint64) { + switch cb.state { + case StateClosed: + if !cb.expiry.IsZero() && cb.expiry.Before(now) { + cb.toNewGeneration(now) + } else if len(cb.counts.buckets) >= 2 { + cb.counts.grow(cb.age(now)) + } + case StateOpen: + if cb.expiry.Before(now) { + cb.setState(StateHalfOpen, now) + } + } + return cb.state, cb.generation, cb.counts.age +} + +func (cb *CircuitBreaker[T]) age(now time.Time) uint64 { + if cb.bucketPeriod == 0 { + return 0 + } + + elapsed := now.Sub(cb.start) + age := int64(elapsed / cb.bucketPeriod) + if age < 0 { + return 0 + } + return uint64(age) +} + +func (cb *CircuitBreaker[T]) setState(state State, now time.Time) { + if cb.state == state { + return + } + + prev := cb.state + cb.state = state + + cb.toNewGeneration(now) + + if cb.onStateChange != nil { + cb.onStateChange(cb.name, prev, state) + } +} + +func (cb *CircuitBreaker[T]) toNewGeneration(now time.Time) { + cb.generation++ + cb.start = now + cb.counts.clear() + + var zero time.Time + switch cb.state { + case StateClosed: + if cb.interval == 0 || len(cb.counts.buckets) >= 2 { + cb.expiry = zero + } else { + cb.expiry = now.Add(cb.interval) + } + case StateOpen: + cb.expiry = now.Add(cb.timeout) + default: // StateHalfOpen + cb.expiry = zero + } +} diff --git a/vendor/github.com/sony/gobreaker/v2/twostep_gobreaker.go b/vendor/github.com/sony/gobreaker/v2/twostep_gobreaker.go new file mode 100644 index 000000000..3494b1448 --- /dev/null +++ b/vendor/github.com/sony/gobreaker/v2/twostep_gobreaker.go @@ -0,0 +1,45 @@ +package gobreaker + +// TwoStepCircuitBreaker is like CircuitBreaker but instead of surrounding a function +// with the breaker functionality, it only checks whether a request can proceed and +// expects the caller to report the outcome in a separate step using a callback. +type TwoStepCircuitBreaker[T any] struct { + cb *CircuitBreaker[T] +} + +// NewTwoStepCircuitBreaker returns a new TwoStepCircuitBreaker configured with the given Settings. +func NewTwoStepCircuitBreaker[T any](st Settings) *TwoStepCircuitBreaker[T] { + return &TwoStepCircuitBreaker[T]{ + cb: NewCircuitBreaker[T](st), + } +} + +// Name returns the name of the TwoStepCircuitBreaker. +func (tscb *TwoStepCircuitBreaker[T]) Name() string { + return tscb.cb.Name() +} + +// State returns the current state of the TwoStepCircuitBreaker. +func (tscb *TwoStepCircuitBreaker[T]) State() State { + return tscb.cb.State() +} + +// Counts returns internal counters +func (tscb *TwoStepCircuitBreaker[T]) Counts() Counts { + return tscb.cb.Counts() +} + +// Allow checks if a new request can proceed. +// If the circuit breaker allow the new request, it returns a callback +// used to register the error object that the request will return in a separate step. +// If the circuit breaker does not allow the request, it returns an error. +func (tscb *TwoStepCircuitBreaker[T]) Allow() (done func(err error), err error) { + generation, age, err := tscb.cb.beforeRequest() + if err != nil { + return nil, err + } + + return func(err error) { + tscb.cb.afterRequest(generation, age, err) + }, nil +} diff --git a/vendor/github.com/youmark/pkcs8/.gitignore b/vendor/github.com/youmark/pkcs8/.gitignore new file mode 100644 index 000000000..836562412 --- /dev/null +++ b/vendor/github.com/youmark/pkcs8/.gitignore @@ -0,0 +1,23 @@ +# 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 diff --git a/vendor/github.com/youmark/pkcs8/LICENSE b/vendor/github.com/youmark/pkcs8/LICENSE new file mode 100644 index 000000000..c939f4481 --- /dev/null +++ b/vendor/github.com/youmark/pkcs8/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 youmark + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/youmark/pkcs8/README b/vendor/github.com/youmark/pkcs8/README new file mode 100644 index 000000000..376fcaf64 --- /dev/null +++ b/vendor/github.com/youmark/pkcs8/README @@ -0,0 +1 @@ +pkcs8 package: implement PKCS#8 private key parsing and conversion as defined in RFC5208 and RFC5958 diff --git a/vendor/github.com/youmark/pkcs8/README.md b/vendor/github.com/youmark/pkcs8/README.md new file mode 100644 index 000000000..ef6c76257 --- /dev/null +++ b/vendor/github.com/youmark/pkcs8/README.md @@ -0,0 +1,22 @@ +pkcs8 +=== +OpenSSL can generate private keys in both "traditional format" and PKCS#8 format. Newer applications are advised to use more secure PKCS#8 format. Go standard crypto package provides a [function](http://golang.org/pkg/crypto/x509/#ParsePKCS8PrivateKey) to parse private key in PKCS#8 format. There is a limitation to this function. It can only handle unencrypted PKCS#8 private keys. To use this function, the user has to save the private key in file without encryption, which is a bad practice to leave private keys unprotected on file systems. In addition, Go standard package lacks the functions to convert RSA/ECDSA private keys into PKCS#8 format. + +pkcs8 package fills the gap here. It implements functions to process private keys in PKCS#8 format, as defined in [RFC5208](https://tools.ietf.org/html/rfc5208) and [RFC5958](https://tools.ietf.org/html/rfc5958). It can handle both unencrypted PKCS#8 PrivateKeyInfo format and EncryptedPrivateKeyInfo format with PKCS#5 (v2.0) algorithms. + + +[**Godoc**](http://godoc.org/github.com/youmark/pkcs8) + +## Installation +Supports Go 1.10+. Release v1.1 is the last release supporting Go 1.9 + +```text +go get github.com/youmark/pkcs8 +``` +## dependency +This package depends on golang.org/x/crypto/pbkdf2 and golang.org/x/crypto/scrypt packages. Use the following command to retrieve them +```text +go get golang.org/x/crypto/pbkdf2 +go get golang.org/x/crypto/scrypt +``` + diff --git a/vendor/github.com/youmark/pkcs8/cipher.go b/vendor/github.com/youmark/pkcs8/cipher.go new file mode 100644 index 000000000..2946c93e8 --- /dev/null +++ b/vendor/github.com/youmark/pkcs8/cipher.go @@ -0,0 +1,60 @@ +package pkcs8 + +import ( + "bytes" + "crypto/cipher" + "encoding/asn1" +) + +type cipherWithBlock struct { + oid asn1.ObjectIdentifier + ivSize int + keySize int + newBlock func(key []byte) (cipher.Block, error) +} + +func (c cipherWithBlock) IVSize() int { + return c.ivSize +} + +func (c cipherWithBlock) KeySize() int { + return c.keySize +} + +func (c cipherWithBlock) OID() asn1.ObjectIdentifier { + return c.oid +} + +func (c cipherWithBlock) Encrypt(key, iv, plaintext []byte) ([]byte, error) { + block, err := c.newBlock(key) + if err != nil { + return nil, err + } + return cbcEncrypt(block, key, iv, plaintext) +} + +func (c cipherWithBlock) Decrypt(key, iv, ciphertext []byte) ([]byte, error) { + block, err := c.newBlock(key) + if err != nil { + return nil, err + } + return cbcDecrypt(block, key, iv, ciphertext) +} + +func cbcEncrypt(block cipher.Block, key, iv, plaintext []byte) ([]byte, error) { + mode := cipher.NewCBCEncrypter(block, iv) + paddingLen := block.BlockSize() - (len(plaintext) % block.BlockSize()) + ciphertext := make([]byte, len(plaintext)+paddingLen) + copy(ciphertext, plaintext) + copy(ciphertext[len(plaintext):], bytes.Repeat([]byte{byte(paddingLen)}, paddingLen)) + mode.CryptBlocks(ciphertext, ciphertext) + return ciphertext, nil +} + +func cbcDecrypt(block cipher.Block, key, iv, ciphertext []byte) ([]byte, error) { + mode := cipher.NewCBCDecrypter(block, iv) + plaintext := make([]byte, len(ciphertext)) + mode.CryptBlocks(plaintext, ciphertext) + // TODO: remove padding + return plaintext, nil +} diff --git a/vendor/github.com/youmark/pkcs8/cipher_3des.go b/vendor/github.com/youmark/pkcs8/cipher_3des.go new file mode 100644 index 000000000..562966440 --- /dev/null +++ b/vendor/github.com/youmark/pkcs8/cipher_3des.go @@ -0,0 +1,24 @@ +package pkcs8 + +import ( + "crypto/des" + "encoding/asn1" +) + +var ( + oidDESEDE3CBC = asn1.ObjectIdentifier{1, 2, 840, 113549, 3, 7} +) + +func init() { + RegisterCipher(oidDESEDE3CBC, func() Cipher { + return TripleDESCBC + }) +} + +// TripleDESCBC is the 168-bit key 3DES cipher in CBC mode. +var TripleDESCBC = cipherWithBlock{ + ivSize: des.BlockSize, + keySize: 24, + newBlock: des.NewTripleDESCipher, + oid: oidDESEDE3CBC, +} diff --git a/vendor/github.com/youmark/pkcs8/cipher_aes.go b/vendor/github.com/youmark/pkcs8/cipher_aes.go new file mode 100644 index 000000000..c0372d1ee --- /dev/null +++ b/vendor/github.com/youmark/pkcs8/cipher_aes.go @@ -0,0 +1,84 @@ +package pkcs8 + +import ( + "crypto/aes" + "encoding/asn1" +) + +var ( + oidAES128CBC = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 2} + oidAES128GCM = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 6} + oidAES192CBC = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 22} + oidAES192GCM = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 26} + oidAES256CBC = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 42} + oidAES256GCM = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 46} +) + +func init() { + RegisterCipher(oidAES128CBC, func() Cipher { + return AES128CBC + }) + RegisterCipher(oidAES128GCM, func() Cipher { + return AES128GCM + }) + RegisterCipher(oidAES192CBC, func() Cipher { + return AES192CBC + }) + RegisterCipher(oidAES192GCM, func() Cipher { + return AES192GCM + }) + RegisterCipher(oidAES256CBC, func() Cipher { + return AES256CBC + }) + RegisterCipher(oidAES256GCM, func() Cipher { + return AES256GCM + }) +} + +// AES128CBC is the 128-bit key AES cipher in CBC mode. +var AES128CBC = cipherWithBlock{ + ivSize: aes.BlockSize, + keySize: 16, + newBlock: aes.NewCipher, + oid: oidAES128CBC, +} + +// AES128GCM is the 128-bit key AES cipher in GCM mode. +var AES128GCM = cipherWithBlock{ + ivSize: aes.BlockSize, + keySize: 16, + newBlock: aes.NewCipher, + oid: oidAES128GCM, +} + +// AES192CBC is the 192-bit key AES cipher in CBC mode. +var AES192CBC = cipherWithBlock{ + ivSize: aes.BlockSize, + keySize: 24, + newBlock: aes.NewCipher, + oid: oidAES192CBC, +} + +// AES192GCM is the 912-bit key AES cipher in GCM mode. +var AES192GCM = cipherWithBlock{ + ivSize: aes.BlockSize, + keySize: 24, + newBlock: aes.NewCipher, + oid: oidAES192GCM, +} + +// AES256CBC is the 256-bit key AES cipher in CBC mode. +var AES256CBC = cipherWithBlock{ + ivSize: aes.BlockSize, + keySize: 32, + newBlock: aes.NewCipher, + oid: oidAES256CBC, +} + +// AES256GCM is the 256-bit key AES cipher in GCM mode. +var AES256GCM = cipherWithBlock{ + ivSize: aes.BlockSize, + keySize: 32, + newBlock: aes.NewCipher, + oid: oidAES256GCM, +} diff --git a/vendor/github.com/youmark/pkcs8/kdf_pbkdf2.go b/vendor/github.com/youmark/pkcs8/kdf_pbkdf2.go new file mode 100644 index 000000000..79697dd82 --- /dev/null +++ b/vendor/github.com/youmark/pkcs8/kdf_pbkdf2.go @@ -0,0 +1,91 @@ +package pkcs8 + +import ( + "crypto" + "crypto/sha1" + "crypto/sha256" + "crypto/x509/pkix" + "encoding/asn1" + "errors" + "hash" + + "golang.org/x/crypto/pbkdf2" +) + +var ( + oidPKCS5PBKDF2 = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 5, 12} + oidHMACWithSHA1 = asn1.ObjectIdentifier{1, 2, 840, 113549, 2, 7} + oidHMACWithSHA256 = asn1.ObjectIdentifier{1, 2, 840, 113549, 2, 9} +) + +func init() { + RegisterKDF(oidPKCS5PBKDF2, func() KDFParameters { + return new(pbkdf2Params) + }) +} + +func newHashFromPRF(ai pkix.AlgorithmIdentifier) (func() hash.Hash, error) { + switch { + case len(ai.Algorithm) == 0 || ai.Algorithm.Equal(oidHMACWithSHA1): + return sha1.New, nil + case ai.Algorithm.Equal(oidHMACWithSHA256): + return sha256.New, nil + default: + return nil, errors.New("pkcs8: unsupported hash function") + } +} + +func newPRFParamFromHash(h crypto.Hash) (pkix.AlgorithmIdentifier, error) { + switch h { + case crypto.SHA1: + return pkix.AlgorithmIdentifier{ + Algorithm: oidHMACWithSHA1, + Parameters: asn1.RawValue{Tag: asn1.TagNull}}, nil + case crypto.SHA256: + return pkix.AlgorithmIdentifier{ + Algorithm: oidHMACWithSHA256, + Parameters: asn1.RawValue{Tag: asn1.TagNull}}, nil + } + return pkix.AlgorithmIdentifier{}, errors.New("pkcs8: unsupported hash function") +} + +type pbkdf2Params struct { + Salt []byte + IterationCount int + PRF pkix.AlgorithmIdentifier `asn1:"optional"` +} + +func (p pbkdf2Params) DeriveKey(password []byte, size int) (key []byte, err error) { + h, err := newHashFromPRF(p.PRF) + if err != nil { + return nil, err + } + return pbkdf2.Key(password, p.Salt, p.IterationCount, size, h), nil +} + +// PBKDF2Opts contains options for the PBKDF2 key derivation function. +type PBKDF2Opts struct { + SaltSize int + IterationCount int + HMACHash crypto.Hash +} + +func (p PBKDF2Opts) DeriveKey(password, salt []byte, size int) ( + key []byte, params KDFParameters, err error) { + + key = pbkdf2.Key(password, salt, p.IterationCount, size, p.HMACHash.New) + prfParam, err := newPRFParamFromHash(p.HMACHash) + if err != nil { + return nil, nil, err + } + params = pbkdf2Params{salt, p.IterationCount, prfParam} + return key, params, nil +} + +func (p PBKDF2Opts) GetSaltSize() int { + return p.SaltSize +} + +func (p PBKDF2Opts) OID() asn1.ObjectIdentifier { + return oidPKCS5PBKDF2 +} diff --git a/vendor/github.com/youmark/pkcs8/kdf_scrypt.go b/vendor/github.com/youmark/pkcs8/kdf_scrypt.go new file mode 100644 index 000000000..36c4f4f59 --- /dev/null +++ b/vendor/github.com/youmark/pkcs8/kdf_scrypt.go @@ -0,0 +1,62 @@ +package pkcs8 + +import ( + "encoding/asn1" + + "golang.org/x/crypto/scrypt" +) + +var ( + oidScrypt = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 11591, 4, 11} +) + +func init() { + RegisterKDF(oidScrypt, func() KDFParameters { + return new(scryptParams) + }) +} + +type scryptParams struct { + Salt []byte + CostParameter int + BlockSize int + ParallelizationParameter int +} + +func (p scryptParams) DeriveKey(password []byte, size int) (key []byte, err error) { + return scrypt.Key(password, p.Salt, p.CostParameter, p.BlockSize, + p.ParallelizationParameter, size) +} + +// ScryptOpts contains options for the scrypt key derivation function. +type ScryptOpts struct { + SaltSize int + CostParameter int + BlockSize int + ParallelizationParameter int +} + +func (p ScryptOpts) DeriveKey(password, salt []byte, size int) ( + key []byte, params KDFParameters, err error) { + + key, err = scrypt.Key(password, salt, p.CostParameter, p.BlockSize, + p.ParallelizationParameter, size) + if err != nil { + return nil, nil, err + } + params = scryptParams{ + BlockSize: p.BlockSize, + CostParameter: p.CostParameter, + ParallelizationParameter: p.ParallelizationParameter, + Salt: salt, + } + return key, params, nil +} + +func (p ScryptOpts) GetSaltSize() int { + return p.SaltSize +} + +func (p ScryptOpts) OID() asn1.ObjectIdentifier { + return oidScrypt +} diff --git a/vendor/github.com/youmark/pkcs8/pkcs8.go b/vendor/github.com/youmark/pkcs8/pkcs8.go new file mode 100644 index 000000000..f27f62752 --- /dev/null +++ b/vendor/github.com/youmark/pkcs8/pkcs8.go @@ -0,0 +1,309 @@ +// Package pkcs8 implements functions to parse and convert private keys in PKCS#8 format, as defined in RFC5208 and RFC5958 +package pkcs8 + +import ( + "crypto" + "crypto/ecdsa" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "crypto/x509/pkix" + "encoding/asn1" + "errors" + "fmt" +) + +// DefaultOpts are the default options for encrypting a key if none are given. +// The defaults can be changed by the library user. +var DefaultOpts = &Opts{ + Cipher: AES256CBC, + KDFOpts: PBKDF2Opts{ + SaltSize: 8, + IterationCount: 10000, + HMACHash: crypto.SHA256, + }, +} + +// KDFOpts contains options for a key derivation function. +// An implementation of this interface must be specified when encrypting a PKCS#8 key. +type KDFOpts interface { + // DeriveKey derives a key of size bytes from the given password and salt. + // It returns the key and the ASN.1-encodable parameters used. + DeriveKey(password, salt []byte, size int) (key []byte, params KDFParameters, err error) + // GetSaltSize returns the salt size specified. + GetSaltSize() int + // OID returns the OID of the KDF specified. + OID() asn1.ObjectIdentifier +} + +// KDFParameters contains parameters (salt, etc.) for a key deriviation function. +// It must be a ASN.1-decodable structure. +// An implementation of this interface is created when decoding an encrypted PKCS#8 key. +type KDFParameters interface { + // DeriveKey derives a key of size bytes from the given password. + // It uses the salt from the decoded parameters. + DeriveKey(password []byte, size int) (key []byte, err error) +} + +var kdfs = make(map[string]func() KDFParameters) + +// RegisterKDF registers a function that returns a new instance of the given KDF +// parameters. This allows the library to support client-provided KDFs. +func RegisterKDF(oid asn1.ObjectIdentifier, params func() KDFParameters) { + kdfs[oid.String()] = params +} + +// Cipher represents a cipher for encrypting the key material. +type Cipher interface { + // IVSize returns the IV size of the cipher, in bytes. + IVSize() int + // KeySize returns the key size of the cipher, in bytes. + KeySize() int + // Encrypt encrypts the key material. + Encrypt(key, iv, plaintext []byte) ([]byte, error) + // Decrypt decrypts the key material. + Decrypt(key, iv, ciphertext []byte) ([]byte, error) + // OID returns the OID of the cipher specified. + OID() asn1.ObjectIdentifier +} + +var ciphers = make(map[string]func() Cipher) + +// RegisterCipher registers a function that returns a new instance of the given +// cipher. This allows the library to support client-provided ciphers. +func RegisterCipher(oid asn1.ObjectIdentifier, cipher func() Cipher) { + ciphers[oid.String()] = cipher +} + +// Opts contains options for encrypting a PKCS#8 key. +type Opts struct { + Cipher Cipher + KDFOpts KDFOpts +} + +// Unecrypted PKCS8 +var ( + oidPBES2 = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 5, 13} +) + +type encryptedPrivateKeyInfo struct { + EncryptionAlgorithm pkix.AlgorithmIdentifier + EncryptedData []byte +} + +type pbes2Params struct { + KeyDerivationFunc pkix.AlgorithmIdentifier + EncryptionScheme pkix.AlgorithmIdentifier +} + +type privateKeyInfo struct { + Version int + PrivateKeyAlgorithm pkix.AlgorithmIdentifier + PrivateKey []byte +} + +func parseKeyDerivationFunc(keyDerivationFunc pkix.AlgorithmIdentifier) (KDFParameters, error) { + oid := keyDerivationFunc.Algorithm.String() + newParams, ok := kdfs[oid] + if !ok { + return nil, fmt.Errorf("pkcs8: unsupported KDF (OID: %s)", oid) + } + params := newParams() + _, err := asn1.Unmarshal(keyDerivationFunc.Parameters.FullBytes, params) + if err != nil { + return nil, errors.New("pkcs8: invalid KDF parameters") + } + return params, nil +} + +func parseEncryptionScheme(encryptionScheme pkix.AlgorithmIdentifier) (Cipher, []byte, error) { + oid := encryptionScheme.Algorithm.String() + newCipher, ok := ciphers[oid] + if !ok { + return nil, nil, fmt.Errorf("pkcs8: unsupported cipher (OID: %s)", oid) + } + cipher := newCipher() + var iv []byte + if _, err := asn1.Unmarshal(encryptionScheme.Parameters.FullBytes, &iv); err != nil { + return nil, nil, errors.New("pkcs8: invalid cipher parameters") + } + return cipher, iv, nil +} + +// ParsePrivateKey parses a DER-encoded PKCS#8 private key. +// Password can be nil. +// This is equivalent to ParsePKCS8PrivateKey. +func ParsePrivateKey(der []byte, password []byte) (interface{}, KDFParameters, error) { + // No password provided, assume the private key is unencrypted + if len(password) == 0 { + privateKey, err := x509.ParsePKCS8PrivateKey(der) + return privateKey, nil, err + } + + // Use the password provided to decrypt the private key + var privKey encryptedPrivateKeyInfo + if _, err := asn1.Unmarshal(der, &privKey); err != nil { + return nil, nil, errors.New("pkcs8: only PKCS #5 v2.0 supported") + } + + if !privKey.EncryptionAlgorithm.Algorithm.Equal(oidPBES2) { + return nil, nil, errors.New("pkcs8: only PBES2 supported") + } + + var params pbes2Params + if _, err := asn1.Unmarshal(privKey.EncryptionAlgorithm.Parameters.FullBytes, ¶ms); err != nil { + return nil, nil, errors.New("pkcs8: invalid PBES2 parameters") + } + + cipher, iv, err := parseEncryptionScheme(params.EncryptionScheme) + if err != nil { + return nil, nil, err + } + + kdfParams, err := parseKeyDerivationFunc(params.KeyDerivationFunc) + if err != nil { + return nil, nil, err + } + + keySize := cipher.KeySize() + symkey, err := kdfParams.DeriveKey(password, keySize) + if err != nil { + return nil, nil, err + } + + encryptedKey := privKey.EncryptedData + decryptedKey, err := cipher.Decrypt(symkey, iv, encryptedKey) + if err != nil { + return nil, nil, err + } + + key, err := x509.ParsePKCS8PrivateKey(decryptedKey) + if err != nil { + return nil, nil, errors.New("pkcs8: incorrect password") + } + return key, kdfParams, nil +} + +// MarshalPrivateKey encodes a private key into DER-encoded PKCS#8 with the given options. +// Password can be nil. +func MarshalPrivateKey(priv interface{}, password []byte, opts *Opts) ([]byte, error) { + if len(password) == 0 { + return x509.MarshalPKCS8PrivateKey(priv) + } + + if opts == nil { + opts = DefaultOpts + } + + // Convert private key into PKCS8 format + pkey, err := x509.MarshalPKCS8PrivateKey(priv) + if err != nil { + return nil, err + } + + encAlg := opts.Cipher + salt := make([]byte, opts.KDFOpts.GetSaltSize()) + _, err = rand.Read(salt) + if err != nil { + return nil, err + } + iv := make([]byte, encAlg.IVSize()) + _, err = rand.Read(iv) + if err != nil { + return nil, err + } + key, kdfParams, err := opts.KDFOpts.DeriveKey(password, salt, encAlg.KeySize()) + if err != nil { + return nil, err + } + + encryptedKey, err := encAlg.Encrypt(key, iv, pkey) + if err != nil { + return nil, err + } + + marshalledParams, err := asn1.Marshal(kdfParams) + if err != nil { + return nil, err + } + keyDerivationFunc := pkix.AlgorithmIdentifier{ + Algorithm: opts.KDFOpts.OID(), + Parameters: asn1.RawValue{FullBytes: marshalledParams}, + } + marshalledIV, err := asn1.Marshal(iv) + if err != nil { + return nil, err + } + encryptionScheme := pkix.AlgorithmIdentifier{ + Algorithm: encAlg.OID(), + Parameters: asn1.RawValue{FullBytes: marshalledIV}, + } + + encryptionAlgorithmParams := pbes2Params{ + EncryptionScheme: encryptionScheme, + KeyDerivationFunc: keyDerivationFunc, + } + marshalledEncryptionAlgorithmParams, err := asn1.Marshal(encryptionAlgorithmParams) + if err != nil { + return nil, err + } + encryptionAlgorithm := pkix.AlgorithmIdentifier{ + Algorithm: oidPBES2, + Parameters: asn1.RawValue{FullBytes: marshalledEncryptionAlgorithmParams}, + } + + encryptedPkey := encryptedPrivateKeyInfo{ + EncryptionAlgorithm: encryptionAlgorithm, + EncryptedData: encryptedKey, + } + + return asn1.Marshal(encryptedPkey) +} + +// ParsePKCS8PrivateKey parses encrypted/unencrypted private keys in PKCS#8 format. To parse encrypted private keys, a password of []byte type should be provided to the function as the second parameter. +func ParsePKCS8PrivateKey(der []byte, v ...[]byte) (interface{}, error) { + var password []byte + if len(v) > 0 { + password = v[0] + } + privateKey, _, err := ParsePrivateKey(der, password) + return privateKey, err +} + +// ParsePKCS8PrivateKeyRSA parses encrypted/unencrypted private keys in PKCS#8 format. To parse encrypted private keys, a password of []byte type should be provided to the function as the second parameter. +func ParsePKCS8PrivateKeyRSA(der []byte, v ...[]byte) (*rsa.PrivateKey, error) { + key, err := ParsePKCS8PrivateKey(der, v...) + if err != nil { + return nil, err + } + typedKey, ok := key.(*rsa.PrivateKey) + if !ok { + return nil, errors.New("key block is not of type RSA") + } + return typedKey, nil +} + +// ParsePKCS8PrivateKeyECDSA parses encrypted/unencrypted private keys in PKCS#8 format. To parse encrypted private keys, a password of []byte type should be provided to the function as the second parameter. +func ParsePKCS8PrivateKeyECDSA(der []byte, v ...[]byte) (*ecdsa.PrivateKey, error) { + key, err := ParsePKCS8PrivateKey(der, v...) + if err != nil { + return nil, err + } + typedKey, ok := key.(*ecdsa.PrivateKey) + if !ok { + return nil, errors.New("key block is not of type ECDSA") + } + return typedKey, nil +} + +// ConvertPrivateKeyToPKCS8 converts the private key into PKCS#8 format. +// To encrypt the private key, the password of []byte type should be provided as the second parameter. +// +// The only supported key types are RSA and ECDSA (*rsa.PrivateKey or *ecdsa.PrivateKey for priv) +func ConvertPrivateKeyToPKCS8(priv interface{}, v ...[]byte) ([]byte, error) { + var password []byte + if len(v) > 0 { + password = v[0] + } + return MarshalPrivateKey(priv, password, nil) +} diff --git a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go new file mode 100644 index 000000000..b33212203 --- /dev/null +++ b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go @@ -0,0 +1,30 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package pbkdf2 implements the key derivation function PBKDF2 as defined in +// RFC 8018 (PKCS #5 v2.1). +// +// This package is a wrapper for the PBKDF2 implementation in the +// [crypto/pbkdf2] package. It is [frozen] and is not accepting new features. +// +// [frozen]: https://go.dev/wiki/Frozen +package pbkdf2 + +import ( + "crypto/pbkdf2" + "hash" +) + +// Key derives a key from the password, salt and iteration count, returning a +// []byte of length keylen that can be used as cryptographic key. The key is +// derived based on the method described as PBKDF2 with the HMAC variant using +// the supplied hash function. +func Key(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte { + out, err := pbkdf2.Key(h, string(password), salt, iter, keyLen) + if err != nil { + // FIPS 140 enforcement, or an invalid key length. + panic(err) + } + return out +} diff --git a/vendor/golang.org/x/crypto/scrypt/scrypt.go b/vendor/golang.org/x/crypto/scrypt/scrypt.go new file mode 100644 index 000000000..b422b7d7f --- /dev/null +++ b/vendor/golang.org/x/crypto/scrypt/scrypt.go @@ -0,0 +1,215 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package scrypt implements the scrypt key derivation function as defined in +// Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard +// Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf). +package scrypt + +import ( + "crypto/sha256" + "encoding/binary" + "errors" + "math/bits" + + "golang.org/x/crypto/pbkdf2" +) + +const maxInt = int(^uint(0) >> 1) + +// blockCopy copies n numbers from src into dst. +func blockCopy(dst, src []uint32, n int) { + copy(dst, src[:n]) +} + +// blockXOR XORs numbers from dst with n numbers from src. +func blockXOR(dst, src []uint32, n int) { + for i, v := range src[:n] { + dst[i] ^= v + } +} + +// salsaXOR applies Salsa20/8 to the XOR of 16 numbers from tmp and in, +// and puts the result into both tmp and out. +func salsaXOR(tmp *[16]uint32, in, out []uint32) { + w0 := tmp[0] ^ in[0] + w1 := tmp[1] ^ in[1] + w2 := tmp[2] ^ in[2] + w3 := tmp[3] ^ in[3] + w4 := tmp[4] ^ in[4] + w5 := tmp[5] ^ in[5] + w6 := tmp[6] ^ in[6] + w7 := tmp[7] ^ in[7] + w8 := tmp[8] ^ in[8] + w9 := tmp[9] ^ in[9] + w10 := tmp[10] ^ in[10] + w11 := tmp[11] ^ in[11] + w12 := tmp[12] ^ in[12] + w13 := tmp[13] ^ in[13] + w14 := tmp[14] ^ in[14] + w15 := tmp[15] ^ in[15] + + x0, x1, x2, x3, x4, x5, x6, x7, x8 := w0, w1, w2, w3, w4, w5, w6, w7, w8 + x9, x10, x11, x12, x13, x14, x15 := w9, w10, w11, w12, w13, w14, w15 + + for i := 0; i < 8; i += 2 { + x4 ^= bits.RotateLeft32(x0+x12, 7) + x8 ^= bits.RotateLeft32(x4+x0, 9) + x12 ^= bits.RotateLeft32(x8+x4, 13) + x0 ^= bits.RotateLeft32(x12+x8, 18) + + x9 ^= bits.RotateLeft32(x5+x1, 7) + x13 ^= bits.RotateLeft32(x9+x5, 9) + x1 ^= bits.RotateLeft32(x13+x9, 13) + x5 ^= bits.RotateLeft32(x1+x13, 18) + + x14 ^= bits.RotateLeft32(x10+x6, 7) + x2 ^= bits.RotateLeft32(x14+x10, 9) + x6 ^= bits.RotateLeft32(x2+x14, 13) + x10 ^= bits.RotateLeft32(x6+x2, 18) + + x3 ^= bits.RotateLeft32(x15+x11, 7) + x7 ^= bits.RotateLeft32(x3+x15, 9) + x11 ^= bits.RotateLeft32(x7+x3, 13) + x15 ^= bits.RotateLeft32(x11+x7, 18) + + x1 ^= bits.RotateLeft32(x0+x3, 7) + x2 ^= bits.RotateLeft32(x1+x0, 9) + x3 ^= bits.RotateLeft32(x2+x1, 13) + x0 ^= bits.RotateLeft32(x3+x2, 18) + + x6 ^= bits.RotateLeft32(x5+x4, 7) + x7 ^= bits.RotateLeft32(x6+x5, 9) + x4 ^= bits.RotateLeft32(x7+x6, 13) + x5 ^= bits.RotateLeft32(x4+x7, 18) + + x11 ^= bits.RotateLeft32(x10+x9, 7) + x8 ^= bits.RotateLeft32(x11+x10, 9) + x9 ^= bits.RotateLeft32(x8+x11, 13) + x10 ^= bits.RotateLeft32(x9+x8, 18) + + x12 ^= bits.RotateLeft32(x15+x14, 7) + x13 ^= bits.RotateLeft32(x12+x15, 9) + x14 ^= bits.RotateLeft32(x13+x12, 13) + x15 ^= bits.RotateLeft32(x14+x13, 18) + } + x0 += w0 + x1 += w1 + x2 += w2 + x3 += w3 + x4 += w4 + x5 += w5 + x6 += w6 + x7 += w7 + x8 += w8 + x9 += w9 + x10 += w10 + x11 += w11 + x12 += w12 + x13 += w13 + x14 += w14 + x15 += w15 + + out[0], tmp[0] = x0, x0 + out[1], tmp[1] = x1, x1 + out[2], tmp[2] = x2, x2 + out[3], tmp[3] = x3, x3 + out[4], tmp[4] = x4, x4 + out[5], tmp[5] = x5, x5 + out[6], tmp[6] = x6, x6 + out[7], tmp[7] = x7, x7 + out[8], tmp[8] = x8, x8 + out[9], tmp[9] = x9, x9 + out[10], tmp[10] = x10, x10 + out[11], tmp[11] = x11, x11 + out[12], tmp[12] = x12, x12 + out[13], tmp[13] = x13, x13 + out[14], tmp[14] = x14, x14 + out[15], tmp[15] = x15, x15 +} + +func blockMix(tmp *[16]uint32, in, out []uint32, r int) { + blockCopy(tmp[:], in[(2*r-1)*16:], 16) + for i := 0; i < 2*r; i += 2 { + salsaXOR(tmp, in[i*16:], out[i*8:]) + salsaXOR(tmp, in[i*16+16:], out[i*8+r*16:]) + } +} + +func integer(b []uint32, r int) uint64 { + j := (2*r - 1) * 16 + return uint64(b[j]) | uint64(b[j+1])<<32 +} + +func smix(b []byte, r, N int, v, xy []uint32) { + var tmp [16]uint32 + R := 32 * r + x := xy + y := xy[R:] + + j := 0 + for i := 0; i < R; i++ { + x[i] = binary.LittleEndian.Uint32(b[j:]) + j += 4 + } + for i := 0; i < N; i += 2 { + blockCopy(v[i*R:], x, R) + blockMix(&tmp, x, y, r) + + blockCopy(v[(i+1)*R:], y, R) + blockMix(&tmp, y, x, r) + } + for i := 0; i < N; i += 2 { + j := int(integer(x, r) & uint64(N-1)) + blockXOR(x, v[j*R:], R) + blockMix(&tmp, x, y, r) + + j = int(integer(y, r) & uint64(N-1)) + blockXOR(y, v[j*R:], R) + blockMix(&tmp, y, x, r) + } + j = 0 + for _, v := range x[:R] { + binary.LittleEndian.PutUint32(b[j:], v) + j += 4 + } +} + +// Key derives a key from the password, salt, and cost parameters, returning +// a byte slice of length keyLen that can be used as cryptographic key. +// +// N is a CPU/memory cost parameter, which must be a power of two greater than 1. +// r and p must satisfy r * p < 2³⁰. If the parameters do not satisfy the +// limits, the function returns a nil byte slice and an error. +// +// For example, you can get a derived key for e.g. AES-256 (which needs a +// 32-byte key) by doing: +// +// dk, err := scrypt.Key([]byte("some password"), salt, 32768, 8, 1, 32) +// +// The recommended parameters for interactive logins as of 2017 are N=32768, r=8 +// and p=1. The parameters N, r, and p should be increased as memory latency and +// CPU parallelism increases; consider setting N to the highest power of 2 you +// can derive within 100 milliseconds. Remember to get a good random salt. +func Key(password, salt []byte, N, r, p, keyLen int) ([]byte, error) { + if N <= 1 || N&(N-1) != 0 { + return nil, errors.New("scrypt: N must be > 1 and a power of 2") + } + if r <= 0 || p <= 0 { + return nil, errors.New("scrypt: parameters must be > 0") + } + if uint64(r)*uint64(p) >= 1<<30 || r > maxInt/128/p || r > maxInt/256 || N > maxInt/128/r { + return nil, errors.New("scrypt: parameters are too large") + } + + xy := make([]uint32, 64*r) + v := make([]uint32, 32*N*r) + b := pbkdf2.Key(password, salt, 1, p*128*r, sha256.New) + + for i := 0; i < p; i++ { + smix(b[i*128*r:], r, N, v, xy) + } + + return pbkdf2.Key(password, b, 1, keyLen, sha256.New), nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 923632fd0..0ec24b4c6 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -447,6 +447,9 @@ github.com/goccy/go-json/internal/encoder/vm_color_indent github.com/goccy/go-json/internal/encoder/vm_indent github.com/goccy/go-json/internal/errors github.com/goccy/go-json/internal/runtime +# github.com/gofrs/flock v0.10.0 +## explicit; go 1.21.0 +github.com/gofrs/flock # github.com/gogo/protobuf v1.3.2 ## explicit; go 1.15 github.com/gogo/protobuf/gogoproto @@ -607,6 +610,13 @@ github.com/modern-go/reflect2 # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 ## explicit github.com/munnerz/goautoneg +# github.com/oracle/oci-go-sdk/v65 v65.117.1 +## explicit; go 1.24.0 +github.com/oracle/oci-go-sdk/v65/common +github.com/oracle/oci-go-sdk/v65/common/auth +github.com/oracle/oci-go-sdk/v65/common/utils +github.com/oracle/oci-go-sdk/v65/core +github.com/oracle/oci-go-sdk/v65/objectstorage # github.com/pborman/uuid v1.2.1 ## explicit github.com/pborman/uuid @@ -658,6 +668,9 @@ github.com/scaleway/scaleway-sdk-go/namegenerator github.com/scaleway/scaleway-sdk-go/parameter github.com/scaleway/scaleway-sdk-go/scw github.com/scaleway/scaleway-sdk-go/validation +# github.com/sony/gobreaker/v2 v2.4.0 +## explicit; go 1.22.0 +github.com/sony/gobreaker/v2 # github.com/spf13/cobra v1.10.2 ## explicit; go 1.15 github.com/spf13/cobra @@ -726,6 +739,9 @@ github.com/vmware/govmomi/vim25/xml # github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 ## explicit github.com/xiang90/probing +# github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 +## explicit; go 1.17 +github.com/youmark/pkcs8 # go.etcd.io/bbolt v1.3.9 ## explicit; go 1.17 go.etcd.io/bbolt @@ -891,8 +907,10 @@ golang.org/x/crypto/openpgp/elgamal golang.org/x/crypto/openpgp/errors golang.org/x/crypto/openpgp/packet golang.org/x/crypto/openpgp/s2k +golang.org/x/crypto/pbkdf2 golang.org/x/crypto/pkcs12 golang.org/x/crypto/pkcs12/internal/rc2 +golang.org/x/crypto/scrypt golang.org/x/crypto/ssh golang.org/x/crypto/ssh/agent golang.org/x/crypto/ssh/internal/bcrypt_pbkdf